From 254bb4105cad403a9349edade3712a2b0267926e Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 21 Aug 2026 19:15:56 -0400 Subject: [PATCH 01/15] feat(web): rework thinking block to kimi-style inline collapsible with live timer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the streaming-window + right-side thinking panel with the reference kimi presentation: a think-head row (bulb glyph, Thinking/Thinking… title, live elapsed while streaming, settled `· 7s` tail) above an inline collapsible think-body. Clicking the head toggles the body; a block opened while streaming folds itself when the stream ends. Drop the openThinking panel machinery (useDetailPanel state, DetailTarget variant, App wiring). Timers anchor on the enclosing turn/run start (the web wire carries no per-block startedAt); settled blocks show the turn duration. --- apps/pythinker-web/src/App.vue | 12 +- .../src/components/chat/ActivityRun.vue | 4 +- .../src/components/chat/ChatPane.vue | 6 +- .../src/components/chat/ConversationPane.vue | 2 - .../src/components/chat/ThinkingBlock.vue | 255 +++++++++++------- .../src/components/chat/TurnFold.vue | 5 +- .../src/composables/useDetailPanel.ts | 47 +--- .../src/composables/useFilePreview.ts | 2 +- .../src/i18n/locales/en/thinking.ts | 1 + .../src/icons/pythinker/thinking.svg | 3 + apps/pythinker-web/src/lib/icons.ts | 6 +- .../pythinker-web/test/thinking-block.test.ts | 105 ++++++++ 12 files changed, 272 insertions(+), 176 deletions(-) create mode 100644 apps/pythinker-web/src/icons/pythinker/thinking.svg create mode 100644 apps/pythinker-web/test/thinking-block.test.ts diff --git a/apps/pythinker-web/src/App.vue b/apps/pythinker-web/src/App.vue index 2ddc0bb8c..1a6a31919 100644 --- a/apps/pythinker-web/src/App.vue +++ b/apps/pythinker-web/src/App.vue @@ -452,10 +452,6 @@ const { previewMax, previewWidth, previewPanelWidth, - thinkingPanelText, - thinkingVisible, - openThinkingPanel, - closeThinkingPanel, compactionPanelText, compactionPanelVisible, openCompactionPanel, @@ -1139,7 +1135,6 @@ function openPr(url: string): void { @select-model="handleComposerSelectModel($event)" @open-file="openFilePreview($event)" @open-media="openMediaPreview($event)" - @open-thinking="openThinkingPanel($event)" @open-compaction="openCompactionPanel($event)" @open-agent="openAgentPanel($event)" @open-tool-diff="openToolDiff($event)" @@ -1208,12 +1203,7 @@ function openPr(url: string): void { :aria-hidden="!sidePanelVisible" > - (); const { t } = useI18n(); @@ -342,7 +341,8 @@ function isItemStreaming(item: RunItem): boolean { :text="item.thinking" :mobile="mobile" :streaming="isItemStreaming(item)" - @open="emit('openThinking', item.sourceIndex)" + :started-at-ms="startedAtMs ?? undefined" + :duration-ms="settledElapsedMs" /> diff --git a/apps/pythinker-web/src/components/chat/ConversationPane.vue b/apps/pythinker-web/src/components/chat/ConversationPane.vue index ef1c734e8..857767538 100644 --- a/apps/pythinker-web/src/components/chat/ConversationPane.vue +++ b/apps/pythinker-web/src/components/chat/ConversationPane.vue @@ -138,7 +138,6 @@ const emit = defineEmits<{ selectModel: [modelId: string]; openFile: [target: FilePreviewRequest]; openMedia: [media: ToolMedia]; - openThinking: [target: { turnId: string; blockIndex: number }]; openCompaction: [target: { turnId: string }]; openAgent: [toolCallId: string]; openToolDiff: [id: string]; @@ -1506,7 +1505,6 @@ defineExpose({ loadComposerForEdit, focusComposer }); @open-file="emit('openFile', $event)" @open-media="emit('openMedia', $event)" @copy-conversation-copied="handleCopyConversationCopied" - @open-thinking="emit('openThinking', $event)" @open-compaction="emit('openCompaction', $event)" @open-agent="emit('openAgent', $event)" @open-tool-diff="emit('openToolDiff', $event)" diff --git a/apps/pythinker-web/src/components/chat/ThinkingBlock.vue b/apps/pythinker-web/src/components/chat/ThinkingBlock.vue index 378636f53..656ed9cc5 100644 --- a/apps/pythinker-web/src/components/chat/ThinkingBlock.vue +++ b/apps/pythinker-web/src/components/chat/ThinkingBlock.vue @@ -1,85 +1,131 @@ - + @@ -87,66 +133,69 @@ watch( .think { margin: 0; } - -.tc-wrap { - display: grid; - grid-template-rows: 1fr 0fr; - transition: grid-template-rows var(--duration-slow) var(--ease-out); +.think-head { + display: flex; + align-items: center; + gap: var(--space-1); + width: 100%; + padding: var(--space-1) 0; + border: none; + border-radius: var(--radius-sm); + background: transparent; + color: var(--color-text-faint); + font: var(--text-sm)/1 var(--font-ui); + text-align: left; cursor: pointer; + user-select: none; + transition: color var(--duration-base) var(--ease-out); } -.tc-wrap.is-collapsed { - grid-template-rows: 0fr 1fr; +.think-head:hover { color: var(--color-text); } +.think-head.is-static, +.think-head.is-static:hover { cursor: default; color: var(--color-text-faint); } +.think-head:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--color-accent-soft); } +.think-bulb { flex: none; } +.think-title { font-weight: var(--weight-medium); } +.think-time { color: var(--color-text-faint); font-weight: 400; flex: none; } +.think-car { + color: var(--color-text-faint); + flex: none; + transition: transform var(--duration-base) var(--ease-out); } -.tc-anim, -.prev-anim { - /* min-height: 0 is required for the 0fr/1fr grid collapse to actually shrink - below the tracks' content. Without it, an inner scroll container (`.tc`, - overflow-y: auto) contributes its content as the automatic minimum, so the - row keeps its streaming height and never collapses to the short teaser — - most visible on iOS Safari. */ +.think.open .think-car { transform: rotate(90deg); } +.think-body { + display: grid; + grid-template-rows: minmax(0, 0fr); overflow: hidden; - min-height: 0; -} - -/* Hover hints clickability (opens the full text in the side panel) */ -.tc-wrap.is-collapsed:hover .prev { - color: var(--color-text); -} -.tc-wrap:not(.is-collapsed):hover .tc { - color: var(--color-text-muted); + transition: grid-template-rows var(--duration-base) var(--ease-out); } - -.prev { - color: var(--color-text-faint); +.think-body.instant { transition: none; } +.think-body.open { grid-template-rows: minmax(0, 1fr); } +.think-body-inner { min-height: 0; overflow: hidden; } +.think-text { font: var(--text-base)/var(--leading-relaxed) var(--font-ui); - font-weight: 425; - white-space: pre-wrap; - word-break: break-word; - display: block; -} - -.tc { - font: var(--text-base)/var(--leading-relaxed) var(--font-ui); - font-weight: 425; + font-weight: 400; color: var(--color-text-muted); white-space: pre-wrap; word-break: break-word; margin: 0; - max-height: calc(var(--leading-relaxed) * 1em * 5); - overflow-y: auto; + padding: var(--space-1) 0 var(--space-2); } /* ---- Mobile tweaks ---- */ -.mob { - margin: 0; -} -.mob .tc { +.mob .think-text { color: var(--color-text-faint); line-height: var(--leading-normal); - max-height: calc(var(--leading-normal) * 1em * 5); } -.mob .prev { - color: var(--color-text-faint); - line-height: var(--leading-normal); + +/* Streaming title breathes like the run header glyph. */ +.think.streaming .think-title { + animation: think-breathe 1.6s var(--ease-in-out) infinite; +} +@keyframes think-breathe { + 0%, to { opacity: 1; } + 50% { opacity: 0.45; } +} +@media (prefers-reduced-motion: reduce) { + .think.streaming .think-title { animation: none; } } diff --git a/apps/pythinker-web/src/components/chat/TurnFold.vue b/apps/pythinker-web/src/components/chat/TurnFold.vue index a020b8347..2dabd3b0d 100644 --- a/apps/pythinker-web/src/components/chat/TurnFold.vue +++ b/apps/pythinker-web/src/components/chat/TurnFold.vue @@ -57,7 +57,6 @@ const emit = defineEmits<{ openFile: [target: FilePreviewRequest]; openToolDiff: [id: string]; openAgent: [toolCallId: string]; - openThinking: [blockIndex: number]; }>(); const { t } = useI18n(); @@ -211,7 +210,8 @@ function runStreaming(block: Extract
(null); - - const thinkingPanelText = computed(() => { - const target = thinkingTarget.value; - if (!target) return null; - const turn = client.turns.value.find((tn) => tn.id === target.turnId); - const blk = turn?.blocks?.[target.blockIndex]; - return blk?.kind === 'thinking' ? blk.thinking : null; - }); - - const thinkingVisible = computed(() => thinkingPanelText.value !== null); - - function openThinkingPanel(target: { turnId: string; blockIndex: number }): void { - const current = thinkingTarget.value; - if (current && current.turnId === target.turnId && current.blockIndex === target.blockIndex) { - thinkingTarget.value = null; - if (detailTarget.value === 'thinking') detailTarget.value = null; - return; - } - detailTarget.value = 'thinking'; - thinkingTarget.value = target; - } - - function closeThinkingPanel(): void { - thinkingTarget.value = null; - if (detailTarget.value === 'thinking') detailTarget.value = null; - } - // --------------------------------------------------------------------------- // Compaction summary panel // --------------------------------------------------------------------------- @@ -363,7 +332,6 @@ export function useDetailPanel({ const sidePanelVisible = computed( () => detailTarget.value !== null && - (detailTarget.value !== 'thinking' || thinkingVisible.value) && (detailTarget.value !== 'compaction' || compactionPanelVisible.value) && (detailTarget.value !== 'agent' || agentPanelVisible.value) && (detailTarget.value !== 'toolDiff' || toolDiffVisible.value) && @@ -377,7 +345,7 @@ export function useDetailPanel({ // --------------------------------------------------------------------------- // Per-session panel snapshot (in-memory only). Switching sessions still closes // the right-side detail layer, but for the transient panels whose content is - // re-derived from the session's turns (thinking / compaction / agent / + // re-derived from the session's turns (compaction / agent / // toolDiff) or already stored per session (btw), we remember which one was // open and restore it when the user switches back. // @@ -386,7 +354,6 @@ export function useDetailPanel({ // re-fetched on demand, so restoring them across sessions would be ambiguous. // --------------------------------------------------------------------------- type PanelSnapshot = - | { kind: 'thinking'; turnId: string; blockIndex: number } | { kind: 'compaction'; turnId: string } | { kind: 'agent'; sessionId: string; subagentId: string } | { kind: 'toolDiff'; toolId: string } @@ -396,8 +363,6 @@ export function useDetailPanel({ function captureSnapshot(): PanelSnapshot | null { switch (detailTarget.value) { - case 'thinking': - return thinkingTarget.value ? { kind: 'thinking', ...thinkingTarget.value } : null; case 'compaction': return compactionTarget.value ? { kind: 'compaction', ...compactionTarget.value } : null; case 'agent': @@ -414,10 +379,6 @@ export function useDetailPanel({ function restoreSnapshot(snap: PanelSnapshot | undefined): void { if (!snap) return; switch (snap.kind) { - case 'thinking': - thinkingTarget.value = { turnId: snap.turnId, blockIndex: snap.blockIndex }; - detailTarget.value = 'thinking'; - break; case 'compaction': compactionTarget.value = { turnId: snap.turnId }; detailTarget.value = 'compaction'; @@ -445,7 +406,6 @@ export function useDetailPanel({ // Escape closes whichever transient right-side detail panel is open. function closeOpenSidePanel(): boolean { - if (detailTarget.value === 'thinking' && thinkingVisible.value) { closeThinkingPanel(); return true; } if (detailTarget.value === 'compaction' && compactionPanelVisible.value) { closeCompactionPanel(); return true; } if (detailTarget.value === 'agent' && agentPanelVisible.value) { closeAgentPanel(); return true; } if (detailTarget.value === 'toolDiff' && toolDiffVisible.value) { closeToolDiff(); return true; } @@ -465,7 +425,6 @@ export function useDetailPanel({ } // Close everything for the incoming session (unchanged behavior). closeFilePreview(); - closeThinkingPanel(); closeCompactionPanel(); closeAgentPanel(); closeToolDiff(); @@ -484,10 +443,6 @@ export function useDetailPanel({ previewMax, previewWidth, previewPanelWidth, - thinkingPanelText, - thinkingVisible, - openThinkingPanel, - closeThinkingPanel, compactionPanelText, compactionPanelVisible, openCompactionPanel, diff --git a/apps/pythinker-web/src/composables/useFilePreview.ts b/apps/pythinker-web/src/composables/useFilePreview.ts index eaf400517..a687c4957 100644 --- a/apps/pythinker-web/src/composables/useFilePreview.ts +++ b/apps/pythinker-web/src/composables/useFilePreview.ts @@ -11,7 +11,7 @@ import type { usePythinkerWebClient } from './usePythinkerWebClient'; type PythinkerWebClient = ReturnType; /** Which occupant currently owns the shared right-side detail layer. */ -export type DetailTarget = 'file' | 'diff' | 'thinking' | 'compaction' | 'agent' | 'toolDiff' | 'turnDiff' | 'btw'; +export type DetailTarget = 'file' | 'diff' | 'compaction' | 'agent' | 'toolDiff' | 'turnDiff' | 'btw'; /** Whether a url can feed a native
@@ -2600,7 +2616,8 @@ function selectModel(modelId: string): void { } -.wm-x { +.wm-x, +.workflow-x { position: relative; width: var(--wm-x-size); height: var(--wm-x-size); @@ -2608,7 +2625,8 @@ function selectModel(modelId: string): void { } -.wm-x:before { +.wm-x:before, +.workflow-x:before { content: ""; position: absolute; inset: calc(-1 * var(--wm-x-ring)) @@ -2616,7 +2634,8 @@ function selectModel(modelId: string): void { @media(hover:none) { - .wm-x:before { + .wm-x:before, + .workflow-x:before { inset: calc((var(--wm-x-size) - var(--touch-target-min)) / 2) } } diff --git a/apps/pythinker-web/src/components/chat/ConversationPane.vue b/apps/pythinker-web/src/components/chat/ConversationPane.vue index 857767538..67f0f208b 100644 --- a/apps/pythinker-web/src/components/chat/ConversationPane.vue +++ b/apps/pythinker-web/src/components/chat/ConversationPane.vue @@ -130,6 +130,7 @@ const emit = defineEmits<{ setPermission: [mode: PermissionMode]; setThinking: [level: ThinkingLevel]; togglePlan: []; + toggleWorkflow: []; toggleGoal: []; createGoal: [objective: string]; controlGoal: [action: 'pause' | 'resume' | 'cancel']; @@ -1469,6 +1470,7 @@ defineExpose({ loadComposerForEdit, focusComposer }); @set-permission="emit('setPermission', $event)" @set-thinking="emit('setThinking', $event)" @toggle-plan="emit('togglePlan')" + @toggle-workflow="emit('toggleWorkflow')" @toggle-goal="emit('toggleGoal')" @open-btw="emit('command', '/btw')" @create-goal="emit('createGoal', $event)" @@ -1572,6 +1574,7 @@ defineExpose({ loadComposerForEdit, focusComposer }); @set-permission="emit('setPermission', $event)" @set-thinking="emit('setThinking', $event)" @toggle-plan="emit('togglePlan')" + @toggle-workflow="emit('toggleWorkflow')" @toggle-goal="emit('toggleGoal')" @open-btw="emit('command', '/btw')" @create-goal="emit('createGoal', $event)" diff --git a/apps/pythinker-web/src/components/mobile/MobileSettingsSheet.vue b/apps/pythinker-web/src/components/mobile/MobileSettingsSheet.vue index c8f65b16c..a98ee95ea 100644 --- a/apps/pythinker-web/src/components/mobile/MobileSettingsSheet.vue +++ b/apps/pythinker-web/src/components/mobile/MobileSettingsSheet.vue @@ -69,6 +69,7 @@ const emit = defineEmits<{ pickModel: []; setThinking: [level: ThinkingLevel]; togglePlan: []; + toggleWorkflow: []; toggleGoal: []; controlGoal: [action: 'pause' | 'resume' | 'cancel']; setPermission: [mode: PermissionMode]; @@ -358,17 +359,15 @@ watch( - -
+ +
+ + + +
+ `};const u=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=c.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const w=u.exec(k.src.slice(k.pos));if(!w)return!1;const v=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(v))return!1;const y=k.src.slice(k.pos+w[0].length);if(y.startsWith("](")||y.startsWith("(")||d(y))return!1;if(!m){const b=w[1],S=k.push("reference","span",0);S.content=b,S.markup=w[0],S.raw=w[0]}return k.pos+=w[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const w=String(h[m].content??"");return`${w}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function Lue({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function LI({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:Lue({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Fue={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Oue(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function FI(e){const t=Oue(e);return Fue[t]??t}function Rue(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>FI(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Pue(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function Due(e){return Pue(e)?.join("\0")??""}function Bue(e,t){return`${Due(e)}\0\0${Rue(t)?.join("\0")??""}`}function Cc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function SA(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var zue=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=CA();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=CA();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=Uue(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),v=jue(this.source.slice(this.visible.length),w,this.segmenter);v.text&&(this.visible+=v.text,this.charBudget=Math.max(0,this.charBudget-v.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Cc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Cc(o,1e3,1)),this.normalizedTargetLatencyMs=Cc(s,900,1),this.normalizedCatchUpLatencyMs=Cc(i,350,1),this.normalizedCatchUpThreshold=SA(r,600),this.normalizedStartDelayMs=SA(a,80),this.maxCommitFps=Math.trunc(Cc(l,30,1)),this.maxCharsPerCommit=Math.trunc(Cc(u,80,1)),this.flushOnFinish=c,this.segmenter=Hue(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Wue(e={},t){const n=new zue(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Hue(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function jue(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function CA(){return typeof performance<"u"?performance.now():Date.now()}function Uue(e,t,n){return Math.min(n,Math.max(t,e))}var Vue=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const Nb=Symbol.for("markstream-vue:node-lifecycle");function yBe(){}const qw=new Map;let OI="material";const qc=new Map,AA=new Map;let Lb=null;function que(e){qw.set(e.id,e)}function Kue(e){const t=qw.get(OI);if(!t)return;const n=t.core[e];if(n)return n;const o=qc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!qc.has(t.id)&&Zue(t)}function Gue(){var e,t;return(t=(e=qw.get(OI))==null?void 0:e.fallback)!=null?t:""}function Zue(e){return Vue(this,null,function*(){var t,n,o;if(qc.has(e.id))return(t=qc.get(e.id))!=null?t:null;let s=AA.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(qc.set(e.id,i),Lb?.(),i)).catch(()=>(qc.set(e.id,null),null)),AA.set(e.id,s)),s})}const MA='',EA='',Yue={id:"material",core:{"":EA,plain:'',text:EA,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:MA,csharp:MA,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Ts(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Jue=Co(0);Lb=()=>{Jue.value++},que(Yue);const Xue={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function S0(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[r]=i.split(":");return r.toLowerCase()})(e);return(t=Xue[n])!=null?t:n}function kBe(e){const t=S0(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function bBe(e){return Kue(S0(e))||Gue()}const TA={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var C0=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});let ei=null,Mu=!1,Eu=null,A0=Gw;function ph(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Kw(){try{const e=globalThis;return ph(e?.katex)}catch{return null}}function Gw(){return C0(null,null,function*(){const e=Kw();if(e)return e;const t=yield Ts(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Ts(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return ph(t)})}function RI(e){const t=Promise.resolve(e).then(n=>{var o;return Eu===t&&n?(ei=(o=ph(n))!=null?o:n,ei):null}).catch(()=>null).finally(()=>{Eu===t&&(Eu=null)});return Eu=t,Mu=!0,t}function Que(e){A0=e,ei=null,Mu=!1,Eu=null}function ece(e){Que(Gw)}function PI(){return typeof A0=="function"}function wBe(){var e;const t=A0;if(!t||t===Gw)return null;if(ei)return ei;const n=Kw();if(n)return ei=n,ei;if(Mu)return null;try{const o=t();return o?typeof o?.then=="function"?(RI(o),null):(ei=(e=ph(o))!=null?e:o,ei):null}catch{return null}}function DI(){return C0(this,null,function*(){var e;const t=Kw();if(t)return ei=t,ei;if(ei)return ei;if(Eu)return Eu;if(Mu)return null;const n=A0;if(!n)return Mu=!0,null;try{const o=n();if(typeof o?.then=="function")return RI(o);if(o)return ei=(e=ph(o))!=null?e:o,Mu=!0,ei}catch{}return Mu=!0,null})}function BI(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let ka=null,fa=null;const Ss=new Map,Tl=new Map;let qp=5;const Pu=new Set;function fp(){if(Ss.size{const{id:n,html:o,error:s}=t.data,i=Ss.get(n);if(i)if(Ss.delete(n),clearTimeout(i.timeoutId),i.cleanup(),fp(),s)i.aborted||i.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(Tl.set(a,o),Tl.size>200){const u=Tl.keys().next().value;Tl.delete(u)}}i.aborted||i.resolve(o)}},ka.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Ss.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Ss.clear(),zI()}}function nce(){var e;for(const t of Ss.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Ss.clear(),zI(),ka&&((e=ka.terminate)==null||e.call(ka)),ka=null,fa=null}function oce(e,t=!0,n=2e3,o){return C0(this,null,function*(){performance.now();const s=BI(e);if(!PI()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(fa)return Promise.reject(fa);const i=`${t?"d":"i"}:${s}`,r=Tl.get(i);if(r)return fp(),Promise.resolve(r);const l=ka||(fa=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),fa.name="WorkerInitError",fa.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(fa);if(Ss.size>=qp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Ss.size,a.max=qp,Promise.reject(a)}return new Promise((a,u)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void u(m)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Ss.get(c);if(!m)return;Ss.delete(c),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),fp()},n);d=()=>{const m=Ss.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",u(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=u;Ss.set(c,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const k=Ss.get(c);Ss.delete(c),clearTimeout(f),k?.cleanup(),k?.reject(m),fp()}})})}function xBe(e,t=!0,n){const o=`${t?"d":"i"}:${BI(e)}`;if(Tl.set(o,n),Tl.size>200){const s=Tl.keys().next().value;Tl.delete(s)}}const sce="WORKER_BUSY";function ice(e=2e3,t){return Ss.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Pu.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},Pu.add(l),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",o(u)},e),queueMicrotask(()=>fp()),t&&(r=()=>{if(i)return;i=!0,a();const u=new Error("Aborted");u.name="AbortError",o(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const xf={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function _Be(e){return C0(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!PI()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:xf.timeout,u=(i=o.waitTimeout)!=null?i:xf.waitTimeout,c=(r=o.backoffMs)!=null?r:xf.backoffMs,d=(l=o.maxRetries)!=null?l:xf.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):xf.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield oce(t,n,a,p)}catch(m){if(m?.code!==sce||h>=f)throw m;if(h++,yield ice(u,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}c>0&&(yield new Promise(k=>globalThis.setTimeout(k,c*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function rce(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function f1(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=rce(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function p1(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function WI(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function h1(e,t=360,n=500){return WI(e,t,n)}function m1(e,t=360,n=500){return WI(e,t,n)}var lce=Object.defineProperty,ace=Object.defineProperties,uce=Object.getOwnPropertyDescriptors,IA=Object.getOwnPropertySymbols,cce=Object.prototype.hasOwnProperty,dce=Object.prototype.propertyIsEnumerable,$A=(e,t,n)=>t in e?lce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HI=(e,t)=>{for(var n in t||(t={}))cce.call(t,n)&&$A(e,n,t[n]);if(IA)for(var n of IA(t))dce.call(t,n)&&$A(e,n,t[n]);return e},NA=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const g1=()=>Ts(()=>import("./mermaid.core-Dza7SVX6.js").then(e=>e.bn),[]);let pl=null,Gc=g1,jf=null,Fb=!1,Ob=!1,Uf=0;function fce(e){Gc=e,Uf++,pl=null,jf=null,Fb=!1,Ob=!1}function pce(e){fce(g1)}function LA(){return typeof Gc=="function"}function FA(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=HI({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},ace(n,uce(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function OA(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=HI({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function SBe(){return NA(this,null,function*(){if(pl)return pl;const e=(function(){try{const o=globalThis;return FA(o?.mermaid)}catch{return null}})();if(e)return pl=e,OA(pl),pl;const t=Gc,n=Uf;return t?t===g1&&Fb?null:jf||(jf=NA(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===g1)return n===Uf&&t===Gc&&(Fb=!0,(function(i){Ob||(Ob=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Uf&&t===Gc&&(jf=null)}return n!==Uf||t!==Gc?null:o?(pl=FA(o),OA(pl),pl):null}),jf):null})}let gi=null,pa=null;const kr=new Map,mu=new Map;function ag(e){for(const t of kr.values())t.reject(e);kr.clear(),mu.clear()}let RA=5,PA=!1;const hce="WORKER_BUSY",DA="MERMAID_DISABLED";function mce(e){if(gi&&gi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",ag(n)}gi=e,pa=null;const t=e;gi.onmessage=n=>{if(gi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=kr.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},gi.onerror=n=>{var o,s;if(gi===t)if(kr.size!==0){try{PA?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}ag(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},gi.onmessageerror=n=>{var o,s;if(gi===t)if(kr.size!==0){try{PA?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}ag(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function gce(){var e;if(gi)try{ag(new Error("Worker cleared")),(e=gi.terminate)==null||e.call(gi)}catch{}gi=null,pa=null}function jI(e,t,n,o){if(!LA()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=DA,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=mu.get(s);return i||(i=(function(r,l,a=1400){if(!LA()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=DA,Promise.reject(c)}if(pa)return Promise.reject(pa);const u=gi||(pa=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),pa.name="WorkerInitError",pa.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(pa);if(kr.size>=RA){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=hce,c.inFlight=kr.size,c.max=RA,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),kr.delete(f))},k={resolve:w=>{m(),c(w)},reject:w=>{m(),d(w)}};kr.set(f,k);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return kr.delete(f),void d(w)}p=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const v=kr.get(f);v&&v.reject(w)},a)})})(e,t,n),mu.set(s,i),i.then(()=>{mu.get(s)===i&&mu.delete(s)},()=>{mu.get(s)===i&&mu.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,u)=>{let c=()=>{};const d=()=>l.removeEventListener("abort",c);c=()=>{d();const f=new Error("Aborted");f.name="AbortError",u(f)},l.addEventListener("abort",c,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),u(f)})})})(i,o)}function CBe(e,t,n=1400,o){return jI("canParse",{code:e,theme:t},n,o)}function ABe(e,t,n=1400,o){return jI("findPrefix",{code:e,theme:t},n,o)}var vce=Object.defineProperty,yce=Object.defineProperties,kce=Object.getOwnPropertyDescriptors,BA=Object.getOwnPropertySymbols,bce=Object.prototype.hasOwnProperty,wce=Object.prototype.propertyIsEnumerable,zA=(e,t,n)=>t in e?vce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kt=(e,t)=>{for(var n in t||(t={}))bce.call(t,n)&&zA(e,n,t[n]);if(BA)for(var n of BA(t))wce.call(t,n)&&zA(e,n,t[n]);return e},fn=(e,t)=>yce(e,kce(t)),go=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const xce="__global__",By="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",Rb=(()=>{const e=globalThis;if(e[By])return e[By];const t={scopedCustomComponents:{},revision:Co(0)};return e[By]=t,t})(),WA=Rb.revision,_ce=Symbol("markstreamCustomComponents"),Sce=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function hh(e){return Sce.has(String(e).trim().toLowerCase())}function Cce(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function zy(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([ur(n),ur(Cce(n))]))!s||hh(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function os(e){const t=wn(_ce,null);return O(()=>{var n;return WA.value,(function(o,s={}){return WA.value,kt(kt(kt({},zy(Rb.scopedCustomComponents[xce]||{})),zy(s)),zy((function(i){return i&&Rb.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const Ace=["aria-label"],Mce={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},Ece={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},Gn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Di=Gn(Ze({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),C("svg",Ece,[...n[1]||(n[1]=[_("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),_("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),C("svg",Mce,[...n[0]||(n[0]=[_("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,Ace))}),[["__scopeId","data-v-be21ab83"]]);Di.install=e=>{e.component(Di.__name,Di)};const Tce={class:"emoji-node"},_i=Gn(Ze({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("span",Tce,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);_i.install=e=>{e.component(_i.__name,_i)};const Ice=["id"],$ce=["title"],Bi=Gn(Ze({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),C("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[_("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,$ce)],8,Ice))}}),[["__scopeId","data-v-c1463a29"]]);Bi.install=e=>{e.component(Bi.__name,Bi)};const UI=(()=>{try{return!1}catch{}return!1})();function Wy(e){UI&&console.warn(e)}function HA(e,t="safe",n){return Vw(e,t,n)}function VI(e){return due(e)}function Hy(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Zw(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=lg((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Hy(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Hy(r.value)]):Object.entries(s).map(([r,l])=>[r,Hy(l)]):null,t,n);var s;if(!o)return;const i=VI(dp(o));return Object.keys(i).length>0?i:void 0}function jA(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,r])=>r===""?` ${i}`:` ${i}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function _f(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function jy(e,t,n,o,s,i,r=!1){const l=(function(d,f){return EI(d,f)})(e,o);if(uh.has(e.toLowerCase())||!l&&SI(e,i))return null;if(!l&&Uw(e,i))return r?[jA(e,t,!0)]:[jA(e,t),...n,``];const a=Vw(t,i,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=o[e]||o[e.toLowerCase()],f=VI(a);return cn(d,fn(kt({},f),{key:c}),n.length>0?n:void 0)}return cn(e,fn(kt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function qI(e,t){return hue(e,t)}function v1(e,t,n="safe"){if(!e)return[];try{return(function(i,r,l="safe"){let a=0;const u=[],c=[];for(const d of i)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=jy(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);_f(u.length>0?u[u.length-1].children:c,f)}else if(d.type==="tag_open")u.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=u.length-1;h>=0;h--)if(u[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;u.length>p;){const h=u.pop(),m=jy(h.tagName,h.attrs||{},h.children,r,h.autoKey,l);u.length>0?_f(u[u.length-1].children,m):_f(c,m),h.tagName.toLowerCase()!==f&&u.length>p&&Wy(`Auto-closing unclosed tag: <${h.tagName}>`)}else Wy(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=jy(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?_f(u[u.length-1].children,f):_f(c,f),Wy(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(TI(e),t,n)}catch(s){return o=s,UI&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const Nce=["innerHTML"],zi=Gn(Ze({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=wn("markstreamHtmlPolicy",void 0),o=O(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=os(()=>t.customId),i=Ze({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=O(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=v1(l,s.value,o.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!qI(l,s.value))return{mode:"html",content:fd(l,o.value)};const a=v1(l,s.value,o.value);return a===null?{mode:"html",content:fd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(g(),C("span",{key:0,class:ze(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[K(x(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(g(),C("span",{key:1,class:ze(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(g(),C("span",{key:2,class:ze(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,Nce))}}),[["__scopeId","data-v-d17f12b0"]]);zi.install=e=>{e.component(zi.__name,zi)};const Lce={class:"inline-code"},Fce={key:0},js=Gn(Ze({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=sh(),o=wn("markstreamFade",void 0),s=wn("markstreamTextStreamState",void 0),i=wn("markstreamStreamVersion",void 0),r=O(()=>{const v=n.fade;return v===""||v===!0||v==="true"||v!==!1&&v!=="false"&&void 0}),l=O(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=O(()=>{var v;return String((v=t.node.code)!=null?v:"")}),u=O(()=>!l.value),c=O(()=>{var v;const y=(v=n["index-key"])!=null?v:n.indexKey;return y==null||y===""?"":String(y)}),d=V(t.node.code),f=V(""),p=V(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ye([()=>t.node.code,c,l],([v])=>{const y=String(v??""),b=c.value,S=LI({nextContent:y,persistedContent:b?s?.get(b):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=S.settledContent,f.value=S.streamedDelta,S.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const I=i.value;h=Ye(()=>i.value,T=>{T!==I&&k()},{flush:"sync"})})()):f.value||m(),b&&s?.set(b,y)},{immediate:!0}),Ld(m);const w=O(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(v,y)=>(g(),C("code",Lce,[u.value?(g(),C(Te,{key:0},[qe(N(a.value),1)],64)):(g(),C(Te,{key:1},[d.value?(g(),C("span",Fce,N(d.value),1)):oe("",!0),f.value?(g(),C("span",{key:1,class:ze(["inline-code-stream-delta",[w.value]]),onAnimationend:k},N(f.value),35)):oe("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);js.install=e=>{e.component(js.__name,js)};const Pb=V(!1),UA=V(""),VA=V("top"),pp=V(null),hp=V(null),Db=V(null),Bb=V(null),qA=V(null);let ug=null,cg=null,zb=0;function KI(){ug&&(clearTimeout(ug),ug=null),cg&&(clearTimeout(cg),cg=null)}let _m=!1,Sm=null,KA=!1;function Oce(e,t,n="top",o=!1,s,i){if(!e)return;const r=++zb;KI();const l=()=>go(null,null,function*(){var a,u;if(yield(function(){return go(this,null,function*(){if(!_m&&!KA&&typeof document<"u"){Sm!=null||(Sm=go(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Ts(()=>import("./vue.runtime.esm-bundler-C95Vw23-.js"),[]),Ts(()=>import("./Tooltip-CQOv8A5U.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),c({setup:()=>()=>{var h;return d(f,{visible:Pb.value,"anchor-el":pp.value,content:UA.value,placement:VA.value,id:hp.value,originX:Db.value,originY:Bb.value,isDark:(h=qA.value)!=null?h:void 0})}}).mount(p),_m=!0}));try{yield Sm}catch(c){_m=!1,Sm=null,KA=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),_m&&r===zb){hp.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,pp.value=e,UA.value=t,VA.value=n,Db.value=(a=s?.x)!=null?a:null,Bb.value=(u=s?.y)!=null?u:null,qA.value=typeof i=="boolean"?i:null,Pb.value=!0;try{e.setAttribute("aria-describedby",hp.value)}catch{}}});o?l():ug=setTimeout(l,80)}function Rce(e=!1){zb+=1,KI();const t=()=>{if(pp.value&&hp.value)try{pp.value.removeAttribute("aria-describedby")}catch{}Pb.value=!1,pp.value=null,hp.value=null,Db.value=null,Bb.value=null};e?t():cg=setTimeout(t,120)}const Pce={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},Dce=Symbol("markstreamI18nFallback");function GI(e,t){var n;return(n=t?.[e])!=null?n:Pce[e]}const Wb=(e,t)=>{var n;return(n=GI(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function GA(e,t){return{t(n){const o=GI(n,t);if(e.te&&o!=null&&!e.te(n))return Wb(n,t);const s=e.t(n);return s===n&&o!=null?Wb(n,t):s}}}function Bce(){const e=(function(){var n,o,s;try{const i=es(),r=Dce,l=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=l?.[r])!=null?o:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=es(),i=s?.proxy,r=i?.$t;if(typeof r=="function"){const u=i?.$te;return{t:r.bind(i),te:typeof u=="function"?u.bind(i):void 0}}const l=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=l?.$t;if(typeof a=="function"){const u=l?.$te;return{t:a.bind(l),te:typeof u=="function"?u.bind(l):void 0}}}catch{}return null})();if(t)return GA(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return GA({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>Wb(n,e)}}const ZI=Symbol("ViewportPriority"),YI=Symbol("ViewportPriorityOptions"),JI=Symbol("OffscreenHeavyNodeDeferral"),zce=O(()=>!1),ju="400px";function Yw(){return wn(YI,void 0)}function Jw(){return wn(JI,zce)}function Wce(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?V(t):t,r=s?(n=window.requestIdleCallback)!=null?n:T=>window.setTimeout(()=>T({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(o=window.cancelIdleCallback)!=null?o:T=>window.clearTimeout(T):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let p=null,h=null;function m(T){if(!T)return"viewport";let $=a.get(T);return $||($=u++,a.set(T,$)),String($)}function k(){if(p!=null){try{l?.(p)}catch{}p=null}}function w(T){if(T){const $=c.get(T);if($&&!$.targets.size){try{$.io.disconnect()}catch{}c.delete(T)}}d.size||f.size||k()}function v(T){const $=d.get(T);if(!$)return;const F=c.get($.bucketKey);if(!$.visible.value){$.visible.value=!0;try{$.resolve()}catch{}}try{F?.io.unobserve(T)}catch{}F?.targets.delete(T),d.delete(T),f.delete(T),w($.bucketKey)}function y(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&p==null&&f.size&&(p=r(()=>{p=null;const T=f.values().next().value;T&&(f.delete(T),v(T),f.size&&y())},{timeout:1200}))}function b(T,$){if(!s||typeof IntersectionObserver>"u")return null;const F=(function(z,A){var L,W,j;return{root:(L=e?.(z??null))!=null?L:null,rootMargin:(W=A?.rootMargin)!=null?W:ju,threshold:(j=A?.threshold)!=null?j:0}})(T,$),R=[m((P=F).root),P.rootMargin,P.threshold].join("\0");var P;const M=c.get(R);if(M)return{key:R,bucket:M};let D;try{D=new IntersectionObserver(z=>{for(const A of z)(A.isIntersecting||A.intersectionRatio>0)&&v(A.target)},{root:F.root,rootMargin:F.rootMargin,threshold:F.threshold})}catch{return null}const B={io:D,targets:new Map};return c.set(R,B),{key:R,bucket:B}}function S(){if(s&&i.value)for(const[T,$]of Array.from(d.entries())){const F=b(T,$.opts);if(!F){v(T);continue}if(F.key===$.bucketKey)continue;const R=$.bucketKey,P=c.get(R);try{P?.io.unobserve(T)}catch{}P?.targets.delete(T),$.bucketKey=F.key,F.bucket.targets.set(T,$),F.bucket.io.observe(T),w(R)}}Ye(i,T=>{if(!T){for(const $ of Array.from(d.keys()))v($);k()}},{flush:"sync"});const I=(T,$)=>{const F=V(!1);let R,P=!1;const M=new Promise(A=>{R=()=>{P||(P=!0,A())}}),D=()=>{const A=d.get(T);if(!A)return f.delete(T),void w();const L=c.get(A.bucketKey);try{L?.io.unobserve(T)}catch{}L?.targets.delete(T),d.delete(T),f.delete(T),w(A.bucketKey)};if(!s||!i.value)return F.value=!0,R(),{isVisible:F,whenVisible:M,destroy:D};const B=b(T,$);if(!B)return F.value=!0,R(),{isVisible:F,whenVisible:M,destroy:D};const z={resolve:R,visible:F,bucketKey:B.key,opts:$};return d.set(T,z),B.bucket.targets.set(T,z),B.bucket.io.observe(T),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,S()})),$?.allowIdle!==!1&&(f.add(T),y()),{isVisible:F,whenVisible:M,destroy:D}};return I.refresh=S,Vn(ZI,I),I}function Xw(){var e,t;const n=wn(ZI,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),c(h.bucketKey),i.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=V(!1);let k,w=!1;const v=new Promise(S=>{k=()=>{w||(w=!0,S())}}),y=()=>{const S=o.get(p);if(!S)return i.delete(p),void(i.size||u());const I=s.get(S.bucketKey);try{I?.io.unobserve(p)}catch{}o.delete(p),I?.targets.delete(p),i.delete(p),c(S.bucketKey),i.size||u()},b=(S=>{var I,T;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const $=(D=>{var B,z;return[(B=D?.rootMargin)!=null?B:ju,(z=D?.threshold)!=null?z:0].join("\0")})(S),F=s.get($);if(F)return{key:$,bucket:F};const R=(I=S?.rootMargin)!=null?I:ju;let P;try{P=new IntersectionObserver(D=>{for(const B of D)(B.isIntersecting||B.intersectionRatio>0)&&d(B.target)},{root:null,rootMargin:R,threshold:(T=S?.threshold)!=null?T:0})}catch{return null}const M={io:P,targets:new Set};return s.set($,M),{key:$,bucket:M}})(h);return b?(o.set(p,{resolve:k,visible:m,bucketKey:b.key}),b.bucket.targets.add(p),b.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:v,destroy:y}):(m.value=!0,k(),{isVisible:m,whenVisible:v,destroy:y})}}function Hce(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const jce=["data-markstream-viewport-pending"],Uce=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],Vce={key:1,class:"image-placeholder"},qce={key:1,class:"image-node__raw-text"},Kce={key:2,class:"image-shimmer-overlay"},Gce={key:1,class:"image-node__raw-text"},Zce={key:3,class:"image-error"},Sa=Gn(Ze({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,r=t,l=V(!1),a=V(!1),u=V(""),c=V("primary"),d=V(null),f=sh(),p=wn(Nb,null),h=Xw(),m=Yw(),k=Jw(),w=O(()=>y3(i.node.src)),v=O(()=>y3(i.fallbackSrc)),y=(s=(o=(n=es())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),b=typeof window<"u"&&y?.getAttribute("src")===(w.value||v.value),S=V(typeof window>"u"||b||!k.value),I=Co(null);let T="",$=null;const F=O(()=>u.value),R=O(()=>!i.lazy),P=O(()=>typeof window<"u"&&k.value&&!b),M=O(()=>!P.value||S.value),D=O(()=>M.value?F.value:""),B=O(()=>{var xe,We;return(We=(xe=m?.value.heavyBlockMargin)!=null?xe:m?.value.rootMargin)!=null?We:ju}),z=O(()=>!i.node.loading&&c.value!=="failed"&&u.value.length>0),A=O(()=>c.value==="failed"),L=O(()=>(!R.value||P.value&&!S.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),W=O(()=>Hce(i,f));function j(xe=W.value){xe&&d.value&&p?.reportHeight(xe,d.value.offsetHeight)}function re(xe=W.value){xe&&xt(()=>{j(xe)})}function Q(){$&&(clearTimeout($),$=null)}function Y(){const xe=W.value;xe&&T!==xe&&(T&&p?.markSettled(T),Q(),T=xe,p?.markPending(xe),typeof window<"u"&&($=window.setTimeout(()=>{T===xe&&(re(xe),G())},8e3)))}function G(){return go(this,null,function*(){const xe=T;xe&&(Q(),T="",yield xt(),j(xe),p?.markSettled(xe))})}function X(){if(c.value==="primary"&&v.value&&v.value!==u.value)return c.value="fallback",u.value=v.value,l.value=!1,a.value=!1,void re();c.value="failed",a.value=!0,r("error",u.value),re()}function te(){l.value=!0,a.value=!1,r("load",F.value),re()}function q(xe){xe.preventDefault(),l.value&&!a.value&&r("click",[xe,F.value])}const{t:me}=Bce();return Ye([w,v,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||w.value?(u.value=w.value,void(c.value="primary")):v.value?(u.value=v.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ye([d,P],([xe,We],he,ee)=>{var ne;if((ne=I.value)==null||ne.destroy(),I.value=null,!We||S.value)return void(S.value=!0);if(!xe)return void(S.value=!1);let H=!0;const Z=h(xe,{rootMargin:B.value,allowIdle:!1});I.value=Z,S.value=Z.isVisible.value,Z.whenVisible.then(()=>{H&&I.value===Z&&(S.value=!0)}),ee(()=>{H=!1,Z.destroy(),I.value===Z&&(I.value=null)})},{immediate:!0}),Ye([z,l,a,F,()=>i.lazy,M],([xe,We,he,ee,ne,H])=>xe&&ee&&!he&&H?We?(G(),void re()):ne?(Y(),void re()):void(We||he||Y()):(G(),void re()),{flush:"post",immediate:!0}),po(()=>{var xe;(xe=I.value)==null||xe.destroy(),I.value=null,(function(){const We=T;We&&(Q(),T="",p?.markSettled(We))})()}),(xe,We)=>{var he,ee,ne,H,Z;return g(),C("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":P.value&&!S.value?"true":void 0},[z.value?(g(),C("img",{key:0,src:D.value||void 0,alt:String((ee=(he=i.node.alt)!=null?he:i.node.title)!=null?ee:""),title:String((H=(ne=i.node.title)!=null?ne:i.node.alt)!=null?H:""),class:ze(["image-node__img",{"is-loading":!R.value&&!l.value,"is-loaded":R.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:R.value?"high":void 0,decoding:R.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Z=i.node.alt)!=null?Z:x(me)("image.preview"),onError:X,onLoad:te,onClick:q},null,42,Uce)):oe("",!0),e.node.loading&&!a.value?(g(),C("span",Vce,[i.usePlaceholder?An(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:F.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[We[0]||(We[0]=_("span",{class:"image-shimmer"},null,-1))],!0):(g(),C("span",qce,N(e.node.raw),1))])):oe("",!0),L.value&&!e.node.loading?(g(),C("span",Kce,[i.usePlaceholder?An(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:F.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[We[1]||(We[1]=_("span",{class:"image-shimmer"},null,-1))],!0):(g(),C("span",Gce,N(e.node.raw),1))])):oe("",!0),A.value?(g(),C("span",Zce,[An(xe.$slots,"error",{node:i.node,displaySrc:F.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[We[2]||(We[2]=_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[_("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),_("span",null,N(x(me)("image.loadError")),1)],!0)])):oe("",!0)],8,jce)}}}),[["__scopeId","data-v-046e82ac"]]);Sa.install=e=>{e.component(Sa.__name,Sa)};const Yce={key:2},el=Ze({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=os(()=>t.customId),o=wn("markstreamHtmlPolicy",void 0),s=wn("markstreamNestedRendererProps",void 0),i=O(()=>{var h;return(h=o?.value)!=null?h:"safe"}),r=O(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return fn(kt({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),l=or({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1}),a=O(()=>t.components[String(t.node.type)]),u=O(()=>!!(a.value&&n.value[t.node.type]&&!hh(String(t.node.type)))),c=O(()=>u.value?Zw(t.node,i.value):void 0),d=O(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=O(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=O(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&u.value?(g(),pe(Ko(a.value),Dn({key:0},c.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:ve(()=>[d.value?(g(),pe(x(l),Dn({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),pe(x(l),Dn({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),pe(Ko(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),C("span",Yce,N(p.value),1)):oe("",!0)}}),ZA=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Jce(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return fn(kt(kt({},ZA),n),{enabled:(t=n.enabled)==null||t})}return kt({},ZA)}function Qw(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function XI(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function YA(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function Xce(e){var t;return e.diff===!0||YA(e.language)||YA(XI(String((t=e.raw)!=null?t:"")))}function Qce(e,t,n){const o=(function(s){const i=XI(s);if(!i)return"";const r=i.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const u=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(u&&/[./\\-]/.test(u))return u}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const ede=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],tde={key:0,translate:"no",class:"markstream-pre__diff-code"},nde={class:"markstream-pre__diff-pane-content"},ode={class:"markstream-pre__diff-number","aria-hidden":"true"},sde={class:"markstream-pre__diff-content"},ide={class:"markstream-pre__diff-content-inner"},rde={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},lde=["textContent"],ade=["textContent"],vi=Ze({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(te,q){const me=String(te??"");return q?me:me.replace(/\r\n$|\n$|\r$/,"")}const o=O(()=>{var te,q,me;const xe=String((q=(te=t.node)==null?void 0:te.language)!=null?q:"");return String((me=String(xe).split(/\s+/g)[0])!=null?me:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=O(()=>`language-${o.value}`),i=O(()=>{var te;return t.loading===!0||((te=t.node)==null?void 0:te.loading)===!0}),r=O(()=>{var te;return n((te=t.node)==null?void 0:te.code,i.value)});let l="",a=1;const u=O(()=>(function(te){let q=0,me=1;te.startsWith(l)&&(q=l.length,me=a,q>0&&te[q-1]==="\r"&&te[q]===` +`&&q++);for(let xe=q;xer.value.split(/\r\n|\n|\r/));let d=0,f="";const p=O(()=>{const te=u.value;te{var te;return t.showLineNumbers===!0&&((te=t.node)==null?void 0:te.diff)===!0}),m=O(()=>h.value&&t.diffInline===!0),k=O(()=>{const te=Number(t.reservedHeightPx);if(!Number.isFinite(te)||te<=0)return;const q=`${Math.ceil(te)}px`;return i.value?{maxHeight:q,overflow:"auto"}:{height:q,minHeight:q,maxHeight:q,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function v(te){return String(te??"").trim().length===0}function y(te,q="context",me={}){const xe=v(te);return{code:te,kind:xe&&q!=="hunk"&&q!=="spacer"&&!me.preserveBlankKind?"context":q,empty:xe}}function b(te){const q=n(te,i.value);return q?q.split(/\r\n|\n|\r/):[]}function S(te,q){return!v(te[q])||qw.some(me=>q.startsWith(me)))}function F(te,q){return q||!te.startsWith(" ")||te.startsWith(" ")?te:` ${te}`}function R(te,q){const me=te.length,xe=q.length,We=[];let he=0;for(;he=he&&H>=he&&te[ne]===q[H];)ee.unshift({originalIndex:ne,modifiedIndex:H}),ne--,H--;const Z=ne-he+1,ye=H-he+1;if(Z<=0||ye<=0||i.value||(Z+1)*(ye+1)>15e5)return We.concat(ee);const fe=ye+1,de=new Uint32Array((Z+1)*(ye+1));for(let _e=Z-1;_e>=0;_e--)for(let ce=ye-1;ce>=0;ce--){const Se=_e*fe+ce;if(te[he+_e]===q[he+ce])de[Se]=de[(_e+1)*fe+ce+1]+1;else{const ie=de[(_e+1)*fe+ce],we=de[_e*fe+ce+1];de[Se]=ie>=we?ie:we}}const J=[];let ae=0,be=0;for(;ae=de[ae*fe+be+1]?ae++:be++;return We.concat(J,ee)}function P(te){var q;const me=(function(){var H,Z;const ye=t.diffHideUnchangedRegions;if(ye==null||ye===!1)return null;const fe=ye===!0?{}:ye;return fe.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((H=fe.contextLineCount)!=null?H:2)),minimumLineCount:Math.max(1,Math.floor((Z=fe.minimumLineCount)!=null?Z:4))}})();if(!me||te.length<1||te.length>2||te.length===2&&te[0].lines.length!==te[1].lines.length)return te;const xe=te[0].lines,We=(q=te[1])==null?void 0:q.lines,he=H=>xe[H].kind==="context"&&(We===void 0||We[H].kind==="context"&&xe[H].code===We[H].code),ee=[];let ne=0;for(;ne=me.minimumLineCount){const ye=H+(H===0?0:me.contextLineCount),fe=Z-(Z===xe.length?0:me.contextLineCount);fe-ye>=me.minimumLineCount&&ee.push({start:ye,end:fe})}ne===H&&ne++}return ee.length?te.map((H,Z)=>{const ye=[];let fe=0;for(const de of ee)ye.push(...H.lines.slice(fe,de.start)),ye.push({code:Z===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${H.key}-collapsed-${de.start}-${de.end}`,number:""}),fe=de.end;return ye.push(...H.lines.slice(fe)),fn(kt({},H),{lines:ye})}):te}const M=O(()=>{var te,q,me,xe;if(!h.value)return[];const We=(function(Z){const ye=Z.some(de=>I(de)),fe=Z.some(de=>T(de));return ye&&fe||(function(){var de,J,ae,be;if(o.value==="diff")return!0;const _e=(be=(ae=String((J=(de=t.node)==null?void 0:de.raw)!=null?J:"").split(/\r?\n/,1)[0])==null?void 0:ae.trim())!=null?be:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(_e)})()&&(ye||fe)})(c.value),he=(function(){var Z,ye;return((Z=t.node)==null?void 0:Z.originalCode)!=null||((ye=t.node)==null?void 0:ye.updatedCode)!=null})();if(m.value){const Z=he?(function(ye,fe){const de=b(ye),J=b(fe),ae=R(de,J);if(ae.length>0){const we=[];let Re=0,at=0;for(const ft of ae){for(;Re=_e&&Se>=_e&&de[ce]===J[Se];)ie.unshift(fn(kt({},y(J[Se])),{key:`inline-suffix-${Se}`,number:Se+1})),ce--,Se--;for(let we=_e;we<=ce;we++)be.push(fn(kt({},y(de[we],"removed",{preserveBlankKind:S(de,we)})),{key:`inline-removed-source-${we}`,number:we+1}));for(let we=_e;we<=Se;we++)be.push(fn(kt({},y(J[we],"added",{preserveBlankKind:S(J,we)})),{key:`inline-added-source-${we}`,number:we+1}));return be.concat(ie)})((te=t.node)==null?void 0:te.originalCode,(q=t.node)==null?void 0:q.updatedCode):(function(ye){const fe=[];let de=1,J=1;const ae=$(ye);for(const[be,_e]of ye.entries())if(_e.startsWith("@@")){const ce=_e.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);ce&&(de=Number(ce[1]),J=Number(ce[2])),fe.push(fn(kt({},y(_e,"hunk")),{key:`inline-hunk-${be}`,number:""}))}else if(I(_e))fe.push(fn(kt({},y(F(_e.slice(1),ae),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${be}`,number:de++}));else if(T(_e))fe.push(fn(kt({},y(F(_e.slice(1),ae),"added",{preserveBlankKind:!0})),{key:`inline-added-${be}`,number:J++}));else{const ce=ae&&_e.startsWith(" ")?_e.slice(1):_e;fe.push(fn(kt({},y(ce)),{key:`inline-context-${be}`,number:J})),de++,J++}return fe})(c.value);return P([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Z}])}if(!We&&he)return(function(Z,ye){const fe=b(Z),de=b(ye),J=R(fe,de),ae=[],be=[];let _e=0,ce=0,Se=0;const ie=(we,Re)=>{const at=Math.max(we-_e,Re-ce);for(let ft=0;ftfn(kt({},Z),{key:`original-${ye}`,number:ye+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ne.map((Z,ye)=>fn(kt({},Z),{key:`modified-${ye}`,number:ye+1}))}])}),D=O(()=>M.value.some(te=>te.lines.some(q=>q.kind==="collapsed"))),B=O(()=>{const te=o.value;return te?`Code block: ${te}`:"Code block"}),z=V(null),A=V([]);let L=null,W=!1,j=null;function re(te){const q=Number.parseFloat(String(te??""));return Number.isFinite(q)&&q>0?q:0}function Q(te,q){var me;if(!te)return q;if(te.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const xe=te.querySelector(".markstream-pre__diff-content"),We=xe?.getBoundingClientRect(),he=(me=We?.height)!=null?me:0;return Math.max(q,Math.ceil(he))}function Y(){W||typeof window>"u"||(L!=null&&window.cancelAnimationFrame(L),L=window.requestAnimationFrame(()=>{L=null,W||(function(){var te,q;L=null;const me=z.value;if(!me||!h.value||m.value||!me.classList.contains("is-wrap"))return void(A.value.length&&(A.value=[]));const xe=(function(ye){const fe=window.getComputedStyle(ye),de=re(fe.getPropertyValue("--markstream-pre-diff-line-height"));if(de>0)return de;const J=re(fe.lineHeight);return J>0?J:18})(me),We=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),he=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ee=Math.max(We.length,he.length),ne=[];for(let ye=0;ye{const de=Z[fe];return de&&Math.abs(ye.rowHeight-de.rowHeight)<=.5&&Math.abs(ye.originalHeight-de.originalHeight)<=.5&&Math.abs(ye.modifiedHeight-de.modifiedHeight)<=.5})||(A.value=ne)})()}))}function G(te){j?.disconnect(),j=null,te&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(j=new ResizeObserver(()=>{Y()}),j.observe(te))}function X(te,q){const me=A.value[te];if(!me)return;const xe=q==="original"?me.originalHeight:me.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(me.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(xe)}px`}}return Ye(z,te=>{G(te),xt(()=>Y())},{flush:"post"}),Ye([h,m,M],()=>{G(z.value),xt(()=>Y())},{flush:"post",immediate:!0}),po(()=>{W=!0,L!=null&&(window.cancelAnimationFrame(L),L=null),j?.disconnect(),j=null}),(te,q)=>(g(),C("pre",{ref_key:"preRef",ref:z,style:jt(k.value),class:ze([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":D.value}]),"aria-busy":i.value,"aria-label":B.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),C("code",tde,[(g(!0),C(Te,null,st(M.value,me=>(g(),C("span",{key:me.key,class:ze(["markstream-pre__diff-pane",me.className])},[_("span",nde,[(g(!0),C(Te,null,st(me.lines,(xe,We)=>(g(),C("span",{key:xe.key,class:ze(["markstream-pre__diff-line",[`markstream-pre__diff-line--${xe.kind}`,{"markstream-pre__diff-line--empty":xe.empty}]]),style:jt(X(We,me.key))},[q[0]||(q[0]=_("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),_("span",ode,N(xe.number),1),_("span",sde,[_("span",ide,N(xe.code),1)])],6))),128))])],2))),128))])):(g(),C(Te,{key:1},[t.showLineNumbers?(g(),C("span",rde,[_("span",{class:"markstream-pre__line-numbers-text",textContent:N(p.value)},null,8,lde)])):oe("",!0),_("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,ade)],64))],14,ede))}});vi.install=e=>{e.component(vi.__name,vi)};const ude={key:0},Ro=Gn(Ze({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=sh(),o=wn("markstreamFade",void 0),s=wn("markstreamTextStreamState",void 0),i=wn("markstreamStreamVersion",void 0),r=O(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=O(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=O(()=>{var k;const w=(k=n["index-key"])!=null?k:n.indexKey;return w==null||w===""?"":String(w)}),u=V(t.node.content),c=V(""),d=V(0);let f;function p(){f?.(),f=void 0}function h(){p(),c.value&&(u.value=u.value+c.value,c.value="")}Ye([()=>t.node.content,a,l],([k])=>{const w=String(k??""),v=a.value,y=LI({nextContent:w,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=y.settledContent,c.value=y.streamedDelta,y.appended?(d.value+=1,(function(){if(!c.value||f||!i)return;const b=i.value;f=Ye(()=>i.value,S=>{S!==b&&h()},{flush:"sync"})})()):c.value||p(),v&&s?.set(v,w)},{immediate:!0}),Ld(p);const m=O(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,w)=>(g(),C("span",{class:ze([[e.node.center?"text-node-center":""],"text-node"])},[u.value?(g(),C("span",ude,N(u.value),1)):oe("",!0),c.value?(g(),C("span",{key:1,class:ze(["text-node-stream-delta",[m.value]]),onAnimationend:h},N(c.value),35)):oe("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Vf(e,t,n){return Ze({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=Xw(),u=Yw(),c=Jw(),d=typeof window<"u"&&((l=(r=es())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=V(typeof window>"u"||d||!c.value),p=Co(null);let h=null;function m(k){const w=k&&"$el"in k?k.$el:k;p.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Ye([p,c],([k,w],v,y)=>{if(h?.destroy(),h=null,!w||f.value)return void(f.value=!0);if(!k)return;let b=!0;const S=a(k,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});h=S,f.value=S.isVisible.value,S.whenVisible.then(()=>{b&&h===S&&(f.value=!0)}),y(()=>{b=!1,S.destroy(),h===S&&(h=null)})},{immediate:!0}),po(()=>{h?.destroy(),h=null}),()=>cn(f.value?t:n,fn(kt({},s),{ref:m}),i)}})}Ro.install=e=>{e.component(Ro.__name,Ro)};const y1=Ze({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,r,l,a,u;const c=S0(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=TA[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):TA[""]),f=Xce(n.node),p=Qce(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),h=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:Qw(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,w=k==="dark"||k!=="light"&&n.isDark===!0,v=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,y=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:v===12?18:Math.max(12,Math.round(1.5*v)),b=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,S=f?0:8,I=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:S,T=typeof((u=h?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:S,$=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",F=kt(kt({fontSize:`${v}px`,lineHeight:`${y}px`,tabSize:b,paddingTop:`${I}px`,paddingBottom:`${T}px`,"--markstream-pre-line-number-top":`${I}px`},f?{"--markstream-pre-diff-line-height":`${y}px`}:{}),$?{"--markstream-code-font-family":$}:{}),R=()=>cn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[cn("svg",{class:"action-icon"})]),P=n.isShowPreview!==!1&&(c==="html"||c==="svg"),M=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||P&&n.showPreviewButton!==!1,D=z=>{if(z!=null)return typeof z=="number"?`${z}px`:String(z)},B=kt(kt(kt({"--markstream-code-layout-character-width":"1ch"},D(n.minWidth)?{minWidth:D(n.minWidth)}:{}),D(n.maxWidth)?{maxWidth:D(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return cn("div",fn(kt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":w,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[B,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:cn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[cn("div",{class:"code-header-main"},[cn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),cn("div",{class:"code-header-copy"},[cn("div",{class:"code-header-title"},p.title),p.caption?cn("div",{class:"code-header-caption"},p.caption):null])]),cn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?cn("div",{class:"code-diff-stats","aria-hidden":"true"},[cn("span",{class:"code-diff-stat removed"},"-0"),cn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:R(),n.showCollapseButton===!1?null:R(),M?cn("div",{class:"relative"},[R()]):null])]),cn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[cn(vi,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?Jce(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:F,"data-markstream-code-loading":"1"})]),cn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[cn("div",{class:"loading-skeleton"},[cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line short"})])]),cn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Uy=Vf("ViewportDeferredCodeBlockNode",or({loader:()=>go(null,null,function*(){try{return(yield Ts(()=>import("./CodeBlockNode-CuG5i4rb.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),vi}}),loadingComponent:y1,delay:0,suspensible:!1}),y1),$r=or(()=>go(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return cn(Ro,fn(kt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield DI(),(yield Ts(()=>import("./index7-60leHAn4.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return cn(Ro,fn(kt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),QI=or(()=>go(null,null,function*(){try{return yield DI(),(yield Ts(()=>import("./index6-DW8kHBOa.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return cn(Ro,fn(kt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),ni=Gn(Ze({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),C("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},N(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);ni.install=e=>{e.component(ni.__name,ni)};const cde={class:"superscript-node"},Si=Gn(Ze({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,footnote_reference:Bi,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,emoji:_i,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("sup",cde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"superscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Si.install=e=>{e.component(Si.__name,Si)};const dde={class:"subscript-node"},Ci=Gn(Ze({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,footnote_reference:Bi,strikethrough:si,highlight:Wi,insert:Ai,superscript:Si,emoji:_i,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("sub",dde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"subscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Ci.install=e=>{e.component(Ci.__name,Ci)};const fde={class:"strong-node"},oi=Gn(Ze({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,emphasis:ri,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("strong",fde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"strong"}-${l}`,components:o.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);oi.install=e=>{e.component(oi.__name,oi)};const pde={class:"strikethrough-node"},si=Gn(Ze({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("del",pde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"strikethrough"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);si.install=e=>{e.component(si.__name,si)};const hde=["href","title","aria-label","aria-hidden","target","rel"],mde=["aria-hidden"],gde={class:"link-text-wrapper relative inline-flex"},vde={class:"leading-[normal] link-text"},ii=Gn(Ze({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=wn("markstreamShowTooltips",void 0),o=O(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=O(()=>{var w,v,y,b,S;const I=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",T=(w=t.animationOpacity)!=null?w:.35,$=Math.max(.12,Math.min(.5*T,T)),F={"--underline-height":`${(v=t.underlineHeight)!=null?v:2}px`,"--underline-bottom":I,"--underline-opacity":String(T),"--underline-rest-opacity":String($),"--underline-duration":`${(y=t.animationDuration)!=null?y:1.6}s`,"--underline-timing":(b=t.animationTiming)!=null?b:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(S=t.animationIteration)!=null?S:"infinite"};return t.color&&(F["--link-color"]=t.color),F}),i=os(()=>t.customId),r=O(()=>kt({text:Ro,strong:oi,strikethrough:si,emphasis:ri,image:Sa,html_inline:zi,inline_code:js},i.value)),l=sh(),a=O(()=>{var w,v;const y=(w=t.node)==null?void 0:w.attrs;if(!y||typeof y!="object")return{};const b={};if(Array.isArray(y))for(const S of y)Array.isArray(S)&&S[0]&&(b[String(S[0])]=String((v=S[1])!=null?v:""));else for(const[S,I]of Object.entries(y))S&&I!=null&&I!==!1&&(b[S]=I===!0?"":String(I));return HA(b,"safe","a")}),u=O(()=>kt(kt({},l),a.value)),c=O(()=>{var w,v;return HA({href:String((v=(w=t.node)==null?void 0:w.href)!=null?v:"")},"safe","a").href}),d=O(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(fse(c.value)?"_blank":void 0)}),f=O(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),p=O(()=>{if(!c.value)return;const w=u.value.rel,v=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),y=new Set(Array.from(v).filter(b=>b.toLowerCase()!=="opener"));return f.value&&(y.add("noopener"),y.add("noreferrer")),y.size>0?Array.from(y).join(" "):void 0}),h=O(()=>{const w=kt({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function m(){o.value&&Rce()}const k=O(()=>{var w,v;const y=(w=t.node)==null?void 0:w.title;return typeof y=="string"&&y.trim().length>0?y:String((v=c.value)!=null?v:"")});return(w,v)=>{var y,b;return e.node.loading?(g(),C("span",Dn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},x(l),{style:s.value}),[_("span",gde,[_("span",vde,[K(x(Ro),{class:"leading-[normal] link-text",node:{type:"text",content:String((y=e.node.text)!=null?y:""),raw:String((b=e.node.text)!=null?b:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),v[1]||(v[1]=_("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,mde)):(g(),C("a",Dn({key:0,class:"link-node",href:c.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:v[0]||(v[0]=S=>(function(I){var T,$,F,R;if(!o.value)return;const P=I,M=P?.clientX!=null&&P?.clientY!=null?{x:P.clientX,y:P.clientY}:void 0,D=((T=t.node)==null?void 0:T.title)||(($=c.value)!=null&&$.includes("xn--")&&((R=(F=t.node)==null?void 0:F.text)!=null&&R.includes("://"))?t.node.text:c.value)||"";Oce(I.currentTarget,D,"top",!1,M)})(S)),onMouseleave:m}),[(g(!0),C(Te,null,st(e.node.children,(S,I)=>(g(),pe(x(el),{key:`${e.indexKey||"emphasis"}-${I}`,components:r.value,node:S,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${I}`},null,8,["components","node","custom-id","index-key"]))),128))],16,hde))}}}),[["__scopeId","data-v-367e6ca4"]]);ii.install=e=>{e.component(ii.__name,ii)};const yde={class:"insert-node"},Ai=Gn(Ze({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,strikethrough:si,highlight:Wi,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("ins",yde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"insert"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Ai.install=e=>{e.component(Ai.__name,Ai)};const kde={class:"highlight-node"},Wi=Gn(Ze({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,strikethrough:si,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("mark",kde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"highlight"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);Wi.install=e=>{e.component(Wi.__name,Wi)};const bde={class:"emphasis-node"},ri=Gn(Ze({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("em",bde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"emphasis"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);ri.install=e=>{e.component(ri.__name,ri)};const wde={class:"hard-break"},Ca=Gn(Ze({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("br",wde))}),[["__scopeId","data-v-50c58f70"]]);Ca.install=e=>{e.component(Ca.__name,Ca)};const Kp=Ze({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=Et({checkbox:Di,checkbox_input:Di,emoji:_i,emphasis:ri,hardbreak:Ca,highlight:Wi,inline_code:js,insert:Ai,link:ii,reference:ni,strikethrough:si,strong:oi,subscript:Ci,superscript:Si,text:Ro}),o=os(()=>t.customId),s=O(()=>{const i=o.value;return Object.keys(i).length>0?kt(kt({},n),i):n});return(i,r)=>(g(!0),C(Te,null,st(e.nodes,(l,a)=>(g(),pe(x(el),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function Hb(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(Hb)}function k1(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(Hb))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(Hb)?s:null}function Uu(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const xde=["cite"],_de={key:0,dir:"auto",class:"paragraph-node"},Sde=["custom-id"],dg=Gn(Ze({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=os(()=>t.customId),o=O(()=>!!n.value.paragraph),s=O(()=>!!n.value.text),i=O(()=>k1(t.node.children,!o.value)),r=O(()=>t.fade!==!1||s.value?null:Uu(i.value));return Vn("markstreamShowTooltips",O(()=>t.showTooltips)),Vn("markstreamFade",O(()=>t.fade)),(l,a)=>(g(),C("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),C("p",_de,[r.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,Sde)):(g(),pe(x(Kp),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),pe(x(Mi),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=u=>l.$emit("copy",u))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,xde))}}),[["__scopeId","data-v-abfecebc"]]);dg.install=e=>{e.component(dg.__name,dg)};const Cde={class:"definition-list"},Ade={class:"definition-term"},Mde={class:"definition-desc"},fg=Gn(Ze({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),C("dl",Cde,[(g(!0),C(Te,null,st(t.node.items,(s,i)=>(g(),C(Te,{key:i},[_("dt",Ade,[K(x(Mi),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),_("dd",Mde,[K(x(Mi),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);fg.install=e=>{e.component(fg.__name,fg)};const Ede=["href","title"],mp=Gn(Ze({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(i);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),C("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Ede))}}),[["__scopeId","data-v-e1eb37b6"]]);mp.install=e=>{e.component(mp.__name,mp)};const Tde=["id"],Ide={class:"flex-1"},pg=Ze({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),C("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[_("div",Ide,[K(x(Mi),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Tde))}});pg.install=e=>{e.component(pg.__name,pg)};const $de=["custom-id"],jb=Gn(Ze({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=wn("markstreamFade",void 0),s=O(()=>o?.value!==!1||n.value.text?null:Uu(t.node.children)),i=O(()=>kt({text:Ro,inline_code:js,link:ii,image:Sa,strong:oi,emphasis:ri,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,checkbox:Di,checkbox_input:Di,footnote_reference:Bi,hardbreak:Ca,math_inline:$r,reference:ni},n.value));return(r,l)=>(g(),pe(Ko(`h${e.node.level}`),Dn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ve(()=>[s.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,$de)):(g(!0),C(Te,{key:1},st(e.node.children,(a,u)=>(g(),pe(x(el),{key:u,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${u}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),M0=jb;M0.install=e=>{e.component(jb.__name,jb)};const Nde={key:0,dir:"auto",class:"paragraph-node"},Lde=["custom-id"],Fde={dir:"auto",class:"paragraph-node"},Ode=["custom-id"],pd=Gn(Ze({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=O(()=>{var p;return(p=t.node)!=null?p:t.item}),o=os(()=>t.customId),s=O(()=>!!o.value.paragraph),i=O(()=>!!o.value.text),r=O(()=>{var p;return k1((p=n.value)==null?void 0:p.children,!s.value)}),l=O(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(v=>v?.type==="list"))return null;const w=k1([m]);return w?{paragraphChildren:w,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const u=O(()=>a()?Uu(r.value):null),c=O(()=>{var p;return a()?Uu((p=l.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=O(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return Vn("markstreamShowTooltips",O(()=>t.showTooltips)),Vn("markstreamFade",O(()=>t.fade)),(p,h)=>{var m,k;return g(),C("li",Dn({class:"list-item",dir:"auto"},f.value),[r.value?(g(),C("p",Nde,[u.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,Lde)):(g(),pe(x(Kp),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(g(),C(Te,{key:1},[_("p",Fde,[c.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,Ode)):(g(),pe(x(Kp),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),C(Te,null,st(l.value.nestedLists,(w,v)=>(g(),pe(x(Mi),{key:v,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${v}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=y=>p.$emit("copy",y))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),pe(x(Mi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=w=>p.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pd.install=e=>{e.component(pd.__name,pd)};const hd=Gn(Ze({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=os(()=>e.customId),n=O(()=>t.value.list_item||pd);return(o,s)=>(g(),pe(Ko(e.node.ordered?"ol":"ul"),{class:ze(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ve(()=>[(g(!0),C(Te,null,st(e.node.items,(i,r)=>{var l;return g(),pe(Ko(n.value),Dn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hd.install=e=>{e.component(hd.__name,hd)};const Rde={key:2,class:"html-block-node__raw"},Pde=["innerHTML"],Dde={key:1,class:"html-block-node__placeholder"},gp=Gn(Ze({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=wn("markstreamHtmlPolicy",void 0),o=wn("markstreamNestedRendererProps",void 0),s=O(()=>{var M,D;return(D=(M=t.htmlPolicy)!=null?M:n?.value)!=null?D:"safe"}),i=O(()=>{var M,D;const B=(M=o?.value)!=null?M:{};return fn(kt({},B),{customId:(D=t.customId)!=null?D:B.customId,htmlPolicy:s.value})}),r=or({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1}),l=O(()=>{const M=lg(t.node.attrs,s.value);if(!M)return;const D=dp(M);return Object.keys(D).length>0?D:void 0}),a=O(()=>{const M=String(t.node.tag||"").trim(),D=lg(t.node.attrs,s.value,M);if(!D)return;const B=dp(D);return Object.keys(B).length>0?B:void 0}),u=os(()=>t.customId),c=Ze({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),p=V(t.node.content),h=O(()=>Array.isArray(t.node.children)?t.node.children:[]),m=O(()=>String(t.node.tag||"div")),k=O(()=>{var M;if(m.value.trim().toLowerCase()!=="details"||(M=t.node.attrs)!=null&&M.some(([B])=>String(B).toLowerCase()==="open"))return null;const D=h.value[0];return D?.type==="html_block"&&String(D.tag||"").toLowerCase()==="summary"?D:null}),w=O(()=>{var M;return Uu((M=k.value)==null?void 0:M.children)}),v=O(()=>{const M=k.value;if(!M)return;const D=lg(M.attrs,s.value,"summary");if(!D)return;const B=dp(D);return Object.keys(B).length>0?B:void 0}),y=O(()=>w.value==null?h.value:h.value.slice(1)),b=O(()=>{const M=m.value.trim().toLowerCase();return w9.has(M)||Uw(M,s.value)}),S=O(()=>h.value.length>0&&!!t.node.tag&&!b.value),I=O(()=>{var M,D,B;if(S.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(M=p.value)!=null?M:""};const z=(D=p.value)!=null?D:t.node.content;if(!z)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fd(z,s.value)};if(t.node.loading){const L=v1(z,u.value,s.value);return L===null?{mode:"text",content:(B=t.node.raw)!=null?B:z}:{mode:"dynamic",nodes:L}}if(!qI(z,u.value))return{mode:"html",content:fd(z,s.value)};const A=v1(z,u.value,s.value);return A===null?{mode:"html",content:fd(z,s.value)}:{mode:"dynamic",nodes:A}}),T=Xw(),$=Yw(),F=Jw(),R=Co(null),P=!!t.node.loading;return typeof window<"u"?(Ye([()=>d.value,()=>$?.value.heavyBlockMargin,()=>$?.value.rootMargin],([M],D,B)=>{var z,A,L,W;if((A=(z=R.value)==null?void 0:z.destroy)==null||A.call(z),R.value=null,!P)return f.value=!0,void(p.value=t.node.content);if(!M)return void(f.value=!1);let j=!0;const re=(W=(L=$?.value.heavyBlockMargin)!=null?L:$?.value.rootMargin)!=null?W:ju,Q=T(M,{rootMargin:re,allowIdle:!F.value});R.value=Q,f.value=f.value||Q.isVisible.value,Q.whenVisible.then(()=>{j&&R.value===Q&&(f.value=!0)}),B(()=>{j=!1,Q.destroy(),R.value===Q&&(R.value=null)})},{immediate:!0}),Ye(()=>t.node.content,M=>{P&&!f.value||(p.value=M)})):f.value=!0,po(()=>{var M,D;(D=(M=R.value)==null?void 0:M.destroy)==null||D.call(M),R.value=null}),(M,D)=>(g(),pe(Ko(S.value?m.value:"div"),Dn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":x(F)&&!f.value?"true":void 0},S.value?a.value:void 0),{default:ve(()=>[f.value?(g(),C(Te,{key:0},[I.value.mode==="structured"?(g(),C(Te,{key:0},[w.value!==null?(g(),C(Te,{key:0},[_("summary",iF(B5(v.value)),N(w.value),17),y.value.length?(g(),pe(x(r),Dn({key:0},i.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):oe("",!0)],64)):(g(),pe(x(r),Dn({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):I.value.mode==="dynamic"?(g(),pe(x(c),{key:1,nodes:I.value.nodes},null,8,["nodes"])):I.value.mode==="text"?(g(),C("pre",Rde,N(I.value.content),1)):(g(),C("div",Dn({key:3},l.value,{innerHTML:I.value.content}),null,16,Pde))],64)):(g(),C("div",Dde,[An(M.$slots,"placeholder",{node:e.node},()=>[D[0]||(D[0]=_("span",{class:"html-block-node__placeholder-bar"},null,-1)),D[1]||(D[1]=_("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),D[2]||(D[2]=_("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);gp.install=e=>{e.component(gp.__name,gp)};const Bde={dir:"auto",class:"paragraph-node"},zde=["custom-id"],Du=Gn(Ze({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=os(()=>t.customId),o=wn("markstreamHtmlPolicy",void 0),s=wn("markstreamFade",void 0),i=wn("markstreamParseOptions",void 0),r=wn("markstreamCustomMarkdownIt",void 0),l=wn("markstreamNestedRendererProps",void 0),a=O(()=>{var $;return($=o?.value)!=null?$:"safe"}),u=O(()=>{var $;return($=t.parseOptions)!=null?$:i?.value}),c=O(()=>{var $;return($=t.customMarkdownIt)!=null?$:r?.value}),d=O(()=>{var $,F;return(F=t.customHtmlTags)!=null?F:($=l?.value)==null?void 0:$.customHtmlTags}),f=O(()=>{var $,F;const R=($=l?.value)!=null?$:{};return fn(kt({},R),{customId:(F=t.customId)!=null?F:R.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),p=or({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1});function h($){var F;return $.type==="text"&&String((F=$.content)!=null?F:"").trim()===""}const m=O(()=>t.node.children.filter($=>!h($))),k=O(()=>m.value.length>0&&m.value.every($=>$.type==="image"||(function(F){var R;const P=(function(M){return M.type==="link"&&Array.isArray(M.children)?M.children.filter(D=>!h(D)):[]})(F);return P.length===1&&((R=P[0])==null?void 0:R.type)==="image"})($))),w=O(()=>new Set(Xu(d.value))),v=O(()=>{if(!k.value||m.value.length<=1)return t.node.children;const $=[];for(let F=0;F0,M=t.node.children.slice(F+1).some(D=>!h(D));P&&M&&$.push(fn(kt({},R),{content:" ",raw:" "}))}return $}),y=O(()=>s?.value===!1&&!n.value.text),b=O(()=>y.value?Uu(v.value):null);function S($,F){return{node:$,"index-key":`${t.indexKey}-${F}`,"custom-id":t.customId,"custom-html-tags":d.value}}const I=O(()=>kt({inline_code:js,image:Sa,link:ii,hardbreak:Ca,emphasis:ri,strong:oi,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,html_inline:zi,html_block:gp,emoji:_i,checkbox:Di,math_inline:$r,checkbox_input:Di,reference:ni,footnote_anchor:mp,footnote_reference:Bi,text:Ro},n.value)),T=O(()=>v.value.map(($,F)=>{var R;const P=(function(M){var D,B,z,A;if(M.type==="html_block"||M.type==="html_inline"){const L=String((D=M.tag)!=null?D:"").trim().toLowerCase()||A9(M.content);if(L&&!w.value.has(L)&&M9((B=M.content)!=null?B:M.raw,L)){const W=String((A=(z=M.content)!=null?z:M.raw)!=null?A:"");return{child:{type:"text",content:W,raw:W},component:Ro,isCustomComponent:!1}}}return{child:M,component:I.value[M.type],isCustomComponent:!!(n.value[M.type]&&!hh(String(M.type)))}})($);return fn(kt({},P),{index:F,key:`${t.indexKey||"paragraph"}-${F}`,customAttrs:P.isCustomComponent?Zw(P.child,a.value):void 0,hasSlotChildren:Array.isArray(P.child.children)&&P.child.children.length>0,slotContent:String((R=P.child.content)!=null?R:""),originalChild:$})}));return($,F)=>(g(),C("p",Bde,[b.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(b.value),9,zde)):(g(!0),C(Te,{key:1},st(T.value,R=>{return g(),C(Te,{key:R.key},[k.value&&h(R.originalChild)?(g(),C(Te,{key:0},[qe(N((P=R.originalChild,String((M=P.content)!=null?M:""))),1)],64)):R.isCustomComponent?(g(),pe(Ko(R.component),Dn({key:1,ref_for:!0},R.customAttrs,{node:R.child,loading:R.child.loading,"index-key":R.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ve(()=>[R.hasSlotChildren?(g(),pe(x(p),Dn({key:0,ref_for:!0},f.value,{nodes:R.child.children,"index-key":R.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):R.slotContent?(g(),pe(x(p),Dn({key:1,ref_for:!0},f.value,{content:R.slotContent,final:!R.child.loading,"index-key":`${R.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),pe(Ko(R.component),Dn({key:2,ref_for:!0},S(R.child,R.index)),null,16))],64);var P,M}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Du.install=e=>{e.component(Du.__name,Du)};const Wde={class:"table-node-wrapper"},Hde=["aria-busy"],jde={key:0},Ude=["custom-id"],Vde=["aria-label","onPointerdown"],qde=["custom-id"],Kde={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},vp=Gn(Ze({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=O(()=>{var w;return(w=t.node.loading)!=null&&w}),o=O(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=V(null),i=V([]);let r=null;const l=O(()=>t.node.header.cells.length),a=O(()=>i.value.some(w=>Number.isFinite(w)&&w>0)),u=O(()=>a.value?i.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Vn("markstreamShowTooltips",O(()=>t.showTooltips)),Vn("markstreamFade",O(()=>t.fade));const c=os(()=>t.customId),d=O(()=>!!c.value.text),f=O(()=>!!c.value.paragraph),p=new WeakMap;function h(w){const v=t.fade===!1&&!d.value,y=!f.value,b=p.get(w);if(b?.children===w.children&&b.textFastPath===v&&b.paragraphFastPath===y)return b.info;const S=k1(w.children,y,!0),I={simpleChildren:S,plainText:S&&v?Uu(S):null};return p.set(w,{children:w.children,textFastPath:v,paragraphFastPath:y,info:I}),I}function m(w){if(!r)return;w.preventDefault();const v=r.startWidth+r.nextStartWidth,y=Math.min(48,Math.floor(v/2)),b=Math.max(y,Math.min(v-y,Math.round(r.startWidth+w.clientX-r.startX))),S=[...r.widths];S[r.index]=b,S[r.index+1]=v-b,i.value=S}function k(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),r=null)}return Ye(l,()=>{k(),i.value=[]}),po(k),(w,v)=>(g(),C("div",Wde,[_("table",{ref_key:"tableRef",ref:s,class:ze(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),C("colgroup",jde,[(g(!0),C(Te,null,st(e.node.header.cells,(y,b)=>(g(),C("col",{key:b,style:jt(u.value[b])},null,4))),128))])):oe("",!0),_("thead",null,[_("tr",null,[(g(!0),C(Te,null,st(e.node.header.cells,(y,b)=>(g(),C("th",{key:b,dir:"auto",class:ze([y.align==="right"?"text-right":y.align==="center"?"text-center":"text-left"])},[h(y).plainText!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(h(y).plainText),9,Ude)):h(y).simpleChildren?(g(),pe(x(Kp),{key:1,nodes:h(y).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${b}`},null,8,["nodes","custom-id","index-key"])):(g(),pe(x(Mi),{key:2,nodes:y.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[0]||(v[0]=S=>w.$emit("copy",S))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),b(function(I,T){if(T.button!==0)return;const $=(function(){var P;const M=(P=s.value)==null?void 0:P.querySelectorAll("thead th");return Array.from(M??[],D=>Math.round(D.getBoundingClientRect().width))})(),F=$[I],R=$[I+1];F&&R&&(T.preventDefault(),r={index:I,startX:T.clientX,startWidth:F,nextStartWidth:R,widths:$},i.value=$,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(b,S)},null,40,Vde)):oe("",!0)],2))),128))])]),_("tbody",null,[(g(!0),C(Te,null,st(o.value,(y,b)=>(g(),C("tr",{key:b},[(g(!0),C(Te,null,st(y.cells,(S,I)=>(g(),C("td",{key:I,class:ze([S.align==="right"?"text-right":S.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(S).plainText!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(h(S).plainText),9,qde)):h(S).simpleChildren?(g(),pe(x(Kp),{key:1,nodes:h(S).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${b}-${I}`},null,8,["nodes","custom-id","index-key"])):(g(),pe(x(Mi),{key:2,nodes:S.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[1]||(v[1]=T=>w.$emit("copy",T))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Hde),K(Cr,{name:"table-node-fade"},{default:ve(()=>[n.value?(g(),C("div",Kde,[An(w.$slots,"loading",{isLoading:n.value},()=>[v[2]||(v[2]=_("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),v[3]||(v[3]=_("span",{class:"sr-only"},"Loading",-1))],!0)])):oe("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);vp.install=e=>{e.component(vp.__name,vp)};const Gde={class:"hr-node"},hg=Gn({},[["render",function(e,t){return g(),C("hr",Gde)}],["__scopeId","data-v-39b2349c"]]);hg.install=e=>{e.component(hg.__name,hg)};const Zde={class:"unknown-node"},Ub=Ze({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),C("div",Zde,N(e.node.raw),1))}),mg=Gn(Ze({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=O(()=>`vmr-container vmr-container-${t.node.name}`),o=os(()=>t.customId),s=O(()=>kt({text:Ro,paragraph:Du,heading:M0,inline_code:js,link:ii,image:Sa,strong:oi,emphasis:ri,strikethrough:si,insert:Ai,subscript:Ci,superscript:Si,checkbox:Di,checkbox_input:Di,hardbreak:Ca,math_inline:$r,reference:ni,list:hd,math_block:QI,table:vp},o.value));return(i,r)=>(g(),C("div",Dn({class:n.value},e.node.attrs),[(g(!0),C(Te,null,st(e.node.children,(l,a)=>{return g(),pe(Ko((u=l.type,s.value[u]||Ub)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var u}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);mg.install=e=>{e.component(mg.__name,mg)};const Yde=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],JA=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Jde(e){if(e<=255)return Yde[e];let t=0,n=JA.length-1;for(;t<=n;){const o=t+n>>1,s=JA[o];if(es[1]))return s[2];t=o+1}}return"L"}const Xde=/[ \t\n\r\f]+/g,Qde=/[\t\n\r\f]| {2,}|^ | $/;let Vy=null;const efe=new RegExp("\\p{Script=Arabic}","u"),Oa=new RegExp("\\p{M}","u"),ex=new RegExp("\\p{Nd}","u");function XA(e){return efe.test(e)}function QA(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Yr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(QA(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(QA(n))return!0}}return!1}const tfe=new Set([" "," ","⁠","\uFEFF"]),nfe=new Set(["-","‐","–","—"]);function e$(e,t){return!((function(n){const o=yp(n);return o!==null&&tfe.has(o)})(e)||t&&((function(n){const o=yp(n);return o!==null&&(tx.has(o)||Vu.has(o))})(e)||(function(n){const o=yp(n);return o!==null&&nfe.has(o)})(e)))}const tx=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),E0=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),nx=new Set(["'","’"]),Vu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),ofe=new Set([":",".","،","؛"]),sfe=new Set(["၏"]),ife=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function rfe(e){if(ox(e))return!0;let t=!1;for(const n of e)if(Vu.has(n)||w1(n))t=!0;else if(!t||!Oa.test(n))return!1;return t}function lfe(e){for(const t of e)if(!tx.has(t)&&!Vu.has(t))return!1;return e.length>0}function afe(e){if(ox(e))return!0;for(const t of e)if(!(E0.has(t)||nx.has(t)||Oa.test(t)||w1(t)))return!1;return e.length>0}function ox(e){let t=!1;for(const n of e)if(n!=="\\"&&!Oa.test(n)){if(!(E0.has(n)||Vu.has(n)||nx.has(n)))return!1;t=!0}return t}function b1(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function yp(e){if(e.length===0)return null;const t=b1(e,e.length);return e.slice(t)}const ufe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function w1(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,ufe)}function cfe(e){const t=(function(n){for(const o of n)if(!Oa.test(o))return o;return null})(e);return t!==null&&ex.test(t)}function dfe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Oa.test(o))n--;else{if(!E0.has(o)&&!nx.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function ffe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function e8(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function t8(e,t){return e&&t!==null&&ofe.has(t)}function pfe(e){const t=yp(e);return t!==null&&sfe.has(t)}function hfe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function Vb(e){let t=e.length;for(;t>0;){const n=b1(e,t),o=e.slice(n,t);if(ife.has(o))return!0;if(!Vu.has(o))return!1;t=n}return!1}function mfe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const gfe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function yr(e){return e.length===1?e[0]:e.join("")}function vfe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),yr(n)}function yfe(e,t,n,o){if(!gfe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=mfe(c,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:yr(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return i!==null&&s.push({text:yr(r),isWordLike:a,kind:i,start:l}),s}function qy(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const kfe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function bfe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||kfe.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!Cfe.has(e)&&!Sfe.test(e)&&_fe.test(e)}function n8(e){let t=!1;for(const n of e)if(!Oa.test(n)){if(!t$(n))return!1;t=!0}return t}function Afe(e,t,n,o){const s=!t&&n8(e),i=!o&&n8(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=b1(c,d),p=c.slice(f,d);if(!Oa.test(p))return p;d=f}return null})(a);return u!==null&&w1(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=b1(a,u),d=a.slice(c,u);if(!Oa.test(d))return t$(d)||w1(d);u=c}return!1})(e);return!!(s||i||l)&&!Yr(e)&&!Yr(n)&&(t||s||r)&&(o||i)}function o8(e){for(const t of e)if(ex.test(t))return!0;return!1}function gg(e){if(e.length===0)return!1;for(const t of e)if(!ex.test(t)&&!xfe.has(t))return!1;return!0}function Mfe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,p;const h=(Vy===null&&(Vy=new Intl.Segmenter(void 0,{granularity:"word"})),Vy);let m=0;const k=[],w=[],v=[],y=[],b=[],S=[],I=[],T=[],$=[],F=[],R=[],P=[];for(const A of h.segment(a))for(const L of yfe(A.segment,(d=A.isWordLike)!=null&&d,A.index,c)){let W=function(){S[q]!==null&&(w[q]=[e8(k,S,I,q)],S[q]=null),w[q].push(L.text),v[q]=v[q]||L.isWordLike,T[q]=T[q]||Q,$[q]=$[q]||Y,F[q]=X,R[q]=te,P[q]=t8($[q],G)};const j=L.kind==="text",re=ffe(L.text,L.isWordLike,L.kind),Q=Yr(L.text),Y=XA(L.text),G=yp(L.text),X=Vb(L.text),te=pfe(L.text),q=m-1;u.carryCJKAfterClosingQuote&&j&&m>0&&y[q]==="text"&&Q&&T[q]&&F[q]||j&&m>0&&y[q]==="text"&&lfe(L.text)&&T[q]||j&&m>0&&y[q]==="text"&&R[q]?W():j&&m>0&&y[q]==="text"&&L.isWordLike&&Y&&P[q]?(W(),v[q]=!0):re!==null&&m>0&&y[q]==="text"&&S[q]===re?I[q]=((f=I[q])!=null?f:1)+1:j&&!L.isWordLike&&m>0&&y[q]==="text"&&!T[q]&&(rfe(L.text)||L.text==="-"&&v[q])?W():(k[m]=L.text,w[m]=[L.text],v[m]=L.isWordLike,y[m]=L.kind,b[m]=L.start,S[m]=re,I[m]=re===null?0:1,T[m]=Q,$[m]=Y,F[m]=X,R[m]=te,P[m]=t8(Y,G),m++)}for(let A=0;Anull);let D=-1;for(let A=m-1;A>=0;A--){const L=k[A];if(L.length!==0){if(y[A]==="text"&&!v[A]&&D>=0&&y[D]==="text"&&(afe(L)||L==="-"&&cfe(k[D]))){const W=(p=M[D])!=null?p:[];W.push(L),M[D]=W,b[D]=b[A],k[A]="";continue}D=A}}for(let A=0;AQ+1){L.push(yr(te)),W.push(me),j.push("text"),re.push(A.starts[Q]),Q=q;continue}}L.push(Y),W.push(X),j.push(G),re.push(A.starts[Q]),Q++}return{len:L.length,texts:L,isWordLike:W,kinds:j,starts:re}})((function(A){const L=[],W=[],j=[],re=[];for(let Q=0;Q1;for(let te=0;te=A.len||qy(A.kinds[G]))continue;const X=[],te=A.starts[G];let q=G;for(;q0&&(L.push(yr(X)),W.push(!0),j.push("text"),re.push(te),Q=q-1)}return{len:L.length,texts:L,isWordLike:W,kinds:j,starts:re}})((function(A){const L=A.texts.slice(),W=A.isWordLike.slice(),j=A.kinds.slice(),re=A.starts.slice();for(let Y=0;Y=0&&!e$(u.texts[y-1],c)&&v(y),m<0&&(m=y),k=k||Yr(b))}return v(u.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,r,t.breakKeepAllAfterPunctuation):r;return kt({normalized:i,chunks:Mfe(l,s)},l)}let Ac=null;const s8=new Map;let Mc=null;const Tfe=new RegExp("\\p{Emoji_Presentation}","u"),Ife=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Ky=null;const i8=new Map;function qb(){if(Ac!==null)return Ac;if(typeof OffscreenCanvas<"u")return Ac=new OffscreenCanvas(1,1).getContext("2d"),Ac;if(typeof document<"u")return Ac=document.createElement("canvas").getContext("2d"),Ac;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function oa(e,t){let n=t.get(e);return n===void 0&&(n={width:qb().measureText(e).width,containsCJK:Yr(e)},t.set(e,n)),n}function x1(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function n$(){return Ky===null&&(Ky=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Ky}function $fe(e){return Tfe.test(e)||e.includes("️")}function cu(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let r=0;const l=n$();for(const a of l.segment(i))$fe(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function Nfe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function r8(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function l8(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function sx(e,t){return t===0?0:e+t}function Ofe(e,t,n,o,s){return sx(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function a8(e,t,n,o){return sx(o,t==="tab"?0:e.lineEndFitAdvances[n])}function u8(e,t,n,o,s){return sx(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function Rfe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Pfe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Cm(e,t,n){let o=t;for(;oW){if(fe!==null&&J>H){q(ne,J,ae),be=J,de=Cm(fe,de,be+1),J=-1,ae=0;continue}q(),xe(ne,be,_e)}else re+=_e,Y=ne,G=be+1;else xe(ne,be,_e);const ce=be+1;fe!==null&&fe[de]===ce&&(J=ce,ae=re,de++),be++}Q&&Y===ne&&G===ye.length&&(Y=ne+1,G=0)}let ee=0;for(;ee=B.length)));){const ne=B[ee],H=r8(z[ee]);if(Q)if(re+ne>W){if(H){We(ee,ne),q(ee+1,0,re-ne),ee++;continue}if(X>=0){if(Y>X||Y===X&&G>0){q();continue}q(X,0,te);continue}if(ne>W&&A[ee]!==null){q(),he(ee,0),ee++;continue}q()}else We(ee,ne),H&&(X=ee+1,te=re-ne),ee++;else ne>W&&A[ee]!==null?he(ee,0):me(ee,ne),H&&(X=ee+1,te=re-ne),ee++}return Q&&q(),j})(n,o);const{widths:s,kinds:i,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=x1(),d=o+c.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,w=-1,v=0,y=null;function b(){w=-1,v=0,y=null}function S(M=m,D=k,B){f++,p=0,h=!1,b()}function I(M,D){h=!0,m=M+1,k=0,p=D}function T(M,D,B){h=!0,m=M,k=D+1,p=B}function $(M,D){h?(p+=D,m=M+1,k=0):I(M,D)}function F(M,D,B,z,A,L){if(!D)return;const W=a8(n,M,B,A);u8(n,M,B,A,z),w=B+1,v=p-L+W,y=M}function R(M,D){var B;const z=r[M],A=(B=l[M])!=null?B:null;let L=A===null?-1:Cm(A,0,D+1),W=-1,j=D;for(;jd){if(A!==null&&W>D){S(M,W),j=W,L=Cm(A,L,j+1),W=-1;continue}S(),T(M,j,re)}else p=G,m=M,k=j+1}else T(M,j,re);const Q=j+1;A!==null&&A[L]===Q&&(W=Q,L++),j++}h&&m===M&&k===z.length&&(m=M+1,k=0)}function P(M){f++,b()}for(let M=0;M=D.endSegmentIndex)));){const z=i[B],A=r8(z),L=Ffe(n,h,B),W=z==="tab"?Lfe(p+L,n.tabStopAdvance):s[B],j=L+W,re=Ofe(n,z,B,L,W);if(z!=="soft-hyphen")if(h){if(p+re>d){const Q=p+a8(n,z,B,L);if(u8(n,z,B,L,W),y==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&v<=d){S(w,0);continue}if(A&&Q<=d){$(B,j),S(B+1,0),B++;continue}if(w>=0&&v<=d){if(m>w||m===w&&k>0){S();continue}const Y=w;S(Y,0),B=Y;continue}if(re>d&&r[B]!==null){S(),R(B,0),B++;continue}S();continue}$(B,j),F(z,A,B,W,L,j),B++}else re>d&&r[B]!==null?R(B,0):I(B,W),F(z,A,B,W,L,j),B++;else h&&(m=B+1,k=0,w=B+1,v=p+a,y=z),B++}h&&(D.consumedEndSegmentIndex,S(D.consumedEndSegmentIndex,0))}return f})(e,t)}let Gy=null;function ix(){return Gy===null&&(Gy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Gy}function Bfe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,p){o=[d],s=f,i=p,r=Vb(d),l=E0.has(d)}function c(d,f){o.push(d),i=i||f;const p=Vb(d);r=d.length===1&&Vu.has(d)&&r||p,l=!1}for(const d of ix().segment(e)){const f=d.segment,p=Yr(f);o.length!==0?l||tx.has(f)||Vu.has(f)||t.carryCJKAfterClosingQuote&&p&&r?c(f,p):i||p?(a(),u(f,d.index,p)):c(f,p):u(f,d.index,p)}return a(),n}function zfe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(l){if(!(s<0)){if(i)s+1===l?o.push(t[s]):(function(a,u){const c=t[a].start,d=u=0&&!e$(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||Yr(a.text)}return r(t.length),o}function c8(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=ix();for(const s of o.segment(e))n++;return n}function Wfe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Hfe(e,t,n,o,s){const i=x1(),{cache:r,emojiCorrection:l}=(function(P,M){qb().font=P;const D=(function(A){let L=s8.get(A);return L||(L=new Map,s8.set(A,L)),L})(P),B=(function(A){const L=A.match(/(\d+(?:\.\d+)?)\s*px/);return L?parseFloat(L[1]):16})(P),z=M?(function(A,L){let W=i8.get(A);if(W!==void 0)return W;const j=qb();j.font=A;const re=j.measureText("😀").width;if(W=0,re>L+.5&&typeof document<"u"&&document.body!==null){const Q=document.createElement("span");Q.style.font=A,Q.style.display="inline-block",Q.style.visibility="hidden",Q.style.position="absolute",Q.textContent="😀",document.body.appendChild(Q);const Y=Q.getBoundingClientRect().width;document.body.removeChild(Q),re-Y>.5&&(W=re-Y)}return i8.set(A,W),W})(P,B):0;return{cache:D,fontSize:B,emojiCorrection:z}})(t,(a=e.normalized,Ife.test(a)));var a;const u=cu("-",oa("-",r),l)+(s===0?0:2*s),c=8*cu(" ",oa(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const w=null,v=[],y=[],b=[],S=null,I=Array.from({length:e.len});function T(P,M,D,B,z,A,L,W,j){z!=="text"&&z!=="space"&&z!=="zero-width-break"&&(k=!1),f.push(M),p.push(D),h.push(B),m.push(z),v.push(L),y.push(W),d&&b.push(j)}function $(P,M,D,B,z){const A=oa(P,r),L=d?c8(P,M):0,W=(function(Y,G,X){return G>1?Y+(G-1)*X:Y})(cu(P,A,l),L,s),j=M==="space"||M==="preserved-space"||M==="zero-width-break"?0:W,re=j===0?0:j+(L>0?s:0),Q=M==="space"||M==="zero-width-break"?0:W;if(z&&B&&P.length>1){let Y="sum-graphemes";s!==0?Y="segment-prefixes":gg(P)?Y="pair-context":i.preferPrefixWidthsForBreakableRuns&&(Y="segment-prefixes");const G=(function(te,q,me,xe,We){if(q.breakableFitAdvances!==void 0&&q.breakableFitMode===We)return q.breakableFitAdvances;q.breakableFitMode=We;const he=n$(),ee=[];for(const ye of he.segment(te))ee.push(ye.segment);if(ee.length<=1)return q.breakableFitAdvances=null,q.breakableFitAdvances;if(We==="sum-graphemes"){const ye=[];for(const fe of ee){const de=oa(fe,me);ye.push(cu(fe,de,xe))}return q.breakableFitAdvances=ye,q.breakableFitAdvances}if(We==="pair-context"||ee.length>96){const ye=[];let fe=null,de=0;for(const J of ee){const ae=cu(J,oa(J,me),xe);if(fe===null)ye.push(ae);else{const be=fe+J,_e=oa(be,me);ye.push(cu(be,_e,xe)-de)}fe=J,de=ae}return q.breakableFitAdvances=ye,q.breakableFitAdvances}const ne=[];let H="",Z=0;for(const ye of ee){H+=ye;const fe=cu(H,oa(H,me),xe);ne.push(fe-Z),Z=fe}return q.breakableFitAdvances=ne,q.breakableFitAdvances})(P,A,r,l,Y),X=G===null||o==="keep-all"?null:(function(te){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(te))return null;const q=[];let me=0;for(const xe of ix().segment(te))me++,Wfe(xe.segment)&&q.push(me);return q.length===0?null:q})(P);return void T(P,W,re,Q,M,D,G,X,L)}T(P,W,re,Q,M,D,null,null,L)}for(let P=0;P=55296&&te<=56319&&X+1=56320&&We<=57343&&(q=We-56320+(te-55296<<10)+65536,me=2)}const xe=Jde(q);xe!=="R"&&xe!=="AL"&&xe!=="AN"||(W=!0);for(let We=0;We=0&&L[te]==="ET";te--)L[te]="EN";for(te=X+1;te0?L[X-1]:Y)!=="L"?"R":"L";if(q===((te{const e=globalThis;if(e[Zy])return e[Zy];const t={configs:{},controllers:{},revision:Co(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Zy]=t,t})();let Sf=null;const Yy=is.revision;function d8(e){var t;return e&&(t=is.configs[e])!=null?t:null}function f8(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function Ufe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function Jy(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!Ufe(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function Xy(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Sf!=null)return Sf;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return Sf=!!((i=r.getContext)!=null&&i.call(r,"2d")),Sf}catch{return Sf=!1,!1}})())return null;try{const i=Math.round(100*t)/100,r=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),l=is.blockEstimateCache.get(r);if(l)return is.blockEstimateCache.delete(r),is.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(p,h,m){const k=`${m}\0${h}\0${p}`,w=is.preparedCache.get(k);if(w)return is.preparedCache.delete(k),is.preparedCache.set(k,w),w.prepared;const v=(function(y,b,S){return(function(I,T,$,F){var R,P;const M=(R=F?.wordBreak)!=null?R:"normal",D=(P=F?.letterSpacing)!=null?P:0;return Hfe(Efe(I,x1(),F?.whiteSpace,M),T,!1,M,D)})(y,b,0,S)})(p,h,{whiteSpace:m});for(is.preparedCache.set(k,{prepared:v});is.preparedCache.size>240;){const y=is.preparedCache.keys().next().value;if(!y)break;is.preparedCache.delete(y)}return v})(e,n.font,a),c=(function(p,h,m){const k=Dfe(p,h);return{lineCount:k,height:k*m}})(u,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(is.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});is.blockEstimateCache.size>4e3;){const p=is.blockEstimateCache.keys().next().value;if(!p)break;is.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function o$(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=Jy(e.children);return i&&n.paragraph?Xy(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=Jy(e.children),l=n.headings[i];return r&&l?Xy(r,t,l):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const r=Jy((s=i[0])==null?void 0:s.children);return r?Xy(r,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of i){const a=o$(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function Cf(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function du(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function Qy(e,t,n=0){return e.diff?Qw(t??{},n)?(function(o){const s=du(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!jfe.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return Cf(du(o.originalCode))+Cf(du(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Cf(du(s)),Cf(du(i)));const r=du(o.code).split(/\r?\n/);let l=0,a=0;for(const u of r)u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):Cf(du(e.code,e.loading===!0))}function Vfe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function ek(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=f8(o.lineHeight,1.5*f8(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:Vfe(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const qfe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function p8(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(i))qfe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function h8(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,i-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-r);hd&&(e.scrollTop=u)}function m8(e,t){let n=0,o=null,s=null;const i=()=>{const r=s;s=null,o=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(o&&(clearTimeout(o),o=null),n=l,s=null,e(...r)):o||(o=setTimeout(i,a))}}function g8(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const s$=Symbol("MarkstreamMathBlockMinHeightCache");function MBe(){return wn(s$,null)}const Kfe=new Set(["text","inline_code","emoji","footnote_reference"]),Gfe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Af(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function fu(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/i),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*o+12))}function i$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(Kfe.has(o))return!0;if(!Gfe.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(i$)}function Kb(e){var t,n,o,s,i,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((o=(n=u.content)!=null?n:u.raw)!=null?o:"");if(c==="inline_code")return String((r=(i=(s=u.code)!=null?s:u.content)!=null?i:u.raw)!=null?r:"");if(c==="emoji")return String((a=(l=u.name)!=null?l:u.raw)!=null?a:"");if(typeof u.text=="string")return u.text;const d=[];for(const f of["children","items","cells","rows"]){const p=u[f];if(Array.isArray(p)){const h=p.map(Kb).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function r$(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(r$)})}function Zfe(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function Yfe(e,t){var n,o,s,i,r,l,a,u,c,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,w=String((n=k.type)!=null?n:""),v=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(y){var b;const S=Number((b=y.level)!=null?b:y.depth);return S>=4?20:S===3?30:S===2?32:44})(k);case"paragraph":return(function(y,b){const S=String(y??"");if(!S)return 28;const I=Math.max(18,Math.floor(Math.max(320,b)/8)),T=S.split(/\r?\n/).length,$=Math.ceil(S.length/I);return Math.max(1,T,$)<=1?28:fu(S,b,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),v);case"list":return(function(y,b){var S;const I=Array.isArray(y.items)?y.items:[];if(!I.length)return 48;const T=Math.max(48,30*I.length+12);let $=12;for(const P of I)$+=Zfe(Kb(P)||String((S=P.raw)!=null?S:""),b);const F=Math.max(0,$-T);if(I.length>20){const P=Math.round(2.4*I.length);return Math.round(T+Math.max(P,Math.min(F,3*I.length)))}if(F<=0)return T;const R=I.length>8?8*I.length:F;return Math.round(T+Math.min(F,R))})(k,v);case"list_item":return fu(String((r=(i=k.raw)!=null?i:k.content)!=null?r:""),v,34);case"blockquote":return fu(String((a=(l=k.raw)!=null?l:k.content)!=null?a:""),v,56);case"table":return(function(y,b){const S=[...y.header?[y.header]:[],...Array.isArray(y.rows)?y.rows:[]];if(!S.length){const I=Array.isArray(y.children)?y.children.length:3;return Math.max(120,38*I+48)}return Math.max(120,Math.round(4+S.reduce((I,T)=>I+(function($,F){const R=Math.max(1,$.length),P=Math.max(80,(F-32)/R),M=Math.max(10,Math.floor(P/8)),D=Math.max(1,...$.map(B=>{var z;const A=Kb(B)||String((z=B?.raw)!=null?z:"");return Math.ceil(A.length/M)||1}));return 54+34*Math.max(0,D-1)+(R<=3&&$.some(r$)?14:0)})((function($){var F;return Array.isArray($?.cells)&&(F=$.cells)!=null?F:[]})(T),b),0)))})(k,v);case"code_block":{const y=String((u=k.language)!=null?u:"").trim().toLowerCase(),b=String((d=(c=k.code)!=null?c:k.raw)!=null?d:"");return y==="mermaid"?h1(f1(b)):y==="infographic"?m1(p1(b)):fu(b,v,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(y,b){var S,I,T;const $=y.match(/^\s*]*)>/i);return $&&!/(?:^|\s)open(?:\s|=|$)/i.test((S=$[1])!=null?S:"")?fu(((T=(I=y.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:I[1])==null?void 0:T.replace(/<[^>]*>/g,"").trim())||"Details",b,28,28):fu(y,b,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),v);case"thematic_break":return 24;default:return fu(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),v,40)}}function v8(e,t,n){return Math.min(Math.max(e,t),n)}const Jfe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Xfe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],Qfe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),l$=["raw","content","code","originalCode","updatedCode"],y8=new WeakMap,k8=new WeakMap;let epe=1;function gr(){return typeof performance<"u"?performance.now():Date.now()}function b8(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Ri(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=y8.get(t);return n||(n=epe++,y8.set(t,n)),String(n)}function w8(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Ri(t),customMarkdownIt:Ri(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Ri(e.validateLink),preTransformTokens:Ri(e.preTransformTokens),postTransformTokens:Ri(e.postTransformTokens),postTransformNodes:Ri(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function x8(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` +`,t-1)+1;return e.slice(n,t).trim()}function _8(e){const t=a$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function a$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function u$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function rx(e){const t=String(e??"");return`${t.length}:${u$(t)}`}function Gb(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?rx(r):`${r.length}:${u$(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Ri(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${Ri(o)}`;const i=Ri(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>Gb(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(u=>`${u}:${Gb(r[u],t,n+1)}`).join(";")}`}return typeof e}function _1(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function c$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>_1(o)?Ra(o,t,n+1):c$(o,t,n+1)).join(",")}`:_1(e)?Ra(e,t,n):Gb(e,t,n)}function tpe(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!l$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${rx(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Ri(s)}`:Qfe.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${c$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Ri(s)}`:""}).filter(Boolean).join(";")}function npe(e){return l$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${rx(n)}`:""}).filter(Boolean).join(";")}function Ra(e,t=new WeakMap,n=0){const o=k8.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${Ri(s)}`;const r=Ri(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>Ra(h,u,c+1)).join("|"):"";return[a.type,npe(d),tpe(d,u,c),f.length,p].join(":")})(e,t,n);return k8.set(s,l),l}function d$(e,t){return Ra(e)===Ra(t)}function lx(e,t,n){const o=gr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=gr()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function S8(e,t,n){return lx(t,n,()=>Ra(e))}function f$(e,t,n){return S8(e,n,"stabilizeSignatureMs")===S8(t,n,"stabilizeSignatureMs")}function Am(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function C8(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function A8(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function ope(e,t){return e.length===t.length&&e===t}function ax(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(i.length!==r.length)return!1;for(let c=0;c{o=ax(e,t)}),o??f$(e,t,n)}function rpe(e,t){const n={};for(const o of Jfe){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function lpe(e,t){var n;const o=_A(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:O(()=>!1),r=V(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let B="",z=0,A=!1,L=!1,W=!1,j=!1;function re(){B="",z=0,A=!1,L=!1,W=!1,j=!1}function Q(Y){let G=!1;for(let X=0;X{if(!Y||!G.startsWith(Y)||G.length<=Y.length)return re(),[!0,0];let X=0;B!==Y&&(re(),Q(Y),X=Y.length);const te=G.slice(Y.length),q=Q(te);return B=G,[q,X+te.length]}})();let p,h=0,m=0,k=gr(),w=-1,v=0;function y(B){w=Number.isInteger(B)?B:0,v+=1}function b(){p&&(clearTimeout(p),p=void 0)}function S(){b();const B=t.renderContent.value;r.value!==B&&(r.value=B),k=gr()}Ye([t.renderContent,t.effectiveFinal,i],([B,z,A])=>{r.value!==B&&(!A||z||(function(L,W){if(!L&&W||W.length<=80||W.length\s*|`{3,}|~{3,})/.test(j))||j.endsWith(` +`)&&!(function(re){const Q=x8(re);if(_8(Q))return!1;const Y=a$(Q);return Y.length>=2&&Y.some(G=>G.trim())})(W))})(r.value,B)?S():(function(){if(m+=1,p)return;const L=Math.max(0,(function(W){const j=W.parseCoalesceMs;return typeof j=="number"&&Number.isFinite(j)&&j>=0?j:80})(e)-(gr()-k));L<=0?S():p=setTimeout(S,L)})())},{flush:"sync",immediate:!0}),Ld(b);const I=O(()=>{var B,z,A,L;return yse(e.customHtmlTags,(B=e.parseOptions)==null?void 0:B.customHtmlTags,(L=(A=(z=t.customComponentsMap)==null?void 0:z.value)!=null?A:{},Object.entries(L).map(([W,j])=>{const re=ur(W);return j==null||!re||hh(re)||b9.has(re)||uh.has(re)?"":re}).filter(Boolean)))}),T=O(()=>{const{key:B,tags:z}=kse(I.value);if(!B)return o;const A=s.get(B);if(A)return A;const L=_A(t.instanceMsgId,{customHtmlTags:z});return s.set(B,L),L}),$=O(()=>{const B=T.value;if(!e.customMarkdownIt)return B;const z=e.customMarkdownIt(B);return B.__markstreamHasCustomParserExtensions=!0,z.__markstreamHasCustomParserExtensions=!0,z}),F=O(()=>{var B,z;const A=(B=e.parseOptions)!=null?B:{},L=t.effectiveFinal.value,W=I.value,j=L!=null,re=W.length>0;return j||re||A.streamParse==null?kt(kt(fn(kt({},A),{streamParse:(z=A.streamParse)==null||z}),j?{final:L}:{}),re?{customHtmlTags:W}:{}):A}),R=O(()=>{var B;return new Set(((B=F.value.customHtmlTags)!=null?B:[]).map(z=>String(z).trim().toLowerCase()).filter(Boolean))}),P=O(()=>w8(F.value,$.value,e.customMarkdownIt,{includeFinal:!0})),M=O(()=>w8(F.value,$.value,e.customMarkdownIt,{includeFinal:!1}));Ye([P,M],([B,z],[A,L])=>{A&&(B===A&&z===L||(S(),z!==L&&(l=[],c="")))},{flush:"sync"});const D=O(()=>{var B,z,A,L,W,j,re,Q,Y,G,X;if((B=e.nodes)!=null&&B.length)return l=[],c="",y(0),Et(e.nodes.slice());const te=r.value;if(!te)return l=[],c="",y(-1),[];const q=t.debugPerformanceEnabled.value,me=q?gr():0,xe=$.value,We=P.value,he=M.value;a&&We!==a&&(function(at){var ft,Mt;(Mt=(ft=at.stream)==null?void 0:ft.reset)==null||Mt.call(ft)})(xe),u&&he!==u&&(l=[],c="");const ee=Object.keys((A=(z=t.customComponentsMap)==null?void 0:z.value)!=null?A:{}).length>0||typeof F.value.postTransformNodes=="function";ee!==d&&(l=[],c="");const ne=!ee&&l.length>0&&te.startsWith(c)&&he===u,H=q?b8(xe):null,Z=q?{}:void 0,ye=A8(xe),fe=!ye&&!ee,de=kt(kt(fn(kt({},F.value),{__reuseStableTopLevelNodes:fe}),ye?{__disableStreamParse:!0}:{}),Z?{__timing:Z}:{}),J=wI(te,xe,de),ae=q?gr():0,be=q?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let _e,ce=q?Am(J.length):void 0,Se=0,ie=0,we=0;if(ne){const at=q?gr():0,[ft,Mt]=(function(tn){var Kt,Qe;const[nt,ut]=tn.scanGlobalReferenceAppend(tn.previousContent,tn.content),Pt=tn.parseOptions;return[tn.previousDirtyStartIndex>0&&Pt.final!==!0&&!tn.customMarkdownIt&&!A8(tn.md)&&!nt&&typeof Pt.preTransformTokens!="function"&&typeof Pt.postTransformTokens!="function"&&typeof Pt.postTransformNodes!="function"&&((Qe=(Kt=Pt.customHtmlTags)==null?void 0:Kt.length)!=null?Qe:0)===0?tn.previousDirtyStartIndex:0,ut]})({content:te,previousContent:c,previousDirtyStartIndex:w,parseOptions:F.value,customMarkdownIt:e.customMarkdownIt,md:xe,scanGlobalReferenceAppend:f});we=Mt;const Tt=ft<=0;if(be){const tn=(function(Kt,Qe,nt,ut={}){var Pt;if(!Qe.length)return{nodes:Kt,metrics:Am(Kt.length)};const Oe=(Pt=ut.scanStartIndex)!=null?Pt:0,Je=ut.reuseDirtyTail!==!1,it=(function(Nt,on,mn,Zt=0){const jn=Math.min(Nt.length,on.length);for(let Xt=Math.min(jn,Math.max(0,Zt));XtRa(at[Tt]))})(_e,be,ie):(function(at,ft=0){for(let Mt=Math.max(0,ft);Mt((W=H?.total)!=null?W:0);t.logPerf(ft?"parse(stream)":"parse(sync)",kt(kt(kt({rendererId:t.instanceMsgId,ms:Math.round(gr()-me),nodes:_e.length,contentLength:te.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:Re,referenceDefinitionScanChars:we,signatureMs:(j=be?.signatureMs)!=null?j:0,stabilizeSignatureMs:(re=be?.stabilizeSignatureMs)!=null?re:0,primeSignatureMs:(Q=be?.primeSignatureMs)!=null?Q:0,signatureCallCount:(Y=be?.signatureCallCount)!=null?Y:0,stabilizeSignatureCallCount:(G=be?.stabilizeSignatureCallCount)!=null?G:0,primeSignatureCallCount:(X=be?.primeSignatureCallCount)!=null?X:0,stabilizeMs:Se},ce??{}),Z?Object.fromEntries(Xfe.map(Mt=>{var Tt;return[Mt,(Tt=Z[Mt])!=null?Tt:0]})):{}),at?{streamMode:at.lastMode,streamDelta:rpe(at,H),streamStats:at}:{}))}return Et(_e)});return{effectiveCustomHtmlTags:I,effectiveCustomHtmlTagsSet:R,mdBase:T,mdInstance:$,mergedParseOptions:F,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>v,parsedNodes:D}}function ape(e){const{isClient:t}=e,n=V(new Set),o=new Map,s=new Map,i=new Map;function r(u){if(!t)return;const c=i.get(u);c!=null&&(window.clearTimeout(c),i.delete(u))}function l(){if(t)for(const u of i.values())window.clearTimeout(u);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,w=k.has(f);if(p){if(w)return;const y=new Set(k);return y.add(f),void(n.value=y)}if(!w)return;const v=new Set(k);v.delete(f),n.value=v})(u,c),c&&((d=e.onNodeMarkedVisible)==null||d.call(e,u))},resetNodeVisibleState:a,cleanupNodeVisibility:function(u){var c;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,o.value=c.done},r=s.subscribe(i);i();const l=O(()=>Math.max(0,t.value.length-n.value.length)),a=O(()=>l.value===0),u=O(()=>o.value&&a.value);return N2()&&Ld(()=>{r(),s.destroy()}),{source:t,visible:n,done:o,final:u,caughtUp:a,pendingChars:l,enqueue:c=>s.enqueue(c),finish:c=>s.finish(c),flush:()=>s.flush(),reset:c=>s.reset(c),pause:()=>s.pause(),resume:()=>s.resume()}}const cpe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},M8=/auto|scroll|overlay/i;function dpe(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return M8.test(t)||M8.test(n)}function fpe(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const ppe={class:"m-0 p-0"},hpe=["data-probe"],mpe=Gn(Ze(fn(kt({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),C("div",{class:"height-estimation-probes",style:jt({width:`${e.width}px`}),"aria-hidden":"true"},[_("div",{ref:i=>e.setParagraphWrapper(i),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[K(x(Du),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),_("div",{ref:i=>e.setListItemWrapper(i),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[_("ul",ppe,[K(x(pd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),_("div",{ref:i=>e.setListWrapper(i),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[K(x(hd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),C(Te,null,st(6,i=>_("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[K(x(M0),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,hpe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),E8=Ze({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=O(()=>{var n,o;return m1((o=Kc(e.estimatedPreviewHeightPx))!=null?o:p1(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?cn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),cn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),cn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>cn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,cn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),cn("div",{class:"absolute inset-0"},[cn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),T8=Ze({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=O(()=>{var n,o;return h1((o=Kc(e.estimatedPreviewHeightPx))!=null?o:f1(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?cn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),cn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>cn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[cn("span",{class:"action-icon block"})])))]):null,cn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),cn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),gpe={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function ps(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const vpe=["data-custom-id"],ype=["data-node-index","data-node-type"],I8="typewriter-simple-cursor-target",p$=Gn(Ze(fn(kt({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(E){if(!(typeof Event<"u"&&E instanceof Event))return typeof E=="string"&&s("copy-code",E),void s("copy",E)}const r=es(),l=wn("markstreamNestedRendererProps",void 0);function a(E){const U=r?.vnode.props;return!!U&&(Object.prototype.hasOwnProperty.call(U,E)||Object.prototype.hasOwnProperty.call(U,String(E).replace(/[A-Z]/g,se=>`-${se.toLowerCase()}`)))}function u(E){var U,se;const le=o[E];return a(E)?le:(se=(U=l?.value)==null?void 0:U[E])!=null?se:le}const c=O(()=>{return(E=u("mode"))==="chat"||E==="minimal"||E==="docs"?E:"docs";var E}),d=O(()=>g8(u("typewriter"))),f=O(()=>d.value!=="off"),p=O(()=>u("domMode")==="minimal"?"minimal":"full"),h=O(()=>{return(E={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":E.codeRenderer==="pre"||E.codeRenderer==="shiki"||E.codeRenderer==="monaco"?E.codeRenderer:E.renderCodeBlocksAsPre===!1||E.mode==="docs"?"monaco":"pre";var E}),m=O(()=>gpe[c.value]),k=O(()=>{var E;return(E=u("showTooltips"))!=null?E:m.value.showTooltips}),w=O(()=>{var E;return(E=u("fade"))!=null?E:m.value.fade}),v=O(()=>{var E;return(E=u("batchRendering"))!=null?E:m.value.batchRendering}),y=O(()=>{var E;return(E=u("initialRenderBatchSize"))!=null?E:m.value.initialRenderBatchSize}),b=O(()=>{var E;return(E=u("renderBatchSize"))!=null?E:m.value.renderBatchSize}),S=O(()=>{var E;return(E=u("renderBatchDelay"))!=null?E:m.value.renderBatchDelay}),I=O(()=>{var E;return(E=u("renderBatchBudgetMs"))!=null?E:m.value.renderBatchBudgetMs}),T=O(()=>{var E;return(E=u("renderBatchIdleTimeoutMs"))!=null?E:m.value.renderBatchIdleTimeoutMs}),$=O(()=>{var E;return(E=u("deferNodesUntilVisible"))!=null?E:m.value.deferNodesUntilVisible}),F=O(()=>{var E;return(E=u("maxLiveNodes"))!=null?E:m.value.maxLiveNodes}),R=O(()=>{var E;return(E=u("liveNodeBuffer"))!=null?E:m.value.liveNodeBuffer}),P=O(()=>{var E;return(E=u("nodeVirtual"))!=null?E:m.value.nodeVirtual}),M={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return p.value},get htmlPolicy(){return u("htmlPolicy")},get viewportPriority(){return u("viewportPriority")},get viewportPriorityOptions(){return u("viewportPriorityOptions")},get codeBlockStream(){return u("codeBlockStream")},get codeBlockDarkTheme(){return u("codeBlockDarkTheme")},get codeBlockLightTheme(){return u("codeBlockLightTheme")},get codeBlockMonacoOptions(){return u("codeBlockMonacoOptions")},get codeRenderer(){return u("codeRenderer")},get renderCodeBlocksAsPre(){return u("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return u("codeBlockMinWidth")},get codeBlockMaxWidth(){return u("codeBlockMaxWidth")},get codeBlockProps(){return u("codeBlockProps")},get mermaidProps(){return u("mermaidProps")},get d2Props(){return u("d2Props")},get infographicProps(){return u("infographicProps")},get showTooltips(){return k.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return o.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return w.value},get batchRendering(){return v.value},get initialRenderBatchSize(){return y.value},get renderBatchSize(){return b.value},get renderBatchDelay(){return S.value},get renderBatchBudgetMs(){return I.value},get renderBatchIdleTimeoutMs(){return T.value},get deferNodesUntilVisible(){return $.value},get maxLiveNodes(){return F.value},get liveNodeBuffer(){return R.value},get nodeVirtual(){return P.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function D(E){s("height-change",E)}function B(E){s("virtual-state-change",E)}function z(E){s("anchor-change",E)}const A=V(),L=V(null),W=V(null),j=V(null),re=Ms({1:null,2:null,3:null,4:null,5:null,6:null}),Q=V(!1),Y=new Map,G=V(0),X=V(0),te=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function q(E,U){return typeof E!="string"?U:E.trim()||U}function me(E){const U=Number(E);return Number.isFinite(U)&&U>0?Math.max(1,Math.trunc(U)):640}const xe=O(()=>{var E;const U=(E=M.viewportPriorityOptions)!=null?E:{},se=q(U.rootMargin,ju);return{rootMargin:se,heavyBlockMargin:q(U.heavyBlockMargin,se),maxTargets:me(U.maxTargets)}}),We=O(()=>{var E;return(E=xe.value.rootMargin)!=null?E:ju}),he=O(()=>{var E;return(E=xe.value.maxTargets)!=null?E:640});function ee(){var E,U;if(((E=o.virtualScroll)==null?void 0:E.enabled)!==!0)return null;const se=(U=o.virtualScroll)==null?void 0:U.scrollRoot;return ne(typeof se=="function"?se():se)}function ne(E){return E?typeof HTMLElement<"u"&&E instanceof HTMLElement?E:typeof E=="object"&&"value"in E?ne(E.value):typeof E=="object"&&"$el"in E?ne(E.$el):null:null}Vn(YI,xe);const{isClient:H,renderAsFragment:Z,debugPerformanceEnabled:ye,resolvedShowTooltips:fe,resolvedHtmlPolicy:de,inheritedSmoothStreaming:J,ownsTypewriterCursor:ae}=(function(E){const U=typeof window<"u",se=sh(),le=wn("markstreamHtmlPolicy",void 0),ke=wn("markstreamTypewriterCursor",void 0),$e=wn("markstreamSmoothStreaming",void 0),De=O(()=>E.renderAsFragment===!0),He=O(()=>!!(E.debugPerformance&&U&&typeof console<"u")),tt=O(()=>{var et;if(typeof E.showTooltips=="boolean")return E.showTooltips;const Be=(et=se.showTooltips)!=null?et:se["show-tooltips"];return Be===""||Be===!0||Be==="true"||Be!==!1&&Be!=="false"&&void 0}),je=O(()=>{var et,Be;return(Be=(et=E.htmlPolicy)!=null?et:le?.value)!=null?Be:"safe"}),Ke=O(()=>ke?.value!==!0);return{isClient:U,renderAsFragment:De,debugPerformanceEnabled:He,resolvedShowTooltips:tt,resolvedHtmlPolicy:je,inheritedSmoothStreaming:$e,inheritedTypewriterCursor:ke,ownsTypewriterCursor:Ke}})(M),{resolveViewportRoot:be,resolveScrollContainer:_e,isReverseFlexScrollRoot:ce,getNormalizedScrollTop:Se,getOffsetTopWithinRoot:ie}=(function(E,U){function se(){var He,tt;return(tt=(He=U.scrollRoot)==null?void 0:He.call(U))!=null?tt:null}function le(He){if(typeof window>"u")return null;const tt=se();if(tt)return tt;const je=He??E.value;if(!je)return null;const Ke=je.ownerDocument||document,et=Ke.scrollingElement||Ke.documentElement;let Be=je;for(;Be&&Be!==Ke.body&&Be!==et;){if(dpe(window.getComputedStyle(Be))&&fpe(Be))return Be;Be=Be.parentElement}return null}function ke(He){if(!U.isClient)return!1;try{const tt=window.getComputedStyle(He);return!!(tt.display||"").toLowerCase().includes("flex")&&(tt.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function $e(He,tt,je){var Ke,et;if(je)return De(tt);const Be=He.scrollTop;if(!ke(He))return Be;const Ge=Be<0?-Be:Be;return Math.max(0,((Ke=He.scrollHeight)!=null?Ke:0)-((et=He.clientHeight)!=null?et:0))-Ge}function De(He){var tt,je,Ke,et,Be;const Ge=Number((tt=He.scrollingElement)==null?void 0:tt.scrollTop),pt=Number((Ke=(je=He.documentElement)==null?void 0:je.scrollTop)!=null?Ke:0),lt=Number((Be=(et=He.body)==null?void 0:et.scrollTop)!=null?Be:0);return Math.max(0,Number.isFinite(Ge)?Ge:0,Number.isFinite(pt)?pt:0,Number.isFinite(lt)?lt:0)}return{resolveViewportRoot:le,resolveScrollContainer:function(He){var tt,je,Ke,et;const Be=se();if(Be)return Be;const Ge=le((tt=He??E.value)!=null?tt:null);if(Ge)return Ge;const pt=(et=(Ke=He?.ownerDocument)!=null?Ke:(je=E.value)==null?void 0:je.ownerDocument)!=null?et:typeof document<"u"?document:null;return pt?.scrollingElement||pt?.documentElement||null},isReverseFlexScrollRoot:ke,getNormalizedScrollTop:$e,getOffsetTopWithinRoot:function(He,tt){const je=tt.ownerDocument||He.ownerDocument||document;if((function(Ge,pt){return Ge===pt.documentElement||Ge===pt.body||Ge===pt.scrollingElement})(tt,je))return He.getBoundingClientRect().top+De(je);const Ke=tt.getBoundingClientRect(),et=He.getBoundingClientRect(),Be=$e(tt,je,!1);return et.top-Ke.top+Be}}})(A,{isClient:H,scrollRoot:ee});Vn("markstreamShowTooltips",fe),Vn("markstreamHtmlPolicy",de),Vn("markstreamTypewriter",f),Vn("markstreamFade",O(()=>M.fade!==!1)),Vn("markstreamTypewriterCursor",O(()=>!0)),Vn("markstreamTextStreamState",Y),Vn("markstreamStreamVersion",G),Vn("markstreamParseOptions",O(()=>M.parseOptions)),Vn("markstreamCustomMarkdownIt",O(()=>M.customMarkdownIt));const{smoothStreamingEnabled:we,renderContent:Re,requestedFinal:at,effectiveFinal:ft}=(function(E,U){const se=upe(kt(kt({},cpe),E.smoothStreamingOptions)),le=O(()=>{var Be,Ge,pt;return E.smoothStreaming!==!1&&!((Be=E.nodes)!=null&&Be.length)&&(E.smoothStreaming===!0||!((Ge=U.inheritedSmoothStreaming)!=null&&Ge.value))&&(E.smoothStreaming===!0||g8(E.typewriter)!=="off"||((pt=E.maxLiveNodes)!=null?pt:0)<=0)}),ke=V(!U.isClient||E.smoothStreaming===!0);Sn(()=>{ke.value=!0});const $e=O(()=>ke.value&&le.value),De=O(()=>{var Be;return $e.value?se.visible.value:(Be=E.content)!=null?Be:""}),He=O(()=>{var Be,Ge;const pt=(Be=E.parseOptions)!=null?Be:{};return(Ge=E.final)!=null?Ge:pt.final}),tt=O(()=>{const Be=He.value;return $e.value&&Be!=null?!!Be&&se.caughtUp.value:Be});let je=0,Ke=!1;function et(){je=0,Ke=!1}return Ye([()=>E.content,()=>E.nodes,$e,He],([Be,Ge,pt,lt])=>{if(Ge?.length)return et(),void se.reset("");const At=Be??"";if(!pt)return et(),se.reset(At),void(lt&&se.finish({flush:!0}));const gt=se.source.value;if(At){if(At!==gt)if(At.startsWith(gt)){const Rt=At.slice(gt.length),Bt=se.pendingChars.value;Rt.length<=8?(je++,Ke||je>=2&&Bt<=8?(Ke=!0,se.reset(At)):se.enqueue(Rt)):(et(),se.enqueue(Rt))}else et(),se.reset(At)}else et(),se.reset("");lt&&se.finish()},{immediate:!0}),{smoothStream:se,smoothStreamingEligible:le,smoothStreamingEnabled:$e,renderContent:De,requestedFinal:He,effectiveFinal:tt}})(M,{isClient:H,inheritedSmoothStreaming:J}),Mt=at.value===!0;Vn("markstreamSmoothStreaming",we);const Tt=V(!1),tn=V(!1),Kt=V(!1);let Qe="",nt=!1,ut=null;function Pt(){H&&ut!=null&&(window.clearTimeout(ut),ut=null)}function Oe(){Tt.value=!1,Pt()}function Je(E,U){if(!ye.value)return;const se=(function(){if(!ye.value)return null;const le=on(it),ke=on(rt),$e=Math.max(Nt,ke);if(le<=0&&$e<=0)return null;const De={total:le,maxPerFrame:$e,byLabel:(He=it,Object.fromEntries(Array.from(He.entries()).sort((tt,je)=>je[1]-tt[1]||tt[0].localeCompare(je[0]))))};var He;return it.clear(),rt.clear(),Nt=0,De})();console.info(`[markstream-vue][perf] ${E}`,se?fn(kt({},U),{layoutReads:se}):U)}Ye([()=>M.indexKey,()=>M.customId],()=>{var E,U;Oe(),tn.value=!1,Kt.value=!((E=o.nodes)!=null&&E.length)&&at.value!==!0&&!!o.content,Qe=(U=Re.value)!=null?U:"",nt=Qe.length>0},{flush:"sync"}),Ye([()=>o.content,()=>o.nodes,at],([E,U,se])=>{!U?.length&&se!==!0&&E&&(Kt.value=!0)},{flush:"sync",immediate:!0}),Ye([Re,()=>o.nodes,at],([E,U,se])=>{const le=E??"";return U?.length||se===!0?(Oe(),tn.value=!1,Qe=le,void(nt=!0)):(le.length>0&&(Kt.value=!0),nt?(Qe&&le.length>Qe.length&&le.startsWith(Qe)?(Tt.value=!0,tn.value=!0,H&&(Pt(),ut=window.setTimeout(()=>{var ke;ut=null,ft.value===!0||(ke=o.nodes)!=null&&ke.length||(mc(),Tt.value=!1,rl())},1200))):(le.length"u")return null;const $e=window;if($e.__markstreamLayoutReadPerformance)return $e.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return $e.__markstreamLayoutReadPerformance=De,De})();ke&&(ke.total=Number(ke.total||0)+1,ke.byLabel[le]=Number(ke.byLabel[le]||0)+1,ke.currentFrameTotal=Number(ke.currentFrameTotal||0)+1,ke.frameScheduled||(ke.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Zt(ke),0):queueMicrotask(()=>Zt(ke)):window.requestAnimationFrame(()=>Zt(ke))))})(E),vt||(vt=!0,H&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(mn):typeof queueMicrotask!="function"?setTimeout(mn,0):queueMicrotask(mn)))}function Xt(E,U){return jn(E),U()}const xo=M.customId?`renderer-${M.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Wo=(function(E){const U=new Map;return{scope:E,cache:U,clear:()=>U.clear()}})(xo),vo=xo;Vn(s$,Wo);const Un=os(()=>M.customId),{effectiveCustomHtmlTagsSet:$s,mergedParseOptions:ot,parsedNodes:Ae,getParsedNodesDirtyStartIndex:wt,getParsedNodesRevision:Lt}=lpe(M,{instanceMsgId:xo,renderContent:Re,effectiveFinal:ft,smoothStreamingEnabled:we,debugPerformanceEnabled:ye,customComponentsMap:Un,logPerf:Je});Ye(Ae,()=>{Tt.value||Wo.clear(),G.value+=1},{immediate:!0});const Qt=O(()=>({customId:M.customId,customHtmlTags:ot.value.customHtmlTags,parseOptions:M.parseOptions,customMarkdownIt:M.customMarkdownIt,htmlPolicy:de.value,viewportPriority:M.viewportPriority,viewportPriorityOptions:xe.value,mode:c.value,domMode:M.domMode,codeRenderer:h.value,codeBlockStream:M.codeBlockStream,codeBlockDarkTheme:M.codeBlockDarkTheme,codeBlockLightTheme:M.codeBlockLightTheme,codeBlockMonacoOptions:M.codeBlockMonacoOptions,renderCodeBlocksAsPre:M.renderCodeBlocksAsPre,codeBlockMinWidth:M.codeBlockMinWidth,codeBlockMaxWidth:M.codeBlockMaxWidth,codeBlockProps:M.codeBlockProps,mermaidProps:M.mermaidProps,d2Props:M.d2Props,infographicProps:M.infographicProps,showTooltips:fe.value,themes:M.themes,langs:M.langs,isDark:M.isDark,typewriter:f.value,smoothStreamingOptions:M.smoothStreamingOptions,parseCoalesceMs:M.parseCoalesceMs,fade:M.fade}));Vn("markstreamNestedRendererProps",Qt);const _o=O(()=>Ae.value),Zn=O(()=>Ae.value.length),Xn=V(null),io=V(null),ro=V(null),ys=V(null),Ti=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),Ns=!Ti&&M.customId?d8(M.customId):null,Us=O(()=>Ns?(Yy.value,d8(M.customId)):null),Vs=O(()=>{var E;return!!(!Z.value&&M.customId&&!Ti&&((E=Us.value)!=null&&E.enabled))}),li=O(()=>!!(H&&Vs.value)),ss=O(()=>{var E;return!!(!Z.value&&((E=o.virtualScroll)!=null&&E.enabled))}),ai=O(()=>ss.value),ui=V(!1);Sn(()=>{ui.value=!0});const Cn=O(()=>!!(H&&ss.value));Vn("markstreamHostScrollManaged",Cn);const Ls=O(()=>!!(ui.value&&Cn.value)),Fn=O(()=>li.value||Cn.value),Io=O(()=>li.value||Ls.value),Ho=O(()=>{var E;return Fn.value&&((E=Us.value)==null?void 0:E.textEstimation)!==!1});function Fs(){const E=X.value||Xt("getMeasuredContainerWidth.clientWidth",()=>{var U;return((U=A.value)==null?void 0:U.clientWidth)||0});return Number.isFinite(E)&&E>0?E:0}const qs=O(()=>{const E=Fs();return E>0?Math.max(1,Math.round(E)):640}),Ii=O(()=>{var E,U;return!(ft.value!==!0||ss.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(E=o.nodes)!=null&&E.length||Kt.value||!(((U=M.maxLiveNodes)!=null?U:0)<=0))}),cs=O(()=>{var E;return Ii.value?50:Math.max(1,(E=M.maxLiveNodes)!=null?E:320)}),Po=O(()=>{var E;return Ii.value?16:Math.max(0,(E=M.liveNodeBuffer)!=null?E:60)}),ln=O(()=>{var E;return!Z.value&&M.nodeVirtual!==!1&&!(((E=M.maxLiveNodes)!=null?E:0)<=0&&!Ii.value)&&(M.nodeVirtual===!0?Ae.value.length>0:Ae.value.length>cs.value)}),Os=O(()=>ln.value||li.value||Cn.value),ds=O(()=>M.viewportPriority!==!1),jo=O(()=>!!ds.value&&!Q.value);var Ks;Ks=O(()=>ds.value),Vn(JI,Ks);const $i=O(()=>{var E;return!(Z.value||M.deferNodesUntilVisible===!1||((E=M.maxLiveNodes)!=null?E:0)<=0||ln.value||Ae.value.length>900||M.viewportPriority===!1)}),ks=Wce(E=>{var U;return be((U=E??A.value)!=null?U:null)},ds),{requestFrame:Nn,cancelFrame:$o,hasIdleCallback:Lr,isTestEnv:Me}=(function(E){const U=E.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,se=E.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,le=E.isClient&&typeof window.requestIdleCallback=="function",ke=(function(){var $e;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=($e=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:$e.value;return De?.env})();return{requestFrame:U,cancelFrame:se,hasIdleCallback:le,isTestEnv:ke?.NODE_ENV==="test"}})({isClient:H}),Ie=O(()=>ft.value===!0&&!ss.value),{resolvedBatchSize:Ve,resolvedInitialBatch:an,batchingEnabled:gn,incrementalRenderingActive:Ln,renderedCount:xn,previousRenderContext:ue,adaptiveBatchSize:Ce,previousBatchConfig:Ne}=(function(E,U){var se;const le=O(()=>{var et;const Be=Math.trunc((et=E.renderBatchSize)!=null?et:80);return Number.isFinite(Be)?Math.max(0,Be):0}),ke=O(()=>{var et;const Be=Math.trunc((et=E.initialRenderBatchSize)!=null?et:le.value);return Number.isFinite(Be)?Math.max(0,Be):le.value}),$e=O(()=>!U.renderAsFragment.value&&E.batchRendering!==!1&&le.value>0&&U.isClient&&!U.isTestEnv),De=V(0),He=V({key:E.indexKey,total:0}),tt=V(Math.max(1,le.value||1)),je=O(()=>{var et,Be,Ge;return $e.value&&!((et=U.continuousStreaming)!=null&&et.value)&&!((Be=U.forceFullRenderFinalContent)!=null&&Be.value)&&((Ge=E.maxLiveNodes)!=null?Ge:0)<=0}),Ke=V({batchSize:le.value,initial:ke.value,delay:(se=E.renderBatchDelay)!=null?se:16,enabled:je.value});return{resolvedBatchSize:le,resolvedInitialBatch:ke,batchingEnabled:$e,incrementalRenderingActive:je,renderedCount:De,previousRenderContext:He,adaptiveBatchSize:tt,previousBatchConfig:Ke}})(M,{isClient:H,isTestEnv:Me,renderAsFragment:Z,forceFullRenderFinalContent:Ie,continuousStreaming:O(()=>tn.value&&ft.value!==!0)}),Ue=O(()=>{var E;return!Z.value&&M.batchRendering!==!1&&Ve.value>0&&!Me&&((E=M.maxLiveNodes)!=null?E:0)<=0&&!Ie.value}),dt=O(()=>Ue.value),yt=O(()=>Fn.value||dt.value),Yt=O(()=>{var E;return yt.value&&((E=Us.value)==null?void 0:E.codeBlockEstimation)!==!1}),sn=new Map,Qn=new Map,kn=new WeakMap;let Tn=null;const No=new WeakMap,Dt=new Map,Vt=[];let dn=[],lo=[],Yn=-1;const Xe=Co(Vt),ge=new Set,Le=V(0);let un=0;const tl=V(0),nl=O(()=>(tl.value,Array.from(sn.entries()).sort((E,U)=>E[0]-U[0]))),Pe=V(null),ct=V(null);let bt,pn=null,Ni=0,dr=null;function ci(){bt.markFallbackHeightPrefixDirty()}function K0(E){return bt.getFallbackNodeHeight(E)}function tc(E,U){return bt.estimateHeightRange(E,U)}function G0(E){return bt.estimateIndexForOffset(E)}const{activeRestoreAnchor:nc,getRelativeScrollTopWithinContainer:UN,setRelativeScrollTopWithinContainer:VN,resolveAnchorOffset:qN,clearRestoreReconcile:xh,scheduleRestoreReconcile:jd,captureRestoreAnchor:h_,restoreAnchor:m_,getAnchorDrift:KN}=(function(E){const{isClient:U,containerRef:se,parsedNodeCount:le,requestFrame:ke,cancelFrame:$e,resolveScrollContainer:De,getNormalizedScrollTop:He,getOffsetTopWithinRoot:tt,isReverseFlexScrollRoot:je,estimateIndexForOffset:Ke,estimateHeightRange:et,getFallbackNodeHeight:Be,clamp:Ge}=E,pt=V(null);let lt=null,At=[];function gt(){const Gt=De(),yn=se.value;if(!Gt||!yn)return null;const _n=Gt.ownerDocument||yn.ownerDocument||document;if(Gt===_n.documentElement||Gt===_n.body||Gt===_n.scrollingElement){const eo=yn.getBoundingClientRect();return Math.max(0,-eo.top)}return Math.max(0,He(Gt,_n,!1)-tt(yn,Gt))}function Rt(Gt){var yn;const _n=De(),eo=se.value;if(!_n||!eo)return;const xs=Math.max(0,Gt),fs=_n.ownerDocument||eo.ownerDocument||document,pr=fs.defaultView||(typeof window<"u"?window:null);if(_n===fs.documentElement||_n===fs.body||_n===fs.scrollingElement){const Pr=He(_n,fs,!0)+eo.getBoundingClientRect().top;return void((yn=pr?.scrollTo)==null||yn.call(pr,0,Math.max(0,Pr+xs)))}h8(_n,fs,tt(eo,_n)+xs,{isReverseFlexScrollRoot:Pr=>{var df;return(df=je?.(Pr))!=null&&df},getNormalizedScrollTop:He})}function Bt(Gt){const yn=le.value,_n=Ge(Gt.nodeIndex,0,Math.max(0,yn-1));return et(0,_n)+Math.max(0,Gt.offsetWithinNodePx)}function qt(){if(lt!=null&&($e?.(lt),lt=null),U)for(const Gt of At)window.clearTimeout(Gt);At=[]}function Wt(Gt){const yn=Bt(Gt),_n=gt();_n!=null&&Math.abs(_n-yn)<=.5||Rt(yn)}return{activeRestoreAnchor:pt,getRelativeScrollTopWithinContainer:gt,setRelativeScrollTopWithinContainer:Rt,resolveAnchorOffset:Bt,clearRestoreReconcile:qt,applyRestoreAnchor:Wt,scheduleRestoreReconcile:function(){pt.value&&U&<==null&&(lt=ke?ke(()=>{lt=null,pt.value&&Wt(pt.value)}):null,lt==null&&pt.value&&Wt(pt.value))},captureRestoreAnchor:function(){const Gt=gt(),yn=le.value;if(Gt==null||yn<=0)return null;const _n=Ge(Ke(Gt+1),0,yn-1),eo=et(0,_n),xs=Be(_n);return{nodeIndex:_n,offsetWithinNodePx:Ge(Gt-eo,0,Math.max(0,xs-1))}},restoreAnchor:function(Gt){const yn=le.value;if(pt.value={nodeIndex:Ge(Gt.nodeIndex,0,Math.max(0,yn-1)),offsetWithinNodePx:Math.max(0,Gt.offsetWithinNodePx)},qt(),Wt(pt.value),U)for(const _n of[0,120,280,480])At.push(window.setTimeout(()=>{pt.value&&Wt(pt.value)},_n))},getAnchorDrift:function(Gt){const yn=gt();return yn==null?null:yn-Bt(Gt)}}})({isClient:H,containerRef:A,parsedNodeCount:Zn,requestFrame:Nn,cancelFrame:$o,resolveScrollContainer:()=>Pe.value||_e(),getNormalizedScrollTop:Se,getOffsetTopWithinRoot:ie,isReverseFlexScrollRoot:ce,estimateIndexForOffset:G0,estimateHeightRange:tc,getFallbackNodeHeight:K0,clamp:ws}),{nodeHeights:oc,heightStats:Gi,heightTreeSize:Z0,heightSumTree:GN,heightKnownTree:ZN,averageNodeHeight:g_,resetHeightMeasurements:YN,pruneHeightMeasurements:JN,rebuildHeightTrees:_h,recordNodeHeight:XN,removeNodeHeights:QN,exportHeightCache:eL,importHeightCache:tL,fenwickRangeSum:nL}=(function(E={}){const U=Ms({}),se=Ms({total:0,count:0}),le=V(0),ke=V([]),$e=V([]);function De(){for(const Be of Object.keys(U))delete U[Number(Be)];se.total=0,se.count=0,le.value=0,ke.value=[],$e.value=[]}function He(Be,Ge,pt){for(let lt=Ge+1;lt0;lt-=lt&-lt)pt+=Be[lt];return pt}function je(Be){le.value=Be;const Ge=new Array(Be+1).fill(0),pt=new Array(Be+1).fill(0);for(const[lt,At]of Object.entries(U)){const gt=Number(lt),Rt=Number(At);!Number.isFinite(gt)||gt<0||gt>=Be||!Number.isFinite(Rt)||Rt<=0||(He(Ge,gt,Rt),He(pt,gt,1))}ke.value=Ge,$e.value=pt}function Ke(Be){if(!Number.isInteger(Be)||Be<0)return!1;const Ge=U[Be];if(!Number.isFinite(Ge)||Ge<=0)return!1;if(delete U[Be],se.total=Math.max(0,se.total-Ge),se.count=Math.max(0,se.count-1),le.value>Be){const pt=ke.value,lt=$e.value;pt.length&<.length&&(He(pt,Be,-Ge),He(lt,Be,-1))}return!0}const et=O(()=>se.count>0?Math.max(12,se.total/se.count):32);return{nodeHeights:U,heightStats:se,heightTreeSize:le,heightSumTree:ke,heightKnownTree:$e,averageNodeHeight:et,resetHeightMeasurements:De,pruneHeightMeasurements:function(Be){if(Be<=0)return void De();let Ge=0,pt=0;for(const[lt,At]of Object.entries(U)){const gt=Number(lt),Rt=Number(At);!Number.isFinite(gt)||gt<0||gt>=Be||!Number.isFinite(Rt)||Rt<=0?delete U[gt]:(Ge+=Rt,pt++)}se.total=Ge,se.count=pt},rebuildHeightTrees:je,recordNodeHeight:function(Be,Ge,pt={}){(function(lt,At,gt={}){var Rt;if(!Number.isFinite(At)||At<=0)return!1;const Bt=U[lt];if(Bt&&(gt.allowShrink===!1&&Atlt){const qt=ke.value,Wt=$e.value;if(qt.length&&Wt.length)if(Bt){const Gt=At-Bt;Gt!==0&&He(qt,lt,Gt)}else He(qt,lt,At),He(Wt,lt,1)}gt.notify!==!1&&((Rt=E.onHeightRecorded)==null||Rt.call(E))})(Be,Ge,fn(kt({},pt),{notify:!0}))},removeNodeHeight:function(Be,Ge={}){var pt;const lt=Ke(Be);return lt&&Ge.notify!==!1&&((pt=E.onHeightRecorded)==null||pt.call(E)),lt},removeNodeHeights:function(Be,Ge={}){var pt;let lt=0;for(const At of Be)Ke(Number(At))&<++;return lt>0&&Ge.notify!==!1&&((pt=E.onHeightRecorded)==null||pt.call(E)),lt},exportHeightCache:function(){return Object.entries(U).map(([Be,Ge])=>({index:Number(Be),height:Number(Ge)})).filter(Be=>Number.isFinite(Be.index)&&Be.index>=0&&Number.isFinite(Be.height)&&Be.height>0).sort((Be,Ge)=>Be.index-Ge.index)},importHeightCache:function(Be,Ge={}){var pt;if(!Array.isArray(Be))return;const lt=le.value;let At=!1;if(Ge.mode!=="merge"){const gt=Object.keys(U);if(gt.length>0){for(const Rt of gt)delete U[Number(Rt)];At=!0}}for(const gt of Be){const Rt=Number(gt.index),Bt=Number(gt.height);if(!Number.isInteger(Rt)||Rt<0||lt>0&&Rt>=lt||!Number.isFinite(Bt)||Bt<=0)continue;const qt=U[Rt];qt&&Math.abs(qt-Bt)<=1||(U[Rt]=Bt,At=!0)}At&&((function(){let gt=0,Rt=0;const Bt=le.value;for(const[qt,Wt]of Object.entries(U)){const Gt=Number(qt),yn=Number(Wt);!Number.isFinite(Gt)||Gt<0||Bt>0&&Gt>=Bt||!Number.isFinite(yn)||yn<=0?delete U[Gt]:(gt+=yn,Rt++)}se.total=gt,se.count=Rt})(),lt>0&&je(lt),(pt=E.onHeightRecorded)==null||pt.call(E))},fenwickRangeSum:function(Be,Ge,pt){if(pt<=Ge)return 0;const lt=tt(Be,pt-1);return Ge<=0?lt:lt-tt(Be,Ge-1)}}})({onHeightRecorded:()=>{ci(),Cn.value&&sf(),nc.value&&jd(),ct.value&&fc(),ho("node-resize")}});function v_(E){Number.isInteger(E)&&E>=0&&ge.add(E)}function y_(E){for(const U of E)v_(Number(U))}function sc(E){un++;let U=!0;try{const se=E();return U=se!==!1,se}finally{un--,un===0&&U&&Le.value++}}function Y0(){dn=[],lo=[],Yn=-1,ge.clear(),Xe.value=Vt}function Sh(){Y0(),sc(()=>YN()),Dt.clear()}function k_(E){!Number.isInteger(E)||E<0||E>=Ae.value.length||Dt.set(E,Kd(E))}function b_(E,U,se={}){const le=oc[E];v_(E),XN(E,U,se);const ke=oc[E];return Object.is(le,ke)?(ge.delete(E),!1):(ke&&ke>0?k_(E):le&&Dt.delete(E),!0)}function w_(E,U){const se=Xt("getNodeLayoutHeight.slot.offsetHeight",()=>{var le,ke;return(ke=(le=sn.get(E))==null?void 0:le.offsetHeight)!=null?ke:0});return se>0?se:Xt("getNodeLayoutHeight.content.offsetHeight",()=>U.offsetHeight)}function x_(E,U={}){U.mode!=="merge"?Y0():y_(E.map(se=>se.index)),sc(()=>tL(E,U)),Sv()}const Fr=O(()=>$i.value&&jo.value),oL=O(()=>{var E;return!Z.value&&M.batchRendering!==!1&&Ve.value>0&&((E=M.maxLiveNodes)!=null?E:0)<=0}),sL=O(()=>!Z.value&&Mt&&ft.value===!0&&!ln.value&&!ss.value&&!Vs.value&&!Fr.value&&!oL.value),__=O(()=>!!ks&&Fr.value),S_=O(()=>ln.value||Cn.value),{focusIndex:ol,liveRange:bs,updateLiveRange:Ud}=(function(E,U){const{parsedNodeCount:se,virtualizationEnabled:le,maxLiveNodesResolved:ke,liveNodeBufferResolved:$e,clamp:De}=U,He=$e??O(()=>{var Ke;return Math.max(0,(Ke=E.liveNodeBuffer)!=null?Ke:60)}),tt=V(0),je=Ms({start:0,end:0});return{liveNodeBufferResolved:He,focusIndex:tt,liveRange:je,updateLiveRange:function(){const Ke=se.value;if(!le.value||Ke===0)return je.start=0,void(je.end=Ke);const et=Math.min(ke.value,Ke),Be=He.value,Ge=De(tt.value-Be,0,Math.max(0,Ke-et));je.start=Ge,je.end=Math.min(Ke,Ge+et)}}})(M,{parsedNodeCount:Zn,virtualizationEnabled:ln,maxLiveNodesResolved:cs,liveNodeBufferResolved:Po,clamp:ws}),Or=new Map,Za=new Map,Vl=new Map,Ch=[],sl=new Map,ql=new Set,C_=V(0);let J0=!1;const A_=O(()=>(C_.value,ql.size)),Li=new Map,Rr=new Map,M_=V(0),X0=O(()=>{M_.value;let E=0;for(const U of Li.values())E+=Math.max(0,U);return E});let Fi=null;const Ah=O(()=>{if(!ln.value)return Ae.value.length;const E=Po.value,U=Math.max(bs.end+E,an.value),se=Math.min(Ae.value.length,U);return Math.max(xn.value,se)});function Mh(){J0||(J0=!0,queueMicrotask(()=>{J0=!1,C_.value+=1}))}function E_(E,U,se="node-resize"){if(!H||typeof window>"u")return null;const le=window.setTimeout(()=>{ql.delete(le)&&Mh();try{U()}finally{ho(se)}},Math.max(0,E));return ql.add(le),Mh(),le}function Eh(E){H&&E!=null&&(ql.delete(E)&&Mh(),window.clearTimeout(E))}function T_(){if(H&&typeof window<"u")for(const E of ql)window.clearTimeout(E);ql.size&&(ql.clear(),Mh()),Ch.length=0,Vl.clear()}function iL(E){L.value=E}function rL(E){W.value=E}function lL(E){j.value=E}const{cancelScheduledFocusSync:Q0,scheduleFocusSync:fr}=(function(E){const{isClient:U,containerRef:se,virtualizationEnabled:le,requestFrame:ke,cancelFrame:$e,syncFocusToScroll:De}=E;let He=null;function tt(){var Ke,et,Be;return(Be=(et=(Ke=se.value)==null?void 0:Ke.ownerDocument)==null?void 0:et.defaultView)!=null?Be:typeof window<"u"?window:null}function je(){if(!He)return;const Ke=tt();He.viaTimeout?Ke?Ke.clearTimeout(He.id):clearTimeout(He.id):$e?.(He.id),He=null}return{cancelScheduledFocusSync:je,scheduleFocusSync:function(Ke={}){if(!le.value)return;if(!U)return void De(!0);if(Ke.immediate)return je(),void De(!0);if(He)return;const et=()=>{He=null,De()};if(ke)return void(He={id:ke(et),viaTimeout:!1});const Be=tt();He={id:Be?Be.setTimeout(et,16):setTimeout(et,16),viaTimeout:!0}}}})({isClient:H,containerRef:A,virtualizationEnabled:ln,requestFrame:Nn,cancelFrame:$o,syncFocusToScroll:function(E=!1){var U;if(!ln.value)return;const se=Pe.value||_e();if(!se)return;const le=se.ownerDocument||((U=A.value)==null?void 0:U.ownerDocument)||document,ke=le?.defaultView||(typeof window<"u"?window:null),$e=se===le?.documentElement||se===le?.body,De=Ae.value.length;if(De<=0)return;if(!$e&&De>0&&ce(se)){const lt=Xt("syncFocusToScroll.clientHeight",()=>se.clientHeight||0),At=Xt("syncFocusToScroll.scrollTop",()=>se.scrollTop),gt=At<0?-At:At;return void $h(ws((He=Math.max(0,gt)+.5*Math.max(0,lt),bt.estimateIndexForOffsetFromEnd(He)),0,Math.max(0,De-1)),E)}var He;const tt=(function(lt,At,gt,Rt){const Bt=A.value;if(!Bt)return null;const qt=Rt?0:Xt("syncFocusToScroll.model.root.getBoundingClientRect",()=>lt.getBoundingClientRect().top),Wt=Xt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Bt.getBoundingClientRect().top),Gt=Math.max(0,qt-Wt),yn=Rt?Xt("syncFocusToScroll.model.viewport.clientHeight",()=>{var _n,eo,xs,fs;return(fs=(xs=(eo=gt?.innerHeight)!=null?eo:(_n=At.documentElement)==null?void 0:_n.clientHeight)!=null?xs:lt.clientHeight)!=null?fs:0}):Xt("syncFocusToScroll.model.root.clientHeight",()=>lt.clientHeight);return ws(G0(Gt+.5*Math.max(0,yn)),0,Math.max(0,Ae.value.length-1))})(se,le,ke,$e);if(tt!=null)return void $h(tt,E);const je=$e?null:Xt("syncFocusToScroll.root.getBoundingClientRect",()=>se.getBoundingClientRect()),Ke=$e?0:je.top,et=$e?Xt("syncFocusToScroll.viewport.clientHeight",()=>{var lt,At;return(At=(lt=ke?.innerHeight)!=null?lt:se.clientHeight)!=null?At:0}):je.bottom,Be=nl.value;let Ge=null,pt=null;for(const[lt,At]of Be){if(!At)continue;const gt=Xt("syncFocusToScroll.slot.getBoundingClientRect",()=>At.getBoundingClientRect());gt.bottom<=Ke||gt.top>=et||(Ge==null&&(Ge=lt),pt=lt)}if(Ge==null||pt==null){const lt=A.value;if(!lt)return;const At=$e?{top:0}:Xt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>se.getBoundingClientRect()),gt=Xt("syncFocusToScroll.fallback.scrollTop",()=>Se(se,le,$e)),Rt=$e?(()=>{const qt=Xt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>lt.getBoundingClientRect()),Wt=($e?0:At.top)-qt.top;return Math.max(0,Wt)})():(()=>{const qt=ie(lt,se);return Math.max(0,gt-qt)})(),Bt=$e?Xt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var qt,Wt,Gt,yn;return(yn=(Gt=(Wt=ke?.innerHeight)!=null?Wt:(qt=le?.documentElement)==null?void 0:qt.clientHeight)!=null?Gt:se.clientHeight)!=null?yn:0}):Xt("syncFocusToScroll.fallback.root.clientHeight",()=>se.clientHeight);return void $h(ws(G0(Rt+.5*Math.max(0,Bt)),0,Math.max(0,Ae.value.length-1)),!0)}$h(Math.round((Ge+pt)/2),E)}}),{visibleNodeIndices:ev,nodeVisibilityHandles:ic,nodeVisibilityWatchStops:Th,nodeVisibilityFallbackTimers:I_,clearVisibilityFallback:Ih,markNodeVisible:Kl,cleanupNodeVisibility:aL,destroyNodeVisibilityState:tv}=ape({isClient:H,shouldTrackVisibleNodeIndices:()=>Fr.value,shouldCleanupNodeVisibility:()=>ln.value,onNodeMarkedVisible:E=>{ln.value?fr():ol.value=ws(E,0,Math.max(0,Ae.value.length-1))},onNodeVisibilityCleaned:E=>{sn.delete(E)&&sS()}}),{cleanupScrollListener:$_,setupScrollListener:uL}=(function(E){const{isClient:U,virtualizationEnabled:se,listenerEnabled:le,scrollRootElement:ke,resolveScrollContainer:$e,scheduleFocusSync:De,onScroll:He}=E;let tt=null,je=null;function Ke(){tt&&(tt(),tt=null),je=null,ke.value=null}function et(Be){const Ge=E.getScrollTop?E.getScrollTop(Be):Be.scrollTop;return Math.max(0,Number.isFinite(Ge)?Math.abs(Ge):0)}return{cleanupScrollListener:Ke,setupScrollListener:function(){if(!U)return;if(!((Be=le?.value)!=null?Be:se.value))return void Ke();var Be;const Ge=$e();if(!Ge)return void Ke();if(ke.value===Ge&&tt)return;Ke(),je=et(Ge);const pt=()=>{if(He?.(),se.value){const lt=(function(At){const gt=et(At),Rt=je;je=gt;const Bt=Math.max(480,.75*(At.clientHeight||0));return Rt==null?gt>Bt?{immediate:!0}:void 0:Math.abs(gt-Rt)>Bt?{immediate:!0}:void 0})(Ge);lt?De(lt):De()}};Ge.addEventListener("scroll",pt,{passive:!0}),ke.value=Ge,tt=()=>{Ge.removeEventListener("scroll",pt)}}}})({isClient:H,virtualizationEnabled:ln,listenerEnabled:S_,scrollRootElement:Pe,resolveScrollContainer:_e,scheduleFocusSync:fr,onScroll:function(){const E=ct.value;if(!E)return;const U=qd();if(!U||(function(le){if(Xd()>=Ni)return dr=null,!1;const ke=dr;if(ke==null)return!0;const $e=Math.abs(le.scrollTop-ke)<=2;return $e||(dr=null),$e})(U))return;const se=q_(U);se!=null?(se<-32||Math.abs(Math.max(0,se)-Math.max(0,E.distanceFromBottomPx))>32)&&dc("restore"):dc("restore")},getScrollTop:E=>{var U;const se=E.ownerDocument||((U=A.value)==null?void 0:U.ownerDocument)||document,le=E===se.documentElement||E===se.body||E===se.scrollingElement;return Xt("scrollListener.getScrollTop",()=>Se(E,se,le))}});function $h(E,U=!1){const se=ws(E,0,Math.max(0,Ae.value.length-1));!U&&Math.abs(se-ol.value)<=1||(ol.value=se,Ud())}function ws(E,U,se){return Math.min(Math.max(E,U),se)}function nv(E=Ae.value.length){const U=wt();return!Number.isInteger(U)||U<0?E:ws(U,0,E)}function ov(E){return E?.firstElementChild}function N_(E,U){var se;return E?(se=E.matches)!=null&&se.call(E,U)?E:E.querySelector(U):null}function cL(E,U){E<1||E>6||(re[E]=U)}function L_(){if(!Fn.value)return void(X.value=0);const E=Xt("updateExperimentContainerWidth.clientWidth",()=>{var U,se;return(se=(U=A.value)==null?void 0:U.clientWidth)!=null?se:0});X.value=E>0?E:0}let Vd=null;function sv(){Vd?.disconnect(),Vd=null}const F_=Vf("ViewportDeferredMarkdownCodeBlockNode",or({loader:()=>go(null,null,function*(){return(yield Ts(()=>import("./index5-Def2Zrxa.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:y1,delay:0,suspensible:!1}),y1);function O_(E){return E===F_}const R_=O(()=>h.value==="pre"?vi:h.value==="shiki"?F_:Uy);function P_(){var E;return((E=M.codeBlockProps)==null?void 0:E.showHeader)!==!1}function D_(E,U,se){const le=oc[U],ke=typeof le=="number"&&le>0;if(Ho.value&&!ke&&!(function($e){return!!Un.value.paragraph&&($e.type==="paragraph"||$e.type==="list_item"||$e.type==="list")})(E)){const $e=o$(E,se,te.value);if($e)return $e}if(Yt.value&&E.type==="code_block"){const $e=(function(De){if(De.type!=="code_block")return null;const He=gS(De,Wh(De));return O_(He)?"markdown":He===vi?"pre":He===R_.value||He===Uy?"monaco":null})(E);if($e==="monaco"||$e==="markdown"||$e==="pre")return(function(De,He){var tt,je,Ke;if(!De||De.type!=="code_block")return null;const et=He.rendererKind,Be=et!=="pre"&&He.showHeader!==!1,Ge=!!De.diff;let pt=0,lt=500;if(et==="monaco"){const gt=(tt=He.monacoOptions)!=null?tt:{},Rt=Qy(De,gt,He.width),Bt=(function(Wt){const Gt=typeof Wt?.fontSize=="number"&&Wt.fontSize>0?Wt.fontSize:12;return typeof Wt?.lineHeight=="number"&&Wt.lineHeight>0?Wt.lineHeight:Math.round(1.5*Gt)})(gt),qt=(function(Wt,Gt){var yn,_n;const eo=typeof((yn=Wt?.padding)==null?void 0:yn.top)=="number"?Wt.padding.top:Gt?0:8,xs=typeof((_n=Wt?.padding)==null?void 0:_n.bottom)=="number"?Wt.padding.bottom:Gt?0:8;return Math.max(0,eo)+Math.max(0,xs)})(gt,Ge);lt=typeof gt.MAX_HEIGHT=="number"&>.MAX_HEIGHT>0?gt.MAX_HEIGHT:500,pt=Math.round(Rt*Bt+qt)}else if(et==="markdown"){const gt=Qy(De);pt=Math.round(21*gt+32)}else{const gt=Qy(De);pt=Math.round(28*gt),lt=Number.POSITIVE_INFINITY}const At=Math.max(1,Math.min(pt,lt));return kt({kind:"code-block",height:Math.round(At+(Be?40:0)),contentHeight:At,rendererKind:et},Ge&&et==="monaco"?{diffInline:Qw((je=He.monacoOptions)!=null?je:{},(Ke=He.width)!=null?Ke:0)}:{})})(E,{rendererKind:$e,monacoOptions:M.codeBlockMonacoOptions,showHeader:P_(),width:se})}return null}s5(()=>{if(Le.value,un>0)return;const E=Ae.value,U=Lt();if(!E.length||!yt.value)return dn=[],lo=[],Yn=-1,ge.clear(),void(Xe.value=Vt);const se=X.value||Xt("estimatedNodeHeights.clientWidth",()=>{var je;return((je=A.value)==null?void 0:je.clientWidth)||0});if(!Number.isFinite(se)||se<=0)return dn=[],lo=[],Yn=-1,ge.clear(),void(Xe.value=Vt);const le=(function(je){return[Math.round(je),Ho.value,Yt.value,te.value,M.codeBlockMonacoOptions,P_(),h.value,Un.value,Yy.value]})(se),ke=dn.length<=E.length&&(De=le,($e=lo).length===De.length&&$e.every((je,Ke)=>Object.is(je,De[Ke])));var $e,De;const He=ke&&Yn===U?E.length:ke?nv(E.length):0,tt=ke?Array.from(ge):[];dn.length=E.length;for(let je=He;je=0&&jeXe.value);bt=(function(E){let U=!0,se=[0],le="";function ke(Ke){var et;const Be=E.nodeHeights[Ke];if(Number.isFinite(Be)&&Be>0)return Be;const Ge=E.parsedNodes.value[Ke],pt=Ge?.type,lt=!!((et=E.hasCustomParagraphComponent)!=null&&et.call(E)),At=E.estimatedNodeHeights.value[Ke],gt=At?.height;if(!(function(Bt,qt,Wt){return!!(Wt&&qt?.kind==="simple-text"&&(Bt==="paragraph"||Bt==="list_item"||Bt==="list"))})(pt,At,lt)&&Number.isFinite(gt)&>>0)return gt;const Rt=Yfe(Ge,E.getContainerWidth()||640);return pt==="heading"||pt==="paragraph"&&Rt<=28&&(function(Bt,qt){if(qt)return!1;const Wt=Bt.children;return!Array.isArray(Wt)||!Wt.length||Wt.every(i$)})(Ge,lt)?Rt:Math.max(E.averageNodeHeight.value,Rt)}function $e(){var Ke;const et=E.parsedNodes.value.length,Be=E.getPrefixCacheKeyParts().join(":");if(!U&&le===Be)return se;const Ge=new Array(et+1);Ge[0]=0;for(let pt=0;pt=((et=pt[Ge])!=null?et:0))return Ge-1;let lt=0,At=Ge-1,gt=Ge-1;for(;lt<=At;){const Rt=lt+At>>1;((Be=pt[Rt+1])!=null?Be:0)>=Ke?(gt=Rt,At=Rt-1):lt=Rt+1}return gt}function He(Ke,et){var Be,Ge;if(Ke>=et)return 0;if(E.heightEstimationActive.value)return(function(At,gt){var Rt,Bt;const qt=E.parsedNodes.value.length,Wt=v8(Math.trunc(At),0,qt),Gt=v8(Math.trunc(gt),Wt,qt);if(Wt>=Gt)return 0;const yn=$e();return((Rt=yn[Gt])!=null?Rt:0)-((Bt=yn[Wt])!=null?Bt:0)})(Ke,et);if(E.heightTreeSize.value!==E.parsedNodes.value.length){let At=0;for(let gt=Ke;gtWt<=0?0:E.fenwickRangeSum(lt,0,Wt)+(Wt-E.fenwickRangeSum(At,0,Wt))*pt;let Rt=0,Bt=Be.length-1,qt=Be.length-1;for(;Rt<=Bt;){const Wt=Rt+Bt>>1;gt(Wt+1)>=Ke?(qt=Wt,Bt=Wt-1):Rt=Wt+1}return qt}let Ge=Ke;for(let pt=0;pt0||Ke++}return Ke}return{markFallbackHeightPrefixDirty:function(){U=!0},getFallbackNodeHeight:ke,estimateHeightRange:He,estimateIndexForOffset:tt,estimateIndexForOffsetFromEnd:function(Ke){var et,Be;const Ge=E.parsedNodes.value;if(!Ge.length)return 0;if(Ke<=0)return Math.max(0,Ge.length-1);if(E.heightEstimationActive.value){const lt=(et=$e()[Ge.length])!=null?et:0;return De(Math.max(0,lt-Ke))}if(E.heightTreeSize.value===Ge.length){const lt=He(0,Ge.length);return tt(Math.max(0,lt-Ke))}let pt=Ke;for(let lt=Ge.length-1;lt>=0;lt--){const At=(Be=E.nodeHeights[lt])!=null?Be:E.averageNodeHeight.value;if(pt<=At)return lt;pt-=At}return 0},getEstimatedNodeHeightCount:je,buildVirtualHeightSummary:function(Ke){var et;const Be=E.parsedNodes.value.length;return{totalNodes:Be,measuredCount:E.heightStats.count,estimatedCount:je(),averageNodeHeight:E.averageNodeHeight.value,topSpacerHeight:Ke.topSpacerHeight,bottomSpacerHeight:Ke.bottomSpacerHeight,estimatedTotalHeight:He(0,Be),width:(et=Ke.width)!=null?et:E.getContainerWidth()}}}})({parsedNodes:Ae,nodeHeights:oc,heightStats:Gi,heightTreeSize:Z0,heightSumTree:GN,heightKnownTree:ZN,averageNodeHeight:g_,heightEstimationActive:Fn,estimatedNodeHeights:rc,getContainerWidth:Fs,hasCustomParagraphComponent:()=>!!Un.value.paragraph,getPrefixCacheKeyParts:()=>{var E;const U=Af(X.value||Xt("getFallbackHeightPrefix.clientWidth",()=>{var le;return((le=A.value)==null?void 0:le.clientWidth)||0})),se=((E=o.virtualScroll)==null?void 0:E.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Ae.value.length,Gi.count,Math.round(Gi.total),Math.round(100*g_.value),se,U,Fn.value?1:0,Yy.value,G.value,Un.value.paragraph?1:0]},fenwickRangeSum:nL}),Ye(()=>Ae.value.length,E=>{var U;ci(),E<=0?Sh():(EJN(U))),E!==Z0.value&&_h(E))},{immediate:!0});const dL=O(()=>{if(!ln.value)return Ae.value.map((le,ke)=>({node:le,index:ke}));const E=Ae.value.length,U=ws(bs.start,0,E),se=ws(bs.end,U,E);return Ae.value.slice(U,se).map((le,ke)=>({node:le,index:U+ke}))}),iv=O(()=>ln.value?tc(0,Math.min(bs.start,Ae.value.length)):0),rv=O(()=>{if(!ln.value)return 0;const E=Ae.value.length;return tc(Math.min(bs.end,E),E)});function B_(){return bt.buildVirtualHeightSummary({topSpacerHeight:iv.value,bottomSpacerHeight:rv.value,width:Ya()})}function fL(){const E=Ae.value,U=B_();return fn(kt({},U),{probe:{paragraphReady:!!te.value.paragraph,listItemReady:!!te.value.listItem,listWrapperOverhead:te.value.listWrapperOverhead,headingReadyLevels:Object.entries(te.value.headings).filter(([,se])=>!!se).map(([se])=>Number(se))},nodes:E.map((se,le)=>{var ke,$e,De,He,tt,je,Ke,et,Be;return{index:le,type:se.type,estimateKind:($e=(ke=rc.value[le])==null?void 0:ke.kind)!=null?$e:null,rendererKind:(He=(De=rc.value[le])==null?void 0:De.rendererKind)!=null?He:null,estimatedHeight:(je=(tt=rc.value[le])==null?void 0:tt.height)!=null?je:null,estimatedContentHeight:(et=(Ke=rc.value[le])==null?void 0:Ke.contentHeight)!=null?et:null,measuredHeight:(Be=oc[le])!=null?Be:null}})})}function lv(){return o.indexKey!=null?String(o.indexKey):ss.value?`virtual-${yo()}`:"markdown-renderer"}function z_(E){const U=String(E),se=`${lv()}-`;if(!U.startsWith(se))return null;const le=U.slice(se.length).match(/^(\d+)(?:$|-)/);if(!le)return null;const ke=Number(le[1]);return!Number.isInteger(ke)||ke<0||ke>=Ae.value.length?null:ke}function yo(){var E,U,se;const le=(E=o.virtualScroll)==null?void 0:E.sessionKey;return String(le!=null&&le!==""?le:(se=(U=o.indexKey)!=null?U:M.customId)!=null?se:xo)}function Uo(){var E;const U=(E=o.virtualScroll)==null?void 0:E.threadKey;return U==null||U===""?void 0:String(U)}const pL=O(()=>{var E,U,se;return(se=Uo())!=null?se:String((U=(E=o.indexKey)!=null?E:M.customId)!=null?U:xo)});function av(E){var U;return(E??"")===((U=Uo())!=null?U:"")}function il(){var E,U,se;return U=(E=o.virtualScroll)==null?void 0:E.measurementKey,se=(function(){const le=h.value;return(function(ke){var $e,De;const He=ke.renderer,tt=He==="monaco"?ke.codeBlockMonacoOptions:void 0,je=ke.codeBlockProps,Ke=He==="shiki";return[ke.isDark?"dark":"light",He==="monaco"?"code-rich":He==="pre"?"code-pre":"code-shiki",ke.codeBlockStream===!1?"code-static":"code-stream",ps(ke.codeBlockMinWidth),ps(ke.codeBlockMaxWidth),...Ke?[Bue(($e=je?.themes)!=null?$e:ke.themes,(De=je?.langs)!=null?De:ke.langs)]:[],ps(tt?.fontSize),ps(tt?.lineHeight),ps(tt?.fontFamily),ps(tt?.tabSize),ps(tt?.MAX_HEIGHT),ps(tt?.wordWrap),ps(tt?.wrappingIndent),ps(tt?.padding),ps(je?.showHeader),ps(je?.showCopyButton),ps(je?.showExpandButton),ps(je?.showPreviewButton),ps(je?.showCollapseButton),ps(je?.showFontSizeButtons)].join("\0")})({renderer:le,isDark:M.isDark,codeBlockStream:M.codeBlockStream,codeBlockMinWidth:M.codeBlockMinWidth,codeBlockMaxWidth:M.codeBlockMaxWidth,codeBlockMonacoOptions:le==="monaco"?M.codeBlockMonacoOptions:void 0,codeBlockProps:M.codeBlockProps,themes:le==="shiki"?M.themes:void 0,langs:le==="shiki"?M.langs:void 0})})(),[U==null?"":String(U),se].join("\0")}function Ya(){return Fs()}const Nh=O(()=>Af(Ya())),Oi=O(()=>[il(),Nh.value].join("\0")),hL=O(()=>{var E;return ss.value?["virtual",(E=Uo())!=null?E:"",yo(),Oi.value].join("\0"):o.indexKey});function lc(){M_.value+=1}function uv(E){return!(!E||!Number.isInteger(E.index)||E.index<0||E.index>=Ae.value.length||E.sessionKey!==yo()||E.threadKey!==Uo()||E.layoutEpochKey!==Oi.value)}function W_(E){const U=String(E),se=Rr.get(U);return se?uv(se)?se.index:null:z_(U)}function H_(E="async-node"){(Li.size||Rr.size)&&(Li.clear(),Rr.clear(),lc(),ho(E))}const ac=wn(Nb,null),cv={reportHeight(E,U){if(!Cn.value)return;const se=W_(E);if(se==null)return;const le=Or.get(se);if(!le)return;const ke=Number(U),$e=w_(se,le);(function(De,He,tt={}){sc(()=>b_(De,He,tt))})(se,Number.isFinite(ke)&&ke>0?Math.max(ke,$e||0):$e)},markPending(E){if(!Cn.value)return;const U=z_(E);U!=null&&(function(se,le){var ke;const $e=Rr.get(se);if($e&&uv($e))return Li.set(se,Math.max(0,(ke=Li.get(se))!=null?ke:0)+1),lc(),void ho("async-node");Li.set(se,1),Rr.set(se,(function(De){return{index:De,sessionKey:yo(),threadKey:Uo(),layoutEpochKey:Oi.value}})(le)),lc(),ho("async-node")})(String(E),U)},markSettled(E){if(!Cn.value)return;const U=String(E),se=W_(E);(se!=null||(function(le){return Li.has(String(le))})(U))&&(function(le){var ke;const $e=(ke=Li.get(le))!=null?ke:0;return!($e<=0||($e<=1?(Li.delete(le),Rr.delete(le)):Li.set(le,$e-1),lc(),$e===1&&ho("async-node"),0))})(U)&&se!=null&&rl()}};function mL(){let E=0;for(const U of Or.values())E+=Xt("getVisibleDomHeight.offsetHeight",()=>{var se;return(se=U?.offsetHeight)!=null?se:0});return Math.ceil(Math.max(0,E))}Vn(Nb,{reportHeight(E,U){cv.reportHeight(E,U),ac?.reportHeight(E,U)},markPending(E){cv.markPending(E),ac?.markPending(E)},markSettled(E){cv.markSettled(E),ac?.markSettled(E)}});let dv,fv=null,uc=null;function Lh(E){return E!==!1&&E!=null&&E!==""}function j_(){return ln.value?(function(){if(!ln.value)return!0;const E=Ae.value.length,U=ws(bs.start,0,E),se=ws(bs.end,U,E);if(U>=se)return!0;for(let le=U;le=Ah.value}function pv(){return ft.value===!0&&!Tt.value&&X0.value===0&&ql.size===0&&sl.size===0&&Fi==null&&j_()}function U_(){var E,U;if(((E=o.virtualScroll)==null?void 0:E.settleMode)!=="manual"||fv===yo()&&dv===Uo())return!0;const se=(U=o.virtualScroll)==null?void 0:U.settledToken;return!!Lh(se)&&uc===rf(se)}function hv(){return pv()&&U_()}function gL(E,U){return U.totalNodes<=0?E==="final"?"final":"estimate":U.measuredCount>=U.totalNodes?E==="final"?"final":"measured":U.measuredCount>0||U.estimatedCount>0?"mixed":"estimate"}function Ja(E="manual",U){const se=B_(),le=(function(ke){return ke||(ft.value!==!0?Ae.value.length>0?"streaming":"estimating":!j_()||sl.size>0||Fi!=null?"measuring":hv()?"settled":"settling")})(U);return{sessionKey:yo(),threadKey:Uo(),phase:le,nodeCount:se.totalNodes,liveRange:{start:bs.start,end:bs.end},renderedCount:xn.value,measuredCount:se.measuredCount,estimatedCount:se.estimatedCount,averageNodeHeight:se.averageNodeHeight,topSpacerHeight:se.topSpacerHeight,bottomSpacerHeight:se.bottomSpacerHeight,visibleDomHeight:mL(),totalHeight:V_(),width:se.width,final:ft.value===!0,stable:hv(),confidence:gL(le,se),reason:E}}function qd(){const E=Pe.value||_e(),U=A.value;if(!E||!U)return null;const se=E.ownerDocument||U.ownerDocument||document,le=E===se.documentElement||E===se.body||E===se.scrollingElement,ke=Xt("getScrollBox.scrollTop",()=>Se(E,se,le)),$e=Xt("getScrollBox.scrollHeight",()=>{var He,tt,je,Ke,et;return le?Math.max((tt=(He=se.documentElement)==null?void 0:He.scrollHeight)!=null?tt:0,(Ke=(je=se.body)==null?void 0:je.scrollHeight)!=null?Ke:0,(et=E.scrollHeight)!=null?et:0):E.scrollHeight}),De=Xt("getScrollBox.clientHeight",()=>{var He;return le?((He=se.documentElement)==null?void 0:He.clientHeight)||E.clientHeight||0:E.clientHeight});return{root:E,doc:se,isViewportRoot:le,scrollTop:ke,scrollHeight:$e,clientHeight:De}}function V_(){const E=Ae.value.length,U=Math.max(0,tc(0,E)),se=Xt("getRendererLogicalHeight.offsetHeight",()=>{var ke,$e;return($e=(ke=A.value)==null?void 0:ke.offsetHeight)!=null?$e:0}),le=Math.max(0,se>0?se:Xt("getRendererLogicalHeight.scrollHeight",()=>{var ke,$e;return($e=(ke=A.value)==null?void 0:ke.scrollHeight)!=null?$e:0}));return E<=0?Math.ceil(se):ln.value?U>0?Math.max(1,Math.ceil(U),(function(){let ke=iv.value+rv.value;for(const $e of sn.values())$e&&(ke+=Math.max(0,Xt("getVirtualizedDomLogicalHeight.offsetHeight",()=>$e.offsetHeight||0)));return Math.ceil(Math.max(0,ke))})(),(function(ke,$e){return ke<=0||$e<=0?0:$e<=ke+Math.max(512,.05*ke)?Math.ceil($e):0})(U,le)):Math.max(1,Math.ceil(le)):Cn.value?U>0||Gi.count>0||bt.getEstimatedNodeHeightCount()>0?(Ln.value&&xn.value,Math.max(1,Math.ceil(le),Math.ceil(U))):Math.ceil(le):Math.max(1,Math.ceil(le),Math.ceil(U))}function q_(E){const U=A.value;if(!U)return null;const se=Xt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>U.getBoundingClientRect());return(function(ke){return ke.isViewportRoot?ke.clientHeight:Xt("getViewportBottomInRoot.getBoundingClientRect",()=>ke.root.getBoundingClientRect().bottom)})(E)-se.bottom}function vL(E={}){const U=E.requireViewport!==!1,se=(function($e=64){const De=qd(),He=A.value;if(!De||!He)return!1;const tt=(function(Ke){if(Ke.isViewportRoot)return{top:0,bottom:Ke.clientHeight};const et=Xt("getVirtualViewportRect.getBoundingClientRect",()=>Ke.root.getBoundingClientRect());return{top:et.top,bottom:et.bottom}})(De),je=Xt("isRendererNearVirtualViewport.getBoundingClientRect",()=>He.getBoundingClientRect());return je.bottom>=tt.top-$e&&je.top<=tt.bottom+$e})();if(U&&!se)return null;const le=(function(){const $e=qd(),De=A.value;if(!$e||!De||Math.max(0,$e.scrollHeight-$e.scrollTop-$e.clientHeight)>64)return null;const He=q_($e);return He==null?null:He>=-8&&He<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,He)}:null})();if(le)return{anchor:le,captured:!0};const ke=h_();if(ke)return{anchor:{type:"node",nodeIndex:ke.nodeIndex,offsetWithinNodePx:ke.offsetWithinNodePx},captured:se};if(E.allowFallback===!0){const $e=(function(){const De=Ae.value.length;return De<=0?null:{type:"node",nodeIndex:ws(ol.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return $e?{anchor:$e,captured:!1}:null}return null}function mv(E){let U=2166136261;for(let se=0;se>>0).toString(36)}function yL(E,U){let se=E;for(let le=0;le8192?`${le.slice(0,8192)}...${le.length}`:le;return`${le.length}:${mv(ke)}`})(E)}`;if(typeof E=="function")return"fn";if(typeof E!="object")return typeof E;if(U.has(E))return"cycle";if(se>=6)return"max-depth";U.add(E);try{if(Array.isArray(E)){if(E.length<=160){const je=[];for(let Ke=0;Ke=He&&De.push(Ke)}return[`a:${E.length}`,`h=${$e.join(",")}`,`t=${De.join(",")}`,`all=${(tt>>>0).toString(36)}`].join(":")}const le=E,ke=Object.keys(le).filter($e=>{const De=le[$e];return $e!=="parent"&&$e!=="el"&&$e!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||kL.has($e))}).sort();return`o:${ke.length}:${ke.map($e=>`${$e}=${Fh(le[$e],U,se+1)}`).join(";")}`}finally{U.delete(E)}}let gv=-1,vv="",Xa=[2166136261];function Kd(E){const U=Ae.value[E];return U?mv(Fh(U)):""}function bL(E,U){let se=E;for(let le=0;le>>0}function yv(){var E,U;const se=G.value;if(gv===se)return vv;const le=Ae.value.length;let ke=nv(le);(gv!==se-1||ke>le||Xa.length>>0).toString(36),gv=se,vv}function cc(E,U={}){var se;const le=U.includeHeightCache===!0,ke=(se=U.includeContentHash)!=null?se:le,$e=le?(function(He){const tt=(function(){var lt,At;const gt=Number((At=(lt=o.virtualScroll)==null?void 0:lt.heightCacheLimit)!=null?At:5e3);return!Number.isFinite(gt)||gt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(gt))})();if(!Number.isFinite(tt)||He.length<=tt)return He;const je=new Map,Ke=lt=>{!lt||je.size>=tt||je.set(lt.index,lt)},et=Ae.value.length,Be=ws(bs.start-2*Po.value,0,et),Ge=ws(bs.end+2*Po.value,Be,et);for(const lt of He)lt.index>=Be&<.index=0&&je.sizelt.index-At.index).slice(0,tt)})(eL().map(He=>{var tt;const je=Ae.value[He.index];return je?fn(kt({},He),{nodeType:String((tt=je.type)!=null?tt:""),signature:Kd(He.index)}):null}).filter(He=>!!He)):[],De=vL({allowFallback:U.allowAnchorFallback===!0,requireViewport:U.requireViewport});return De||$e.length||U.includeEmptyState===!0?fn(kt({sessionKey:E.sessionKey,threadKey:E.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:E,width:E.width,contentHash:ke?yv():void 0,measurementKey:il()||void 0,heightCache:$e.length?$e:void 0}):null}function kv(E){var U,se;const le=qd();if(!le)return;const ke=(function(He){const tt=A.value;if(!tt)return null;const je=ie(tt,He.root),Ke=Ae.value.length,et=Xt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>tt.offsetHeight||0),Be=Math.max(0,et>0?et:Ke>0?Xt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>tt.scrollHeight||0):0),Ge=V_();return je+Math.max(Be,Ge)})(le);if(ke==null)return;const $e=Math.max(0,E.distanceFromBottomPx),De=Math.max(0,ke-le.clientHeight-$e);(function(He){Ni=Xd()+120,dr=He})(De),le.isViewportRoot?(se=(U=le.doc.defaultView)==null?void 0:U.scrollTo)==null||se.call(U,0,De):h8(le.root,le.doc,De,{isReverseFlexScrollRoot:ce,getNormalizedScrollTop:Se})}const bv=[];function K_(){if(H)for(pn!=null&&($o?.(pn),pn=null);bv.length;){const E=bv.pop();E!=null&&window.clearTimeout(E)}}function dc(E){const U=!!ct.value;ct.value=null,Ni=0,dr=null,K_(),U&&E&&ho(E)}function fc(){if(!ct.value||!H||pn!=null)return;const E=()=>{pn=null;const U=ct.value;U&&kv(U)};pn=Nn?Nn(E):null,pn==null&&E()}function G_(E,U={}){const se=Ae.value.length;return se<=0?[]:E.filter(le=>!(!Number.isInteger(le.index)||le.index<0||le.index>=se)&&!(!Number.isFinite(le.height)||le.height<=0)&&!(U.requireSignature&&!le.signature)&&!(U.requireCompatibilityMetadata&&!le.nodeType&&!le.signature)&&(function(ke){var $e;const De=Ae.value[ke.index];return!(!De||ke.nodeType&&ke.nodeType!==String(($e=De.type)!=null?$e:"")||ke.signature&&ke.signature!==Kd(ke.index))})(le))}function Z_(E){const U=Af(Ya()),se=Af(E);return U!==-1&&se!==-1&&U===se}function wv(E){var U;const se=Number(E?.width);if(Number.isFinite(se)&&se>0)return se;const le=Number((U=E?.metrics)==null?void 0:U.width);return Number.isFinite(le)&&le>0?le:null}function Y_(E){var U;return E.sessionKey===yo()&&!!av(E.threadKey)&&((U=E.measurementKey)!=null?U:"")===il()&&!!Z_(wv(E))&&!!(function(se){const le=se.heightCache;return!!le?.length&&(J_(se)?le.some(ke=>!!(ke.nodeType||ke.signature)):le.some(ke=>!!ke.signature))})(E)}function J_(E){return!!(E.contentHash&&E.contentHash===yv())}function wL(E){return!J_(E)}let Qa=null,eu=null,Oh=null,Gd=null,Zd=null;function xv(E){var U;const se=E.map(ke=>{var $e,De;return[ke.index,Math.round(10*ke.height),($e=ke.nodeType)!=null?$e:"",(De=ke.signature)!=null?De:""].join("")}).join(""),le=Af(Ya());return[(U=Uo())!=null?U:"",yo(),il(),Ae.value.length,le,E.length,mv(se)].join(":")}function X_(E=(U=>(U=o.virtualScroll)==null?void 0:U.heightCache)()){if(!Cn.value||!E?.length||Ae.value.length<=0||!Z_((U=o.virtualScroll)==null?void 0:U.heightCacheWidth))return!1;var U;const se=G_(E,{requireSignature:!0});if(!se.length)return!1;const le=xv(se);return le===Qa?(eu="standalone",!0):(x_(se,{mode:"merge"}),ci(),Qa=le,eu="standalone",ef(),ho("restore"),!0)}function _v(E,U={}){var se,le,ke;if(!Cn.value||!E||E.sessionKey!==yo()||!av(E.threadKey)||Ae.value.length<=0)return!1;const $e=!!((se=E.heightCache)!=null&&se.length)&&!Rh(),De=!E.anchor||E.anchorCaptured===!1&&U.allowUncapturedAnchor!==!0?null:E.anchor,He=U.restoreAnchor===!0&&!!De&&!Rh()&&Number(wv(E))>0;let tt=!1;if((le=E.heightCache)!=null&&le.length&&Y_(E)){const Ke=G_(E.heightCache,{requireCompatibilityMetadata:!E.contentHash,requireSignature:wL(E)});Ke.length&&(x_(Ke,{mode:"merge"}),ci(),Qa=xv(Ke),eu="restore",ef(),tt=!0)}if($e||He)return!1;if(!U.restoreAnchor||!De)return tt&&ho("restore"),!0;const je=(function(Ke,et){var Be;const Ge=Ke.anchor,pt=Ge?Ge.type==="bottom"?`bottom:${Math.round(Ge.distanceFromBottomPx)}`:`node:${Ge.nodeIndex}:${Math.round(Ge.offsetWithinNodePx)}`:"none";return[(Be=Uo())!=null?Be:"",yo(),il(),Nh.value,et,pt].join(":")})(E,(ke=U.restoreToken)!=null?ke:"imperative");return Oh===je?(tt&&ho("restore"),!0):(Oh=je,(function(Ke){const et=()=>{if(Ke.type==="node")return dc(),void m_({nodeIndex:Ke.nodeIndex,offsetWithinNodePx:Ke.offsetWithinNodePx});if(xh(),nc.value=null,ct.value=Ke,K_(),kv(Ke),H)for(const Be of[0,120,280,480])bv.push(window.setTimeout(()=>{const Ge=ct.value;Ge&&kv(Ge)},Be))};(function(Be){if(!ln.value)return!1;const Ge=Ae.value.length;return!(Ge<=0||(ol.value=Be.type==="node"?ws(Be.nodeIndex,0,Ge-1):Ge-1,Ud(),0))})(Ke)?xt(et):et()})(De),ho("restore"),!0)}function Rh(){const E=Ya();return Number.isFinite(E)&&E>0}function Q_(E){var U;return E.sessionKey===yo()&&!!av(E.threadKey)&&(Ae.value.length<=0||!(!((U=E.heightCache)!=null&&U.length)||Rh())||!(!(E.anchor&&Number(wv(E))>0)||Rh()))}function Sv(){Dt.clear();for(const E of Object.keys(oc)){const U=Number(E);Number.isInteger(U)&&U>=0&&U{let U=!1,se=null;const le=()=>{U||(U=!0,se!=null&&window.clearTimeout(se),E())};if(Nn)return Nn(le),void(se=window.setTimeout(le,50));se=window.setTimeout(le,0)})}function Cv(E,U=Uo(),se=Oi.value){return yo()===E&&Uo()===U&&Oi.value===se}function Av(){return go(this,arguments,function*(E={}){var U,se,le,ke,$e;const De=yo(),He=Uo(),tt=Oi.value,je=(U=E.frames)!=null?U:2,Ke=(se=E.timeoutMs)!=null?se:120,et=(le=E.reason)!=null?le:"manual",Be=E.expectedSettledTokenKey,Ge=E.flushPendingTimers===!0,pt=Ja(et),lt=()=>fn(kt({},pt),{phase:pt.final?"settling":pt.phase,stable:!1,confidence:pt.confidence==="final"?"mixed":pt.confidence,reason:et}),At=()=>Cv(De,He,tt)&&(Be==null||Qd()===Be);for(let qt=0;qtwindow.setTimeout(Wt,qt))})(Ke),!At()||(Ge&&T_(),rl(),Yd(),!At()))return lt();const gt=pv();gt&&(fv=De,dv=He,((ke=o.virtualScroll)==null?void 0:ke.settleMode)==="manual"&&Be!=null&&Lh(($e=o.virtualScroll)==null?void 0:$e.settledToken)&&Qd()===Be&&(uc=rf(o.virtualScroll.settledToken)));const Rt=At()&>&&U_(),Bt=Ja(et,Rt?"final":void 0);return $v(Bt,!0),Bt})}let Mv="content",tu=null,nu=null,Ev=0,Jd=null,pc=null,Tv=null,Iv=null;function Xd(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function tS(E){var U,se;const le=Jd;if(!le)return!0;const ke=(se=(U=o.virtualScroll)==null?void 0:U.heightDiffThresholdPx)!=null?se:1;return Math.abs(E.totalHeight-le.totalHeight)>ke||E.sessionKey!==le.sessionKey||E.phase!==le.phase||E.stable!==le.stable||E.final!==le.final||E.threadKey!==le.threadKey||E.nodeCount!==le.nodeCount||E.measuredCount!==le.measuredCount||E.width!==le.width}function Qd(E=(U=>(U=o.virtualScroll)==null?void 0:U.settledToken)()){return ps(E)}function nS(E,U){var se,le;return[E,U.sessionKey,(se=U.threadKey)!=null?se:"",il(),yv(),ps((le=o.virtualScroll)==null?void 0:le.settledToken),Math.round(U.totalHeight),Math.round(U.width)].join("\0")}function ef(){Tv=null,Iv=null,pc=null}function xL(E){const U=E.heightCache;return U?.length?xv(U):""}function tf(E){var U,se,le;const ke=E.metrics,$e=E.anchor?(De=E.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[E.sessionKey,(U=E.threadKey)!=null?U:"",(se=E.measurementKey)!=null?se:il(),(le=E.contentHash)!=null?le:"",xL(E),$e,E.anchorCaptured?1:0,ke.liveRange.start,ke.liveRange.end,ke.renderedCount,ke.nodeCount,Math.round(ke.totalHeight),Math.round(ke.width),ke.phase,ke.stable?1:0].join("\0")}function $v(E,U=!1){if(!Cn.value||(function(De=!1){return!De&&ss.value&&!Ls.value})(U))return;const se=U||tS(E),le=(function(De,He=!1){return He||De.stable||De.phase==="final"?{state:cc(De,{includeHeightCache:!0})}:{state:cc(De)}})(E,U),ke=le.state,$e=!!(ke&&(se||(function(De,He=!1){return!!He||tf(De)!==pc})(ke,U)));if(se&&(D(E),Jd=E,Ev=Xd()),ke&&$e&&(B(ke),ke.anchor&&z(ke.anchor),pc=tf(ke)),E.stable){const De=nS("settled",E);if(De!==Tv){Tv=De;const He=cc(E,{includeHeightCache:!0});He&&(B(He),pc=tf(He)),(function(tt){s("render-settled",tt)})(E)}}if(E.phase==="final"){const De=nS("final",E);if(De!==Iv){Iv=De;const He=cc(E,{includeHeightCache:!0});He&&(B(He),pc=tf(He)),(function(tt){s("render-final",tt)})(E)}}}function Nv(){tu!=null&&($o?.(tu),tu=null),nu!=null&&H&&(window.clearTimeout(nu),nu=null)}function oS(){tu=null,nu=null,(function(E){if(sl.size>0||Fi!=null)return!0;switch(E){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(Mv)&&(rl(),Yd()),$v(Ja(Mv))}function ho(E){var U,se;if(!Cn.value||(Mv=E,tu!=null||nu!=null))return;const le=Math.max(0,(se=(U=o.virtualScroll)==null?void 0:U.emitIntervalMs)!=null?se:32),ke=Math.max(0,le-(Xd()-Ev)),$e=()=>{nu=null,tu=Nn?Nn(oS):null,tu==null&&oS()};H&&ke>0?nu=window.setTimeout($e,ke):$e()}function sS(){tl.value+=1}function Ph(E){if(Ln.value&&E>=xn.value){const U=Ae.value[E],se=at.value===!0&&ft.value!==!0&&E>=Ae.value.length-2,le=U?.type==="code_block"||U?.type==="image"||U?.type==="mermaid"||U?.type==="infographic";if(!se||le)return!1}return!Fr.value||E=he.value&&(Q.value||(Q.value=!0,tv()),!__.value||!ks))return hc(E),void(U&&Kl(E,!0));if(E{if(I_.delete($e),!Fr.value||ev.value.has($e))return;const tt=sn.get($e);if(!tt)return;const je=_e(tt),Ke=tt.ownerDocument||document,et=Ke.defaultView||window,Be=!je||je===Ke.documentElement||je===Ke.body,Ge=!Be&&je?Xt("nodeVisibilityFallback.root.getBoundingClientRect",()=>je.getBoundingClientRect()):null,pt=Be?0:Ge.top,lt=Be?Xt("nodeVisibilityFallback.clientHeight",()=>{var gt,Rt;return(Rt=(gt=et.innerHeight)!=null?gt:je?.clientHeight)!=null?Rt:0}):Ge.bottom,At=Xt("nodeVisibilityFallback.node.getBoundingClientRect",()=>tt.getBoundingClientRect());At.bottom>=pt-500&&At.top<=lt+500&&Kl($e,!0)},1800+De);I_.set($e,He)})(E);let ke=null;ke=Ye(()=>le.isVisible.value,$e=>{if($e){Ih(E),Kl(E,!0),ke?.(),Th.delete(E),ic.get(E)===le&&ic.delete(E);try{le.destroy()}catch{}}},{immediate:!0}),Th.set(E,ke),ln.value&&fr()}function Lv(){Fi=null,sc(()=>{let E=!1;for(const[U,se]of sl)sl.delete(U),Or.get(U)===se.el&&Za.get(U)===se.version&&(E=b_(U,se.height,{allowShrink:se.allowShrink})||E);return E})}function mc(){Fi!=null&&($o?.(Fi),Fi=null),sl.clear()}function Bh(E,U){(function(se,le,ke){var $e;if(!Number.isFinite(ke)||ke<=0||Or.get(se)!==le)return;const De=Za.get(se);if(De==null)return;const He=Ae.value[se],tt=Tt.value&&ft.value!==!0&&!(($e=o.nodes)!=null&&$e.length)&&se>=Ae.value.length-2,je=!(He?.loading===!0||tt),Ke=sl.get(se),et=Ke?Ke.allowShrink&&je:je,Be=Ke&&!et?Math.max(Ke.height,ke):ke;sl.set(se,{height:Be,allowShrink:et,version:De,el:le}),Fi==null&&(Fi=Nn?Nn(Lv):null,Fi==null&&Lv())})(E,U,w_(E,U))}function rl(){for(const[E,U]of Or)U&&Bh(E,U)}function iS(){Tn?.disconnect(),Tn=null,Qn.clear()}function Fv(){for(;Ch.length;)Eh(Ch.pop())}Ye(Ls,E=>{E&&ho("content")},{flush:"post"}),t({getVirtualMetrics:Ja,captureVirtualState:function(E={}){var U;return cc(Ja("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:E.allowFallbackAnchor===!0,requireViewport:E.requireViewport===!0,includeEmptyState:(U=E.includeEmptyState)==null||U})},restoreVirtualState:function(E,U={}){const se=U.restoreAnchor===!0,le=U.restoreToken==null?"imperative":String(U.restoreToken);Gd=E,Zd={restoreAnchor:se,restoreToken:le,allowUncapturedAnchor:U.allowUncapturedAnchor===!0},!_v(E,{restoreAnchor:se,restoreToken:le,allowUncapturedAnchor:U.allowUncapturedAnchor===!0})&&Q_(E)||(Gd=null,Zd=null)},forceMeasure:function(E="manual"){return go(this,null,function*(){yield xt(),yield eS(),rl(),Yd(),yield xt();const U=Ja(E);return $v(U,!0),U})},settle:Av,scrollToNode:function(E,U="start"){dc(),xh();const se=Ae.value.length;if(se<=0)return;const le=ws(E,0,se-1),ke=()=>{var $e;const De=qN({nodeIndex:le,offsetWithinNodePx:0}),He=K0(le),tt=qd(),je=($e=tt?.clientHeight)!=null?$e:0,Ke=UN();let et=De;if(U==="center")et=De-je/2+He/2;else if(U==="end")et=De-je+He;else if(U==="nearest"&&Ke!=null){if(De>=Ke&&De+He<=Ke+je)return;et=DeOs.value,E=>{if(!E){iS();for(const U of Vl.values())for(const se of U)Eh(se);Vl.clear(),Za.clear(),Fv(),mc()}},{immediate:!0}),Ye(ft,E=>{E&&(function(){if(H&&ft.value&&Or.size){Fv();for(const U of[80,240,640]){const se=E_(U,()=>{for(const[le,ke]of Or)ke&&Bh(le,ke)},"final");se!=null&&Ch.push(se)}}})(),ho(E?"final":"content")});const _L=m8(()=>ho("content"),16),SL=m8(()=>ho("batch"),16);Ye([()=>Ae.value.length,()=>xn.value],()=>{ct.value&&fc(),_L()},{flush:"post",immediate:!0}),Ye([()=>bs.start,()=>bs.end],()=>{SL()},{flush:"post"});const{cleanupBatchScheduler:CL}=(function(E){const{props:U,isClient:se,isTestEnv:le,parsedNodesIdentity:ke,parsedNodeCount:$e,desiredRenderedCount:De,datasetKey:He,batchingEnabled:tt,incrementalRenderingActive:je,resolvedBatchSize:Ke,resolvedInitialBatch:et,renderedCount:Be,adaptiveBatchSize:Ge,previousRenderContext:pt,previousBatchConfig:lt,requestFrame:At,cancelFrame:gt,hasIdleCallback:Rt,cleanupNodeVisibility:Bt,onDatasetKeyChanged:qt,onDatasetChanged:Wt}=E;let Gt=null,yn="raf",_n=null,eo=0,xs=!1,fs=!1;const pr=new Set,Pr=new Set;function df(){if(se){Gt!=null&&(yn==="raf"&>?gt(Gt):yn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Gt):yn==="timeout"&&window.clearTimeout(Gt),Gt=null),eo+=1;for(const Rs of pr)gt&>(Rs);for(const Rs of Pr)window.clearTimeout(Rs);pr.clear(),Pr.clear(),_n=null,xs=!1,fs=!1}}function Gh(){return typeof performance<"u"?performance.now():Date.now()}function _S(Rs){(function(ll){var Zl;if(!je.value)return;const al=Math.max(2,(Zl=U.renderBatchBudgetMs)!=null?Zl:6),ul=Math.max(1,Ke.value||1),hr=Math.max(1,Math.floor(ul/4));ll>1.5*al?Ge.value=Math.max(hr,Math.floor(.8*Ge.value)):ll<.6*al&&Ge.value=al)return;const ul=Math.max(1,Rs),hr=()=>{const yc=Gh();Gt=null;const ff=_n??ul;_n=null;const kc=Gh();Be.value=Math.min(al,Be.value+ff),Bt(Be.value),(function(Wv,Zh){if(!se)return void _S(Zh);xs=!0;const MS=++eo;xt().then(()=>{var ES;if(MS!==eo)return;const qL=Gh(),KL=Math.max(Zh,qL-Wv),TS=()=>{MS===eo&&_S(KL)};if(At){let su=null,bc=null,$S=!1;const NS=()=>{$S||($S=!0,su!==null&&(pr.delete(su),su=null),bc!==null&&(Pr.delete(bc),window.clearTimeout(bc),bc=null),TS())};return su=At(()=>{NS()}),pr.add(su),bc=window.setTimeout(()=>{su!==null&>&>(su),NS()},Math.max(32,(ES=U.renderBatchIdleTimeoutMs)!=null?ES:120)),void Pr.add(bc)}const IS=window.setTimeout(()=>{Pr.delete(IS),TS()},0);Pr.add(IS)})})(yc,Gh()-kc)};if(!se||fi.immediate)return void hr();const Yl=Math.max(0,(ll=U.renderBatchDelay)!=null?ll:16);if(_n=_n!=null?Math.max(_n,ul):ul,Gt==null){if(!le&&Rt&&window.requestIdleCallback){const yc=Math.max(0,(Zl=U.renderBatchIdleTimeoutMs)!=null?Zl:120);return yn="idle",void(Gt=window.requestIdleCallback(()=>hr(),{timeout:yc}))}if(At&&!le)return yn="raf",void(Gt=At(()=>{Yl===0?hr():(yn="timeout",Gt=window.setTimeout(()=>hr(),Yl))}));yn="timeout",Gt=window.setTimeout(()=>hr(),Yl)}}function CS(Rs,fi={}){xs?fs=!0:Rs==null?AS():SS(Rs,fi)}function AS(){je.value&&SS(tt.value?Math.max(1,Math.round(Ge.value)):Math.max(1,Ke.value))}return Ye([ke,$e,He,je,Ke,et,()=>U.renderBatchDelay],()=>{var Rs;const fi=$e.value,ll=pt.value,Zl=He.value,al=!Object.is(Zl,ll.key),ul=fi!==ll.total,hr=al||ul;pt.value={key:Zl,total:fi};const Yl=lt.value,yc=(Rs=U.renderBatchDelay)!=null?Rs:16,ff=Yl.batchSize!==Ke.value||Yl.initial!==et.value||Yl.delay!==yc||Yl.enabled!==je.value;lt.value={batchSize:Ke.value,initial:et.value,delay:yc,enabled:je.value},al&&qt(fi),(hr||ff||!je.value)&&df(),(hr||ff)&&(Ge.value=Math.max(1,Ke.value||1)),hr&&Wt();const kc=De.value;if(!fi)return Be.value=0,void Bt(0);if(!je.value)return Be.value=kc,void Bt(Be.value);const Wv=al||ll.total===0;Be.value=Wv||ff?Math.min(kc,et.value):Math.min(Be.value,kc);const Zh=Math.max(1,et.value||Ke.value||fi);Be.value{je.value&&(typeof fi=="number"&&Rs<=fi||Rs>Be.value&&CS())}),{cleanupBatchScheduler:df}})({props:M,isClient:H,isTestEnv:Me,parsedNodesIdentity:_o,parsedNodeCount:Zn,desiredRenderedCount:Ah,datasetKey:hL,batchingEnabled:gn,incrementalRenderingActive:Ln,resolvedBatchSize:Ve,resolvedInitialBatch:an,renderedCount:xn,adaptiveBatchSize:Ce,previousRenderContext:ue,previousBatchConfig:Ne,requestFrame:Nn,cancelFrame:$o,hasIdleCallback:Lr,cleanupNodeVisibility:aL,onDatasetKeyChanged:E=>{mc(),Sh(),ci(),ef(),E>0&&_h(E)},onDatasetChanged:()=>{ln.value&&fr({immediate:!0})}});Ye([S_,ln,()=>A.value,()=>ee()],([E,U])=>{if(!E)return $_(),void Q0();uL(),U?fr({immediate:!0}):Q0()},{flush:"post",immediate:!0}),Ye([()=>Ae.value.length,()=>ln.value],E=>go(null,[E],function*([U,se]){se&&U&&H&&(yield xt(),fr({immediate:!0}))}),{flush:"post"}),Ye(Fn,E=>{E&&(function(){var U;if(Xn.value&&io.value&&ro.value&&((U=ys.value)!=null&&U[1]))return;const se=Et({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),le=Et({type:"list_item",children:[se],raw:"- Probe paragraph text"}),ke=Et({type:"list",ordered:!1,items:[le],raw:"- Probe paragraph text"});Xn.value=se,io.value=le,ro.value=ke;const $e={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)$e[De]=Et({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});ys.value=$e})()},{immediate:!0}),Ye([()=>A.value,Fn],()=>{if(!Fn.value)return sv(),void(X.value=0);L_(),sv(),Fn.value&&A.value&&typeof ResizeObserver<"u"&&(Vd=new ResizeObserver(()=>{L_(),nc.value&&jd(),ct.value&&fc(),ho("resize")}),Vd.observe(A.value))},{immediate:!0}),Ye([Fn,qs,Oi],()=>go(null,null,function*(){if(!Fn.value)return te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void ci();yield xt(),(function(){if(!Fn.value||typeof window>"u")return te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void ci();const E={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},U=N_(ov(L.value),".paragraph-node");E.paragraph=ek(L.value,U,"pre-wrap");const se=ov(W.value),le=se?.querySelector(".paragraph-node");E.listItem=ek(W.value,le,"pre-wrap");const ke=Xt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,He;return(He=(De=j.value)==null?void 0:De.offsetHeight)!=null?He:0}),$e=Xt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,He;return(He=(De=W.value)==null?void 0:De.offsetHeight)!=null?He:0});E.listWrapperOverhead=Math.max(0,ke-$e);for(let De=1;De<=6;De++){const He=N_(ov(re[De]),`h${De}`);E.headings[De]=ek(re[De],He,"pre-wrap")}te.value=E,ci()})()}),{flush:"post",immediate:!0}),Ye(()=>Ae.value.length,()=>{ln.value&&fr({immediate:!0})}),Ye([Fn,X],()=>{ci(),ln.value&&fr({immediate:!0}),nc.value&&jd(),ct.value&&fc(),ho("resize")},{immediate:!1}),Ye(()=>Fr.value,E=>{if(E)for(const[U,se]of sn)Dh(U,se);else if(tv(),ln.value)fr({immediate:!0});else for(const[U,se]of sn)se&&Kl(U,!0)},{immediate:!1}),Ye([We,he,()=>ee()],()=>{var E;(E=ks.refresh)==null||E.call(ks);for(const[U,se]of sn)Dh(U,se)},{immediate:!1}),Ye([()=>M.viewportPriority,()=>Ae.value.length,he],([E,U,se])=>{if(E!==!1){if(Q.value&&(U<=200||U<=se)){Q.value=!1;for(const[le,ke]of sn)Dh(le,ke)}}else Q.value=!1}),Ye(()=>xn.value,()=>{ln.value&&fr({immediate:!0})}),Ye([ol,cs,Po,()=>Ae.value.length,ln],()=>{Ud()},{immediate:!0});let nf=null,of=!1,gc=null;function sf(){nf=null,fv=null,dv=void 0,uc=null,ef()}function Ov(){mc(),Sh(),ci(),Dt.clear();const E=Ae.value.length;E>0&&_h(E),Sv()}function Rv(){Nv(),T_(),Jd=null,Qa=null,eu=null,Oh=null,Gd=null,Zd=null,of=!1,sf(),H_("restore"),xh(),dc()}function rf(E){var U;return[(U=Uo())!=null?U:"",yo(),il(),Nh.value,Qd(E),Ae.value.length,Math.round(tc(0,Ae.value.length)),Math.round(Ya()),Gi.count,Math.round(Gi.total)].join(":")}function rS(){return go(this,null,function*(){var E,U,se,le;const ke=(E=o.virtualScroll)==null?void 0:E.settledToken,$e=Qd(ke),De=yo(),He=Uo(),tt=Oi.value;if(Cn.value&&((U=o.virtualScroll)==null?void 0:U.settleMode)==="manual"&&Lh(ke))if(pv()){if(rf(ke)!==uc&&!of){of=!0;try{const je=yield Av({reason:"manual",expectedSettledTokenKey:$e}),Ke=Qd()===$e;Cv(De,He,tt)&&je.sessionKey===De&&je.threadKey===He&&Ke&&je.stable&&je.phase==="final"&&(uc=rf((se=o.virtualScroll)==null?void 0:se.settledToken))}finally{of=!1,yield xt();const je=(le=o.virtualScroll)==null?void 0:le.settledToken,Ke=Lh(je)?rf(je):"";Cv(De,He,tt)&&Ke&&uc!==Ke&&rS()}}}else ho("manual")})}Ye(Cn,(E,U)=>{if(E!==U){if(!E)return Rv(),void Nv();Rv(),Ov(),gc=Oi.value,ho("content")}},{flush:"post"}),Ye([Cn,Oi],([E,U])=>{E?gc!=null?gc!==U&&(gc=U,(function(se="resize"){mc(),Sh(),ci(),Dt.clear();const le=Ae.value.length;le>0&&_h(le),Sv(),Qa=null,eu=null,Oh=null,Jd=null,of=!1,sf(),X_(),xt(()=>{rl(),nc.value&&jd(),ct.value&&fc(),ho(se)})})("resize")):gc=U:gc=null},{flush:"post",immediate:!0}),Ye([Cn,()=>yo(),()=>Uo()],([E])=>{E&&(Rv(),Ov(),H_("content"),ho("content"))}),Ye([Cn,()=>yo(),()=>Uo(),Oi,()=>Ae.value.length],([E])=>{E&&(function(U="async-node"){let se=!1;for(const[le,ke]of Array.from(Rr.entries()))uv(ke)||(Rr.delete(le),Li.delete(le),se=!0);se&&(lc(),ho(U))})("async-node")},{flush:"post"}),Ye([Cn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.sessionKey},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>o.indexKey,()=>G.value],([E])=>{E&&(ef(),(function(U="content"){if(!Cn.value)return;const se=[],le=Ae.value.length,ke=nv(le);for(const $e of Array.from(Dt.keys())){if($e>=le){se.push($e);continue}if($e=le&&Dt.delete($e);se.length&&((function($e,De={}){const He=Array.from($e,Number);y_(He);let tt=0;if(sc(()=>(tt=QN(He,De),tt>0)),tt>0)(function(je){for(const Ke of je)Dt.delete(Ke)})(He);else for(const je of He)ge.delete(je)})(se,{notify:!1}),ci(),sf(),nc.value&&jd(),ct.value&&fc(),ho(U))})("content"))},{flush:"post",immediate:!0}),Ye([Cn,()=>Ae.value.length,()=>yo(),()=>Uo()],([E,U,se,le],[ke,$e,De,He])=>{E&&ke&&se===De&&le===He&&U!==$e&&sf()},{flush:"post"}),Ye([Cn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCache},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCacheWidth},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>Ae.value.length,()=>yo(),X],()=>{X_()},{flush:"post",immediate:!0}),Ye([Cn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreAnchor},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>Ae.value.length,()=>yo(),X],E=>go(null,[E],function*([U,se]){if(!U||!se)return;yield xt();const le=(function(){var ke;const $e=(ke=o.virtualScroll)==null?void 0:ke.restoreAnchor;return $e==null||$e===!1?null:$e===!0?"true":String($e)})();_v(se,{restoreAnchor:le!=null,restoreToken:le??void 0})}),{flush:"post",immediate:!0}),Ye([Cn,X,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey}],([E])=>{var U;if(!E)return;const se=(U=o.virtualScroll)==null?void 0:U.restoreState;se&&Qa&&eu==="restore"&&(Y_(se)||(Ov(),Qa=null,eu=null,ho("resize")))},{flush:"post"}),Ye([Cn,()=>Ae.value.length,()=>yo(),X],E=>go(null,[E],function*([U]){var se;const le=Gd,ke=Zd;U&&le&&(yield xt(),!_v(le,{restoreAnchor:ke?.restoreAnchor===!0,restoreToken:(se=ke?.restoreToken)!=null?se:"imperative",allowUncapturedAnchor:ke?.allowUncapturedAnchor===!0})&&Q_(le)||(Gd=null,Zd=null))}),{flush:"post",immediate:!0}),Ye([Cn,ft,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>yo(),()=>Uo(),Oi,X0,A_,()=>xn.value,Ah,()=>Gi.count,()=>Gi.total],([E,U,se])=>{if(!E||U!==!0||se==="manual"||!hv())return;const le=(function(){var ke;const $e=Ae.value.length;return[(ke=Uo())!=null?ke:"",yo(),il(),Nh.value,$e,Math.round(tc(0,$e)),Math.round(Ya()),Gi.count,Math.round(Gi.total)].join(":")})();nf!==le&&(nf=le,Av({reason:"final"}).then(ke=>{ke.stable||nf!==le||(nf=null)}))},{flush:"post",immediate:!0}),Ye([Cn,ft,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settledToken},()=>yo(),()=>Uo(),Oi,X0,A_,()=>xn.value,Ah,()=>Ae.value.length,()=>Gi.count,()=>Gi.total],()=>{rS()},{flush:"post",immediate:!0}),Ye([()=>Ae.value.length,ln,cs,Po,()=>bs.start,()=>bs.end],([E,U,se,le,ke,$e])=>{ye.value&&Je("virtualization",{nodes:E,virtualization:U,maxLiveNodes:se,buffer:le,focusIndex:ol.value,scroll:U?(()=>{const De=Pe.value||_e();return De?{reverse:ce(De),scrollTop:Math.round(De.scrollTop),scrollTopAbs:Math.round(Math.abs(De.scrollTop)),scrollHeight:Math.round(De.scrollHeight),clientHeight:Math.round(De.clientHeight)}:null})():null,liveRange:{start:ke,end:$e},rendered:xn.value})}),Ye([()=>M.customId],([E],U,se)=>{if(!E||Ti)return;const le=(function(ke,$e){return ke?(is.controllers[ke]=$e,()=>{is.controllers[ke]===$e&&delete is.controllers[ke]}):()=>{}})(E,{captureRestoreAnchor:h_,restoreAnchor:m_,getAnchorDrift:KN,getReport:fL});se(()=>{le()})},{immediate:!0}),po(()=>{(function(){if(Cn.value)try{rl(),Yd();const E=Ja("manual");tS(E)&&(D(E),Jd=E,Ev=Xd());const U=cc(E,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});U&&(B(U),U.anchor&&z(U.anchor),pc=tf(U))}catch{}})(),CL(),tv(),Pt(),iS();for(const E of Vl.values())for(const U of E)Eh(U);Vl.clear(),Za.clear(),Dt.clear(),Fv(),mc(),sv(),xh(),dc(),Nv(),$_(),Q0()});const AL=Vf("ViewportDeferredMermaidBlockNode",or({loader:()=>go(null,null,function*(){try{return(yield Ts(()=>import("./index11-Dc3KsH1m.js"),__vite__mapDeps([7,5]))).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',E),vi}}),loadingComponent:T8,delay:0}),T8),ML=Vf("ViewportDeferredInfographicBlockNode",or({loader:()=>go(null,null,function*(){try{return(yield Ts(()=>import("./index10-BQgn6eNW.js"),[])).default}catch(E){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',E),vi}}),loadingComponent:E8,delay:0}),E8),EL=Vf("ViewportDeferredD2BlockNode",or(()=>go(null,null,function*(){try{return(yield Ts(()=>import("./index8-Q1qyQj7P.js"),[])).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',E),vi}})),vi),lS={text:Ro,paragraph:Du,heading:M0,code_block:Uy,list:hd,list_item:pd,blockquote:dg,table:vp,definition_list:fg,footnote:pg,footnote_reference:Bi,footnote_anchor:mp,admonition:vg,vmr_container:mg,hardbreak:Ca,link:ii,image:Sa,thematic_break:hg,math_inline:$r,math_block:QI,strong:oi,emphasis:ri,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,checkbox:Di,checkbox_input:Di,inline_code:js,html_inline:zi,reference:ni,html_block:gp},TL=O(()=>lv()),aS=O(()=>p8(M.codeBlockProps)),IL=O(()=>p8(M.codeBlockProps,{omit:["langs"]})),uS=O(()=>kt(kt({stream:M.codeBlockStream,darkTheme:M.codeBlockDarkTheme,lightTheme:M.codeBlockLightTheme,monacoOptions:M.codeBlockMonacoOptions,themes:M.themes,langs:h.value==="shiki"?M.langs:void 0,minWidth:M.codeBlockMinWidth,maxWidth:M.codeBlockMaxWidth},typeof fe.value=="boolean"?{showTooltips:fe.value}:{}),IL.value)),cS=O(()=>kt(fn(kt({},uS.value),{langs:M.langs}),aS.value));function dS(E){return typeof E=="boolean"?E:void 0}const $L=O(()=>{const E=M.codeBlockProps||{},U={},se=dS(E.showLineNumbers);se!==void 0&&(U.showLineNumbers=se);const le=dS(E.diffInline);le!==void 0&&(U.diffInline=le);const ke=(function($e){const De=Number($e);return Number.isFinite(De)&&De>0?De:void 0})(E.reservedHeightPx);return ke!==void 0&&(U.reservedHeightPx=ke),U}),NL=O(()=>kt(kt({stream:M.codeBlockStream,darkTheme:M.codeBlockDarkTheme,lightTheme:M.codeBlockLightTheme,themes:M.themes,langs:M.langs,minWidth:M.codeBlockMinWidth,maxWidth:M.codeBlockMaxWidth},typeof fe.value=="boolean"?{showTooltips:fe.value}:{}),aS.value)),LL=O(()=>kt({},M.mermaidProps||{})),fS=O(()=>kt({},M.d2Props||{})),FL=O(()=>kt({},M.infographicProps||{})),lf=O(()=>({typewriter:f.value,fade:M.fade,customHtmlTags:ot.value.customHtmlTags})),OL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltip:fe.value}:{})),RL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltips:fe.value}:{})),PL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltips:fe.value}:{})),DL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltips:fe.value}:{}));function BL(E){return Array.isArray(E.children)&&E.children.length>0}const zh=O(()=>dL.value.map(E=>{var U,se,le,ke,$e,De,He,tt;let je=(function(gt){var Rt,Bt,qt,Wt,Gt,yn,_n;if(gt.type!=="code_block")return gt;const eo=gt,xs=[String((Rt=eo.language)!=null?Rt:""),String((Bt=eo.loading)!=null?Bt:""),String((qt=eo.diff)!=null?qt:""),String((Wt=eo.code)!=null?Wt:""),String((Gt=eo.originalCode)!=null?Gt:""),String((yn=eo.updatedCode)!=null?yn:""),String((_n=eo.raw)!=null?_n:"")].join("\0"),fs=No.get(eo);if(fs&&fs.signature===xs)return fs.node;const pr=kt({},eo);return No.set(eo,{signature:xs,node:pr}),pr})(E.node);const Ke=Wh(je);let et=gS(je,Ke);if((je.type==="html_block"||je.type==="html_inline")&&et===lS[je.type]){const gt=je,Rt=String((U=gt.tag)!=null?U:"").trim().toLowerCase()||A9(gt.content);if(Rt){const Bt=Un.value[Rt];if($s.value.has(Rt)&&Bt)et=Bt,je=fn(kt({},gt),{type:Rt,tag:Rt,content:wse(gt.content,Rt)});else if(M9((se=gt.content)!=null?se:gt.raw,Rt)){const qt=String((ke=(le=gt.content)!=null?le:gt.raw)!=null?ke:"");je.type==="html_inline"?(et=Ro,je={type:"text",content:qt,raw:qt}):(et=Du,je={type:"paragraph",children:[{type:"text",content:qt,raw:qt}],raw:qt})}}}const Be=je.type==="code_block"&&h.value==="pre"&&et===vi&&!Pv(Un.value,Ke);let Ge=kt({},(function(gt,Rt,Bt){const qt=Rt??Wh(gt);if(gt.type==="code_block"){const Wt=qt?Pv(Un.value,qt):void 0;if(Bt&&h.value==="pre"&&!Wt&&Bt===vi)return $L.value;if(Bt&&qt&&Bt===Wt)return qt==="mermaid"?hS(gt):qt==="infographic"?mS(gt):qt==="d2"||qt==="d2lang"?fS.value:cS.value;if(Bt&&Bt===Un.value.code_block)return cS.value;if(O_(Bt))return NL.value}return qt==="mermaid"?hS(gt):qt==="infographic"?mS(gt):qt==="d2"||qt==="d2lang"?fS.value:gt.type==="link"?OL.value:gt.type==="list"?RL.value:gt.type==="blockquote"?PL.value:gt.type==="table"?DL.value:gt.type==="code_block"?uS.value:lf.value})(je,Ke,et));const pt=Fn.value?rc.value[E.index]:null;je.type==="code_block"&&pt?.kind==="code-block"&&(Ge=fn(kt({},Ge),Be?{reservedHeightPx:($e=pt.height)!=null?$e:pt.contentHeight}:{estimatedHeightPx:pt.height,estimatedContentHeightPx:pt.contentHeight,estimatedDiffInline:pt.diffInline})),Be||je.type!=="code_block"||Ke!=="mermaid"||Kc(Ge.estimatedPreviewHeightPx)!=null||(Ge=fn(kt({},Ge),{estimatedPreviewHeightPx:h1(f1(String((De=je.code)!=null?De:"")))})),Be||je.type!=="code_block"||Ke!=="infographic"||Kc(Ge.estimatedPreviewHeightPx)!=null||(Ge=fn(kt({},Ge),{estimatedPreviewHeightPx:m1(p1(String((He=je.code)!=null?He:"")))})),je.type==="math_block"&&(Ge=fn(kt({},Ge),{cacheScope:vo}));const lt=(function(gt,Rt){const Bt=String(gt.type);return!hh(Bt)&&Un.value[Bt]===Rt})(je,et),At=lt?Zw(je,de.value):void 0;return fn(kt({},E),{node:je,component:et,bindings:Ge,customBindings:kt(kt({},At??{}),Ge),rendersCustomNode:lt,hasSlotChildren:BL(je),slotContent:String((tt=je.content)!=null?tt:""),isCodeBlock:je.type==="code_block",indexKey:`${TL.value}-${E.index}`,vnodeKey:`${pL.value}\0${E.index}\0${je.type}`})}));function Wh(E){var U;return E?.type==="code_block"?String((U=E.language)!=null?U:"").trim().toLowerCase():""}function Pv(E,U){const se=U.trim().toLowerCase();if(se)for(const le of[se,S0(se),FI(se)]){const ke=le&&E[le];if(ke)return ke}}function pS(E,U,se,le){var ke,$e;const De=kt({},E.value);return Kc(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=le(se(String((ke=U?.code)!=null?ke:"")),void 0,De.maxHeight==="none"?null:($e=Kc(De.maxHeight))!=null?$e:void 0)),De}function hS(E){return pS(LL,E,f1,h1)}function mS(E){return pS(FL,E,p1,m1)}function gS(E,U){if(!E)return Ub;const se=Un.value,le=se[String(E.type)];if(E.type==="code_block"){const ke=U??Wh(E),$e=ke?Pv(se,ke):void 0;return $e||(h.value==="pre"?se.code_block||vi:ke==="mermaid"?se.mermaid||AL:ke==="infographic"?se.infographic||ML:ke==="d2"||ke==="d2lang"?se.d2||EL:le||se.code_block||R_.value)}return le||lS[String(E.type)]||Ub}function Dv(E){s("click",E)}function zL(E){var U;(U=E.target)!=null&&U.closest("[data-node-index]")&&s("mouseover",E)}function WL(E){var U;(U=E.target)!=null&&U.closest("[data-node-index]")&&s("mouseout",E)}function vS(E){s("mouseover",E)}function yS(E){s("mouseout",E)}const ou=V(null),di=V(!1),af=V(null),HL=O(()=>!(M.domMode!=="minimal"||Z.value||M.fade!==!1||f.value||di.value||Ue.value||ln.value||ai.value||Vs.value||$i.value||Object.keys(Un.value).length!==0));let uf,vc=null,Bv=0,Hh=0,jh=0;const kS=["code_block","admonition","table","math_block","html_block","image","thematic_break"],jL=new Set(kS),bS=[".typewriter-cursor",".height-estimation-probes",...kS.map(E=>`[data-node-type="${E}"]`),"script","style"].join(",");function wS(E){if(!E||typeof E!="object")return!1;const U=E.type;return typeof U=="string"&&jL.has(U)}function Uh(E){var U,se;if(!E||typeof E!="object")return 0;const le=E,ke=(se=(U=le.raw)!=null?U:le.content)!=null?se:le.code;if(typeof ke=="string")return ke.length;const $e=le.children;if(Array.isArray($e))return $e.reduce((He,tt)=>He+Uh(tt),0);const De=le.items;return Array.isArray(De)?De.reduce((He,tt)=>He+Uh(tt),0):0}function Vh(){uf&&(clearTimeout(uf),uf=void 0)}function zv(){Bv+=1,vc!=null&&($o?.(vc),vc=null)}function cf(){zv(),Gl(),ou.value&&(ou.value.style.visibility="hidden")}function UL(E){var U;if(E.nodeType!==Node.TEXT_NODE||!((U=E.textContent)!=null?U:"").trim())return!1;const se=E.parentElement;return!!se&&!se.closest(bS)}function VL(E){let U=E.lastChild;for(;U;){if(UL(U))return U;if(U.nodeType===Node.ELEMENT_NODE){const se=U;if(!se.matches(bS)&&se.lastChild){U=se.lastChild;continue}}for(;U&&U!==E&&!U.previousSibling;)U=U.parentNode;if(!U||U===E)break;U=U.previousSibling}return null}function xS(){const E=zh.value;for(let U=E.length-1;U>=0;U--){const se=E[U];if(!se||wS(se.node)||!Ph(se.index))continue;const le=sn.get(se.index);if(!le)continue;const ke=VL(le);if(ke)return ke}return null}function Gl(){af.value&&(af.value.classList.remove(I8),af.value=null)}function qh(){if(d.value!=="simple"||!H||!di.value||!A.value)return void Gl();const E=xS(),U=E?(function(se){var le;const ke=(le=se.parentElement)==null?void 0:le.closest(".text-node");return ke instanceof HTMLElement?ke:se.parentElement})(E):null;U!==af.value&&(Gl(),U&&(U.classList.add(I8),af.value=U))}function Kh(){if(d.value!=="precise"||!H||!di.value||vc!=null)return;const E=Bv,U=()=>{vc=null,E===Bv&&(function(){var se,le;if(d.value!=="precise"||!(H&&di.value&&A.value&&ou.value))return;const ke=A.value,$e=ou.value;$e.style.visibility="hidden";const De=xS();if(!De)return;let He=0,tt=0,je=20,Ke=!1;if(De?.textContent){const et=De.textContent.length,Be=document.createRange();Be.setStart(De,Math.max(0,et-1)),Be.setEnd(De,et);const Ge=typeof Be.getClientRects=="function"?Be.getClientRects():void 0,pt=(le=Ge?.[Ge.length-1])!=null?le:(se=De.parentElement)==null?void 0:se.getBoundingClientRect();if(pt){const lt=Xt("typewriterCursor.root.getBoundingClientRect",()=>ke.getBoundingClientRect());He=pt.right-lt.left+ke.scrollLeft,tt=pt.top-lt.top+ke.scrollTop,je=pt.height||je,Ke=!0}Be.detach()}Ke&&($e.style.transform=`translate(${Math.max(0,He)}px, ${Math.max(0,tt)}px)`,$e.style.height=`${je}px`,$e.style.visibility="visible")})()};Nn?vc=Nn(U):U()}return Ye([Re,()=>o.content,()=>o.nodes,()=>M.typewriter,ft],()=>go(null,null,function*(){var E,U;if(!H||Z.value||!ae.value)return;if(ft.value)return di.value=!1,Vh(),void cf();if((E=o.nodes)!=null&&E.length)return di.value=!1,Vh(),cf(),Hh=((U=o.content)!=null?U:"").length,void(jh=Re.value.length);const se=(function(){var He,tt;return(He=o.nodes)!=null&&He.length?o.nodes.reduce((je,Ke)=>je+Uh(Ke),0):((tt=o.content)!=null?tt:"").length})(),le=(function(){var He;return(He=o.nodes)!=null&&He.length?o.nodes.reduce((tt,je)=>tt+Uh(je),0):Re.value.length})(),ke=!wS(Ae.value[Ae.value.length-1]),$e=se>Hh,De=le>jh;if(!f.value||!ke||!$e&&!De)return f.value&&ke||(di.value=!1,cf()),Hh=se,void(jh=le);Hh=se,jh=le,di.value=!0,d.value==="precise"&&ou.value&&(ou.value.style.visibility="hidden"),Vh(),yield xt(),d.value==="simple"?qh():(Gl(),Kh()),uf=setTimeout(()=>{uf=void 0,di.value=!1},3e3)}),{flush:"post",immediate:!0}),Ye(di,E=>go(null,null,function*(){E?(yield xt(),d.value!=="simple"?(Gl(),d.value==="precise"&&Kh()):qh()):cf()}),{flush:"post"}),Ye(d,()=>go(null,null,function*(){if(H&&!Z.value&&ae.value&&di.value){if(yield xt(),d.value==="simple")return zv(),void qh();Gl(),d.value!=="precise"?cf():Kh()}}),{flush:"post"}),Ye([()=>xn.value,()=>bs.start,()=>bs.end],()=>go(null,null,function*(){H&&!Z.value&&ae.value&&di.value&&(yield xt(),d.value!=="simple"?(Gl(),d.value==="precise"&&Kh()):qh())}),{flush:"post"}),po(()=>{Vh(),zv(),Gl(),Wo.clear()}),(E,U)=>{const se=kO("NodeRenderer",!0);return x(Z)?(g(!0),C(Te,{key:0},st(zh.value,le=>(g(),C(Te,{key:le.vnodeKey},[le.rendersCustomNode?(g(),pe(Ko(le.component),Dn({key:0,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onClick:Dv,onMouseover:vS,onMouseout:yS,onCopy:U[0]||(U[0]=ke=>i(ke)),onHandleArtifactClick:U[1]||(U[1]=ke=>s("handleArtifactClick",ke))}),{default:ve(()=>[le.hasSlotChildren?(g(),pe(se,Dn({key:0,ref_for:!0},Qt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(g(),pe(se,Dn({key:1,ref_for:!0},Qt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Ko(le.component),Dn({key:1,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onClick:Dv,onMouseover:vS,onMouseout:yS,onCopy:U[2]||(U[2]=ke=>i(ke)),onHandleArtifactClick:U[3]||(U[3]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),C("div",{key:1,ref_key:"containerRef",ref:A,class:ze(["markstream-vue markdown-renderer",[{dark:M.isDark},{virtualized:ln.value},{"virtual-scroll-coordinated":Ls.value},{"stable-layout":sL.value},{"typewriter-simple-cursor":di.value&&d.value==="simple"}]]),"data-custom-id":M.customId,onClick:Dv,onMouseover:zL,onMouseout:WL},[Io.value||ln.value?(g(),C(Te,{key:0},[Io.value?(g(),pe(mpe,{key:0,width:qs.value,"flow-root":ln.value||Ls.value,"paragraph-node":Xn.value,"list-item-node":io.value,"list-node":ro.value,"heading-nodes":ys.value,"set-paragraph-wrapper":iL,"set-list-item-wrapper":rL,"set-list-wrapper":lL,"set-heading-wrapper":cL},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):oe("",!0),ln.value?(g(),C("div",{key:1,class:"node-spacer",style:jt({height:`${iv.value}px`}),"aria-hidden":"true"},null,4)):oe("",!0)],64)):oe("",!0),HL.value?(g(!0),C(Te,{key:1},st(zh.value,le=>(g(),C(Te,{key:le.vnodeKey},[Ph(le.index)?(g(),pe(Ko(le.component),Dn({key:0,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onMouseover:U[4]||(U[4]=ke=>s("mouseover",ke)),onMouseout:U[5]||(U[5]=ke=>s("mouseout",ke)),onCopy:U[6]||(U[6]=ke=>i(ke)),onHandleArtifactClick:U[7]||(U[7]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"])):oe("",!0)],64))),128)):(g(!0),C(Te,{key:2},st(zh.value,le=>(g(),C("div",{key:le.vnodeKey,ref_for:!0,ref:ke=>Dh(le.index,ke),class:"node-slot","data-node-index":le.index,"data-node-type":le.node.type},[Ph(le.index)?(g(),C("div",{key:0,ref_for:!0,ref:ke=>(function($e,De){var He;De||(function(et){const Be=`${lv()}-${et}`;let Ge=!1;for(const pt of Array.from(Li.keys())){const lt=Rr.get(pt);(lt?.index===et||pt===Be||pt.startsWith(`${Be}-`))&&(Li.delete(pt),Rr.delete(pt),Ge=!0)}Ge&&(lc(),ho("async-node"))})($e),sl.delete($e),(function(et){var Be;const Ge=((Be=Za.get(et))!=null?Be:0)+1;Za.set(et,Ge)})($e);const tt=Vl.get($e);if(tt){for(const et of tt)Eh(et);Vl.delete($e)}if((function(et){const Be=Qn.get(et);Be&&(Tn?.unobserve(Be),kn.delete(Be),Qn.delete(et))})($e),!De||!Os.value)return Or.delete($e),void Za.delete($e);Or.set($e,De);const je=()=>{Bh($e,De)};queueMicrotask(je);const Ke=(Tn||typeof ResizeObserver>"u"||(Tn=new ResizeObserver(et=>{if(et.length)for(const Be of et){const Ge=kn.get(Be.target),pt=Qn.get(Ge??-1);Ge!=null&&pt&&Bh(Ge,pt)}else rl()})),Tn);if(Ke&&(Qn.set($e,De),kn.set(De,$e),Ke.observe(De)),typeof window<"u"){const et=((He=Ae.value[$e])==null?void 0:He.type)==="code_block"?[16,80,240,800]:ft.value?[80]:[];if(et.length){const Be=et.map(Ge=>E_(Ge,je,"node-resize")).filter(Ge=>Ge!=null);Be.length&&Vl.set($e,Be)}}})(le.index,ke),class:"node-content"},[le.isCodeBlock?le.rendersCustomNode?(g(),pe(Ko(le.component),Dn({key:1,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[12]||(U[12]=ke=>i(ke)),onHandleArtifactClick:U[13]||(U[13]=ke=>s("handleArtifactClick",ke))}),{default:ve(()=>[le.hasSlotChildren?(g(),pe(se,Dn({key:0,ref_for:!0},Qt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(g(),pe(se,Dn({key:1,ref_for:!0},Qt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Ko(le.component),Dn({key:2,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[14]||(U[14]=ke=>i(ke)),onHandleArtifactClick:U[15]||(U[15]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Cr,{key:0,name:"fade",css:M.fade!==!1,appear:M.fade!==!1},{default:ve(()=>[le.rendersCustomNode?(g(),pe(Ko(le.component),Dn({key:0,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[8]||(U[8]=ke=>i(ke)),onHandleArtifactClick:U[9]||(U[9]=ke=>s("handleArtifactClick",ke))}),{default:ve(()=>[le.hasSlotChildren?(g(),pe(se,Dn({key:0,ref_for:!0},Qt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(g(),pe(se,Dn({key:1,ref_for:!0},Qt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Ko(le.component),Dn({key:1,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[10]||(U[10]=ke=>i(ke)),onHandleArtifactClick:U[11]||(U[11]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),C("div",{key:1,class:"node-placeholder",style:jt({height:`${K0(le.index)}px`})},null,4))],8,ype))),128)),di.value&&d.value==="precise"?(g(),C("span",{key:3,ref_key:"typewriterCursorRef",ref:ou,class:"typewriter-cursor","aria-hidden":"true"},null,512)):oe("",!0),ln.value?(g(),C("div",{key:4,class:"node-spacer",style:jt({height:`${rv.value}px`}),"aria-hidden":"true"},null,4)):oe("",!0)],42,vpe))}}})),[["__scopeId","data-v-a9489508"]]),Mi=p$;Mi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Mi.__name,Mi.name].filter(n=>!!n));for(const n of t)e.component(n,p$)};const ux=Object.freeze(Object.defineProperty({__proto__:null,default:Mi},Symbol.toStringTag,{value:"Module"})),kpe={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},bpe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},wpe={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},xpe={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},_pe={class:"admonition-title"},Spe=["aria-expanded","aria-controls"],Cpe=["id"],vg=Gn(Ze({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=O(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const u=o.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=V(!!o.node.collapsible&&!((n=o.node.open)==null||n));function l(){o.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(g(),C("div",{class:ze(["admonition",[`admonition-${o.node.kind}`]])},[_("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),C("svg",kpe,[...c[1]||(c[1]=[_("circle",{cx:"12",cy:"12",r:"10"},null,-1),_("path",{d:"M12 16v-4"},null,-1),_("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),C("svg",bpe,[...c[2]||(c[2]=[_("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),_("path",{d:"M9 18h6"},null,-1),_("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),C("svg",wpe,[...c[3]||(c[3]=[_("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),_("path",{d:"M12 9v4"},null,-1),_("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),C("svg",xpe,[...c[4]||(c[4]=[_("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),_("path",{d:"M12 8v4"},null,-1),_("path",{d:"M12 16h.01"},null,-1)])])):oe("",!0),_("span",_pe,N(i.value),1),o.node.collapsible?(g(),C("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(g(),C("svg",{style:jt({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...c[5]||(c[5]=[_("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,Spe)):oe("",!0)]),Bn(_("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[K(x(Mi),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,Cpe),[[yi,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);vg.install=e=>{e.component(vg.__name,vg)};const Zb=()=>Ts(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let Mm=null,Em=Zb,Tm=null,$8=!1,N8=!1;function EBe(){return go(this,null,function*(){if(Mm)return Mm;const e=Em;return e?e===Zb&&$8?null:Tm||(Tm=go(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===Zb)return e===Em&&($8=!0,(function(o){N8||(N8=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===Em&&(Tm=null)}return e!==Em?null:t?(Mm=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),Mm):null}),Tm):null})}let Im=null,h$=null,$m=null;function TBe(){return typeof h$=="function"}function IBe(){return go(this,null,function*(){if(Im)return Im;const e=h$;return e?$m||($m=go(null,null,function*(){const t=yield e(),n=(function(o){var s,i,r;if(!o)return null;const l=(s=o.default)!=null?s:o,a=typeof l=="function"&&typeof((i=l.prototype)==null?void 0:i.render)=="function"?l:(r=o.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Im=n,Im):null}).finally(()=>{$m=null}),$m):null})}const $Be=Symbol("markstreamLanguageIconResolver"),Nm=V(!1);let L8=!1;function tk(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function m$(){return!L8&&typeof window<"u"&&typeof document<"u"&&(L8=!0,Nm.value=tk(),new MutationObserver(()=>{Nm.value=tk()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Nm.value=tk()})),Nm}const g$=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],Ape=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),Yb=[...g$].toSorted((e,t)=>t.length-e.length).join("|"),nk=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${Yb}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${Yb})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),v$=/[),.;!?]+$/;function Mpe(e){const t=e.toLowerCase();return g$.some(n=>t.endsWith(`.${n}`))}function Epe(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${Yb}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function Tpe(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(v$,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=Ape.has(i),a=Mpe(i);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(i);if(!d)return null;s=d}const u=o[2]??o[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function Ipe(e,t={}){const n=[];nk.lastIndex=0;let o;for(;(o=nk.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",r=s.indexOf(i);if(r<0)continue;const l=o[2]??o[3];let a=i+(l?s.slice(r+i.length):"");const u=a.replace(v$,""),c=a.length-u.length;a=u;const d=Tpe(a,t);if(!d)continue;const f=o.index+r,p=f+a.length;n.push({...d,start:f,end:p,text:a}),c>0&&(nk.lastIndex-=c)}return n}const $pe=12e4,Npe=6e4,Lpe=32,Fpe=3e4,F8=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function Ope(e){let t=0,n=0,o=0;F8.lastIndex=0;let s;for(;(s=F8.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=$pe||n>=Npe||t>=Lpe||o>=Fpe?"pre":"shiki",codeFenceCount:t,codeChars:n}}function Lm(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const Rpe=/\s/,Ppe=/\p{Nd}/u;function Aa(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function Dpe(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function O8(e){return e!==void 0&&Rpe.test(e)}function Sd(e){return e!==void 0&&Ppe.test(e)}function S1(e){return e!==void 0&&e>="A"&&e<="Z"}const y$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function Bpe(e,t){if(!S1(e[t-1]))return!1;let n=t-1;for(;n>0&&S1(e[n-1]);)n--;return y$.test(e.slice(n,t))||Sd(Aa(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Aa(e,t+1)??"")}function zpe(e,t){if(!S1(e[t-1]))return!1;let n=t-1;for(;n>0&&S1(e[n-1]);)n--;return y$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function Wpe(e,t){const n=e[t+1];return Sd(Aa(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&Sd(Aa(e,t+2))}const Hpe=/^[-–—,,、;;::~~(([【//]$/;function jpe(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Sd(Aa(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&Hpe.test(o)}const ok=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;function Upe(e){let t=e.replace(new RegExp(String.raw`^(?:${ok})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${ok})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${ok})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const R8=1,P8=2,D8=3,Wr=-1;function Vpe(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(Wr),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const A=[];for(let re=0;re`「」『』【】〔〕()*—–“”‘’'),u=[];for(const A of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))u.push(A.index);for(const A of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))u.push(A.index);for(const A of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(A.index===0||!/[\w~/.-]/.test(e[A.index-1]??""))&&u.push(A.index);u.sort((A,L)=>A-L);let c=-1;for(const A of u){if(AA+7&&!/[\w/?#@~.+&=%-]/.test(e[L+1]??""))break}}r.push([A,L]),c=L}const d=[];for(let A=0;A]/.test(Q))continue;let Y=Wr,G=Wr;for(;W"){G=W;break}if(!j&&X==="/"&&e[W+1]===">"){G=W+1;break}if(!/\s/.test(X)){Y=W;break}for(;W"){G=W;break}if(j){Y=W;break}if(te==="/"&&e[W+1]===">"){G=W+1;break}const q=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(W));if(!q){Y=W;break}W+=q[0].length;let me=W;for(;me`]+/.exec(e.slice(me));if(!We){Y=me;break}W=me+We[0].length}}}if(G!==Wr)d.push([A,G+1]),A=G;else if(Y!==Wr){const X=e.indexOf("<",A+1);A=(X!==-1&&X",A+2);Y===-1?f=!1:(d.push([A,Y+2]),A=Y+1,W=!0)}else if(L==="!"){if(e[A+2]==="-"&&e[A+3]==="-"){if(p){const Y=e.indexOf("-->",A+4);Y===-1?p=!1:(d.push([A,Y+3]),A=Y+2,W=!0)}}else if(e.startsWith("[CDATA[",A+2)){if(h){const Y=e.indexOf("]]>",A+9);Y===-1?h=!1:(d.push([A,Y+3]),A=Y+2,W=!0)}}else if(m&&/[A-Z]/.test(e[A+2]??"")){const Y=e.indexOf(">",A+3);Y===-1?m=!1:(d.push([A,Y+1]),A=Y,W=!0)}}if(W)continue;if(L!==void 0&&/[a-zA-Z]/.test(L)){const Y=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(A+1));if(Y){let G=A+1+Y[0].length;for(;G"&&e[G]!=="<"&&!/\s/.test(e[G]);)G++;if(e[G]===">"){d.push([A,G+1]),A=G;continue}}}if(L===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(L))continue;let j=A+1;for(;j"&&(d.push([A,j+1]),A=j)}}d.sort((A,L)=>A[0]-L[0]);const k=[];for(const A of d){const L=k.at(-1);L&&A[0]<=L[1]?L[1]=Math.max(L[1],A[1]):k.push([A[0],A[1]])}r.push(...k);const w=A=>{let L=0;for(;L=(l[L]?.[1]??0);)L++;const W=l[L];return W!==void 0&&A>=W[0]},v=A=>{let L=0;for(;L=(k[L]?.[1]??0);)L++;const W=k[L];return W!==void 0&&A>=W[0]},y=[];let b=null,S=0,I=!1;for(let A=0;A"&&(I=!1);continue}if(!(w(A)||v(A))){if(b!==null){e[A]===b&&(b=null);continue}if(y.length>0&&(e[A]==='"'||e[A]==="'")&&A>0&&/\s/.test(e[A-1]??""))b=e[A];else if(e[A]==="[")S++;else if(e[A]==="]")S>0&&e[A+1]==="("&&(y.push(A),I=e[A+2]==="<",A++),S=Math.max(0,S-1);else if(e[A]==="("&&y.length>0)y.push(-1);else if(e[A]===")"&&y.length>0){const L=y.pop();if(L!==void 0&&L>=0){const W=e.slice(L+2,A);(/\s/.exec(W)===null||W.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(W)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(W))&&r.push([L,A+1])}}}}r.sort((A,L)=>A[0]-L[0]);const T=[];for(const A of r){const L=T.at(-1);L&&A[0]<=L[1]?L[1]=Math.max(L[1],A[1]):T.push([A[0],A[1]])}const $=A=>{let L=0,W=T.length-1;for(;L<=W;){const j=L+W>>1,re=T[j];if(re===void 0)return!1;if(A=re[1])L=j+1;else return!0}return!1},F=new Uint8Array(t);{let A=-1,L=!1,W=!1,j=0;for(let re=0;re<=t;re++){const Q=re0&&(Y==="{"?j++:Y==="}"&&j--)}}for(let A=0;A=0;A--)n[A]===D8&&(R=A),o[A]=R;const P=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,M=/[^\p{L}\p{Nd}\s]$/u,D=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,B=/(?:^|\s)[a-z]{2,}/,z=(A,L)=>{const W=Aa(e,A+1);if(W===void 0||!P.test(W))return!1;const j=o[A+1]??Wr;if(j!==Wr){const re=e.slice(A+1,j);return!(j-(A+1)===((e.codePointAt(A+1)??0)>65535?2:1))&&D.test(re)||/[,;:!?]$/.test(re)||/^[a-z]{2,}$/.test(re)?!1:(s[j]??0)-(s[A+1]??0)===0&&(i[j]??0)-(i[A+1]??0)===0}return M.test(L)||D.test(L)||B.test(L)};return(A,L=-1)=>{if(e[A]!=="$"||n[A]===R8||e[A+1]==="$"||e[A-1]==="$"&&L!==A||Bpe(e,A)||A+1>=t||O8(Aa(e,A+1)))return null;const W=o[A+1]??Wr;if(W===Wr||(s[W]??0)-(s[A+1]??0)>0||(i[W]??0)-(i[A+1]??0)>0)return null;const j=e.slice(A+1,W);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(j)||e[W+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(j)||Sd(Dpe(e,A))&&Upe(j)||Wpe(e,A)&&(z(W,j)||zpe(e,W)||/\s/.test(j)&&/\p{Nd}$/u.test(j)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(j)||!1)||e[W+1]==="$"&&!/\p{L}/u.test(j)&&M.test(j)?null:{content:j,end:W+1}}}const qpe=/^---[ \t]*(?:\r\n|\n)/,Kpe=/^---[ \t]*$/;function Gpe(e){const t=qpe.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` +`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),Kpe.test(i)){const r=e.slice(o,n);if(r==="")return{frontmatter:null,body:e};const l=s\n]*>|[^()\s]+)\)/g,Zpe=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,Ype=/^[a-zA-Z]:(?:[\\/]|%5c)/i,Jpe=/^[A-Za-z0-9._~-]$/;let z8;function Xpe(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replace(/[[\]\\]/g,"\\$&").replaceAll(` +`,"%0A").replaceAll("\r","%0D")}function Qpe(e){return e.replace(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` +`).replaceAll("%0D","\r").replaceAll("%25","%")}function ehe(e){const t=e.split("/").map(n=>{let o="";for(const s of n){const i=s.codePointAt(0);i>127||Jpe.test(s)?o+=s:o+=`%${i.toString(16).toUpperCase().padStart(2,"0")}`}return o}).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function k$(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function the(e){const t=k$(e);try{return decodeURIComponent(t)}catch{return t}}function nhe(e){const t=k$(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")||Zpe.test(t)&&!Ype.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function sk(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function b$(e){const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${Xpe(e.name)}](${ehe(t)})`}function ohe(e){const t=[];let n=0;B8.lastIndex=0;for(const o of e.matchAll(B8)){const s=o.index;sk(t,e.slice(n,s));const i=o[0],r=o[1],l=o[2],a=e[s-1]==="!"?null:nhe(l);a&&r?t.push({type:"mention",attrs:{kind:a,name:Qpe(r),path:the(l)}}):sk(t,i),n=s+i.length}return sk(t,e.slice(n)),t}function W8(e){return z8??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(z8.segment(e),({segment:t})=>t)}function w$(e){const t=W8(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?W8(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function she(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function ihe(e){return new Worker("/assets/mermaidParser.worker-Dx4jPi9z.js",{type:"module",name:e?.name})}const rhe={key:0,class:"md-frontmatter"},lhe={key:1,class:"diff-wrap"},ahe={class:"diff-bar"},uhe=["aria-label","onClick"],che={class:"diff-pre"},dhe={key:0,class:"diff-sign"},fhe={class:"diff-text"},phe="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Fm="pythinker-code://skill/",H8="md-table-wide",j8="md-table-toggle",U8="md-table-fade",V8="md-table-toggle--show",hhe="md-table-at-end",mhe=26,q8="github-light",K8="github-dark",ghe=Ze({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){ece(),pce(),nce(),gce(),tce(new she),mce(new ihe);const t=new WeakMap;function n(Oe,Je){if(Oe.src[Oe.pos]!=="$")return!1;let it=t.get(Oe);(!it||it.src!==Oe.src)&&(it={src:Oe.src,match:Vpe(Oe.src),lastEnd:-1},t.set(Oe,it));const rt=it.match(Oe.pos,it.lastEnd);if(!rt||rt.end>Oe.posMax)return!1;if(it.lastEnd=rt.end,Je)return Oe.pos=rt.end,!0;const vt=Oe.push("math_inline","math",0);return vt.content=rt.content,vt.markup="$",vt.raw=Oe.src.slice(Oe.pos,rt.end),vt.loading=!1,Oe.pos=rt.end,!0}function o(Oe){return Oe.set({typographer:!1}),Oe.inline.ruler.disable("math"),Oe.inline.ruler.before("escape","math",n),Oe}const{t:s}=$t(),i=wn("resolveImage"),r=V(null),l=e,a=O(()=>!l.streaming),u=O(()=>Gpe(l.text??"")),c=O(()=>u.value.body),d=O(()=>Epe(c.value)),f=O(()=>l.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:Ope(c.value)),p=m$(),h=O(()=>!l.streaming),m=Ms(new Map),k=new Set,w=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,v=/(]*?\bsrc=")([^"]+)(")/gi;function y(Oe){return!/^(https?:|data:|blob:)/i.test(Oe)}function b(Oe){if(!i)return;const Je=[];for(const it of[w,v]){it.lastIndex=0;let rt;for(;(rt=it.exec(Oe))!==null;)Je.push(rt[2]??"")}for(const it of Je)!it||!y(it)||m.has(it)||k.has(it)||(k.add(it),i(it).then(rt=>{m.set(it,rt!==it?rt:"")}).catch(()=>{m.set(it,"")}).finally(()=>{k.delete(it)}))}function S(Oe){if(!i)return Oe;const Je=it=>{if(!y(it))return null;const rt=m.get(it);return rt===void 0?phe:rt===""?null:rt};return Oe.replace(w,(it,rt,vt,Nt)=>{const on=Je(vt);return on===null?it:`${rt}${on}${Nt}`}).replace(v,(it,rt,vt,Nt)=>{const on=Je(vt);return on===null?it:`${rt}${on}${Nt}`})}Ye(()=>c.value,Oe=>b(Oe),{immediate:!0});function I(){if(!r.value||!l.openFile||l.streaming)return;const Oe=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Je=[];let it=Oe.nextNode();for(;it;){const rt=it,vt=rt.parentElement;vt&&!vt.closest("a, pre, .md-file-link, svg")&&rt.data.trim().length>0&&Je.push(rt),it=Oe.nextNode()}for(const rt of Je){const vt=Ipe(rt.data,{aliases:d.value});if(vt.length===0||!rt.parentNode)continue;const Nt=document.createDocumentFragment();let on=0;for(const mn of vt){mn.start>on&&Nt.append(document.createTextNode(rt.data.slice(on,mn.start)));const Zt=document.createElement("button");Zt.type="button",Zt.className="md-file-link",Zt.textContent=mn.text,Zt.title=mn.line?`${mn.path}:${mn.line}`:mn.path,Zt.addEventListener("click",jn=>{jn.preventDefault(),jn.stopPropagation(),l.openFile?.({path:mn.path,line:mn.line})}),Nt.append(Zt),on=mn.end}onFm.length?"skill":Oe.startsWith("#")||Oe.startsWith("?")||Oe.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(Oe)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(Oe)?null:Oe.endsWith("/")||Oe.endsWith("\\")||/%5c$/i.test(Oe)?"folder":"file":null}function R(Oe){try{return decodeURIComponent(Oe.slice(Fm.length))}catch{return Oe.slice(Fm.length)}}function P(Oe){return Oe.replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function M(){if(!r.value||l.streaming)return;const Oe=r.value.querySelectorAll("a[href]");for(const Je of Oe){if(Je.dataset.mdLinkHandled==="true"||Je.closest("svg")||Je.querySelector("img"))continue;const it=Je.getAttribute("href")??"",rt=F(it);if(rt===null)continue;Je.dataset.mdLinkHandled="true",Je.removeAttribute("title");const vt=rt==="skill"?it:T(it),Nt=P(Je.textContent??"");Je.classList.add("mention-pill",`mention-${rt}`),Je.dataset.mentionKind=rt,Je.dataset.mentionName=rt==="skill"?R(it):Nt,Je.dataset.mentionPath=vt,(rt==="skill"||l.openFile)&&Je.removeAttribute("href"),(rt==="skill"||rt==="file"&&l.openFile)&&(Je.tabIndex=0,Je.setAttribute("role","button"));const on=w$(Nt),mn=document.createElement("span");if(mn.className="mention-pill-name",mn.textContent=on,Je.replaceChildren(mn),!Je.querySelector(".mention-pill-icon")){const Zt=document.createElement("span");Zt.className="mention-pill-icon",Zt.setAttribute("aria-hidden","true"),Zt.innerHTML=rt==="skill"?ki("sparkles","sm"):rt==="folder"?ki("folder","sm"):aw(vt,Nt),Je.prepend(Zt)}Je.addEventListener("click",Zt=>{rt!=="skill"&&!l.openFile||(Zt.preventDefault(),Zt.stopPropagation(),rt==="file"&&l.openFile?.({path:$(T(it))}))}),rt==="file"&&l.openFile&&Je.addEventListener("keydown",Zt=>{Zt.key!=="Enter"&&Zt.key!==" "||(Zt.preventDefault(),Zt.stopPropagation(),l.openFile?.({path:$(T(it))}))}),fe(Je)}}function D(Oe){const Je=Oe.dataset.mentionKind??(Oe.classList.contains("mention-skill")?"skill":Oe.classList.contains("mention-folder")?"folder":"file"),it=Oe.dataset.mentionName??Oe.querySelector(".mention-pill-name")?.textContent??"";return{kind:Je,name:it,path:Oe.dataset.mentionPath??""}}function B(Oe,Je){let it;return()=>{if(it===void 0){const rt=getComputedStyle(document.documentElement).getPropertyValue(Oe).trim(),vt=parseFloat(rt);it=Number.isFinite(vt)?rt.endsWith("s")?vt*1e3:vt:Je}return it}}const z=B("--space-1-5",6),A=B("--p-mention-tip-vmargin",12),L=B("--duration-tooltip",150),W=B("--duration-fast",120),j=B("--duration-flash",1e3),re=V(null);let Q=null,Y=0,G=0;function X(Oe){return re.value?.contains(Oe)??!1}function te(){let Oe=re.value;return Oe||(Oe=document.createElement("div"),Oe.className="mention-tip",Oe.id="mention-tip",Oe.setAttribute("role","tooltip"),Oe.addEventListener("mouseenter",()=>window.clearTimeout(G)),Oe.addEventListener("mouseleave",()=>H()),Oe.addEventListener("focusin",()=>window.clearTimeout(G)),Oe.addEventListener("focusout",Je=>{const it=Je.relatedTarget;it instanceof Node&&(Oe.contains(it)||Q?.contains(it))||ee()}),document.body.append(Oe),re.value=Oe),Oe}function q(){const Oe=re.value,Je=Q;if(!Oe||!Je)return;const it=Je.getBoundingClientRect(),rt=z(),vt=A();let Nt=it.top-rt-Oe.offsetHeight;NtJe.name===Oe)}function xe(Oe){const Je=document.createElement("div");Je.className="mention-tip-path";const it=document.createElement("div");it.className="mention-tip-path-text";const rt=Oe.split(/([/\\])/);let vt=rt.length-1;for(;vt>0&&(rt[vt]===""||rt[vt]==="/"||rt[vt]==="\\");)vt--;for(let mn=0;mn{mn.preventDefault(),mn.stopPropagation(),Jo(Oe).then(Zt=>{Zt&&(Nt.innerHTML=ki("check","sm"),window.setTimeout(()=>{Nt.innerHTML=on},j()))})}),Je.append(Nt),Je}function We(Oe){const Je=document.createElement("div");Je.className="mention-tip-skill";const it=document.createElement("div");it.className="mention-tip-head";const rt=document.createElement("span");if(rt.className="mention-tip-name",rt.textContent=Oe.name,it.append(rt),Oe.path&&l.openFile){const vt=document.createElement("button");vt.type="button",vt.className="mention-tip-open",vt.setAttribute("aria-label",s("mention.openSkill")),vt.innerHTML=ki("external-link","sm");const Nt=Oe.path;vt.addEventListener("click",on=>{on.preventDefault(),on.stopPropagation(),ee(),l.openFile?.({path:Nt})}),it.append(vt)}if(Je.append(it),Oe.description){const vt=document.createElement("div");vt.className="mention-tip-desc",vt.textContent=Oe.description,Je.append(vt)}return Je}function he(Oe){const Je=te();Q?.removeAttribute("aria-describedby"),Q=Oe,Oe.setAttribute("aria-describedby",Je.id);const it=D(Oe);Je.replaceChildren(it.kind==="skill"?We(me(it.name)??{name:it.name,description:""}):xe(it.path||it.name)),Je.classList.remove("positioned"),q(),Je.classList.add("positioned"),Je.removeAttribute("inert")}function ee(){window.clearTimeout(Y),window.clearTimeout(G),Q?.removeAttribute("aria-describedby"),Q=null;const Oe=re.value;Oe?.classList.remove("positioned"),Oe?.setAttribute("inert","")}function ne(Oe){window.clearTimeout(G),window.clearTimeout(Y);const Je=re.value?.classList.contains("positioned")&&Q===Oe;Y=window.setTimeout(()=>{Oe.isConnected&&he(Oe)},Je?0:L())}function H(){window.clearTimeout(Y),window.clearTimeout(G),G=window.setTimeout(ee,W())}function Z(Oe){const Je=re.value;if(!(!Je||!Je.classList.contains("positioned")||!Q)){if(Oe.key==="Escape"){Oe.target instanceof Node&&Je.contains(Oe.target)&&Q.focus(),ee(),Oe.preventDefault(),Oe.stopImmediatePropagation();return}if(Oe.key==="Tab"&&Oe.target instanceof Node&&Je.contains(Oe.target)){const it=Array.from(Je.querySelectorAll("button")),rt=it[0],vt=it[it.length-1];(!Oe.shiftKey&&Oe.target===vt||Oe.shiftKey&&Oe.target===rt)&&(Oe.preventDefault(),Q.focus(),ee())}}}function ye(Oe){const Je=Oe.target;Je instanceof Node&&(X(Je)||Q?.contains(Je))||ee()}function fe(Oe){Oe.addEventListener("mouseenter",()=>ne(Oe)),Oe.addEventListener("mouseleave",Je=>{const it=Je.relatedTarget;it instanceof Node&&X(it)||H()}),Oe.addEventListener("focus",()=>ne(Oe)),Oe.addEventListener("blur",Je=>{const it=Je.relatedTarget;it instanceof Node&&X(it)||H()})}function de(){ee()}function J(Oe){return Oe.querySelector(`button.${j8}`)}function ae(Oe){return Oe.querySelector(`.${U8}`)}function be(Oe){const Je=J(Oe);if(!Je)return;const it=Oe.querySelector("thead tr")??Oe.querySelector("tr");if(!it)return;const rt=it.getBoundingClientRect(),vt=Oe.getBoundingClientRect().top,Nt=Math.max(2,Math.round(rt.top-vt+(rt.height-mhe)/2));Je.style.top=`${Nt}px`,Je.style.right=`${Nt}px`}function _e(Oe){const Je=Oe.querySelector("table");return Je!==null&&Je.scrollWidth>Oe.clientWidth+1}function ce(Oe){const Je=`translateX(${Oe.scrollLeft}px)`,it=ae(Oe);it&&(it.style.transform=Je);const rt=J(Oe);rt&&(rt.style.transform=Je);const vt=Oe.scrollLeft+Oe.clientWidth>=Oe.scrollWidth-2;Oe.classList.toggle(hhe,vt)}function Se(Oe){const Je=J(Oe);if(!Je)return;const it=_e(Oe),rt=Oe.classList.contains(H8);Je.classList.toggle(V8,it||rt),ae(Oe)?.classList.toggle(V8,it),be(Oe),ce(Oe)}function ie(Oe){const Je=J(Oe);if(Je)return Je;if(!Oe.closest(".a-msg .msg"))return null;const it=document.createElement("div");it.className=U8,it.setAttribute("aria-hidden","true");const rt=document.createElement("button");return rt.type="button",rt.className=j8,rt.innerHTML=ki("expand","sm"),rt.setAttribute("aria-label",s("conversation.widenTable")),rt.title=s("conversation.widenTable"),rt.addEventListener("click",vt=>{vt.preventDefault(),vt.stopPropagation(),we(Oe)}),Oe.append(it,rt),Oe.addEventListener("scroll",()=>ce(Oe),{passive:!0}),Se(Oe),rt}function we(Oe){const Je=Oe.classList.toggle(H8),it=J(Oe);if(it){it.innerHTML=ki(Je?"collapse":"expand","sm");const rt=s(Je?"conversation.restoreTableWidth":"conversation.widenTable");it.setAttribute("aria-label",rt),it.title=rt}Se(Oe),Oe.dispatchEvent(new CustomEvent("kimi-table-layout",{bubbles:!0}))}function Re(){if(!(!r.value||l.streaming))for(const Oe of r.value.querySelectorAll(".table-node-wrapper"))ie(Oe)}function at(){if(!(!r.value||l.streaming))for(const Oe of r.value.querySelectorAll(".table-node-wrapper"))Se(Oe)}function ft(){ee(),xt().then(()=>{I(),M(),Re()})}Ye(()=>l.text,ft),Ye(()=>l.streaming,ft);let Mt=null,Tt=null;Sn(()=>{ft(),r.value&&(Mt=new MutationObserver(ft),Mt.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Tt=new ResizeObserver(at),Tt.observe(r.value))),window.addEventListener("scroll",de,{capture:!0}),window.addEventListener("resize",de),document.addEventListener("pointerdown",ye,{capture:!0}),document.addEventListener("keydown",Z,{capture:!0})}),En(()=>{Mt?.disconnect(),Tt?.disconnect(),window.removeEventListener("scroll",de,{capture:!0}),window.removeEventListener("resize",de),document.removeEventListener("pointerdown",ye,{capture:!0}),document.removeEventListener("keydown",Z,{capture:!0}),ee(),re.value?.remove(),re.value=null});const tn={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Kt=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,Qe=O(()=>{const Oe=S(c.value),Je=[];let it=0;Kt.lastIndex=0;let rt;for(;(rt=Kt.exec(Oe))!==null;){const Nt=rt[1]??"",on=Oe.slice(it,rt.index)+(Nt||"");on.trim()&&Je.push({kind:"md",text:on}),Je.push({kind:"diff",code:rt[2]??""}),it=Kt.lastIndex}const vt=Oe.slice(it);return(vt.trim()||Je.length===0)&&Je.push({kind:"md",text:vt}),Je});function nt(Oe){return Oe.split(` +`).map(Je=>Je.startsWith("@@")?{type:"hunk",sign:"",text:Je}:/^\+(?!\+\+)/.test(Je)?{type:"add",sign:"+",text:Je.slice(1)}:/^-(?!--)/.test(Je)?{type:"del",sign:"-",text:Je.slice(1)}:Je.startsWith(" ")?{type:"ctx",sign:"",text:Je.slice(1)}:{type:"ctx",sign:"",text:Je})}const ut=V(null);function Pt(Oe,Je){Jo(Oe).then(it=>{it&&(ut.value=Je,setTimeout(()=>{ut.value=null},1400))})}return(Oe,Je)=>(g(),C("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),C("pre",rhe,N(u.value.frontmatter),1)):oe("",!0),(g(!0),C(Te,null,st(Qe.value,(it,rt)=>(g(),C(Te,{key:rt},[it.kind==="md"?(g(),pe(x(Mi),{key:0,content:it.text,"custom-markdown-it":o,mode:"chat","code-renderer":f.value.codeRenderer,"is-dark":x(p),"code-block-light-theme":q8,"code-block-dark-theme":K8,themes:[q8,K8],"code-block-props":tn,final:a.value,"smooth-streaming":e.streaming,"batch-rendering":h.value,"defer-nodes-until-visible":!1,onCopy:x(nB)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),C("div",lhe,[_("div",ahe,[Je[0]||(Je[0]=_("span",{class:"diff-lang"},"diff",-1)),K(Mn,{text:x(s)("filePreview.copyCode")},{default:ve(()=>[_("button",{class:"diff-copy","aria-label":x(s)("filePreview.copyCode"),onClick:vt=>Pt(it.code,rt)},[K(Fe,{name:ut.value===rt?"check":"copy",size:"sm"},null,8,["name"])],8,uhe)]),_:2},1032,["text"])]),_("pre",che,[_("code",null,[(g(!0),C(Te,null,st(nt(it.code),(vt,Nt)=>(g(),C("span",{key:Nt,class:ze(["diff-line",`diff-${vt.type}`])},[vt.type!=="hunk"?(g(),C("span",dhe,N(vt.sign),1)):oe("",!0),_("span",fhe,N(vt.text),1)],2))),128))])])]))],64))),128))],512))}}),Bl=ht(ghe,[["__scopeId","data-v-9fc85391"]]),vhe=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"})),yhe={class:"activity-notice",role:"status"},khe={"aria-hidden":"true"},bhe={class:"an-label"},whe=Ze({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),C("div",yhe,[_("span",khe,[K(ns,{size:"sm"})]),_("span",bhe,N(e.label),1)]))}}),xhe=ht(whe,[["__scopeId","data-v-5e7a6420"]]);function _he(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=c=>String(c).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===o.getFullYear(),l=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(r&&l&&a)return i;const u=new Date(o);return u.setDate(o.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${i}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const She=Ze({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=$t(),o=V(!1),s=O(()=>{const l=new Date(t.time);if(Number.isNaN(l.getTime()))return t.time;const a=u=>String(u).padStart(2,"0");return`${l.getFullYear()}-${a(l.getMonth()+1)}-${a(l.getDate())} ${a(l.getHours())}:${a(l.getMinutes())}`}),i=O(()=>o.value?s.value:_he(t.time,n("conversation.yesterday")));function r(){o.value=!o.value}return(l,a)=>(g(),C("button",{type:"button",class:"msg-time",onClick:Ct(r,["stop"])},N(i.value),1))}}),x$=ht(She,[["__scopeId","data-v-6761370d"]]);function Che(e){return e.length===1?`0${e}`:e}function Ahe(e,t){return`${String(Number(e))}:${Che(t)}`}const G8=e=>/^\d+$/.test(e);function Mhe(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,r,l]=n,a=i==="*"&&r==="*"&&l==="*",u=i==="*"&&r==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const c=/^\*\/(\d+)$/.exec(o);if(c&&s==="*"&&a)return c[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:c[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if(G8(o)&&G8(s)&&u){const f=Ahe(s,o);if(l==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(l==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const Ehe=["data-turn-id"],The={class:"cn-bubble"},Ihe={class:"cn-title"},$he={key:0,class:"cn-prompt"},Nhe={class:"cn-meta"},Lhe={key:0,class:"cn-meta-item"},Fhe={key:1,class:"cn-meta-item"},Ohe=["aria-label"],Rhe=["title"],Phe=Ze({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=$t(),o=O(()=>t.cron),s=O(()=>o.value?.missedCount!==void 0),i=O(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=O(()=>{const c=o.value?.cron;return c?Mhe(c,n):""}),l=O(()=>s.value?"error":"ok"),a=O(()=>{const c=o.value;if(!c)return"";const d=[];return c.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof c.coalescedCount=="number"&&c.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:c.coalescedCount})),c.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:c.missedCount})),c.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),u=O(()=>t.text??"");return(c,d)=>(g(),C("div",{class:ze(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[_("div",The,[_("span",Ihe,N(i.value),1),u.value?(g(),C("span",$he,N(u.value),1)):oe("",!0)]),_("div",Nhe,[K(Fe,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),r.value?(g(),C("span",Lhe,N(r.value),1)):oe("",!0),a.value?(g(),C("span",Fhe,N(a.value),1)):oe("",!0),_("span",{class:ze(["cn-status",l.value]),"aria-label":l.value},[l.value==="ok"?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):(g(),pe(Fe,{key:1,name:"close",size:"sm"}))],10,Ohe),o.value?.jobId?(g(),C("span",{key:2,class:"cn-meta-item cn-id",title:x(n)("conversation.cron.job",{id:o.value.jobId})},N(o.value.jobId),9,Rhe)):oe("",!0),e.createdAt?(g(),pe(x$,{key:3,time:e.createdAt},null,8,["time"])):oe("",!0)])],10,Ehe))}}),Dhe=ht(Phe,[["__scopeId","data-v-d3807b0f"]]),Z8=rn.clientId,Bhe="pythinker-code-web",zhe="web";function _$(){return{serverHttpUrl:Hhe(),clientId:Uhe(),clientName:Bhe,clientVersion:Vhe(),clientUiMode:zhe}}function Whe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Hhe(e){const t=Whe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Zc(e,t){return`${e}/api/v1${t.startsWith("/")?t:`/${t}`}`}function jhe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function Uhe(){const e=zo(Z8);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return ts(Z8,t),t}function Vhe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}function qhe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function Khe(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const Ghe={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function Zhe(e,t){switch(t.op){case"reset":return Yhe(e,t);case"turn.upsert":return Xhe(e,t.turn);case"step.upsert":return eme(e,t.turnId,t.step);case"frame.upsert":return nme(e,t);case"append":return sme(e,t);case"marker.upsert":return J8(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return J8(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return lme(e,t.task);case"interaction.upsert":return ame(e,t.interaction);case"attachment.upsert":return cme(e,t.attachment);case"todo.upsert":return fme(e,t.todo);case"prompt.upsert":return hme(e,t.prompt);case"meta.merge":return vme(e,t.meta);case"items.remove":return rme(e,t.ids)}}function Yhe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function Y8(e,t){return{...e,kind:"turn",steps:[...t]}}function S$(e){return{kind:"turn",turnId:e,ordinal:qhe(e),state:"running",origin:{kind:"other"},steps:[]}}function Jhe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Cd(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function cx(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function T0(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function Xhe(e,t){const n=Cd(e,t.turnId);return n?Qhe(n,t)?{state:e,changed:!1}:{state:{...e,items:T0(e.items,t.turnId,o=>Y8(t,o.steps))},changed:!0}:{state:{...e,items:cx(e.items,Y8(t,[]))},changed:!0}}function Qhe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function eme(e,t,n){const o=Cd(e,t)??S$(t),s=o.steps.findIndex(u=>u.stepId===n.stepId);let i,r=!0;if(s>=0){const u=o.steps[s];u&&tme(u,n)?(r=!1,i=o.steps):i=o.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...o,steps:[...i]},a=Cd(e,t)?T0(e.items,t,()=>l):cx(e.items,l);return{state:{...e,items:a},changed:!0}}function tme(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function nme(e,t){const n=Cd(e,t.turnId)??S$(t.turnId),o=n.steps.find(c=>c.stepId===t.stepId)??Jhe(t.stepId,t.turnId),s=o.frames.findIndex(c=>c.frameId===t.frame.frameId);let i;if(s>=0){const c=o.frames[s];if(c!==void 0&&ome(c,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const r={...o,frames:[...i]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=Cd(e,t.turnId)?T0(e.items,t.turnId,()=>a):cx(e.items,a);return{state:{...e,items:u},changed:!0}}function ome(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function sme(e,t){if(t.target.type==="task")return ime(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Cd(e,n),r=i?.steps.find(f=>f.stepId===o),l=r?.frames.find(f=>f.frameId===s);if(!i||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=C$(l.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?c:f)};return{state:{...e,items:T0(e.items,n,()=>d)},changed:!0}}function ime(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=C$(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const r=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function C$(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function J8(e,t,n,o){if(e.items.some(i=>Jb(i)===n)){let i=!1;const r=e.items.map(l=>Jb(l)!==n||l===t?l:(i=!0,t));return i?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let r=i.length;for(let l=0;l=o){r=l;break}}return i.splice(r,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function Jb(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function rme(e,t){const n=new Set(t),o=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(Jb(l)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,r=e.interactions;if(o.length>0){const l=new Set,a=new Set(i),u=new Set;for(const c of o)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}i=a}return{state:{...e,items:s,interactions:r,pendingInteractions:i},changed:!0}}function lme(e,t){const n=e.tasks.get(t.taskId);if(n&&gme(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function ame(e,t){const n=e.interactions.get(t.interactionId);if(n&&ume(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function ume(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function cme(e,t){const n=e.attachments.get(t.attachmentId);if(n&&dme(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function dme(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function fme(e,t){const n=e.todos.get(t.todoId);if(n&&pme(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function pme(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function hme(e,t){const n=e.prompts.get(t.promptId);if(n&&mme(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function mme(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function gme(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function vme(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class yme{constructor(t){this.agentId=t}#e=Ghe;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const r=Zhe(s,i);if(r.gap){o={target:i.target,...r.gap};continue}r.changed&&(s=r.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const r of this.#t)r(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,r)=>r.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=i)continue;r.push(a)}else l>i&&r.push(a);n=r,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var X8;function mt(e,t,n){function o(l,a){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:a,constr:r,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,a);const u=r.prototype,c=Object.keys(u);for(let d=0;dn?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class md extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class A$ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(X8=globalThis).__zod_globalConfig??(X8.__zod_globalConfig={});const dx=globalThis.__zod_globalConfig;function zl(e){return dx}function M$(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function Xb(e,t){return typeof t=="bigint"?t.toString():t}function I0(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fx(e){return e==null}function px(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function kme(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function Gp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wme=I0(()=>{if(dx.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ad(e){if(Gp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Gp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function T$(e){return Ad(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const xme=new Set(["string","number","symbol"]);function Md(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function en(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function _me(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Sme={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Cme(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=ja(e._zod.def,{get shape(){const r={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(r[l]=n.shape[l])}return Qu(this,"shape",r),r},checks:[]});return Ua(e,i)}function Ame(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=ja(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete r[l]}return Qu(this,"shape",r),r},checks:[]});return Ua(e,i)}function Mme(e,t){if(!Ad(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(i,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=ja(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Qu(this,"shape",i),i}});return Ua(e,s)}function Eme(e,t){if(!Ad(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Qu(this,"shape",o),o}});return Ua(e,n)}function Tme(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Qu(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ua(e,n)}function Ime(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=ja(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Qu(this,"shape",a),a},checks:[]});return Ua(t,r)}function $me(e,t,n){const o=ja(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const r in n){if(!(r in i))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(i[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)i[r]=new e({type:"nonoptional",innerType:s[r]});return Qu(this,"shape",i),i}});return Ua(t,o)}function Yc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Om(e){return typeof e=="string"?e:e?.message}function Wl(e,t,n){const o=e.message?e.message:Om(e.inst?._zod.def?.error?.(e))??Om(t?.error?.(e))??Om(n.customError?.(e))??Om(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:r,...l}=e;return l.path??(l.path=[]),l.message=o,t?.reportInput&&(l.input=r),l}function hx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Zp(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const I$=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$$=mt("$ZodError",I$),N$=mt("$ZodError",I$,{Parent:Error});function Lme(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function Fme(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const r of s.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(l=>o({issues:l},[...i,...r.path]));else if(r.code==="invalid_key")o({issues:r.issues},[...i,...r.path]);else if(r.code==="invalid_element")o({issues:r.issues},[...i,...r.path]);else{const l=[...i,...r.path];if(l.length===0)n._errors.push(t(r));else{let a=n,u=0;for(;u(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new md;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Wl(a,i,zl())));throw E$(l,s?.callee),l}return r.value},gx=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Wl(a,i,zl())));throw E$(l,s?.callee),l}return r.value},$0=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new md;return i.issues.length?{success:!1,error:new(e??$$)(i.issues.map(r=>Wl(r,s,zl())))}:{success:!0,data:i.value}},Ome=$0(N$),N0=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(r=>Wl(r,s,zl())))}:{success:!0,data:i.value}},Rme=N0(N$),Pme=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return mx(e)(t,n,s)},Dme=e=>(t,n,o)=>mx(e)(t,n,o),Bme=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return gx(e)(t,n,s)},zme=e=>async(t,n,o)=>gx(e)(t,n,o),Wme=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return $0(e)(t,n,s)},Hme=e=>(t,n,o)=>$0(e)(t,n,o),jme=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return N0(e)(t,n,s)},Ume=e=>async(t,n,o)=>N0(e)(t,n,o),Vme=/^[cC][0-9a-z]{6,}$/,qme=/^[0-9a-z]+$/,Kme=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gme=/^[0-9a-vA-V]{20}$/,Zme=/^[A-Za-z0-9]{27}$/,Yme=/^[a-zA-Z0-9_-]{21}$/,Jme=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xme=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,t6=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Qme=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ege="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tge(){return new RegExp(ege,"u")}const nge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ige=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rge=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,L$=/^[A-Za-z0-9_-]*$/,lge=/^https?$/,age=/^\+[1-9]\d{6,14}$/,F$="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",uge=new RegExp(`^${F$}$`);function O$(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cge(e){return new RegExp(`^${O$(e)}$`)}function dge(e){const t=O$({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${F$}T(?:${o})$`)}const fge=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pge=/^-?\d+$/,R$=/^-?\d+(?:\.\d+)?$/,hge=/^(?:true|false)$/i,mge=/^[^A-Z]*$/,gge=/^[^a-z]*$/,Ei=mt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),P$={number:"number",bigint:"bigint",object:"date"},D$=mt("$ZodCheckLessThan",(e,t)=>{Ei.init(e,t);const n=P$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Ei.init(e,t);const n=P$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vge=mt("$ZodCheckMultipleOf",(e,t)=>{Ei.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):kme(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yge=mt("$ZodCheckNumberFormat",(e,t)=>{Ei.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=Sme[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=pge)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?r.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):r.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}li&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),kge=mt("$ZodCheckMaxLength",(e,t)=>{var n;Ei.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const r=hx(s);o.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),bge=mt("$ZodCheckMinLength",(e,t)=>{var n;Ei.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const r=hx(s);o.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),wge=mt("$ZodCheckLengthEquals",(e,t)=>{var n;Ei.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const r=hx(s),l=i>t.length;o.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),L0=mt("$ZodCheckStringFormat",(e,t)=>{var n,o;Ei.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),xge=mt("$ZodCheckRegex",(e,t)=>{L0.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_ge=mt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mge),L0.init(e,t)}),Sge=mt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=gge),L0.init(e,t)}),Cge=mt("$ZodCheckIncludes",(e,t)=>{Ei.init(e,t);const n=Md(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Age=mt("$ZodCheckStartsWith",(e,t)=>{Ei.init(e,t);const n=new RegExp(`^${Md(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Mge=mt("$ZodCheckEndsWith",(e,t)=>{Ei.init(e,t);const n=new RegExp(`.*${Md(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Ege=mt("$ZodCheckOverwrite",(e,t)=>{Ei.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Tge{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` +`).filter(r=>r),s=Math.min(...o.map(r=>r.length-r.trimStart().length)),i=o.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of i)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` +`))}}const Ige={major:4,minor:4,patch:3},Mo=mt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ige;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(r,l,a)=>{let u=Yc(r),c;for(const d of l){if(d._zod.def.when){if(Nme(r)||!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,p=d._zod.check(r);if(p instanceof Promise&&a?.async===!1)throw new md;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,r.issues.length!==f&&(u||(u=Yc(r,f)))});else{if(r.issues.length===f)continue;u||(u=Yc(r,f))}}return c?c.then(()=>r):r},i=(r,l,a)=>{if(Yc(r))return r.aborted=!0,r;const u=s(l,o,a);if(u instanceof Promise){if(a.async===!1)throw new md;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>i(c,r,l)):i(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new md;return a.then(u=>s(u,o,l))}return s(a,o,l)}}oo(e,"~standard",()=>({validate:s=>{try{const i=Ome(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Rme(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),vx=mt("$ZodString",(e,t)=>{Mo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??fge(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),wo=mt("$ZodStringFormat",(e,t)=>{L0.init(e,t),vx.init(e,t)}),$ge=mt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xme),wo.init(e,t)}),Nge=mt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=t6(o))}else t.pattern??(t.pattern=t6());wo.init(e,t)}),Lge=mt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qme),wo.init(e,t)}),Fge=mt("$ZodURL",(e,t)=>{wo.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===lge.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Oge=mt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=tge()),wo.init(e,t)}),Rge=mt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yme),wo.init(e,t)}),Pge=mt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vme),wo.init(e,t)}),Dge=mt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=qme),wo.init(e,t)}),Bge=mt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Kme),wo.init(e,t)}),zge=mt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gme),wo.init(e,t)}),Wge=mt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zme),wo.init(e,t)}),Hge=mt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dge(t)),wo.init(e,t)}),jge=mt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=uge),wo.init(e,t)}),Uge=mt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=cge(t)),wo.init(e,t)}),Vge=mt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Jme),wo.init(e,t)}),qge=mt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=nge),wo.init(e,t),e._zod.bag.format="ipv4"}),Kge=mt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oge),wo.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Gge=mt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sge),wo.init(e,t)}),Zge=mt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ige),wo.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const r=Number(i);if(`${r}`!==i)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function z$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Yge=mt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rge),wo.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{z$(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Jge(e){if(!L$.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return z$(n)}const Xge=mt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=L$),wo.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Jge(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Qge=mt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=age),wo.init(e,t)});function e1e(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const t1e=mt("$ZodJWT",(e,t)=>{wo.init(e,t),e._zod.check=n=>{e1e(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),W$=mt("$ZodNumber",(e,t)=>{Mo.init(e,t),e._zod.pattern=e._zod.bag.pattern??R$,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),n1e=mt("$ZodNumberFormat",(e,t)=>{yge.init(e,t),W$.init(e,t)}),o1e=mt("$ZodBoolean",(e,t)=>{Mo.init(e,t),e._zod.pattern=hge,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),s1e=mt("$ZodUnknown",(e,t)=>{Mo.init(e,t),e._zod.parse=n=>n}),i1e=mt("$ZodNever",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function n6(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const r1e=mt("$ZodArray",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let r=0;rn6(u,n,r))):n6(a,n,r)}return i.length?Promise.all(i).then(()=>n):n}});function C1(e,t,n,o,s,i){const r=n in o;if(e.issues.length){if(s&&i&&!r)return;t.issues.push(...Jc(n,e.issues))}if(!r&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?r&&(t.value[n]=void 0):t.value[n]=e.value}function H$(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=_me(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function j$(e,t,n,o,s,i){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||l.has(f))continue;if(u==="never"){r.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>C1(h,n,f,t,c,d))):C1(p,n,f,t,c,d)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const l1e=mt("$ZodObject",(e,t)=>{if(Mo.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...l};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=I0(()=>H$(t));oo(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=Gp,i=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=o.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:u[f],issues:[]},a);k instanceof Promise?c.push(k.then(w=>C1(w,l,f,u,h,m))):C1(k,l,f,u,h,m)}return i?j$(c,u,l,a,o.value,e):c.length?Promise.all(c).then(()=>l):l}}),a1e=mt("$ZodObjectJIT",(e,t)=>{l1e.init(e,t);const n=e._zod.parse,o=I0(()=>H$(t)),s=f=>{const p=new Tge(["shape","payload","ctx"]),h=o.value,m=y=>{const b=e6(y);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let w=0;for(const y of h.keys)k[y]=`key_${w++}`;p.write("const newResult = {};");for(const y of h.keys){const b=k[y],S=e6(y),I=f[y],T=I?._zod?.optin==="optional",$=I?._zod?.optout==="optional";p.write(`const ${b} = ${m(y)};`),T&&$?p.write(` + if (${b}.issues.length) { + if (${S} in input) { + payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${S}, ...iss.path] : [${S}] + }))); + } + } + + if (${b}.value === undefined) { + if (${S} in input) { + newResult[${S}] = undefined; + } + } else { + newResult[${S}] = ${b}.value; + } + + `):T?p.write(` + if (${b}.issues.length) { + payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${S}, ...iss.path] : [${S}] + }))); + } + + if (${b}.value === undefined) { + if (${S} in input) { + newResult[${S}] = undefined; + } + } else { + newResult[${S}] = ${b}.value; + } + + `):p.write(` + const ${b}_present = ${S} in input; + if (${b}.issues.length) { + payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${S}, ...iss.path] : [${S}] + }))); + } + if (!${b}_present && !${b}.issues.length) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: undefined, + path: [${S}] + }); + } + + if (${b}_present) { + if (${b}.value === undefined) { + newResult[${S}] = undefined; + } else { + newResult[${S}] = ${b}.value; + } + } + + `)}p.write("payload.value = newResult;"),p.write("return payload;");const v=p.compile();return(y,b)=>v(f,y,b)};let i;const r=Gp,l=!dx.jitless,u=l&&wme.value,c=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return r(h)?l&&u&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),c?j$([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function o6(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Yc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(r=>Wl(r,o,zl())))}),t)}const U$=mt("$ZodUnion",(e,t)=>{Mo.init(e,t),oo(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),oo(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),oo(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),oo(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>px(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const r=[];for(const l of t.options){const a=l._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)r.push(a),i=!0;else{if(a.issues.length===0)return a;r.push(a)}}return i?Promise.all(r).then(l=>o6(l,o,e,s)):o6(r,o,e,s)}}),u1e=mt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,U$.init(e,t);const n=e._zod.parse;oo(e._zod,"propValues",()=>{const s={};for(const i of t.options){const r=i._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const o=I0(()=>{const s=t.options,i=new Map;for(const r of s){const l=r._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const a of l){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,r)}}return i});e._zod.parse=(s,i)=>{const r=s.value;if(!Gp(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=o.value.get(r?.[t.discriminator]);return l?l._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:r,path:[t.discriminator],inst:e}),s)}}),c1e=mt("$ZodIntersection",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),r=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||r instanceof Promise?Promise.all([i,r]).then(([a,u])=>s6(n,a,u)):s6(n,i,r)}});function Qb(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ad(e)&&Ad(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const r=Qb(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};s[i]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;ol.l&&l.r).map(([l])=>l);if(i.length&&s&&e.issues.push({...s,keys:i}),Yc(e))return e;const r=Qb(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const d1e=mt("$ZodRecord",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Ad(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.keyType._zod.run({value:u,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>Wl(p,o,zl())),input:u,path:[u],inst:e});continue}const d=c.value,f=t.valueType._zod.run({value:s[u],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(u,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(u,f.issues)),n.value[d]=f.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const l of Reflect.ownKeys(s)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,l))continue;let a=t.keyType._zod.run({value:l,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&R$.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[l]=s[l]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Wl(d,o,zl())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},o);c instanceof Promise?i.push(c.then(d=>{d.issues.length&&n.issues.push(...Jc(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Jc(l,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),f1e=mt("$ZodEnum",(e,t)=>{Mo.init(e,t);const n=M$(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>xme.has(typeof s)).map(s=>typeof s=="string"?Md(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const r=s.value;return o.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),p1e=mt("$ZodLiteral",(e,t)=>{if(Mo.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Md(o):o?Md(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),h1e=mt("$ZodTransform",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new A$(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n.fallback=!0,n));if(s instanceof Promise)throw new md;return n.value=s,n.fallback=!0,n}});function i6(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const V$=mt("$ZodOptional",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",e._zod.optout="optional",oo(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),oo(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${px(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(r=>i6(r,s)):i6(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),m1e=mt("$ZodExactOptional",(e,t)=>{V$.init(e,t),oo(e._zod,"values",()=>t.innerType._zod.values),oo(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),g1e=mt("$ZodNullable",(e,t)=>{Mo.init(e,t),oo(e._zod,"optin",()=>t.innerType._zod.optin),oo(e._zod,"optout",()=>t.innerType._zod.optout),oo(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${px(n.source)}|null)$`):void 0}),oo(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),v1e=mt("$ZodDefault",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",oo(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>r6(i,t)):r6(s,t)}});function r6(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const y1e=mt("$ZodPrefault",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",oo(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),k1e=mt("$ZodNonOptional",(e,t)=>{Mo.init(e,t),oo(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>l6(i,e)):l6(s,e)}});function l6(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const b1e=mt("$ZodCatch",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",oo(e._zod,"optout",()=>t.innerType._zod.optout),oo(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(r=>Wl(r,o,zl()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Wl(i,o,zl()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),w1e=mt("$ZodPipe",(e,t)=>{Mo.init(e,t),oo(e._zod,"values",()=>t.in._zod.values),oo(e._zod,"optin",()=>t.in._zod.optin),oo(e._zod,"optout",()=>t.out._zod.optout),oo(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(r=>Rm(r,t.in,o)):Rm(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>Rm(i,t.out,o)):Rm(s,t.out,o)}});function Rm(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const x1e=mt("$ZodReadonly",(e,t)=>{Mo.init(e,t),oo(e._zod,"propValues",()=>t.innerType._zod.propValues),oo(e._zod,"values",()=>t.innerType._zod.values),oo(e._zod,"optin",()=>t.innerType?._zod?.optin),oo(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(a6):a6(s)}});function a6(e){return e.value=Object.freeze(e.value),e}const _1e=mt("$ZodCustom",(e,t)=>{Ei.init(e,t),Mo.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>u6(i,n,o,e));u6(s,n,o,e)}});function u6(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(Zp(s))}}var c6;class S1e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function C1e(){return new S1e}(c6=globalThis).__zod_globalRegistry??(c6.__zod_globalRegistry=C1e());const qf=globalThis.__zod_globalRegistry;function A1e(e,t){return new e({type:"string",...en(t)})}function M1e(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...en(t)})}function d6(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...en(t)})}function E1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...en(t)})}function T1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...en(t)})}function I1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...en(t)})}function $1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...en(t)})}function N1e(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...en(t)})}function L1e(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...en(t)})}function F1e(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...en(t)})}function O1e(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...en(t)})}function R1e(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...en(t)})}function P1e(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...en(t)})}function D1e(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...en(t)})}function B1e(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...en(t)})}function z1e(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...en(t)})}function W1e(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...en(t)})}function H1e(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...en(t)})}function j1e(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...en(t)})}function U1e(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...en(t)})}function V1e(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...en(t)})}function q1e(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...en(t)})}function K1e(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...en(t)})}function G1e(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...en(t)})}function Z1e(e,t){return new e({type:"string",format:"date",check:"string_format",...en(t)})}function Y1e(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...en(t)})}function J1e(e,t){return new e({type:"string",format:"duration",check:"string_format",...en(t)})}function X1e(e,t){return new e({type:"number",checks:[],...en(t)})}function Q1e(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...en(t)})}function e0e(e,t){return new e({type:"boolean",...en(t)})}function t0e(e){return new e({type:"unknown"})}function n0e(e,t){return new e({type:"never",...en(t)})}function f6(e,t){return new D$({check:"less_than",...en(t),value:e,inclusive:!1})}function ik(e,t){return new D$({check:"less_than",...en(t),value:e,inclusive:!0})}function p6(e,t){return new B$({check:"greater_than",...en(t),value:e,inclusive:!1})}function rk(e,t){return new B$({check:"greater_than",...en(t),value:e,inclusive:!0})}function h6(e,t){return new vge({check:"multiple_of",...en(t),value:e})}function q$(e,t){return new kge({check:"max_length",...en(t),maximum:e})}function A1(e,t){return new bge({check:"min_length",...en(t),minimum:e})}function K$(e,t){return new wge({check:"length_equals",...en(t),length:e})}function o0e(e,t){return new xge({check:"string_format",format:"regex",...en(t),pattern:e})}function s0e(e){return new _ge({check:"string_format",format:"lowercase",...en(e)})}function i0e(e){return new Sge({check:"string_format",format:"uppercase",...en(e)})}function r0e(e,t){return new Cge({check:"string_format",format:"includes",...en(t),includes:e})}function l0e(e,t){return new Age({check:"string_format",format:"starts_with",...en(t),prefix:e})}function a0e(e,t){return new Mge({check:"string_format",format:"ends_with",...en(t),suffix:e})}function Wd(e){return new Ege({check:"overwrite",tx:e})}function u0e(e){return Wd(t=>t.normalize(e))}function c0e(){return Wd(e=>e.trim())}function d0e(){return Wd(e=>e.toLowerCase())}function f0e(){return Wd(e=>e.toUpperCase())}function p0e(){return Wd(e=>bme(e))}function h0e(e,t,n){return new e({type:"array",element:t,...en(n)})}function m0e(e,t,n){return new e({type:"custom",check:"custom",fn:t,...en(n)})}function g0e(e,t){const n=v0e(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(Zp(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Zp(i))}},e(o.value,o)),t);return n}function v0e(e,t){const n=new Ei({check:"custom",...en(t)});return n._zod.check=e,n}function G$(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??qf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qo(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const r={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,r);const l=e._zod.toJSONSchema?.();if(l)r.schema=l;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),Qo(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&Zs(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&"_prefault"in r.schema&&((o=r.schema).default??(o.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function Z$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=o.get(l);if(a&&a!==r[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(l,r[0])}}const s=r=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(r[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},i=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$ref=a};if(e.cycles==="throw")for(const r of e.seen.entries()){const l=r[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const l=r[1];if(t===r[0]){i(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id){i(r);continue}if(l.cycle){i(r);continue}if(l.count>1&&e.reused==="ref"){i(r);continue}}}function Y$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=l=>{const a=e.seen.get(l);if(a.ref===null)return;const u=a.def??a.schema,c={...u},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,c),l._zod.parent===d)for(const k in u)k==="$ref"||k==="allOf"||k in c||delete u[k];if(h.$ref&&p.def)for(const k in u)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(u[k])===JSON.stringify(p.def[k])&&delete u[k]}const f=l._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:l,jsonSchema:u,path:a.path??[]})};for(const l of[...e.seen.entries()].reverse())o(l[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(l)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const r=e.external?.defs??{};for(const l of e.seen.entries()){const a=l[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,r[a.defId]=a.def)}e.external||Object.keys(r).length>0&&(e.target==="draft-2020-12"?s.$defs=r:s.definitions=r);try{const l=JSON.parse(JSON.stringify(s));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:M1(t,"input",e.processors),output:M1(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Zs(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Zs(o.element,n);if(o.type==="set")return Zs(o.valueType,n);if(o.type==="lazy")return Zs(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Zs(o.innerType,n);if(o.type==="intersection")return Zs(o.left,n)||Zs(o.right,n);if(o.type==="record"||o.type==="map")return Zs(o.keyType,n)||Zs(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Zs(o.in,n)||Zs(o.out,n);if(o.type==="object"){for(const s in o.shape)if(Zs(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(Zs(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(Zs(s,n))return!0;return!!(o.rest&&Zs(o.rest,n))}return!1}const y0e=(e,t={})=>n=>{const o=G$({...n,processors:t});return Qo(e,o),Z$(o,e),Y$(o,e)},M1=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},r=G$({...s??{},target:i,io:t,processors:n});return Qo(e,r),Z$(r,e),Y$(r,e)},k0e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},b0e=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof r=="number"&&(s.maxLength=r),l&&(s.format=k0e[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},w0e=(e,t,n,o)=>{const s=n,{minimum:i,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number";const d=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(r??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u:typeof r=="number"&&(s.maximum=r),typeof a=="number"&&(s.multipleOf=a)},x0e=(e,t,n,o)=>{n.type="boolean"},_0e=(e,t,n,o)=>{n.not={}},S0e=(e,t,n,o)=>{},C0e=(e,t,n,o)=>{const s=e._zod.def,i=M$(s.entries);i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),n.enum=i},A0e=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const r of s.values)if(r===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(r))}else i.push(r);if(i.length!==0)if(i.length===1){const r=i[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),i.every(r=>typeof r=="boolean")&&(n.type="boolean"),i.every(r=>r===null)&&(n.type="null"),n.enum=i},M0e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},E0e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},T0e=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:r,maximum:l}=e._zod.bag;typeof r=="number"&&(s.minItems=r),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=Qo(i.element,t,{...o,path:[...o.path,"items"]})},I0e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const r=i.shape;for(const u in r)s.properties[u]=Qo(r[u],t,{...o,path:[...o.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=i.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=Qo(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},$0e=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,r=s.options.map((l,a)=>Qo(l,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=r:n.anyOf=r},N0e=(e,t,n,o)=>{const s=e._zod.def,i=Qo(s.left,t,{...o,path:[...o.path,"allOf",0]}),r=Qo(s.right,t,{...o,path:[...o.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(i)?i.allOf:[i],...l(r)?r.allOf:[r]];n.allOf=a},L0e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const r=i.keyType,a=r._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const c=Qo(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Qo(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=Qo(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},F0e=(e,t,n,o)=>{const s=e._zod.def,i=Qo(s.innerType,t,o),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},O0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},R0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},P0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},D0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let r;try{r=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=r},B0e=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),r=t.io==="input"?i?s.out:s.in:s.out;Qo(r,t,o);const l=t.seen.get(e);l.ref=r},z0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},J$=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},W0e=mt("ZodISODateTime",(e,t)=>{Hge.init(e,t),To.init(e,t)});function H0e(e){return G1e(W0e,e)}const j0e=mt("ZodISODate",(e,t)=>{jge.init(e,t),To.init(e,t)});function U0e(e){return Z1e(j0e,e)}const V0e=mt("ZodISOTime",(e,t)=>{Uge.init(e,t),To.init(e,t)});function q0e(e){return Y1e(V0e,e)}const K0e=mt("ZodISODuration",(e,t)=>{Vge.init(e,t),To.init(e,t)});function G0e(e){return J1e(K0e,e)}const Z0e=(e,t)=>{$$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Fme(e,n)},flatten:{value:n=>Lme(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Xb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Xb,2)}},isEmpty:{get(){return e.issues.length===0}}})},cr=mt("ZodError",Z0e,{Parent:Error}),Y0e=mx(cr),J0e=gx(cr),X0e=$0(cr),Q0e=N0(cr),eve=Pme(cr),tve=Dme(cr),nve=Bme(cr),ove=zme(cr),sve=Wme(cr),ive=Hme(cr),rve=jme(cr),lve=Ume(cr),m6=new WeakMap;function mh(e,t,n){const o=Object.getPrototypeOf(e);let s=m6.get(o);if(s||(s=new Set,m6.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const r=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const l=r.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}const Eo=mt("ZodType",(e,t)=>(Mo.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:M1(e,"input"),output:M1(e,"output")}}),e.toJSONSchema=y0e(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Y0e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>X0e(e,n,o),e.parseAsync=async(n,o)=>J0e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Q0e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>eve(e,n,o),e.decode=(n,o)=>tve(e,n,o),e.encodeAsync=async(n,o)=>nve(e,n,o),e.decodeAsync=async(n,o)=>ove(e,n,o),e.safeEncode=(n,o)=>sve(e,n,o),e.safeDecode=(n,o)=>ive(e,n,o),e.safeEncodeAsync=async(n,o)=>rve(e,n,o),e.safeDecodeAsync=async(n,o)=>lve(e,n,o),mh(e,"ZodType",{check(...n){const o=this.def;return this.clone(ja(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return Ua(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(eye(n,o))},superRefine(n,o){return this.check(tye(n,o))},overwrite(n){return this.check(Wd(n))},optional(){return k6(this)},exactOptional(){return Wve(this)},nullable(){return b6(this)},nullish(){return k6(b6(this))},nonoptional(n){return Kve(this,n)},array(){return zn(this)},or(n){return Lve([this,n])},and(n){return Rve(this,n)},transform(n){return w6(this,Bve(n))},default(n){return Uve(this,n)},prefault(n){return qve(this,n)},catch(n){return Zve(this,n)},pipe(n){return w6(this,n)},readonly(){return Xve(this)},describe(n){const o=this.clone();return qf.add(o,{description:n}),o},meta(...n){if(n.length===0)return qf.get(this);const o=this.clone();return qf.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return qf.get(e)?.description},configurable:!0}),e)),X$=mt("_ZodString",(e,t)=>{vx.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>b0e(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,mh(e,"_ZodString",{regex(...o){return this.check(o0e(...o))},includes(...o){return this.check(r0e(...o))},startsWith(...o){return this.check(l0e(...o))},endsWith(...o){return this.check(a0e(...o))},min(...o){return this.check(A1(...o))},max(...o){return this.check(q$(...o))},length(...o){return this.check(K$(...o))},nonempty(...o){return this.check(A1(1,...o))},lowercase(o){return this.check(s0e(o))},uppercase(o){return this.check(i0e(o))},trim(){return this.check(c0e())},normalize(...o){return this.check(u0e(...o))},toLowerCase(){return this.check(d0e())},toUpperCase(){return this.check(f0e())},slugify(){return this.check(p0e())}})}),ave=mt("ZodString",(e,t)=>{vx.init(e,t),X$.init(e,t),e.email=n=>e.check(M1e(uve,n)),e.url=n=>e.check(N1e(cve,n)),e.jwt=n=>e.check(K1e(Cve,n)),e.emoji=n=>e.check(L1e(dve,n)),e.guid=n=>e.check(d6(g6,n)),e.uuid=n=>e.check(E1e(Pm,n)),e.uuidv4=n=>e.check(T1e(Pm,n)),e.uuidv6=n=>e.check(I1e(Pm,n)),e.uuidv7=n=>e.check($1e(Pm,n)),e.nanoid=n=>e.check(F1e(fve,n)),e.guid=n=>e.check(d6(g6,n)),e.cuid=n=>e.check(O1e(pve,n)),e.cuid2=n=>e.check(R1e(hve,n)),e.ulid=n=>e.check(P1e(mve,n)),e.base64=n=>e.check(U1e(xve,n)),e.base64url=n=>e.check(V1e(_ve,n)),e.xid=n=>e.check(D1e(gve,n)),e.ksuid=n=>e.check(B1e(vve,n)),e.ipv4=n=>e.check(z1e(yve,n)),e.ipv6=n=>e.check(W1e(kve,n)),e.cidrv4=n=>e.check(H1e(bve,n)),e.cidrv6=n=>e.check(j1e(wve,n)),e.e164=n=>e.check(q1e(Sve,n)),e.datetime=n=>e.check(H0e(n)),e.date=n=>e.check(U0e(n)),e.time=n=>e.check(q0e(n)),e.duration=n=>e.check(G0e(n))});function _t(e){return A1e(ave,e)}const To=mt("ZodStringFormat",(e,t)=>{wo.init(e,t),X$.init(e,t)}),uve=mt("ZodEmail",(e,t)=>{Lge.init(e,t),To.init(e,t)}),g6=mt("ZodGUID",(e,t)=>{$ge.init(e,t),To.init(e,t)}),Pm=mt("ZodUUID",(e,t)=>{Nge.init(e,t),To.init(e,t)}),cve=mt("ZodURL",(e,t)=>{Fge.init(e,t),To.init(e,t)}),dve=mt("ZodEmoji",(e,t)=>{Oge.init(e,t),To.init(e,t)}),fve=mt("ZodNanoID",(e,t)=>{Rge.init(e,t),To.init(e,t)}),pve=mt("ZodCUID",(e,t)=>{Pge.init(e,t),To.init(e,t)}),hve=mt("ZodCUID2",(e,t)=>{Dge.init(e,t),To.init(e,t)}),mve=mt("ZodULID",(e,t)=>{Bge.init(e,t),To.init(e,t)}),gve=mt("ZodXID",(e,t)=>{zge.init(e,t),To.init(e,t)}),vve=mt("ZodKSUID",(e,t)=>{Wge.init(e,t),To.init(e,t)}),yve=mt("ZodIPv4",(e,t)=>{qge.init(e,t),To.init(e,t)}),kve=mt("ZodIPv6",(e,t)=>{Kge.init(e,t),To.init(e,t)}),bve=mt("ZodCIDRv4",(e,t)=>{Gge.init(e,t),To.init(e,t)}),wve=mt("ZodCIDRv6",(e,t)=>{Zge.init(e,t),To.init(e,t)}),xve=mt("ZodBase64",(e,t)=>{Yge.init(e,t),To.init(e,t)}),_ve=mt("ZodBase64URL",(e,t)=>{Xge.init(e,t),To.init(e,t)}),Sve=mt("ZodE164",(e,t)=>{Qge.init(e,t),To.init(e,t)}),Cve=mt("ZodJWT",(e,t)=>{t1e.init(e,t),To.init(e,t)}),Q$=mt("ZodNumber",(e,t)=>{W$.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>w0e(e,o,s),mh(e,"ZodNumber",{gt(o,s){return this.check(p6(o,s))},gte(o,s){return this.check(rk(o,s))},min(o,s){return this.check(rk(o,s))},lt(o,s){return this.check(f6(o,s))},lte(o,s){return this.check(ik(o,s))},max(o,s){return this.check(ik(o,s))},int(o){return this.check(v6(o))},safe(o){return this.check(v6(o))},positive(o){return this.check(p6(0,o))},nonnegative(o){return this.check(rk(0,o))},negative(o){return this.check(f6(0,o))},nonpositive(o){return this.check(ik(0,o))},multipleOf(o,s){return this.check(h6(o,s))},step(o,s){return this.check(h6(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ht(e){return X1e(Q$,e)}const Ave=mt("ZodNumberFormat",(e,t)=>{n1e.init(e,t),Q$.init(e,t)});function v6(e){return Q1e(Ave,e)}const Mve=mt("ZodBoolean",(e,t)=>{o1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>x0e(e,n,o)});function gh(e){return e0e(Mve,e)}const Eve=mt("ZodUnknown",(e,t)=>{s1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>S0e()});function ls(){return t0e(Eve)}const Tve=mt("ZodNever",(e,t)=>{i1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>_0e(e,n,o)});function Ive(e){return n0e(Tve,e)}const $ve=mt("ZodArray",(e,t)=>{r1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>T0e(e,n,o,s),e.element=t.element,mh(e,"ZodArray",{min(n,o){return this.check(A1(n,o))},nonempty(n){return this.check(A1(1,n))},max(n,o){return this.check(q$(n,o))},length(n,o){return this.check(K$(n,o))},unwrap(){return this.element}})});function zn(e,t){return h0e($ve,e,t)}const Nve=mt("ZodObject",(e,t)=>{a1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>I0e(e,n,o,s),oo(e,"shape",()=>t.shape),mh(e,"ZodObject",{keyof(){return bo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ls()})},loose(){return this.clone({...this._zod.def,catchall:ls()})},strict(){return this.clone({...this._zod.def,catchall:Ive()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Mme(this,n)},safeExtend(n){return Eme(this,n)},merge(n){return Tme(this,n)},pick(n){return Cme(this,n)},omit(n){return Ame(this,n)},partial(...n){return Ime(t7,this,n[0])},required(...n){return $me(n7,this,n[0])}})});function Ft(e,t){const n={type:"object",shape:e??{},...en(t)};return new Nve(n)}const e7=mt("ZodUnion",(e,t)=>{U$.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>$0e(e,n,o,s),e.options=t.options});function Lve(e,t){return new e7({type:"union",options:e,...en(t)})}const Fve=mt("ZodDiscriminatedUnion",(e,t)=>{e7.init(e,t),u1e.init(e,t)});function Va(e,t,n){return new Fve({type:"union",options:t,discriminator:e,...en(n)})}const Ove=mt("ZodIntersection",(e,t)=>{c1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>N0e(e,n,o,s)});function Rve(e,t){return new Ove({type:"intersection",left:e,right:t})}const y6=mt("ZodRecord",(e,t)=>{d1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>L0e(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function yx(e,t,n){return!t||!t._zod?new y6({type:"record",keyType:_t(),valueType:e,...en(t)}):new y6({type:"record",keyType:e,valueType:t,...en(n)})}const e2=mt("ZodEnum",(e,t)=>{f1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>C0e(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const r of o)if(n.has(r))i[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new e2({...t,checks:[],...en(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const r of o)if(n.has(r))delete i[r];else throw new Error(`Key ${r} not found in enum`);return new e2({...t,checks:[],...en(s),entries:i})}});function bo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new e2({type:"enum",entries:n,...en(t)})}const Pve=mt("ZodLiteral",(e,t)=>{p1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>A0e(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function bn(e,t){return new Pve({type:"literal",values:Array.isArray(e)?e:[e],...en(t)})}const Dve=mt("ZodTransform",(e,t)=>{h1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>E0e(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new A$(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Zp(i,n.value,t));else{const r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Zp(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function Bve(e){return new Dve({type:"transform",transform:e})}const t7=mt("ZodOptional",(e,t)=>{V$.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>J$(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function k6(e){return new t7({type:"optional",innerType:e})}const zve=mt("ZodExactOptional",(e,t)=>{m1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>J$(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Wve(e){return new zve({type:"optional",innerType:e})}const Hve=mt("ZodNullable",(e,t)=>{g1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>F0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function b6(e){return new Hve({type:"nullable",innerType:e})}const jve=mt("ZodDefault",(e,t)=>{v1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>R0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Uve(e,t){return new jve({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():T$(t)}})}const Vve=mt("ZodPrefault",(e,t)=>{y1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>P0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function qve(e,t){return new Vve({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():T$(t)}})}const n7=mt("ZodNonOptional",(e,t)=>{k1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>O0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Kve(e,t){return new n7({type:"nonoptional",innerType:e,...en(t)})}const Gve=mt("ZodCatch",(e,t)=>{b1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>D0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zve(e,t){return new Gve({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Yve=mt("ZodPipe",(e,t)=>{w1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>B0e(e,n,o,s),e.in=t.in,e.out=t.out});function w6(e,t){return new Yve({type:"pipe",in:e,out:t})}const Jve=mt("ZodReadonly",(e,t)=>{x1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>z0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Xve(e){return new Jve({type:"readonly",innerType:e})}const Qve=mt("ZodCustom",(e,t)=>{_1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>M0e(e,n)});function eye(e,t={}){return m0e(Qve,e,t)}function tye(e,t){return g0e(e,t)}const qu=_t().min(1),kx=_t().min(1),vh=_t().min(1),Ku=_t().min(1),Vi=_t().min(1),nye=/^[A-Za-z0-9._-]{1,128}$/;function oye(e){return nye.test(e)&&e!=="."&&e!==".."}const o7=Va("kind",[Ft({kind:bn("user"),payload:ls().optional()}),Ft({kind:bn("cron"),taskId:Ku.optional(),payload:ls().optional()}),Ft({kind:bn("task"),taskId:Ku,payload:ls().optional()}),Ft({kind:bn("hook"),payload:ls().optional()}),Ft({kind:bn("compaction"),payload:ls().optional()}),Ft({kind:bn("side"),payload:ls().optional()}),Ft({kind:bn("other"),payload:ls().optional()})]),sye=Ft({inputTokens:Ht().optional(),outputTokens:Ht().optional(),cachedTokens:Ht().optional(),cost:Ht().optional()}),kp=Ft({inputOther:Ht(),output:Ht(),inputCacheRead:Ht(),inputCacheCreation:Ht()}),iye=Ft({llmFirstTokenLatencyMs:Ht().optional(),llmStreamDurationMs:Ht().optional(),llmRequestBuildMs:Ht().optional(),llmServerFirstTokenMs:Ht().optional(),llmServerDecodeMs:Ht().optional(),llmClientConsumeMs:Ht().optional()}),rye=Ft({failedAttempt:Ht(),nextAttempt:Ht(),maxAttempts:Ht(),delayMs:Ht(),errorName:_t(),errorMessage:_t(),statusCode:Ht().optional()}),s7=bo(["queued","running","completed","failed","cancelled"]),lye=bo(["running","completed","interrupted","failed"]),aye=Ft({kind:bn("text"),frameId:vh,role:bo(["assistant","user"]),text:_t(),attachmentIds:zn(_t()).optional(),taskId:Ku.optional()}),uye=Ft({kind:bn("thinking"),frameId:vh,text:_t()}),cye=Ft({agentId:Vi,role:bo(["child","member"]).optional()}),dye=Ft({kind:bo(["stdout","stderr","progress","status","custom"]),text:_t().optional(),percent:Ht().optional(),customKind:_t().optional(),customData:ls().optional()}),fye=Ft({kind:bn("tool"),frameId:vh,toolCallId:_t(),name:_t(),view:_t().optional(),state:bo(["running","done","error"]),input:ls().optional(),output:ls().optional(),display:ls().optional(),error:_t().optional(),inputText:_t().optional(),progress:dye.optional(),taskId:Ku.optional(),approvalId:_t().optional(),todoId:_t().optional(),agentRefs:zn(cye).optional()}),bx=Ft({interactionId:_t(),interactionKind:bo(["approval","question"]),toolCallId:_t().optional(),state:bo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:ls().optional(),response:ls().optional()}),pye=Ft({kind:bn("notice"),frameId:vh,level:bo(["error","warning","info"]),source:_t().optional(),message:_t(),detail:ls().optional()}),i7=Va("kind",[aye,uye,fye,pye]),r7=Ft({kind:bn("step"),stepId:kx,turnId:qu,ordinal:Ht().int(),state:lye,frames:zn(i7),startedAt:_t().optional(),endedAt:_t().optional(),usage:kp.optional(),finishReason:_t().optional(),timing:iye.optional(),retry:rye.optional(),endReason:_t().optional(),endMessage:_t().optional()}),l7=Ft({kind:bn("turn"),turnId:qu,ordinal:Ht().int(),state:s7,origin:o7,prompt:_t().optional(),attachmentIds:zn(_t()).optional(),steps:zn(r7),startedAt:_t().optional(),endedAt:_t().optional(),usage:sye.optional(),durationMs:Ht().optional(),error:_t().optional()}),a7=Ft({kind:bn("marker"),markerId:_t(),marker:_t(),payload:ls().optional(),at:_t().optional()}),u7=Ft({kind:bn("taskref"),refId:_t(),taskId:Ku,at:_t().optional()}),c7=Va("kind",[l7,a7,u7]),wx=Ft({taskId:Ku,kind:bo(["shell","subagent","tool","other"]),state:bo(["running","completed","failed","timed_out","killed","lost"]),detached:gh(),description:_t().optional(),agentId:Vi.optional(),outputTail:_t(),startedAt:_t().optional(),endedAt:_t().optional(),resultSummary:_t().optional(),error:_t().optional(),stateReason:_t().optional(),usage:kp.optional()}),d7=Ft({objective:_t(),status:bo(["active","paused","blocked","complete"]),completionCriterion:_t().optional(),budgetUsed:Ht().optional(),budgetLimit:Ht().optional()}),hye=Ft({plan:Ft({reviewPath:_t().optional(),version:Ht().optional()}).optional(),dynamic_workflow:Ft({trigger:_t().optional()}).optional()}),mye=Ft({plan:Ft({reviewPath:_t().optional(),version:Ht().optional()}).nullable().optional(),dynamic_workflow:Ft({trigger:_t().optional()}).nullable().optional()}),gye=Va("kind",[Ft({kind:bn("idle")}),Ft({kind:bn("running"),turnId:Ht(),step:Ht(),stepId:_t(),since:Ht()}),Ft({kind:bn("streaming"),turnId:Ht(),step:Ht(),stepId:_t(),stream:bo(["assistant","thinking","tool_call"]),toolCallId:_t().optional(),toolName:_t().optional(),since:Ht()}),Ft({kind:bn("tool_call"),turnId:Ht(),step:Ht(),toolCallId:_t(),name:_t(),since:Ht()}),Ft({kind:bn("retrying"),turnId:Ht(),step:Ht(),stepId:_t(),failedAttempt:Ht(),nextAttempt:Ht(),maxAttempts:Ht(),delayMs:Ht(),errorName:_t().optional(),statusCode:Ht().optional(),since:Ht()}),Ft({kind:bn("awaiting_approval"),turnId:Ht(),step:Ht().optional(),approval:ls().optional(),since:Ht()}),Ft({kind:bn("interrupted"),turnId:Ht(),step:Ht().optional(),reason:bo(["aborted","max_steps","error"]),message:_t().optional(),at:Ht()}),Ft({kind:bn("ended"),turnId:Ht(),reason:bo(["completed","cancelled","failed","blocked"]),durationMs:Ht().optional(),at:Ht()})]),vye=Ft({byModel:yx(_t(),kp).optional(),currentTurn:kp.optional(),total:kp.optional()}),yye=Ft({model:_t().optional(),thinkingEffort:_t().optional(),usage:vye.optional(),contextTokens:Ht().optional(),maxContextTokens:Ht().optional(),contextUsage:Ht().optional(),permission:bo(["manual","yolo","auto"]).optional(),phase:gye.optional()}),xx=Ft({goal:d7.optional(),modes:hye.optional(),activity:bo(["idle","turn","disposing","unknown"]).optional(),agent:yye.optional()}),kye=xx.extend({goal:d7.nullable().optional(),modes:mye.optional()}),F0=Ft({attachmentId:_t(),mediaType:_t(),name:_t().optional(),size:Ht().optional(),source:Va("kind",[Ft({kind:bn("url"),url:_t()}),Ft({kind:bn("file"),fileId:_t()}),Ft({kind:bn("session_media"),fileId:_t()})]).optional(),placeholder:_t().optional()}),bye=Ft({title:_t(),status:bo(["pending","in_progress","done"])}),_x=Ft({todoId:_t(),items:zn(bye),updatedAt:_t().optional()}),Sx=Ft({promptId:_t(),status:bo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:_t().optional(),content:ls().optional(),createdAt:_t(),finishedAt:_t().optional(),steeredAt:_t().optional()}),f7=Ft({items:zn(c7),tasks:zn(wx),interactions:zn(bx).default([]),attachments:zn(F0).default([]),todos:zn(_x).default([]),prompts:zn(Sx).default([]),meta:xx,hasMoreOlder:gh().optional()}),wye=l7.omit({steps:!0}),xye=r7.omit({frames:!0}),_ye=Va("type",[Ft({type:bn("frame"),turnId:qu,stepId:kx,frameId:vh}),Ft({type:bn("task"),taskId:Ku})]),Cx=Va("op",[Ft({op:bn("reset"),agentId:Vi,snapshot:f7}),Ft({op:bn("turn.upsert"),turn:wye}),Ft({op:bn("step.upsert"),turnId:qu,step:xye}),Ft({op:bn("frame.upsert"),turnId:qu,stepId:kx,frame:i7}),Ft({op:bn("append"),target:_ye,offset:Ht().int().nonnegative(),text:_t()}),Ft({op:bn("marker.upsert"),item:a7,beforeTurn:Ht().int().optional()}),Ft({op:bn("taskref.upsert"),item:u7,beforeTurn:Ht().int().optional()}),Ft({op:bn("task.upsert"),task:wx}),Ft({op:bn("interaction.upsert"),interaction:bx}),Ft({op:bn("attachment.upsert"),attachment:F0}),Ft({op:bn("todo.upsert"),todo:_x}),Ft({op:bn("prompt.upsert"),prompt:Sx}),Ft({op:bn("meta.merge"),meta:kye}),Ft({op:bn("items.remove"),ids:zn(_t())})]);Ft({agentId:Vi,ops:zn(Cx)});const Sye=bo(["off","turn","block","delta"]),Ed=Ht().int().nonnegative(),Cye=yx(_t(),Sye);Ft({session_id:_t().min(1),transcript:Cye,transcript_since:yx(_t(),Ed).optional()});Ft({agent_id:Vi,before_turn:_t().min(1).optional(),after_turn:_t().min(1).optional(),page_size:Ht().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),oye(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const Aye=Ft({agentId:Vi,type:bo(["main","sub","independent"]).optional(),parentAgentId:Vi.optional(),label:_t().optional(),createdAt:_t().optional(),disposedAt:_t().optional()}),Mye=Ft({agent_id:Vi,items:zn(c7),has_more:gh(),tasks:zn(wx),interactions:zn(bx).default([]),attachments:zn(F0).default([]),todos:zn(_x).default([]),prompts:zn(Sx).default([]),meta:xx,agents:zn(Aye),pending_interactions:zn(_t()),seq:Ed.optional()});Ft({agent_id:Vi,batches:zn(Ft({seq:Ed,ops:zn(Cx)})),latest_seq:Ed,complete:gh()});const Eye=Ft({turn_id:qu,ordinal:Ht().int(),state:s7,origin:o7,prompt:_t(),attachment_ids:zn(_t()).optional(),started_at:_t().optional()});Ft({agents:zn(Ft({agent_id:Vi,messages:zn(Eye),attachments:zn(F0).default([])}))});const Tye=Ft({state:bo(["pending","approved","rejected","cancelled"]),selected_option:_t().optional(),feedback:_t().optional()}),Iye=Ft({tool_call_id:_t(),turn_id:qu,source:bo(["interaction","display","output"]),plan:_t(),path:_t().optional(),options:zn(Ft({label:_t(),description:_t().optional()})).optional(),review:Tye.optional()});Ft({agent_id:Vi,plans:zn(Iye)});const $ye=Ft({agent_id:Vi,snapshot:f7,has_more_older:gh(),seq:Ed.optional()}),Nye=Ft({agent_id:Vi,ops:zn(Cx),seq:Ed.optional()}),p7=$ye.extend({type:bn("transcript.reset")}),h7=Nye.extend({type:bn("transcript.ops")});Va("type",[p7,h7]);const Lye=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],m7=500,E1=256*1024,x6=200,lk=16384,ak=500,uk=50,ck=50,Fye=6,Oye=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,Rye=/^[A-Za-z0-9+/=_-]{200,}$/;let dk=null;function Nr(){if(dk!==null)return dk;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=zo(rn.debug)==="1"),dk=e,e}const Ma=[],Xc=[];let Kf=0;const xu=[];let Gf=0,Pye=1;const T1=new TextEncoder,Dye=new Set(Lye),Ax=V(0),Zf=Co(!1);function Bye(){return Ma}function zye(){Ma.length=0,Xc.length=0,Kf=0,xu.length=0,Gf=0,Ax.value++}function Ul(e){if(!Zf.value){try{const t={id:Pye++,ts:Date.now(),source:e.source,kind:String(gd(e.kind)),label:String(gd(e.label)),sessionId:e.sessionId===void 0?void 0:String(gd(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:qa(e.detail)},n=JSON.stringify(t),o=T1.encode(n).byteLength;if(o>E1)return;for(Ma.push(t),Xc.push(n),Kf+=o+(Xc.length>1?1:0);Ma.length>m7||Kf>E1;){const s=Xc.shift();Ma.shift(),s!==void 0&&(Kf-=T1.encode(s).byteLength,Xc.length>0&&(Kf-=1))}}catch{return}Ax.value++}}function pu(e){if(typeof e=="string")return e.length<=x6?e:e.slice(0,x6)}function Yi(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Wye(e,t){if(Dye.has(e))try{const n={ts:Date.now(),event:e,sessionId:pu(t?.sessionId),status:pu(t?.status),operation:pu(t?.operation),seq:Yi(t?.seq),durationMs:Yi(t?.durationMs),messageCount:Yi(t?.messageCount),contentCount:Yi(t?.contentCount),mediaCount:Yi(t?.mediaCount),sessionCount:Yi(t?.sessionCount),workspaceCount:Yi(t?.workspaceCount),promptId:pu(t?.promptId),zipBytes:Yi(t?.zipBytes),errorName:pu(t?.errorName),errorCode:Yi(t?.errorCode),requestId:pu(t?.requestId),phase:pu(t?.phase),httpStatus:Yi(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Yi(t?.line),col:Yi(t?.col)},o=JSON.stringify(n),s=T1.encode(o).byteLength;if(s>E1)return;for(xu.push(o),Gf+=s+(xu.length>1?1:0);xu.length>m7||Gf>E1;){const i=xu.shift();i!==void 0&&(Gf-=T1.encode(i).byteLength,xu.length>0&&(Gf-=1))}}catch{return}}function gd(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return Rye.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>ak?`${i.slice(0,ak)}… [+${i.length-ak} chars]`:i}if(n!=="object")return String(e);if(t>=Fye)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,uk).map(r=>gd(r,t+1));return e.length>uk&&i.push(`[+${e.length-uk} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,ck))o[i]=Oye.test(i)?"[redacted]":gd(r,t+1);return s.length>ck&&(o._truncatedKeys=s.length-ck),o}function qa(e){if(e===void 0)return;const t=gd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>lk)return{_truncated:`detail JSON was ${n.length} chars; first ${lk} kept`,preview:n.slice(0,lk)}}catch{return"[unserializable detail]"}return t}function Dm(e){Nr()&&Ul({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:qa(e.body)}})}function Ec(e){if(!Nr())return;const t=e.code!==0;Ul({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:qa(e.data)}})}function sa(e){Nr()&&Ul({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){Nr()&&Ul({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:qa(t)})}function Hye(e){if(!Nr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;Ul({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:qa(e)})}function jye(e){if(!Nr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,r=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Ul({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:qa(t.payload)})}const Uye={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Vye(e,t,n){Nr()&&Ul({source:"client",kind:`client:${e}`,label:`${Uye[e]} ${t}`,detail:qa(n)})}function wl(e,t){Nr()&&Ul({source:"client",kind:"client:event",label:`· ${e}`,detail:qa(t)})}function Go(e,t){Wye(e,t),Ul({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let fk=!1,Bm=null;function qye(){if(fk)return()=>Bm?.();fk=!0;const e=[];try{if(typeof window<"u"){const n=s=>{Go("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;Go("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(Nr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Vye(n,i.map(Kye).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(Bm===t){for(const n of e.toReversed())n();Bm=null,fk=!1}};return Bm=t,t}function Kye(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function g7(e=Ma){if(typeof document>"u")return;const t=new Blob([Gye(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Gye(e=Ma){return e===Ma?Xc.join(` +`):e.map(t=>JSON.stringify(t)).join(` +`)}function Zye(){return xu.join(` +`)}function v7(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function t2(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function vr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:v7(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function bp(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function _6(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function Mx(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:_6(e.source)};case"video":return{type:"video",source:_6(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function n2(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(Mx),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function Yye(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function Jye(e){return{content:e.content.map(Yye),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function Xye(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function y7(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function Qye(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function eke(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(Qye),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function k7(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(eke),createdAt:e.created_at}}function tke(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function nke(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=tke(o);return{answers:t,method:e.method,note:e.note}}function yg(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function S6(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function ia(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Ji(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function b7(e){if(!e||typeof e!="object")return null;const t=e,n=ia(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:ia(t,"goalId")??ia(t,"goal_id")??"goal",objective:ia(t,"objective")??"",completionCriterion:ia(t,"completionCriterion")??ia(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:ia(t,"terminalReason")??ia(t,"terminal_reason"),budget:{tokenBudget:Ji(s,"tokenBudget")??Ji(s,"token_budget"),remainingTokens:Ji(s,"remainingTokens")??Ji(s,"remaining_tokens"),turnBudget:Ji(s,"turnBudget")??Ji(s,"turn_budget"),remainingTurns:Ji(s,"remainingTurns")??Ji(s,"remaining_turns"),wallClockBudgetMs:Ji(s,"wallClockBudgetMs")??Ji(s,"wall_clock_budget_ms"),remainingWallClockMs:Ji(s,"remainingWallClockMs")??Ji(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function oke(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:vr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:vr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:bp(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:bp(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:v7(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=b7(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:n2(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(Mx),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:y7(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:k7(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:yg(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:o2(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function ske(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function pk(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function Mf(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function w7(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function ike(e){return{provider:w7(e.provider),modelsImported:e.models_imported}}function o2(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry,raw:e.raw}}function rke(e){return e.session_id}function lke(e){return e.seq}const ake="main",uke=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function vl(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function cke(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const s2=new Map;function dke(e){return s2.get(e)}function C6(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function Js(e,t){const n=e[t];return typeof n=="string"?n:void 0}function gu(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Xi(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function fke(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=Js(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=Js(t,"goalId")??Js(t,"goal_id")??"goal",r=Js(t,"objective")??"";return{goalId:i,objective:r,completionCriterion:Js(t,"completionCriterion")??Js(t,"completion_criterion"),status:s,turnsUsed:gu(t,"turnsUsed")??gu(t,"turns_used")??0,tokensUsed:gu(t,"tokensUsed")??gu(t,"tokens_used")??0,wallClockMs:gu(t,"wallClockMs")??gu(t,"wall_clock_ms")??0,terminalReason:Js(t,"terminalReason")??Js(t,"terminal_reason"),budget:{tokenBudget:Xi(o,"tokenBudget")??Xi(o,"token_budget"),remainingTokens:Xi(o,"remainingTokens")??Xi(o,"remaining_tokens"),turnBudget:Xi(o,"turnBudget")??Xi(o,"turn_budget"),remainingTurns:Xi(o,"remainingTurns")??Xi(o,"remaining_turns"),wallClockBudgetMs:Xi(o,"wallClockBudgetMs")??Xi(o,"wall_clock_budget_ms"),remainingWallClockMs:Xi(o,"remainingWallClockMs")??Xi(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function _u(e,t,n,o){if(typeof n!="string"||n.length===0)return null;const s=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(s.status==="completed"||s.status==="failed"||s.status==="cancelled")&&o.status==="running"?{...o,status:s.status,subagentPhase:s.subagentPhase,startedAt:s.startedAt,completedAt:s.completedAt,outputPreview:s.outputPreview,outputBytes:s.outputBytes,suspendedReason:s.suspendedReason}:o,l={...s,...r,id:n,agentId:n,sessionId:t,kind:"subagent"};return e.subagentMeta.set(n,l),l}function pke(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=Js(t,"name")??Js(t,"toolName")??"tool",o=Is(hke(n)),s=mke(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=Js(n,"text");if(s)return hk(s);const i=Js(n,"message");if(i)return hk(i)}const o=Js(t,"message");if(o)return hk(o)}return null}function hke(e){return e.replace(/_\d+$/,"")}const A6=2e3;function hk(e){return e.length>A6?`${e.slice(0,A6)}…`:e}function mke(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return Rl(e,n)}function gke(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const c=Js(s,"delta");if(!c)return[];const d=e.subagentMeta.get(n),f=_u(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:c,stream:"stdout",kind:"text"}),p}const r=pke(o,s);if(r===null||r.length===0)return[];const l=e.subagentMeta.get(n),a=_u(e,t,n,{status:"running",subagentPhase:"working",startedAt:l?.startedAt??new Date().toISOString()}),u=[];return a&&u.push({type:"taskCreated",sessionId:t,task:a}),u.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:r,stream:"stdout"}),u}function Ef(e){return{...e,content:e.content.map(t=>({...t}))}}function M6(e,t,n){const o={id:vl("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function vke(e,t,n,o,s,i){const r={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(r),r}function yke(e){return Array.isArray(e)?e.map(t=>Mx(t)):[]}function E6(e,t,n,o){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function kke(e,t,n,o,s,i){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function bke(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function T6(e,t){e.messages.find(n=>n.id===t)}function wke(e,t,n,o,s,i){const r={id:vl("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(r),r}function Tf(e,t){return e.messages.find(n=>n.id===t)}function I6(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function xke(){const e=new Map,t=new Set;function n(c){let d=e.get(c);return d||(d=C6(),e.set(c,d)),d}function o(c){e.set(c,C6())}function s(c){t.add(c)}function i(c,d){const f=n(c);f.currentPromptId=d}function r(c,d){o(c);const f=n(c),p=d.promptId??vl("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=M6(f,c,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:Ef(h)}]}function l(c,d,f,p){try{return u(c,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",c,h instanceof Error?h.message:h),[]}}function a(c,d){return d===void 0?"append":dc?"gap":"append"}function u(c,d,f,p){const h=n(f),m=d,k=[],w=m?.agentId;if(typeof w=="string"&&w!==ake){const v=t.has(w);if(v&&(c==="thinking.delta"||c==="assistant.delta")){const y=m?.delta??"";return y?[{type:"agentDelta",sessionId:f,agentId:w,delta:{[c==="thinking.delta"?"thinking":"text"]:y}}]:[]}if(v&&c==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:w,reason:m?.reason}];if(uke.has(c))return gke(h,f,w,c,m??{},t)}switch(c){case"session.meta.updated":{const v=m?.patch?.title??m?.title,y=m?.patch?.lastPrompt,b={};typeof v=="string"&&v.length>0&&(b.title=v),typeof y=="string"&&(b.lastPrompt=y),(b.title!==void 0||b.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,...b});break}case"prompt.submitted":{const v=m?.promptId,y=m?.userMessageId;if(!v||!y)break;const b=yke(m?.content);if(b.length===0)break;h.currentPromptId=v;const S=vke(h,f,v,y,b,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:Ef(S)});break}case"turn.started":{const v=m?.turnId,y=h.currentPromptId??vl("pr_");h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y),h.turnTextLen=0,h.turnThinkLen=0,s2.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const v=m?.turnId;let y=h.turnPromptId.get(v)??h.currentPromptId;if(y||(y=vl("pr_"),h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const S=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Tf(h,S)!==void 0){h.currentAssistantMsgId=S;break}}const b=M6(h,f,y);h.currentAssistantMsgId=b.id,k.push({type:"messageCreated",message:Ef(b)});break}case"thinking.delta":{const v=h.currentAssistantMsgId;if(!v)break;const y=m?.delta??"";if(!y)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const b=a(h.turnThinkLen,p?.offset);if(b==="skip")break;if(b==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const S=E6(h,v,"thinking",y);if(S<0)break;h.turnThinkLen+=y.length,k.push({type:"assistantDelta",sessionId:f,messageId:v,contentIndex:S,delta:{thinking:y}});break}case"assistant.delta":{const v=h.currentAssistantMsgId;if(!v)break;const y=m?.delta??"";if(!y)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const b=a(h.turnTextLen,p?.offset);if(b==="skip")break;if(b==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const S=E6(h,v,"text",y);if(S<0)break;h.turnTextLen+=y.length,k.push({type:"assistantDelta",sessionId:f,messageId:v,contentIndex:S,delta:{text:y}});break}case"tool.use":case"tool.call.started":{const v=h.currentAssistantMsgId,y=m?.turnId,b=h.turnPromptId.get(y)??h.currentPromptId;if(!v||!b)break;const S=m?.toolCallId,I=m?.name??m?.toolName??"",T=m?.args??m?.input??{};kke(h,v,S,I,T);const $=Tf(h,v);$&&$.content.length-1,h.toolStartTimes.set(S,Date.now()),$&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:$.content.map(F=>({...F})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=m?.toolCallId,y=bke(m??{});v&&y&&k.push({type:"toolOutput",sessionId:f,toolCallId:v,outputChunk:y.outputChunk,stream:y.stream});break}case"tool.result":{const v=m?.turnId;let y=h.turnPromptId.get(v)??h.currentPromptId;y||(y=vl("pr_"),h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y));const b=m?.toolCallId,S=m?.output,I=m?.isError??!1;h.toolStartTimes.get(b)??Date.now(),h.toolStartTimes.delete(b);const T=wke(h,f,b,S,I,y);k.push({type:"messageCreated",message:Ef(T)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=h.currentAssistantMsgId,y=cke(m?.usage);if(h.totalInput+=y.input,h.totalOutput+=y.output,h.totalCacheRead+=y.cacheRead,h.totalCacheCreate+=y.cacheCreate,v){T6(h,v);const b=Tf(h,v);b&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:b.content.map(S=>({...S})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:I6(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const v=h.currentAssistantMsgId,y=m?.reason??"completed",b=gu(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),v){T6(h,v);const I=Tf(h,v);I&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:I.content.map(T=>({...T})),status:y==="failed"||y==="blocked"?"error":"completed",durationMs:b})}h.turnCount++;const S=I6(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:S}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=m?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:v,reason:m?.reason??"completed"});break}case"prompt.aborted":{const v=m?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:v});break}case"turn.step.retrying":{const v=h.currentAssistantMsgId;if(v!==void 0){const y=Tf(h,v);y!==void 0&&(y.content=y.content.filter(b=>b.type!=="text"&&b.type!=="thinking"&&b.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:v,content:y.content.map(b=>({...b})),status:"pending"}),h.retryReuseMsgId=v)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const v=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",y=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;s2.set(f,{reason:v,message:y,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const v=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:vl("task_"),y={id:v,agentId:v,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(y.id,y),k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.started":{const v=_u(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});v&&k.push({type:"taskCreated",sessionId:f,task:v});break}case"subagent.suspended":{const v=_u(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0});v&&k.push({type:"taskCreated",sessionId:f,task:v});break}case"subagent.completed":{const v=typeof m?.resultSummary=="string"?m.resultSummary:void 0,y=_u(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),outputPreview:v});y&&k.push({type:"taskCreated",sessionId:f,task:y}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof m?.error=="string"?m.error:void 0,y=_u(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),outputPreview:v});y&&k.push({type:"taskCreated",sessionId:f,task:y}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const v=m?.info??{},y=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,b=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):vl("task_"),S=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:fo.global.t("tasks.defaultDescription");if(v.kind==="agent"){const T=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(T!==void 0){const $=_u(h,f,T,{description:S,backgroundTaskId:b,model:typeof v.model=="string"?v.model:void 0,thinkingEffort:typeof v.thinkingEffort=="string"?v.thinkingEffort:void 0,runInBackground:!0});$&&k.push({type:"taskCreated",sessionId:f,task:$})}else k.push({type:"taskCreated",sessionId:f,task:{id:b,sessionId:f,kind:"subagent",description:S,status:"running",createdAt:y??new Date().toISOString(),startedAt:y,subagentPhase:"queued",runInBackground:!0}});break}const I=typeof v.command=="string"?v.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:b,sessionId:f,kind:"bash",description:S,command:I,status:"running",createdAt:y??new Date().toISOString(),startedAt:y,outputPreview:I!==void 0?`$ ${I}`:void 0}});break}case"task.terminated":{const v=m?.info??{},y=v.status==="failed"||typeof v.exitCode=="number"&&v.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:y?"failed":"completed"});break}case"compaction.completed":{const v=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const v=fke(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=m?.origin,y=Js(m??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&y){const b={id:vl("cron_"),sessionId:f,role:"user",content:[{type:"text",text:y}],createdAt:new Date().toISOString(),metadata:{origin:v}};h.messages.push(b),k.push({type:"messageCreated",message:Ef(b)})}break}}return k}return{project:l,bindNextPromptId:i,seedInFlight:r,reset:o,markSideChannelAgent:s}}const _ke=new Set(["server_hello","ack","ping","resync_required","error","pong"]),$6=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","background.task.started","background.task.terminated","cron.fired"]),Ske=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),Cke=new Set(["assistant.delta","thinking.delta"]);function Ake(e,t){if(_ke.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return Cke.has(o)?Mke(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?Ske.has(o)?{route:"protocol"}:$6.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:$6.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function Mke(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class Yf extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class hl extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function nr(e){return e instanceof Yf||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function Ex(e){return e instanceof hl||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const _s="pythinker-web.server-credential",Eke="token",Tke=10080*60*1e3;let Jr;const i2=new Set;function Ike(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(Eke);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function r2(e){return{version:1,credential:e,expiresAt:Date.now()+Tke}}function $ke(e){return JSON.stringify(e)}function Tx(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function l2(e){globalThis.localStorage?.setItem(_s,$ke(e))}function Nke(){try{const e=globalThis.localStorage?.getItem(_s);if(e){const n=Tx(e);if(n===void 0){const o=r2(e);let s=!1;try{l2(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(_s)===e&&globalThis.localStorage?.removeItem(_s),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(_s)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(_s),globalThis.localStorage?.getItem(_s)===e&&globalThis.localStorage?.removeItem(_s);return}const t=globalThis.sessionStorage?.getItem(_s);if(t){const n=r2(t);let o=!1;try{l2(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(_s),o=!0}catch{}return o?n:void 0}return}catch{return}}function Lke(){const e=Ike();return e?(_7(e),!0):(Jr=Nke(),Jr!==void 0)}function x7(){if(Jr!==void 0){if(Jr.expiresAt<=Date.now()){Fke(Jr);return}return Jr.credential}}function Fke(e){Jr=void 0;try{globalThis.sessionStorage?.removeItem(_s);const t=globalThis.localStorage?.getItem(_s),n=t==null?void 0:Tx(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(_s)}catch{}}function _7(e){const t=r2(e);Jr=t;try{l2(t)}catch{}try{globalThis.sessionStorage?.removeItem(_s)}catch{}}function Oke(){const e=Jr;Jr=void 0;try{const t=globalThis.localStorage?.getItem(_s),o=(t==null?void 0:Tx(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(_s),globalThis.sessionStorage?.removeItem(_s)}catch{}}function Rke(e){return i2.add(e),()=>{i2.delete(e)}}function Pke(){Oke();for(const e of i2)try{e()}catch{}}const Bc=3e4,zm=5*6e4,S7="0123456789ABCDEFGHJKMNPQRSTVWXYZ",N6=500,C7=40101;function Wm(e=Bc){try{return AbortSignal.timeout(e)}catch{return}}function Dke(e,t){let n="",o=e;for(let s=0;sS7[n%32]).join("")}function Hm(){return`${Dke(Date.now(),10)}${Bke(16)}`}function zke(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function mk(e){try{const t=await e.text();return t?t.length>N6?`${t.slice(0,N6)}...`:t:void 0}catch{return}}class A7{constructor(t,n){this.origin=t,this.identity=n}async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t){const n=Zc(this.origin,t),o=Hm(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();Dm({method:"GET",path:t,url:n,requestId:o});let r;try{r=await fetch(n,{method:"GET",headers:s,signal:Wm()})}catch(a){throw sa({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new hl({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-i})}if(r.ok)return Ec({method:"GET",path:t,requestId:o,status:r.status,durationMs:Date.now()-i,code:0,msg:""}),r.blob();let l;try{l=await r.clone().json()}catch{}throw this.checkAuthRequired(r,l?.code??0),Ec({method:"GET",path:t,requestId:o,status:r.status,durationMs:Date.now()-i,code:l?.code??r.status,msg:l?.msg??r.statusText,envelopeRequestId:l?.request_id}),new Yf({code:l?.code??r.status,msg:l?.msg??r.statusText,requestId:l?.request_id??o,details:l?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async postZip(t,n,o){const s="POST",i=Zc(this.origin,t),r=Hm(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();Dm({method:s,path:t,url:i,requestId:r,body:o});let u;try{u=await fetch(i,{method:s,headers:l,body:JSON.stringify(n),signal:Wm(zm)})}catch(p){throw sa({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:p}),new hl({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:r,phase:"fetch",timeoutMs:zm,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let p;try{p=await u.clone().json()}catch{}if(this.checkAuthRequired(u,p?.code??0),!u.ok||p!==void 0&&p.code!==0){const k=p?.code??u.status,w=p?.msg??u.statusText;throw Ec({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:k,msg:w,envelopeRequestId:p?.request_id}),new Yf({code:k,msg:w,requestId:p?.request_id??r,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw sa({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new hl({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:zm,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await mk(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(p){throw sa({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:p}),new hl({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:zm,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return Ec({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Zc(this.origin,t),s=Hm(),i={"X-Request-Id":s};this.addClientHeaders(i);const r=Date.now();Dm({method:"POST",path:t,url:o,requestId:s,body:zke(n)});let l;try{l=await fetch(o,{method:"POST",headers:i,body:n,signal:Wm()})}catch(c){throw sa({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new hl({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw sa({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new hl({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Bc,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await mk(u),timestamp:Date.now(),durationMs:Date.now()-r})}if(Ec({method:"POST",path:t,requestId:s,status:l.status,durationMs:Date.now()-r,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(l,a.code),a.code!==0)throw new Yf({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-r});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[]){let r=Zc(this.origin,n);if(s){const p=new URLSearchParams;for(const[m,k]of Object.entries(s))k!==void 0&&p.set(m,String(k));const h=p.toString();h&&(r=`${r}?${h}`)}const l=Hm(),a={"X-Request-Id":l};this.addClientHeaders(a),o!==void 0&&(a["Content-Type"]="application/json; charset=utf-8");const u=Date.now();Dm({method:t,path:n,url:r,requestId:l,body:o});let c;try{c=await fetch(r,{method:t,headers:a,body:o!==void 0?JSON.stringify(o):void 0,signal:Wm()})}catch(p){throw sa({method:t,path:n,requestId:l,phase:"fetch",durationMs:Date.now()-u,error:p}),new hl({message:`Network error calling ${t} ${n}`,cause:p,method:t,path:n,url:r,requestId:l,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-u})}let d;const f=c.clone();try{d=await c.json()}catch(p){throw sa({method:t,path:n,requestId:l,phase:"parse",durationMs:Date.now()-u,status:c.status,error:p}),new hl({message:`Failed to parse JSON response from ${t} ${n}`,cause:p,method:t,path:n,url:r,requestId:l,phase:"parse",timeoutMs:Bc,status:c.status,statusText:c.statusText,contentType:c.headers.get("content-type")??void 0,bodyPreview:await mk(f),timestamp:Date.now(),durationMs:Date.now()-u})}if(Ec({method:t,path:n,requestId:l,status:c.status,durationMs:Date.now()-u,code:d.code,msg:d.msg,envelopeRequestId:d.request_id,data:d.data}),this.checkAuthRequired(c,d.code),d.code!==0&&!i.includes(d.code))throw new Yf({code:d.code,msg:d.msg,requestId:d.request_id,details:d.details,timestamp:Date.now(),durationMs:Date.now()-u});return d.data}addClientHeaders(t){const n=x7();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===C7)&&Pke()}}const Wke="pythinker-code.bearer.",Hke=3e4;class jke{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=x7(),n=t!==void 0?[`${Wke}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));jye(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=jm(t,n),i=this.terminalAttachments.get(s),r=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(jm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(jm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,Hke),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=p7.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.handlers.onTranscriptReset?.(i,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(i);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(o==="transcript.ops"){const s=h7.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.handlers.onTranscriptOps?.(i,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(i);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,r=n.seq,l=jm(s,i),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,u,r);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.handlers.onTerminalExit?.(s,i,l);break}default:{this.trackCursor(n);const s=n.type,i=Ake(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:r.seq,session_id:r.session_id,timestamp:r.timestamp,payload:r.payload,...l.volatile!==void 0?{volatile:l.volatile}:{},...l.offset!==void 0?{offset:l.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),Hye(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function jm(e,t){return`${e}\0${t}`}function Uke(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function L6(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function Vke(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function F6(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function O6(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function gk(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function R6(e){return e==="auto_compact"||e==="manual_compact"}class qke{http;config;constructor(t){this.config=t,this.http=new A7(t.serverHttpUrl,{clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode})}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1"}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(vr),hasMore:o.has_more}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return vr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return vr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return vr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return b7(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return vr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(n2),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=Mye.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();Go("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:vr(o.session),messages:o.messages.items.map(n2),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(y7),pendingQuestions:o.pending_questions.map(k7),subagents:(o.subagents??[]).map(yg)};return Go("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw Go("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...L6(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` +`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),r=`${t}.zip`;return{blob:i.blob,fileName:Uke(i.contentDisposition,r)}}async submitPrompt(t,n){const o=Date.now();Go("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,Jye(n));return Go("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw Go("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...L6(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return vr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return vr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(vr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,Xye(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,nke(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o)).items.map(yg)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return yg(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(gk)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return gk(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return gk(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:Vke(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:F6(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:F6(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(S6)])):void 0;return{items:s.items.map(S6),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Zc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(bp)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return bp(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return bp(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(ske)}async listProviders(){return(await this.http.get("/providers")).items.map(Mf)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=Mf(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",O6(t));return Mf(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,O6(n));return{provider:Mf(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map(Mf),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return vk(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return vk(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return vk(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return pk(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return pk(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return pk(n)}async getConfig(){const t=await this.http.get("/config");return o2(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry",raw:"raw"};for(const[i,r]of Object.entries(t)){const l=o[i];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return o2(s)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model,managedProvider:t.managed_provider?{status:t.managed_provider.status}:null}}async startOAuthLogin(){const t=await this.http.post("/oauth/login",{});return t.status==="authenticated"?{flowId:t.flow_id,provider:t.provider,status:"authenticated"}:{flowId:t.flow_id,provider:t.provider,status:"pending",verificationUri:t.verification_uri,verificationUriComplete:t.verification_uri_complete,userCode:t.user_code,expiresIn:t.expires_in,interval:t.interval,expiresAt:t.expires_at}}async pollOAuthLogin(){const t=await this.http.get("/oauth/login");return t?{flowId:t.flow_id,status:t.status,resolvedAt:t.resolved_at}:null}async cancelOAuthLogin(){const t=await this.http.delete("/oauth/login");return{cancelled:t.cancelled,status:t.status}}async logout(){return{loggedOut:(await this.http.post("/oauth/logout",{})).logged_out}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Zc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=jhe(this.config.serverHttpUrl,this.config.clientId),o=xke(),s=new jke(n,this.config.clientId,{onWireEvent:i=>{const r=rke(i),l=lke(i),a=oke(i);a.type==="historyCompacted"&&!R6(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:i=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=i,d=o.project(r,u,a,{offset:c});for(const f of d){const p=u?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:p,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!R6(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:h})}},onResync:(i,r,l)=>{o.reset(i),t.onResync(i,r,l)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,r,l)=>{t.onError(i,r,l)},onTranscriptReset:(i,r,l,a)=>{t.onTranscriptReset?.(i,r,l,a)},onTranscriptOps:(i,r,l,a)=>t.onTranscriptOps?.(i,r,l,a),onTerminalOutput:(i,r,l,a)=>{t.onTerminalOutput?.(i,r,l,a)},onTerminalExit:(i,r,l)=>{t.onTerminalExit?.(i,r,l)}});return s.connect(),{subscribe(i,r){s.subscribe(i,r??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,r,l){s.subscribeTranscript(i,r,l)},unsubscribeTranscript(i,r){s.unsubscribeTranscript(i,r)},seedSnapshot(i,r){if(r.inFlightTurn===null){o.reset(i);return}const l=o.seedInFlight(i,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:i,seq:r.asOfSeq})},bindNextPromptId(i,r){o.bindNextPromptId(i,r)},abort(i,r){s.abort(i,r)},terminalAttach(i,r,l){s.terminalAttach(i,r,l)},terminalInput(i,r,l){s.terminalInput(i,r,l)},terminalResize(i,r,l,a){s.terminalResize(i,r,l,a)},terminalDetach(i,r){s.terminalDetach(i,r)},terminalClose(i,r){s.terminalClose(i,r)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function vk(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function Kke(e){const t=new A7(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(w7)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return ike(s)}}}let yk;function St(){if(yk===void 0){const e=_$();yk=Object.assign(new qke(e),Kke(e))}return yk}const Gke=["src","controls","muted"],Zke=["aria-label"],Yke=["src","alt"],Jke=["aria-label"],Ix=Ze({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=V(t.fileId?"":t.url),o=V(null),s=V(!t.fileId);let i=null,r=0,l=!1,a=null;function u(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await St().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(l||d!==r)return;n.value=t.url}}return Ye(()=>[t.fileId,t.url,s.value],c,{immediate:!0}),Sn(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),po(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(g(),C(Te,{key:0},[n.value?(g(),C("video",{key:0,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,Gke)):(g(),C("span",{key:1,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,Zke))],64)):n.value?(g(),C("img",{key:1,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,Yke)):(g(),C("span",{key:2,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,Jke))}}),Xke=["title","aria-label"],Qke={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},ebe={key:2,class:"media-thumb-badge"},tbe={key:3,class:"media-thumb-badge is-error"},nbe={key:4,class:"media-thumb-badge"},obe=["aria-label"],sbe=Ze({__name:"MediaThumb",props:{kind:{},name:{},url:{},fileId:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>n.name?n.name:n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentImage"));function r(l){const a=l.currentTarget;o("activate",a?.querySelector("img")??null)}return(l,a)=>(g(),C("span",{class:ze(["media-thumb",{"is-error":n.error,uploading:n.uploading}])},[_("button",{type:"button",class:"media-thumb-btn",title:i.value,"aria-label":i.value,onClick:r},[n.url?(g(),pe(Ix,{key:0,url:n.url,kind:n.kind,alt:n.name,"file-id":n.fileId,"media-class":"media-thumb-media",controls:!1,muted:""},null,8,["url","kind","alt","file-id"])):(g(),C("span",Qke)),n.uploading?(g(),C("span",ebe,[K(ns,{size:"sm",label:x(s)("composer.uploading")},null,8,["label"])])):n.error?(g(),C("span",tbe,[K(Fe,{name:"info",size:"sm"})])):n.kind==="video"?(g(),C("span",nbe,[K(Fe,{name:"play",size:"sm"})])):oe("",!0)],8,Xke),n.removable?(g(),pe(Mn,{key:0,text:n.removeLabel??x(s)("composer.remove")},{default:ve(()=>[_("button",{type:"button",class:"media-thumb-rm","aria-label":n.removeLabel??x(s)("composer.remove"),onClick:a[0]||(a[0]=u=>o("remove"))},[K(Fe,{name:"close",size:"sm"})],8,obe)]),_:1},8,["text"])):oe("",!0)],2))}}),ibe=ht(sbe,[["__scopeId","data-v-b4904b11"]]),rbe=["title","data-kind"],lbe=["aria-label"],abe={class:"att-tile"},ube={class:"att-name"},cbe={key:1,class:"att-err"},dbe=["aria-label"],fbe=Ze({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>{const d=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return d?d.toUpperCase():void 0}),r=O(()=>{const c=i.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"file-text":"file"}),l=O(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function a(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=O(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>e.kind!=="file"&&e.removable?(g(),pe(ibe,{key:0,kind:e.kind,name:e.name,url:e.url,"file-id":e.fileId,uploading:e.uploading,error:e.error,removable:"","remove-label":e.removeLabel,onActivate:d[0]||(d[0]=f=>o("activate")),onRemove:d[1]||(d[1]=f=>o("remove"))},null,8,["kind","name","url","file-id","uploading","error","remove-label"])):(g(),C("span",{key:1,class:ze(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[_("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[2]||(d[2]=f=>o("activate"))},[_("span",abe,[e.kind==="image"&&e.url?(g(),pe(Ix,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),pe(Fe,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),pe(Fe,{key:2,name:"image",size:"sm"})):(g(),pe(Fe,{key:3,name:r.value,size:"sm"},null,8,["name"]))]),_("span",ube,N(l.value),1),e.uploading?(g(),pe(ns,{key:0,size:"sm",label:x(s)("composer.uploading")},null,8,["label"])):e.error?(g(),C("span",cbe,[K(Fe,{name:"info",size:"sm"})])):oe("",!0)],8,lbe),e.removable?(g(),pe(Mn,{key:0,text:e.removeLabel??x(s)("composer.remove")},{default:ve(()=>[_("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??x(s)("composer.remove"),onClick:d[3]||(d[3]=f=>o("remove"))},[K(Fe,{name:"close",size:"sm"})],8,dbe)]),_:1},8,["text"])):oe("",!0)],10,rbe))}}),a2=ht(fbe,[["__scopeId","data-v-fe5172dd"]]),pbe=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],hbe=["innerHTML"],mbe={class:"mention-pill-name"},gbe=Ze({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=V(null),o=O(()=>ohe(t.text));function s(r,l){l.kind!=="file"||!t.interactive||!t.openFile||(r.preventDefault(),r.stopPropagation(),t.openFile({path:l.path}))}function i(r){const l=window.getSelection(),a=n.value;if(!l||l.rangeCount===0||!a||!r.clipboardData)return;const u=l.getRangeAt(0);if(!u.intersectsNode(a))return;const c=u.cloneContents();for(const d of c.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(b$({kind:f,name:p,path:h})))}r.clipboardData.setData("text/plain",c.textContent??""),r.preventDefault()}return(r,l)=>(g(),C("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),C(Te,null,st(o.value,(a,u)=>(g(),C(Te,{key:u},[a.type==="text"?(g(),C(Te,{key:0},[qe(N(a.value),1)],64)):(g(),C("span",{key:1,class:ze(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:c=>s(c,a.attrs),onKeydown:[Do(c=>s(c,a.attrs),["enter"]),Do(c=>s(c,a.attrs),["space"])]},[_("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:x(aw)(a.attrs.path,a.attrs.name)},null,8,hbe),_("span",mbe,N(x(w$)(a.attrs.name)),1)],42,pbe))],64))),128))],544))}}),vbe=["aria-expanded","title"],ybe={class:"tf-sum"},kbe=["inert"],bbe={class:"tf-body-inner"},wbe={key:1,class:"msg"},xbe=Ze({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>n.streamingTailIndex!==null),r=O(()=>n.live?n.parked?"parked":"live":"settled"),l=V(!1),a=O(()=>i.value||l.value),u=V(a.value),c=V(a.value);let d=null;Ye(a,T=>{if(T){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=wn("pinScroll",()=>{}),p=V(null);function h(){l.value=!l.value,xt(()=>{const T=p.value;T&&f(T)})}const m=V(Date.now());let k=null;function w(){k!==null&&(clearInterval(k),k=null)}Ye(r,(T,$)=>{T!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):w(),$==="live"&&T!=="live"&&(l.value=!1)},{immediate:!0}),En(()=>{w(),d!==null&&clearTimeout(d)});const v=O(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),y=O(()=>{if(r.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):v.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-v.value);if(v.value!==void 0)return Math.max(0,m.value-v.value)}),b=O(()=>{const T=y.value;if(T===void 0)return s("conversation.fold.workedUnknown");const $=Op(T);return $?s("conversation.fold.worked",{duration:$}):s("conversation.fold.workedUnknown")});function S(T){return n.streamingTailIndex!==null&&"sourceIndex"in T&&T.sourceIndex===n.streamingTailIndex}function I(T){if(n.streamingTailIndex===null)return!1;const $=T.items.at(-1);return $!==void 0&&$.sourceIndex===n.streamingTailIndex}return(T,$)=>e.items.length>0?(g(),C("div",{key:0,class:ze(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?oe("",!0):(g(),C("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":l.value,title:b.value,onClick:h},[_("span",ybe,N(b.value),1),K(Fe,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,vbe)),u.value?(g(),C("div",{key:1,class:ze(["tf-body",{open:c.value}]),inert:!a.value},[_("div",bbe,[(g(!0),C(Te,null,st(e.items,(F,R)=>(g(),C(Te,{key:x(oT)(F,R)},[F.kind==="thinking"?(g(),pe(fw,{key:0,text:F.thinking,mobile:e.mobile,streaming:S(F),"started-at-ms":v.value,"duration-ms":y.value},null,8,["text","mobile","streaming","started-at-ms","duration-ms"])):F.kind==="text"&&F.text?(g(),C("div",wbe,[K(Bl,{text:F.text,streaming:S(F),"open-file":P=>o("openFile",P)},null,8,["text","streaming","open-file"])])):F.kind==="activity-run"?(g(),pe(sT,{key:2,items:F.items,mobile:e.mobile,streaming:I(F),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[0]||($[0]=P=>o("openMedia",P)),onOpenFile:$[1]||($[1]=P=>o("openFile",P)),onOpenToolDiff:$[2]||($[2]=P=>o("openToolDiff",P)),onOpenAgent:$[3]||($[3]=P=>o("openAgent",P))},null,8,["items","mobile","streaming","tool-diff-panel"])):F.kind==="tool"?(g(),pe(dw,{key:3,tool:F.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[4]||($[4]=P=>o("openMedia",P)),onOpenFile:$[5]||($[5]=P=>o("openFile",P)),onOpenToolDiff:$[6]||($[6]=P=>o("openToolDiff",P)),onOpenAgent:$[7]||($[7]=P=>o("openAgent",P))},null,8,["tool","mobile","tool-diff-panel"])):oe("",!0)],64))),128))])],10,kbe)):oe("",!0)],2)):oe("",!0)}}),_be=ht(xbe,[["__scopeId","data-v-2134c6e0"]]),Sbe={key:0,class:"ui-card__head"},Cbe={class:"ui-card__body"},Abe={key:1,class:"ui-card__foot"},Mbe=Ze({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),C("div",Sbe,[An(t.$slots,"head",{},void 0,!0)])):oe("",!0),_("div",Cbe,[An(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),C("div",Abe,[An(t.$slots,"foot",{},void 0,!0)])):oe("",!0)],2))}}),$x=ht(Mbe,[["__scopeId","data-v-d2cab471"]]),Ebe={class:"tf-ic"},Tbe={class:"tf-title"},Ibe={key:0,class:"tf-stats"},$be={key:0,class:"tf-add"},Nbe={key:1,class:"tf-del"},Lbe={class:"diffbar","aria-hidden":"true"},Fbe={class:"tf-list"},Obe={class:"tf-dir"},Rbe={class:"tf-base"},Pbe={key:0,class:"tf-stats"},Dbe={key:0,class:"tf-add"},Bbe={key:1,class:"tf-del"},zbe=Ze({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=Co(!1),i=O(()=>s.value?e.changes:e.changes.slice(0,3)),r=O(()=>Math.max(0,e.changes.length-3)),l=O(()=>e.changes.reduce((k,w)=>k+w.added,0)),a=O(()=>e.changes.reduce((k,w)=>k+w.removed,0)),u=O(()=>e.changes.every(k=>!k.statsIncomplete)),c=O(()=>l.value+a.value),d=O(()=>c.value===0?1:l.value),f=O(()=>c.value===0?1:a.value);function p(k){if(!e.cwd)return k;const w=e.cwd.replaceAll("\\","/").replace(/\/$/,""),v=k.replaceAll("\\","/");return v.startsWith(`${w}/`)?v.slice(w.length+1):k}function h(k){const w=p(k).replaceAll("\\","/"),v=w.lastIndexOf("/");return v<0?{dir:"",base:w}:{dir:w.slice(0,v+1),base:w.slice(v+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,w)=>(g(),pe($x,{class:"turn-files"},Ap({head:ve(()=>[_("span",Ebe,[K(Fe,{name:"pencil",size:"sm"})]),_("span",Tbe,N(x(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),u.value&&c.value>0?(g(),C("span",Ibe,[l.value>0?(g(),C("span",$be,"+"+N(l.value),1)):oe("",!0),a.value>0?(g(),C("span",Nbe,"−"+N(a.value),1)):oe("",!0),_("span",Lbe,[_("span",{class:"seg-add",style:jt({flexGrow:d.value})},null,4),_("span",{class:"seg-del",style:jt({flexGrow:f.value})},null,4)])])):oe("",!0)]),default:ve(()=>[_("ul",Fbe,[(g(!0),C(Te,null,st(i.value,v=>(g(),C("li",{key:v.path,class:"tf-row"},[(g(),pe(Ko(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:y=>m(v)},{default:ve(()=>[_("span",Obe,N(h(v.path).dir),1),_("span",Rbe,N(h(v.path).base),1)]),_:2},1032,["type","onClick"])),!v.statsIncomplete&&(v.added>0||v.removed>0)?(g(),C("span",Pbe,[v.added>0?(g(),C("span",Dbe,"+"+N(v.added),1)):oe("",!0),v.removed>0?(g(),C("span",Bbe,"−"+N(v.removed),1)):oe("",!0)])):oe("",!0)]))),128))])]),_:2},[r.value>0?{name:"foot",fn:ve(()=>[K(nn,{class:"tf-more",variant:"ghost",size:"sm",onClick:w[0]||(w[0]=v=>s.value=!s.value)},{default:ve(()=>[K(Fe,{class:ze(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),qe(" "+N(s.value?x(o)("conversation.turnFiles.showLess"):x(o)(r.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:r.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),Wbe=ht(zbe,[["__scopeId","data-v-dbd50ff6"]]),Hbe=["src"],jbe=6,Ube=300,Vbe=6,qbe=250,Kbe=Ze({__name:"MascotSprite",props:{state:{},size:{default:48}},setup(e){const t=jbe*Ube,n=Vbe*qbe,o=e,s=V("laptop");let i;const r=O(()=>{const d=o.size;return{width:`${d}px`,height:`${d*208/192}px`}}),l=O(()=>o.state==="failed"?"/brand/mascot-failed.png":`/brand/mascot-${s.value}.png`);function a(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function u(){i!==void 0&&(clearTimeout(i),i=void 0)}function c(){if(u(),o.state==="failed"||a())return;const d=s.value==="laptop"?t:n;i=setTimeout(()=>{i=void 0,s.value=s.value==="laptop"?"review":"laptop",c()},d)}return Sn(c),En(u),Ye(()=>o.state==="failed",d=>{if(d){u();return}s.value="laptop",c()}),(d,f)=>(g(),C("img",{"aria-hidden":"true",class:"mascot-apng",src:l.value,style:jt(r.value)},null,12,Hbe))}}),Gbe=ht(Kbe,[["__scopeId","data-v-c03cab60"]]),Zbe={class:"working-indicator",role:"status"},Ybe={class:"wi-mascot","aria-hidden":"true"},Jbe={class:"wi-label"},Xbe=Ze({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),C("div",Zbe,[_("span",Ybe,[K(Gbe,{state:"running",size:40})]),_("span",Jbe,N(e.label),1)]))}}),Qbe=ht(Xbe,[["__scopeId","data-v-52881756"]]),Gr=V(null),vd=V(!1);function Nx(e){const t=Gr.value;!t||vd.value||(Gr.value=null,t.resolve(e))}async function e2e(){const e=Gr.value;if(!(!e||vd.value)){if(!e.action){Nx(!0);return}vd.value=!0;try{await e.action(),Gr.value===e&&(Gr.value=null),e.resolve(!0)}catch(t){Gr.value===e&&(Gr.value=null),e.reject(t)}finally{vd.value=!1}}}function t2e(e){return vd.value?Promise.resolve(!1):(Gr.value&&Nx(!1),new Promise((t,n)=>{Gr.value={...e,resolve:t,reject:n}}))}function Ka(){return{current:Gr,busy:vd,confirm:t2e,settle:Nx,runAction:e2e}}const n2e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,o2e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,s2e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,P6="text/plain;charset=utf-8";function i2e(e,t){const n=(t??"").toLowerCase();if(n2e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:P6;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:o2e.test(o)?P6:s2e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function M7(e,t,n){const o=i2e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await St().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const r=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=r;else{const l=document.createElement("a");l.href=r,l.download=t??e,l.click()}return setTimeout(()=>{URL.revokeObjectURL(r)},6e4),"previewed"}function r2e(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const r=n!=="",l=[];for(const u of o.split("/"))!u||u==="."||(u===".."?l.length>0&&l.at(-1)!==".."?l.pop():r||l.push(u):l.push(u));const a=n+l.join("/");return s?a.toLowerCase():a}function l2e(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function a2e(e){const t=new Map;for(const n of Fu(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=Hs(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=cw(n.tool.arg);if(!s)continue;const i=o==="write",r=i?null:uw(n.tool),l=r?QE(r):{added:0,removed:0},a=i||r===null,u=r2e(s),c=t.get(u);if(!c){t.set(u,{path:s,...l,hasWrite:i,statsIncomplete:a,diff:r});continue}c.added+=l.added,c.removed+=l.removed,c.hasWrite||=i,c.statsIncomplete||=a,c.diff!==null&&r!==null?c.diff=[...c.diff,{type:"hunk",text:"···"},...l2e(c.diff,r)]:c.diff=null}return[...t.values()]}const u2e={class:"chat"},c2e={key:0,class:"chat-loading"},d2e={class:"chat-loading-text"},f2e={key:1,class:"chat-empty"},p2e={key:1,class:"top-sentinel-text"},h2e={key:0,class:"u-turn"},m2e=["data-turn-id"],g2e={key:0,class:"u-atts"},v2e={key:1,class:"skill-act"},y2e={class:"skill-act-head"},k2e={key:0,class:"skill-act-args"},b2e={key:2,class:"skill-act"},w2e={class:"skill-act-head"},x2e={key:0,class:"skill-act-args"},_2e={class:"u-text"},S2e=["aria-expanded","onClick"],C2e={key:0,class:"u-meta"},A2e=["aria-label","onClick"],M2e=["aria-label","onClick"],E2e=["data-turn-id"],T2e=["onClick"],I2e={class:"cd-view"},$2e={key:1,class:"cd-label"},N2e=["data-turn-id"],L2e={key:1,class:"msg"},F2e={key:1,class:"a-msg-ft"},O2e={key:0,class:"a-duration"},R2e=["aria-label","onClick"],P2e={key:3,class:"turn-failed",role:"alert"},D2e={class:"tf-chip","aria-hidden":"true"},B2e={class:"tf-main"},z2e={class:"tf-title"},W2e=["title"],H2e={key:5,class:"sending-placeholder"},j2e={key:6,class:"q-stack"},U2e={class:"q-head"},V2e={class:"q-title"},q2e={class:"q-hint"},K2e=["onDragover","onDrop"],G2e={class:"u-bub q-bub"},Z2e=["title","onDragstart"],Y2e=["title","onClick"],J2e={key:0,class:"u-text q-text"},X2e={key:1,class:"q-text q-text-placeholder"},Q2e={key:0,class:"q-imgs"},ewe={key:0,class:"q-file"},twe={key:1,class:"q-tag q-tag-next"},nwe={key:2,class:"q-tag q-tag-idx"},owe=["aria-label","onClick"],swe={key:0,class:"open-unsupported",role:"status"},iwe=2500,rwe=Ze({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openCompaction","openAgent","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),{confirm:s}=Ka();En(()=>{for(const ce of w.values())ce.disconnect();w.clear(),k.clear(),We!==null&&(clearTimeout(We),We=null),Y!==null&&(clearTimeout(Y),Y=null),W!==null&&(clearTimeout(W),W=null),Z!==null&&(clearTimeout(Z),Z=null)});const i=e,r=V(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(ce=>{ce[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&p("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}Sn(a),En(()=>{l?.disconnect(),l=null}),Ye(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{xt().then(a)});const u=O(()=>{if(!i.turnActive||i.turns.length===0)return null;const ce=i.turns.at(-1);return ce.role==="assistant"?ce.id:null}),c=O(()=>i.working),d=O(()=>{const ce=new Map;for(const Se of i.turns){if(Se.role!=="assistant")continue;const ie=tQ(Se),{folded:we,visible:Re}=nQ(ie);ce.set(Se.id,{all:ie,folded:we,visible:Re,changes:a2e(Se)})}return ce}),f=O(()=>{const ce=i.turns.at(-1);if(ce?.role!=="assistant")return o("conversation.requesting");const Se=d.value.get(ce.id)?.all.some(ie=>ie.kind==="text"?ie.text.trim().length>0:!0);return o(Se?"conversation.working":"conversation.requesting")}),p=n,h=V({}),m=V({}),k=new Map,w=new Map;function v(ce){const ie=k.get(ce)?.querySelector(".u-text");if(!ie)return;const we=Number.parseFloat(getComputedStyle(ie).lineHeight)||24;m.value[ce]=ie.scrollHeight>we*10+1}function y(ce,Se){const ie=Se instanceof HTMLElement?Se:null;if(!ie){w.get(ce)?.disconnect(),w.delete(ce),k.delete(ce);return}if(k.get(ce)!==ie){if(w.get(ce)?.disconnect(),k.set(ce,ie),typeof ResizeObserver<"u"){const we=new ResizeObserver(()=>v(ce));we.observe(ie.querySelector(".u-text")??ie),w.set(ce,we)}xt(()=>v(ce))}}function b(ce){h.value[ce]=!h.value[ce]}const S=V(null),I=V(null);function T(ce){return(ce.attachments?.length??0)>0}function $(ce){p("editQueued",ce)}function F(ce,Se){if(S.value=ce,!Se.dataTransfer)return;Se.dataTransfer.effectAllowed="move",Se.dataTransfer.setData("text/plain",String(ce));const ie=Se.currentTarget?.closest(".q-turn");ie&&Se.dataTransfer.setDragImage(ie,24,24)}function R(ce,Se){if(S.value===null)return;Se.preventDefault(),Se.dataTransfer&&(Se.dataTransfer.dropEffect="move");const ie=Se.currentTarget.getBoundingClientRect(),we=Se.clientY{for(let ce=i.turns.length-1;ce>=0;ce--)if(i.turns[ce].role==="user")return i.turns[ce].id;return null});function B(ce){return ce.role==="user"&&ce.id===D.value&&!i.working&&!ce.skillActivation&&!ce.pluginCommand}function z(ce){const Se=ce.compaction,ie=Se?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof Se?.tokensBefore=="number"&&typeof Se?.tokensAfter=="number"?ie+o("conversation.compactedTokens",{before:Pl(Se.tokensBefore),after:Pl(Se.tokensAfter)}):ie}const A=V(null),L=V(null);let W=null;async function j(ce){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&re(ce)}function re(ce){L.value===null&&(L.value=ce.id,p("editMessage",{text:ce.text,attachments:ce.attachments}),W=setTimeout(()=>{W=null,L.value=null},iwe))}Ye(()=>i.turns,ce=>{L.value!==null&&(ce.some(Se=>Se.id===L.value)||(L.value=null,W!==null&&(clearTimeout(W),W=null)))},{flush:"post"});const Q=V(!1);let Y=null;function G(){if(i.turns.length===0)return;const ce=[];for(const ie of i.turns){if(ie.role==="compaction"||ie.role==="cron")continue;const we=ie.role==="user"?"User":"Assistant",Re=sQ(ie);Re.trim()&&ce.push(`**${we}** + +${Re}`)}const Se=ce.join(` + +--- + +`);Jo(Se).then(ie=>{ie&&(Q.value=!0,p("copyConversationCopied"),Y!==null&&clearTimeout(Y),Y=setTimeout(()=>{Y=null,Q.value=!1},2e3))}).catch(()=>{})}function X(ce){const Se=[];for(let ie=ce;ie>=0;ie--){const we=i.turns[ie];if(!we||we.role!=="assistant")break;Se.unshift(we)}return Se}function te(ce){return X(ce).map(Se=>oQ(Se)).filter(Boolean).join(` + +`)}function q(){for(let ce=i.turns.length-1;ce>=0;ce-=1)if(i.turns[ce]?.role==="assistant")return te(ce);return""}function me(){const ce=q();ce.trim()&&Jo(ce).then(Se=>{Se&&(Q.value=!0,p("copyConversationCopied"),Y!==null&&clearTimeout(Y),Y=setTimeout(()=>{Y=null,Q.value=!1},2e3))}).catch(()=>{})}t({copyConversation:G,copyFinalSummary:me});function xe(ce){const Se=i.turns[ce];if(!Se||Se.role!=="assistant")return!1;const ie=i.turns[ce+1];return!ie||ie.role!=="assistant"}let We=null;function he(ce){const Se=i.turns[ce];if(!Se)return;const ie=te(ce);ie.trim()&&Jo(ie).then(we=>{we&&(A.value=Se.id,We!==null&&clearTimeout(We),We=setTimeout(()=>{We=null,A.value=null},1400))}).catch(()=>{})}function ee(ce){const Se=ce.text;Se.trim()&&Jo(Se).then(ie=>{ie&&(A.value=ce.id,We!==null&&clearTimeout(We),We=setTimeout(()=>{We=null,A.value=null},1400))}).catch(()=>{})}function ne(ce){return{kind:ce.kind==="video"?"video":"image",url:ce.url,path:ce.name,fileId:ce.fileId}}const H=V(null);let Z=null;function ye(ce){if(ce.kind==="image"||ce.kind==="video"){p("openMedia",ne(ce));return}ce.fileId!==void 0&&M7(ce.fileId,ce.name,ce.mediaType).then(Se=>{Se==="unsupported"&&(H.value=ce.name??ce.fileId??"",Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,H.value=null},2400))})}function fe(ce,Se){return ce.id!==u.value?!1:Se.sourceIndex===Fu(ce).length-1}function de(ce){if(ce.id!==u.value)return null;const Se=Fu(ce),ie=Se.at(-1);if(ie?.kind==="tool"&&ie.tool.status==="running"){const we=ie.tool.id;if(i.approvals.some(at=>at.toolCallId===we)||(i.questions??[]).some(at=>at.toolCallId===we))return null}return Se.length-1}function J(ce){if(!ce.createdAt)return;const Se=Date.parse(ce.createdAt);return Number.isFinite(Se)?Se:void 0}function ae(ce,Se){if(ce.id!==u.value)return!1;const ie=Se.items.at(-1);return ie!==void 0&&ie.sourceIndex===Fu(ce).length-1}function be(){for(let ce=i.turns.length-1;ce>=0;ce-=1){const Se=i.turns[ce];if(Se&&Se.role==="user"&&Se.text.trim().length>0)return Se.text}return""}function _e(){const ce=be();ce.length!==0&&p("continueTurn",ce)}return(ce,Se)=>(g(),C(Te,null,[_("div",u2e,[e.sessionLoading?(g(),C("div",c2e,[K(ns,{size:"sm"}),_("span",d2e,N(x(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),C("div",f2e)):oe("",!0),e.hasMoreMessages||e.loadingMore?(g(),C("div",{key:2,ref_key:"topSentinelRef",ref:r,class:ze(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),C("span",p2e,[K(ns,{size:"sm"}),qe(" "+N(x(o)("conversation.loadingOlder")),1)])):(g(),C("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:Se[0]||(Se[0]=ie=>p("loadOlderMessages"))},N(x(o)("conversation.loadOlder")),1))],2)):oe("",!0),(g(!0),C(Te,null,st(e.turns,(ie,we)=>(g(),C(Te,{key:ie.id},[ie.role==="user"?(g(),C("div",h2e,[_("div",{class:ze(["u-bub turn-anchor",{undoing:L.value===ie.id}]),"data-turn-id":ie.id},[ie.attachments&&ie.attachments.length>0?(g(),C("div",g2e,[(g(!0),C(Te,null,st(ie.attachments,(Re,at)=>(g(),pe(a2,{key:at,kind:Re.kind,name:Re.name,url:Re.url,"file-id":Re.fileId,"media-type":Re.mediaType,size:Re.size,onActivate:ft=>ye(Re)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):oe("",!0),ie.skillActivation?(g(),C("div",v2e,[_("div",y2e,[Se[14]||(Se[14]=_("span",{class:"skill-act-arrow"},"▶",-1)),_("span",null,N(x(o)("conversation.activatedSkill",{name:ie.skillActivation.name})),1)]),ie.skillActivation.args?(g(),C("div",k2e,N(ie.skillActivation.args),1)):oe("",!0)])):ie.pluginCommand?(g(),C("div",b2e,[_("div",w2e,[Se[15]||(Se[15]=_("span",{class:"skill-act-arrow"},"▶",-1)),_("span",null,"/"+N(ie.pluginCommand.pluginId)+":"+N(ie.pluginCommand.commandName),1)]),ie.pluginCommand.args?(g(),C("div",x2e,N(ie.pluginCommand.args),1)):oe("",!0)])):(g(),C("div",{key:3,ref_for:!0,ref:Re=>y(ie.id,Re),class:ze(["u-text-wrap",{"is-clamped":m.value[ie.id]&&!h.value[ie.id]}])},[_("div",_2e,[K(gbe,{text:ie.text,"open-file":Re=>p("openFile",Re)},null,8,["text","open-file"])]),m.value[ie.id]?(g(),C("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!h.value[ie.id],onClick:Re=>b(ie.id)},[qe(N(x(o)(h.value[ie.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),K(Fe,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,S2e)):oe("",!0)],2))],10,m2e),ie.createdAt||B(ie)?(g(),C("div",C2e,[B(ie)?(g(),C("div",{key:0,class:ze(["u-edit-wrap",{undoing:L.value===ie.id}])},[_("button",{type:"button",class:"u-edit","aria-label":x(o)("conversation.undoTooltip"),onClick:Re=>j(ie)},[K(Fe,{name:"undo",size:"sm"})],8,A2e)],2)):oe("",!0),ie.text.trim().length>0?(g(),C("button",{key:1,type:"button",class:"u-copy","aria-label":x(o)("filePreview.copy"),onClick:Ct(Re=>ee(ie),["stop"])},[A.value!==ie.id?(g(),pe(Fe,{key:0,name:"copy",size:"sm"})):(g(),pe(Fe,{key:1,name:"check",size:"sm"}))],8,M2e)):oe("",!0),ie.createdAt?(g(),pe(x$,{key:2,time:ie.createdAt},null,8,["time"])):oe("",!0)])):oe("",!0)])):ie.role==="compaction"?(g(),C("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":ie.id,role:"separator"},[Se[16]||(Se[16]=_("span",{class:"cd-line","aria-hidden":"true"},null,-1)),ie.text?(g(),C("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Re=>p("openCompaction",{turnId:ie.id})},[_("span",null,N(z(ie)),1),_("span",I2e,N(x(o)("conversation.viewSummary")),1)],8,T2e)):(g(),C("span",$2e,N(z(ie)),1)),Se[17]||(Se[17]=_("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,E2e)):ie.role==="cron"?(g(),pe(Dhe,{key:2,text:ie.text,cron:ie.cron,"turn-id":ie.id,"created-at":ie.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),C("div",{key:3,class:"a-msg turn-anchor","data-turn-id":ie.id},[K(_be,{items:d.value.get(ie.id)?.folded??[],live:ie.id===u.value,parked:ie.id===u.value&&de(ie)===null,"streaming-tail-index":de(ie),"created-ms":J(ie),"duration-ms":ie.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:Se[1]||(Se[1]=Re=>p("openMedia",Re)),onOpenFile:Se[2]||(Se[2]=Re=>p("openFile",Re)),onOpenToolDiff:Se[3]||(Se[3]=Re=>p("openToolDiff",Re)),onOpenAgent:Se[4]||(Se[4]=Re=>p("openAgent",Re))},null,8,["items","live","parked","streaming-tail-index","created-ms","duration-ms","tool-diff-panel"]),(g(!0),C(Te,null,st(d.value.get(ie.id)?.visible??[],(Re,at)=>(g(),C(Te,{key:x(oT)(Re,at)},[Re.kind==="thinking"?(g(),pe(fw,{key:0,text:Re.thinking,mobile:"",streaming:fe(ie,Re),"started-at-ms":J(ie),"duration-ms":ie.durationMs},null,8,["text","streaming","started-at-ms","duration-ms"])):Re.kind==="text"&&Re.text?(g(),C("div",L2e,[K(Bl,{text:Re.text,streaming:fe(ie,Re),"open-file":ft=>p("openFile",ft)},null,8,["text","streaming","open-file"])])):Re.kind==="activity-run"?(g(),pe(sT,{key:2,items:Re.items,mobile:"",streaming:ae(ie,Re),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:Se[5]||(Se[5]=ft=>p("openMedia",ft)),onOpenFile:Se[6]||(Se[6]=ft=>p("openFile",ft)),onOpenToolDiff:Se[7]||(Se[7]=ft=>p("openToolDiff",ft)),onOpenAgent:Se[8]||(Se[8]=ft=>p("openAgent",ft))},null,8,["items","streaming","tool-diff-panel"])):Re.kind==="tool"?(g(),pe(dw,{key:3,tool:Re.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:Se[9]||(Se[9]=ft=>p("openMedia",ft)),onOpenFile:Se[10]||(Se[10]=ft=>p("openFile",ft)),onOpenToolDiff:Se[11]||(Se[11]=ft=>p("openToolDiff",ft)),onOpenAgent:Se[12]||(Se[12]=ft=>p("openAgent",ft))},null,8,["tool","tool-diff-panel"])):oe("",!0)],64))),128)),ie.id!==u.value&&(d.value.get(ie.id)?.changes.length??0)>0?(g(),pe(Wbe,{key:0,changes:d.value.get(ie.id)?.changes??[],cwd:e.cwd,onOpenDiff:Re=>p("openTurnDiff",{turnId:ie.id,changes:d.value.get(ie.id)?.changes??[]}),onOpenFile:Se[13]||(Se[13]=Re=>p("openFile",Re))},null,8,["changes","cwd","onOpenDiff"])):oe("",!0),ie.id!==u.value&&xe(we)&&(te(we).trim().length>0||ie.durationMs!==void 0)?(g(),C("div",F2e,[K(Mn,{text:`${ie.durationMs} ms`},{default:ve(()=>[ie.durationMs!==void 0?(g(),C("span",O2e,N(x(QX)(ie.durationMs)),1)):oe("",!0)]),_:2},1032,["text"]),te(we).trim().length>0?(g(),C("button",{key:0,class:"a-cpbtn","aria-label":x(o)("filePreview.copy"),onClick:Re=>he(we)},[A.value!==ie.id?(g(),pe(Fe,{key:0,name:"copy",size:"sm"})):(g(),pe(Fe,{key:1,name:"check",size:"sm"}))],8,R2e)):oe("",!0)])):oe("",!0)],8,N2e))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),C("div",P2e,[_("span",D2e,[K(Fe,{name:"alert-triangle",size:"sm"})]),_("div",B2e,[_("span",z2e,N(e.turnErrorKind==="max_steps"?x(o)("conversation.turnFailedMaxSteps"):x(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),C("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},N(e.turnErrorMessage),9,W2e)):oe("",!0)]),K(nn,{variant:"secondary",size:"sm",onClick:_e},{default:ve(()=>[qe(N(x(o)("conversation.turnFailedResume")),1)]),_:1})])):oe("",!0),e.compaction?(g(),pe(xhe,{key:4,label:x(o)("conversation.compacting")},null,8,["label"])):oe("",!0),c.value?(g(),C("div",H2e,[K(Qbe,{label:f.value},null,8,["label"])])):oe("",!0),e.queued.length>0?(g(),C("div",j2e,[_("div",U2e,[_("span",V2e,[K(Fe,{name:"mail",size:"sm"}),qe(" "+N(x(o)("composer.queueLabel"))+" · ",1),_("b",null,N(e.queued.length),1)]),_("span",q2e,N(x(o)("composer.queueAutoDrain")),1)]),(g(!0),C(Te,null,st(e.queued,(ie,we)=>(g(),C("div",{key:we,class:ze(["u-turn q-turn",{"q-dragging":S.value===we,"drop-before":I.value?.index===we&&I.value.position==="before","drop-after":I.value?.index===we&&I.value.position==="after"}]),onDragover:Re=>R(we,Re),onDrop:Re=>P(we,Re)},[_("div",G2e,[_("span",{class:"q-grip",title:x(o)("composer.queueDragTitle"),draggable:"true",onDragstart:Re=>F(we,Re),onDragend:M},[K(Fe,{name:"grip",size:"sm"})],40,Z2e),_("button",{type:"button",class:"q-body",title:x(o)("composer.editQueued"),onClick:Re=>$(we)},[ie.text?(g(),C("span",J2e,N(ie.text),1)):(g(),C("span",X2e,[K(Fe,{name:"file",size:"sm"}),qe(" "+N(x(o)("composer.queuedAttachments",{n:ie.attachments?.length??0})),1)]))],8,Y2e),T(ie)?(g(),C("div",Q2e,[(g(!0),C(Te,null,st(ie.attachments,(Re,at)=>(g(),C(Te,{key:at},[Re.kind==="file"?(g(),C("span",ewe,[K(Fe,{name:"file",size:"sm"}),qe(" "+N(Re.name??Re.fileId),1)])):(g(),pe(Ix,{key:1,url:Re.url,kind:Re.kind,"file-id":Re.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):oe("",!0),we===0?(g(),C("span",twe,N(x(o)("composer.queueNext")),1)):(g(),C("span",nwe,"#"+N(we+1),1)),_("button",{type:"button",class:"q-rm","aria-label":x(o)("composer.remove"),onClick:Ct(Re=>p("unqueue",we),["stop"])},[K(Fe,{name:"close",size:"sm"})],8,owe)])],42,K2e))),128))])):oe("",!0)]),H.value!==null?(g(),C("div",swe,N(x(o)("composer.attachmentOpenUnsupported",{name:H.value})),1)):oe("",!0)],64))}}),Lx=ht(rwe,[["__scopeId","data-v-0f67514f"]]),lwe={class:"ch-id"},awe={key:0,class:"ch-ws"},uwe={key:1,class:"ch-sep"},cwe=["onKeydown"],dwe={class:"ch-ses"},fwe={key:0,class:"ch-pill ch-sync-pill"},pwe={key:0,class:"ch-ahead"},hwe={key:1,class:"ch-behind"},mwe={key:1,class:"ch-pill ch-diff-pill"},gwe={key:0,class:"ch-add"},vwe={key:1,class:"ch-del"},ywe={class:"ch-pill ch-pr pr-merged ch-done-pill"},kwe=Ze({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=O(()=>o.ahead??0),r=O(()=>o.behind??0),l=O(()=>o.gitDiffStats?.totalAdditions??0),a=O(()=>o.gitDiffStats?.totalDeletions??0),u=O(()=>l.value>0||a.value>0),c={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(Q){return Q.trim().toLowerCase().replaceAll("_","-")}function f(Q){const Y=d(Q);return c[Y]?`pr-${Y}`:"pr-unknown"}function p(Q){return n(c[d(Q)]??"header.prStatusUnknown")}const h=V(!1),m=V(null),k=V(null),w=V({});function v(Q){const Y=Q.target;k.value?.el?.contains(Y)||m.value?.el?.contains(Y)||S()}function y(){S()}async function b(Q){if(Q.stopPropagation(),h.value){S();return}h.value=!0,document.addEventListener("mousedown",v),window.addEventListener("resize",y),await xt();const Y=m.value?.el,G=k.value?.el;if(!Y||!G)return;const X=Y.getBoundingClientRect(),te=4,q=8,me=G.offsetWidth,xe=G.offsetHeight;let We=X.bottom+te;We+xe>window.innerHeight-q&&(We=Math.max(q,X.top-xe-te));let he=X.left;he+me>window.innerWidth-q&&(he=Math.max(q,X.right-me)),w.value={top:`${Math.round(We)}px`,left:`${Math.round(he)}px`}}function S(){h.value=!1,document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)}En(()=>{document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)});function I(){s("copyAll"),S()}function T(){s("copyFinalSummary"),S()}const $=V(!1);function F(){o.sessionId&&Jo(o.sessionId).then(Q=>{Q&&($.value=!0,setTimeout(()=>{$.value=!1},1200))})}const R=V(!1),P=V(""),M=V(null);async function D(){if(S(),!!o.sessionId){R.value=!0,P.value=o.sessionTitle??"",await xt();try{M.value?.focus(),M.value?.select()}catch{}}}function B(){const Q=P.value.trim();Q&&o.sessionId&&Q!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,Q),R.value=!1}function z(){R.value=!1}function A(){o.sessionId&&(S(),s("forkSession",o.sessionId))}function L(){o.sessionId&&(S(),s("exportSession",o.sessionId))}function W(){o.sessionId&&(S(),s("togglePin",o.sessionId))}function j(){o.sessionId&&(S(),s("archiveSession",o.sessionId))}function re(){o.sessionId&&(S(),s("restoreSession",o.sessionId))}return(Q,Y)=>(g(),C("header",{class:ze(["chat-header",{"macos-desktop":x(ld)}])},[_("div",lwe,[e.workspaceName?(g(),C("span",awe,N(e.workspaceName),1)):oe("",!0),e.workspaceName&&e.sessionTitle?(g(),C("span",uwe,"/")):oe("",!0),R.value?Bn((g(),C("input",{key:2,ref_key:"renameInputRef",ref:M,"onUpdate:modelValue":Y[0]||(Y[0]=G=>P.value=G),class:"ch-rename",type:"text",onKeydown:[Do(Ct(B,["stop"]),["enter"]),Do(Ct(z,["stop"]),["esc"])],onBlur:B,onClick:Y[1]||(Y[1]=Ct(()=>{},["stop"]))},null,40,cwe)),[[vs,P.value]]):e.sessionTitle?(g(),pe(Mn,{key:3,text:e.sessionTitle},{default:ve(()=>[_("span",dwe,N(e.sessionTitle),1)]),_:1},8,["text"])):oe("",!0)]),K(Jt,{ref_key:"kebabRef",ref:m,class:ze(["ch-act-more",{open:h.value}]),label:x(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:Y[2]||(Y[2]=Ct(G=>b(G),["stop"]))},{default:ve(()=>[K(Fe,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),pe(Ar,{key:0,ref_key:"menuRef",ref:k,class:"ch-menu",style:jt(w.value),onClick:Y[3]||(Y[3]=Ct(()=>{},["stop"]))},{default:ve(()=>[K(vn,{onClick:I},{default:ve(()=>[K(Fe,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),qe(" "+N(e.copied?x(n)("header.copied"):x(n)("header.copyAll")),1)]),_:1}),K(vn,{onClick:T},{default:ve(()=>[K(Fe,{name:"file-text",size:"sm"}),qe(" "+N(x(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),C(Te,{key:0},[K(vn,{separator:""}),K(vn,{onClick:F},{default:ve(()=>[K(Fe,{name:$.value?"check":"copy",size:"sm"},null,8,["name"]),qe(" "+N($.value?x(n)("header.copied"):x(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?oe("",!0):(g(),pe(vn,{key:0,onClick:W},{default:ve(()=>[K(Fe,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),qe(" "+N(e.pinned?x(n)("header.unpinSession"):x(n)("header.pinSession")),1)]),_:1})),K(vn,{onClick:D},{default:ve(()=>[K(Fe,{name:"pencil",size:"sm"}),qe(" "+N(x(n)("header.renameSession")),1)]),_:1}),K(vn,{onClick:A},{default:ve(()=>[K(Fe,{name:"git-fork",size:"sm"}),qe(" "+N(x(n)("header.forkSession")),1)]),_:1}),K(vn,{onClick:L},{default:ve(()=>[K(Fe,{name:"download",size:"sm"}),qe(" "+N(x(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),pe(vn,{key:1,onClick:re},{default:ve(()=>[K(Fe,{name:"undo",size:"sm"}),qe(" "+N(x(n)("header.reopenSession")),1)]),_:1})):(g(),pe(vn,{key:2,onClick:j},{default:ve(()=>[K(Fe,{name:"archive",size:"sm"}),qe(" "+N(x(n)("header.markSessionDone")),1)]),_:1}))],64)):oe("",!0)]),_:1},8,["style"])):oe("",!0),Y[6]||(Y[6]=_("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),C("button",{key:1,type:"button",class:"ch-git",onClick:Y[4]||(Y[4]=G=>s("openChanges"))},[_("span",{class:ze(["ch-branch",{"ch-detached":!e.branch}])},N(e.branch||x(n)("header.detached")),3),i.value>0||r.value>0?(g(),C("span",fwe,[i.value>0?(g(),C("span",pwe,"↑"+N(i.value),1)):oe("",!0),r.value>0?(g(),C("span",hwe,"↓"+N(r.value),1)):oe("",!0)])):oe("",!0),u.value?(g(),C("span",mwe,[l.value>0?(g(),C("span",gwe,"+"+N(l.value),1)):oe("",!0),a.value>0?(g(),C("span",vwe,"-"+N(a.value),1)):oe("",!0)])):oe("",!0)])):oe("",!0),e.pr?(g(),C("button",{key:2,type:"button",class:ze(["ch-pill ch-pr",f(e.pr.state)]),onClick:Y[5]||(Y[5]=G=>e.pr&&s("openPr",e.pr.url))},[K(Fe,{name:"git-pull-request",size:"sm"}),_("span",null,"PR #"+N(e.pr.number)+" · "+N(p(e.pr.state)),1)],2)):oe("",!0),e.sessionId&&e.sessionDone?(g(),C(Te,{key:3},[_("span",ywe,[K(Fe,{name:"circle-check",size:"sm"}),_("span",null,N(x(n)("header.sessionDone")),1)]),K(nn,{variant:"secondary",size:"sm",onClick:re},{default:ve(()=>[K(Fe,{name:"undo",size:"sm"}),qe(" "+N(x(n)("header.reopenSession")),1)]),_:1})],64)):oe("",!0)],2))}}),bwe=ht(kwe,[["__scopeId","data-v-a0c7719c"]]),wwe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],D6=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function xwe(e){if(e<=255)return wwe[e];let t=0,n=D6.length-1;for(;t<=n;){const o=t+n>>1,s=D6[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function _we(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let u=0;u=55296&&c<=56319&&u+1=56320&&h<=57343&&(d=(c-55296<<10)+(h-56320)+65536,f=2)}const p=xwe(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c0?n[u-1]:l,f=c0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Twe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` +`).replace(/[\r\f]/g,` +`):e}let kk=null,Iwe;function $we(){return kk===null&&(kk=new Intl.Segmenter(Iwe,{granularity:"word"})),kk}const Nwe=/\p{Script=Arabic}/u,Ga=/\p{M}/u,Fx=/\p{Nd}/u;function B6(e){return Nwe.test(e)}function z6(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Qr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(z6(s))return!0;t++;continue}}if(z6(n))return!0}}return!1}function Lwe(e){const t=yh(e);return t!==null&&(Ox.has(t)||Gu.has(t))}const Fwe=new Set([" "," ","⁠","\uFEFF"]),Owe=new Set(["-","‐","–","—"]);function Rwe(e){const t=yh(e);return t!==null&&Fwe.has(t)}function Pwe(e){const t=yh(e);return t!==null&&Owe.has(t)}function E7(e,t){return Rwe(e)?!1:t?!(Lwe(e)||Pwe(e)):!0}const Ox=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),O0=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Rx=new Set(["'","’"]),Gu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Dwe=new Set([":",".","،","؛"]),Bwe=new Set(["၏"]),zwe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Wwe(e){if(Px(e))return!0;let t=!1;for(const n of e){if(Gu.has(n)||P0(n)){t=!0;continue}if(!(t&&Ga.test(n)))return!1}return t}function Hwe(e){for(const t of e)if(!Ox.has(t)&&!Gu.has(t))return!1;return e.length>0}function jwe(e){if(Px(e))return!0;for(const t of e)if(!O0.has(t)&&!Rx.has(t)&&!Ga.test(t)&&!P0(t))return!1;return e.length>0}function Px(e){let t=!1;for(const n of e)if(!(n==="\\"||Ga.test(n))){if(O0.has(n)||Gu.has(n)||Rx.has(n)){t=!0;continue}return!1}return t}function R0(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function yh(e){if(e.length===0)return null;const t=R0(e,e.length);return e.slice(t)}function Uwe(e){for(const t of e)if(!Ga.test(t))return t;return null}function Vwe(e){for(let t=e.length;t>0;){const n=R0(e,t),o=e.slice(n,t);if(!Ga.test(o))return o;t=n}return null}const qwe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Kwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function P0(e){const t=e.codePointAt(0);return t!==void 0&&Kwe(t,qwe)}function Gwe(e){const t=Vwe(e);return t!==null&&P0(t)}function Zwe(e){const t=Uwe(e);return t!==null&&Fx.test(t)}function Ywe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Ga.test(o)){n--;continue}if(O0.has(o)||Rx.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Jwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function W6(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function H6(e,t){return e&&t!==null&&Dwe.has(t)}function Xwe(e){const t=yh(e);return t!==null&&Bwe.has(t)}function Qwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function u2(e){let t=e.length;for(;t>0;){const n=R0(e,t),o=e.slice(n,t);if(zwe.has(o))return!0;if(!Gu.has(o))return!1;t=n}return!1}function exe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const txe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Mr(e){return e.length===1?e[0]:e.join("")}function nxe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Mr(n)}function oxe(e,t,n,o){if(!txe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=exe(c,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){r.push(c),u+=c.length;continue}i!==null&&s.push({text:Mr(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length}return i!==null&&s.push({text:Mr(r),isWordLike:a,kind:i,start:l}),s}function c2(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const sxe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function ixe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:sxe.test(n)&&t+1=e.len||c2(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c0&&(t.push(Mr(a)),n.push(!0),o.push("text"),s.push(u),i=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const uxe=new Set([":","-","/","×",",",".","+","–","—"]),cxe=/[\p{P}\p{S}\p{Co}]/u,dxe=/\p{Emoji_Presentation}/u,fxe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function pxe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function T7(e){const t=e.charCodeAt(0);return t<128?pxe(t):!fxe.has(e)&&!dxe.test(e)&&cxe.test(e)}function j6(e){let t=!1;for(const n of e)if(!Ga.test(n)){if(!T7(n))return!1;t=!0}return t}function hxe(e){for(let t=e.length;t>0;){const n=R0(e,t),o=e.slice(n,t);if(Ga.test(o)){t=n;continue}return T7(o)||P0(o)}return!1}function mxe(e,t,n,o){const s=!t&&j6(e),i=!o&&j6(n),r=Gwe(e),l=(t||r)&&hxe(e);return!s&&!i&&!l||Qr(e)||Qr(n)?!1:(t||s||r)&&(o||i)}function I7(e){for(const t of e)if(Fx.test(t))return!0;return!1}function I1(e){if(e.length===0)return!1;for(const t of e)if(!(Fx.test(t)||uxe.has(t)))return!1;return!0}function gxe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(Mr(u)),n.push(d),o.push("text"),s.push(e.starts[i]),i=c;continue}}t.push(r),n.push(a),o.push(l),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function yxe(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let u=0;u0&&a[z]==="text"&&R&&f[z]&&h[z]||$&&s>0&&a[z]==="text"&&Hwe(T.text)&&f[z]||$&&s>0&&a[z]==="text"&&m[z]?A():$&&s>0&&a[z]==="text"&&T.isWordLike&&P&&k[z]?(A(),l[z]=!0):F!==null&&s>0&&a[z]==="text"&&c[z]===F?d[z]=(d[z]??1)+1:$&&!T.isWordLike&&s>0&&a[z]==="text"&&!f[z]&&(Wwe(T.text)||T.text==="-"&&l[z])?A():(i[s]=T.text,r[s]=[T.text],l[s]=T.isWordLike,a[s]=T.kind,u[s]=T.start,c[s]=F,d[s]=F===null?0:1,f[s]=R,p[s]=P,h[s]=D,m[s]=B,k[s]=H6(P,M),s++)}for(let I=0;Inull);let v=-1;for(let I=s-1;I>=0;I--){const T=i[I];if(T.length!==0){if(a[I]==="text"&&!l[I]&&v>=0&&a[v]==="text"&&(jwe(T)||T==="-"&&Zwe(i[v]))){const $=w[v]??[];$.push(T),w[v]=$,u[v]=u[I],i[I]="";continue}v=I}}for(let I=0;I=0&&!E7(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Qr(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),r.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:r}}function Sxe(e,t,n="normal",o="normal"){const s=Mwe(n),i=s.mode==="pre-wrap"?Twe(e):Ewe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=wxe(i,t,s),l=o==="keep-all"?_xe(i,r,t.breakKeepAllAfterPunctuation):r;return{normalized:i,chunks:xxe(l,s),...l}}let $c=null;const U6=new Map;let Nc=null;const Cxe=96,Axe=/\p{Emoji_Presentation}/u,Mxe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let bk=null;const V6=new Map;function Dx(){if($c!==null)return $c;if(typeof OffscreenCanvas<"u")return $c=new OffscreenCanvas(1,1).getContext("2d"),$c;if(typeof document<"u")return $c=document.createElement("canvas").getContext("2d"),$c;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Exe(e){let t=U6.get(e);return t||(t=new Map,U6.set(e,t)),t}function ba(e,t){let n=t.get(e);return n===void 0&&(n={width:Dx().measureText(e).width,containsCJK:Qr(e)},t.set(e,n)),n}function D0(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function Txe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function $7(){return bk===null&&(bk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),bk}function Ixe(e){return Axe.test(e)||e.includes("️")}function $xe(e){return Mxe.test(e)}function Nxe(e,t){let n=V6.get(e);if(n!==void 0)return n;const o=Dx();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const r=i.getBoundingClientRect().width;document.body.removeChild(i),s-r>.5&&(n=s-r)}return V6.set(e,n),n}function Lxe(e){let t=0;const n=$7();for(const o of n.segment(e))Ixe(o.segment)&&t++;return t}function Fxe(e,t){return t.emojiCount===void 0&&(t.emojiCount=Lxe(e)),t.emojiCount}function Tu(e,t,n){return n===0?t.width:t.width-Fxe(e,t)*n}function Oxe(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=$7(),r=[];for(const c of i.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=ba(d,n);c.push(Tu(d,f,o))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>Cxe){const c=[];let d=null,f=0;for(const p of r){const h=ba(p,n),m=Tu(p,h,o);if(d===null)c.push(m);else{const k=d+p,w=ba(k,n);c.push(Tu(k,w,o)-f)}d=p,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=ba(a,n),f=Tu(a,d,o);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function Rxe(e,t){const n=Dx();n.font=e;const o=Exe(e),s=Txe(e),i=t?Nxe(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function Pxe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function N7(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function L7(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Bx(e,t){return t===0?0:e+t}function zxe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Wxe(e,t,n,o,s){const i=t==="tab"?s+zxe(e,n):e.lineEndFitAdvances[n];return Bx(o,i)}function q6(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return Bx(o,s)}function K6(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return Bx(o,i)}function Hxe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function jxe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function $1(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const r=e.kinds[i];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Vxe(e,t,n,o,s,i){return t+Uxe(e,n,o,s,i)}function qxe(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r}=e;if(o.length===0)return 0;const a=D0().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,p=0,h=0,m=0,k=0,w=-1,v=0;function y(){w=-1,v=0}function b(R=m,P=k,M=d){c++,n?.(M,p,h,R,P),d=0,f=!1,y()}function S(R,P){f=!0,p=R,h=0,m=R+1,k=0,d=P}function I(R,P,M){f=!0,p=R,h=P,m=R,k=P+1,d=M}function T(R,P){if(!f){S(R,P);return}d+=P,m=R+1,k=0}function $(R,P){const M=i[R],D=r[R]??null;let B=D===null?-1:$1(D,0,P+1),z=-1,A=0,L=P;for(;Lu){if(D!==null&&z>P){b(R,z,A),L=z,B=$1(D,B,L+1),z=-1,A=0;continue}b(),I(R,L,W)}else d+=W,m=R,k=L+1;const j=L+1;D!==null&&D[B]===j&&(z=j,A=d,B++),L++}f&&m===R&&k===M.length&&(m=R+1,k=0)}let F=0;for(;F=o.length));){const R=o[F],P=s[F],M=N7(P);if(!f){R>u&&i[F]!==null?$(F,0):S(F,R),M&&(w=F+1,v=d-R),F++;continue}if(d+R>u){if(M){T(F,R),b(F+1,0,d-R),F++;continue}if(w>=0){if(m>w||m===w&&k>0){b();continue}b(w,0,v);continue}if(R>u&&i[F]!==null){b(),$(F,0),F++;continue}b();continue}T(F,R),M&&(w=F+1,v=d-R),F++}return f&&b(),c}function Kxe(e,t,n){if(e.simpleLineWalkFastPath)return qxe(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(o.length===0||a.length===0)return 0;const u=D0(),c=u.lineFitEpsilon,d=t+c;let f=0,p=0,h=!1,m=0,k=0,w=0,v=0,y=-1,b=0,S=0,I=null;function T(){y=-1,b=0,S=0,I=null}function $(){return I==="soft-hyphen"&&y===w&&v===0?S:p}function F(A=w,L=v,W){f++,n!==void 0&&n(Vxe(e,W??$(),m,k,A,L),m,k,A,L),p=0,h=!1,T()}function R(A,L){h=!0,m=A,k=0,w=A+1,v=0,p=L}function P(A,L,W){h=!0,m=A,k=L,w=A,v=L+1,p=W}function M(A,L){if(!h){R(A,L);return}p+=L,w=A+1,v=0}function D(A,L,W,j,re,Q){if(!L)return;const Y=q6(e,A,W,re),G=K6(e,A,W,re,j);y=W+1,b=p-Q+Y,S=p-Q+G,I=A}function B(A,L){const W=i[A],j=r[A]??null;let re=j===null?-1:$1(j,0,L+1),Q=-1,Y=0,G=L;for(;Gd){if(j!==null&&Q>L){F(A,Q,Y),G=Q,re=$1(j,re,G+1),Q=-1,Y=0;continue}F(),P(A,G,X)}else p=me,w=A,v=G+1}const te=G+1;j!==null&&j[re]===te&&(Q=te,Y=p,re++),G++}h&&w===A&&v===W.length&&(w=A+1,v=0)}function z(A){f++,n?.(0,A.startSegmentIndex,0,A.consumedEndSegmentIndex,0),T()}for(let A=0;A=L.endSegmentIndex));){const j=s[W],re=N7(j),Q=Bxe(e,h,W),Y=j==="tab"?Dxe(p+Q,e.tabStopAdvance):o[W],G=Q+Y,X=Wxe(e,j,W,Q,Y);if(j==="soft-hyphen"){h&&(w=W+1,v=0,y=W+1,b=p+l,S=p+l,I=j),W++;continue}if(!h){X>d&&i[W]!==null?B(W,0):R(W,Y),D(j,re,W,Y,Q,G),W++;continue}if(p+X>d){const q=p+q6(e,j,W,Q),me=p+K6(e,j,W,Q,Y);if(I==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&b<=d){F(y,0,S);continue}if(re&&q<=d){M(W,G),F(W+1,0,me),W++;continue}if(y>=0&&b<=d){if(w>y||w===y&&v>0){F();continue}const xe=y;F(xe,0,S),W=xe;continue}if(X>d&&i[W]!==null){F(),B(W,0),W++;continue}F();continue}M(W,G),D(j,re,W,Y,Q,G),W++}if(h){const j=y===L.consumedEndSegmentIndex?S:p;F(L.consumedEndSegmentIndex,0,j)}}return f}let wk=null;function zx(){return wk===null&&(wk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),wk}function Gxe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function Zxe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,p){o=[d],s=f,i=p,r=u2(d),l=O0.has(d)}function c(d,f){o.push(d),i=i||f;const p=u2(d);d.length===1&&Gu.has(d)?r=r||p:r=p,l=!1}for(const d of zx().segment(e)){const f=d.segment,p=Qr(f);if(o.length===0){u(f,d.index,p);continue}if(l||Ox.has(f)||Gu.has(f)||t.carryCJKAfterClosingQuote&&p&&r){c(f,p);continue}if(!i&&!p){c(f,p);continue}a(),u(f,d.index,p)}return a(),n}function Yxe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(a,u){const c=t[a].start,d=u=0&&!E7(t[a-1].text,n)&&l(a),s<0&&(s=a),i=i||Qr(u.text)}return l(t.length),o}function G6(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=zx();for(const s of o.segment(e))n++;return n}function Jxe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Xxe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of zx().segment(e))n++,Jxe(o.segment)&&t.push(n);return t.length===0?null:t}function Qxe(e,t,n){return t>1?e+(t-1)*n:e}function e_e(e,t,n,o,s){const i=D0(),{cache:r,emojiCorrection:l}=Rxe(t,$xe(e.normalized)),a=Tu("-",ba("-",r),l)+(s===0?0:s*2),c=Tu(" ",ba(" ",r),l)*8,d=s!==0;if(e.len===0)return Gxe();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const w=n?[]:null,v=[],y=[],b=[],S=n?[]:null,I=Array.from({length:e.len});function T(P,M,D,B,z,A,L,W,j){z!=="text"&&z!=="space"&&z!=="zero-width-break"&&(k=!1),f.push(M),p.push(D),h.push(B),m.push(z),w?.push(A),v.push(L),y.push(W),d&&b.push(j),S!==null&&S.push(P)}function $(P,M,D,B,z){const A=ba(P,r),L=d?G6(P,M):0,W=Qxe(Tu(P,A,l),L,s),j=M==="space"||M==="preserved-space"||M==="zero-width-break"?0:W,re=j===0?0:j+(L>0?s:0),Q=M==="space"||M==="zero-width-break"?0:W;if(z&&B&&P.length>1){let Y="sum-graphemes";s!==0?Y="segment-prefixes":I1(P)?Y="pair-context":i.preferPrefixWidthsForBreakableRuns&&(Y="segment-prefixes");const G=Oxe(P,A,r,l,Y),X=G===null||o==="keep-all"?null:Xxe(P);T(P,W,re,Q,M,D,G,X,L);return}T(P,W,re,Q,M,D,null,null,L)}for(let P=0;P{n>t&&(t=n)}),t}function i_e(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let r=0;r=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function Y6(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of r_e(t)){const r=Math.max(0,Math.min(s,e.length)),l=Math.max(r,Math.min(i,e.length));l<=r||(r>o&&n.push({text:e.slice(o,r),hit:!1}),n.push({text:e.slice(r,l),hit:!0}),o=l)}return o0?n:[{text:e,hit:!1}]}function J6(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function l_e(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let r=0;r0,l.value=v.scrollTop+v.clientHeight{const v={},y="var(--menu-scroll-fade)";let b;return r.value&&l.value?b=`linear-gradient(to bottom, transparent 0, black ${y}, black calc(100% - ${y}), transparent 100%)`:r.value?b=`linear-gradient(to bottom, transparent, black ${y})`:l.value&&(b=`linear-gradient(to top, transparent, black ${y})`),b&&(v.maskImage=b,v.WebkitMaskImage=b),u.value&&(v.maxHeight=u.value),Object.keys(v).length>0?v:void 0}),f=O(()=>{const v=a.value;return v?{top:`${v.top}px`,height:`${v.height}px`}:void 0});function p(){const v=t.value,y=n.value,b=v?.offsetParent;if(!v||!y||!b)return;const S=getComputedStyle(v),I=If(v,"--space-2",8),T=(parseFloat(S.paddingTop)||0)+(parseFloat(S.paddingBottom)||0),$=If(y,o,Number.POSITIVE_INFINITY),F=window.visualViewport?.offsetTop??0,R=b.getBoundingClientRect().top-F-I-T;u.value=`${Math.max(Math.floor(Math.min($,R)),0)}px`,xt(c)}function h(){const v=n.value;if(!v)return;const y=v.querySelectorAll('[role="option"]')[s?.value??-1];if(!y)return;const b=v.getBoundingClientRect(),S=y.getBoundingClientRect(),I=S.top-b.top+v.scrollTop,T=I+S.height;Iv.scrollTop+v.clientHeight&&(v.scrollTop=T-v.clientHeight)}let m=null;function k(v){const y=n.value,b=a.value;if(!y||!b)return;v.preventDefault(),m?.();const S=v.pointerId;(v.target instanceof Element?v.target:null)?.setPointerCapture?.(S);const T=If(y,"--menu-scrollbar-track-inset",0),$=y.clientHeight-T*2-b.height,F=y.scrollHeight-y.clientHeight,R=v.clientY,P=y.scrollTop,M=z=>{z.pointerId!==S||$<=0||(y.scrollTop=P+(z.clientY-R)/$*F)},D=z=>{z.pointerId===S&&m?.()};m=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),m=null},window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)}let w=null;return Sn(()=>{if(typeof ResizeObserver=="function"&&n.value){w=new ResizeObserver(y=>{for(const b of y)b.target===n.value?c():p()}),w.observe(n.value);const v=t.value?.offsetParent;v&&w.observe(v)}window.addEventListener("resize",p),window.visualViewport?.addEventListener("resize",p),window.visualViewport?.addEventListener("scroll",p),p(),c()}),En(()=>{w?.disconnect(),w=null,m?.(),window.removeEventListener("resize",p),window.visualViewport?.removeEventListener("resize",p),window.visualViewport?.removeEventListener("scroll",p)}),Ye(()=>[s?.value,i?.value],()=>{xt(()=>{c(),h()})}),{atTop:r,atBottom:l,thumb:a,scrollStyle:d,thumbStyle:f,onScroll:c,onThumbPointerDown:k}}const u_e={key:0,class:"slash-empty",role:"status"},c_e=["id","aria-selected","onMouseenter","onMousedown"],d_e={class:"slash-name"},f_e={key:0,class:"slash-match"},p_e={class:"slash-desc"},h_e={key:0,class:"slash-desc-match"},m_e=Ze({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),r=V(null),l=O(()=>n.activeIndex),a=O(()=>n.items),{thumb:u,scrollStyle:c,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=F7({menuEl:i,scrollEl:r,maxHeightVar:"--p-slash-menu-h",activeIndex:l,refreshKey:a}),h=O(()=>n.items.map((m,k)=>{const w=m.isSkill?m.desc:s(m.desc),v=n.ranges[k]??a_e(n.query,m.name,w);return{item:m,namePieces:Y6(m.name,v.name),desc:w,descPieces:Y6(w,v.desc)}}));return(m,k)=>(g(),C("div",{ref_key:"menuEl",ref:i,class:"slash-menu","data-menu-frame":""},[n.items.length===0?(g(),C("div",u_e,N(x(s)("composer.noCommands")),1)):oe("",!0),_("div",{ref_key:"scrollEl",ref:r,class:"slash-scroll",role:"listbox",style:jt(x(c)),onScroll:k[0]||(k[0]=(...w)=>x(f)&&x(f)(...w))},[(g(!0),C(Te,null,st(h.value,(w,v)=>(g(),C("div",{id:`composer-slash-option-${v}`,key:`${w.item.name}-${v}`,class:ze(["slash-item",{active:v===n.activeIndex}]),role:"option","aria-selected":v===n.activeIndex,onMouseenter:y=>o("hover",v),onMousedown:Ct(y=>o("select",w.item),["prevent"])},[_("span",d_e,[(g(!0),C(Te,null,st(w.namePieces,(y,b)=>(g(),C(Te,{key:b},[y.hit?(g(),C("span",f_e,N(y.text),1)):(g(),C(Te,{key:1},[qe(N(y.text),1)],64))],64))),128))]),_("span",p_e,[(g(!0),C(Te,null,st(w.descPieces,(y,b)=>(g(),C(Te,{key:b},[y.hit?(g(),C("span",h_e,N(y.text),1)):(g(),C(Te,{key:1},[qe(N(y.text),1)],64))],64))),128))])],42,c_e))),128))],36),x(u)&&n.items.length>0?(g(),C("div",{key:1,class:"scroll-thumb",style:jt(x(d)),onPointerdown:k[1]||(k[1]=(...w)=>x(p)&&x(p)(...w))},null,36)):oe("",!0)],512))}}),g_e=ht(m_e,[["__scopeId","data-v-d671dff5"]]),v_e={key:0,class:"mention-state dim",role:"status"},y_e={key:1,class:"mention-state dim",role:"status"},k_e=["id","aria-selected","onMouseenter","onMousedown"],b_e=["innerHTML"],w_e={class:"mention-name"},x_e={key:0,class:"mention-hit"},__e={class:"mention-meta"},S_e=["innerHTML"],C_e={class:"mention-name"},A_e={key:0,class:"mention-hit"},M_e={key:0,class:"mention-meta"},E_e={key:0,class:"mention-hit"},T_e=Ze({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),r=V(null),l=O(()=>n.activeIndex),a=O(()=>n.items),{thumb:u,scrollStyle:c,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=F7({menuEl:i,scrollEl:r,maxHeightVar:"--p-mention-menu-h",activeIndex:l,refreshKey:a});function h(y){const b=y.endsWith("/")?y.slice(0,-1):y,S=b.lastIndexOf("/");return S===-1?"":b.slice(0,S)}function m(y){const b=y.file.path.endsWith("/")?y.file.path.slice(0,-1):y.file.path;return xk(y.file.name,y.file.matchPositions,Math.max(0,b.length-y.file.name.length))}function k(y){return xk(h(y.file.path),y.file.matchPositions,0)}function w(y){return xk(y.skill.name,y.matchPositions,0)}function v(y){return y.kind==="skill"?`skill:${y.skill.name}`:y.file.path}return(y,b)=>(g(),C("div",{ref_key:"menuEl",ref:i,class:"mention-menu","data-menu-frame":""},[n.loading&&n.items.length===0?(g(),C("div",v_e,N(x(s)("mention.searching")),1)):n.items.length===0?(g(),C("div",y_e,N(x(s)("mention.noMatch")),1)):oe("",!0),n.loading&&n.items.length>0?(g(),pe(ns,{key:2,class:"mention-spin",size:"sm",label:x(s)("mention.searching")},null,8,["label"])):oe("",!0),_("div",{ref_key:"scrollEl",ref:r,class:"mention-scroll",role:"listbox",style:jt(x(c)),onScroll:b[0]||(b[0]=(...S)=>x(f)&&x(f)(...S))},[(g(!0),C(Te,null,st(n.items,(S,I)=>(g(),C("div",{id:`composer-mention-option-${I}`,key:v(S),class:ze(["mention-item",{active:I===n.activeIndex,stale:n.stale&&S.kind!=="skill"}]),role:"option","aria-selected":I===n.activeIndex,onMouseenter:T=>o("hover",I),onMousedown:Ct(T=>o("select",S),["prevent"])},[S.kind==="skill"?(g(),C(Te,{key:0},[_("span",{class:"mention-icon",innerHTML:x(ki)("sparkles","sm"),"aria-hidden":"true"},null,8,b_e),_("span",w_e,[(g(!0),C(Te,null,st(w(S),(T,$)=>(g(),C(Te,{key:$},[T.hit?(g(),C("span",x_e,N(T.text),1)):(g(),C(Te,{key:1},[qe(N(T.text),1)],64))],64))),128))]),_("span",__e,N(S.skill.description),1)],64)):(g(),C(Te,{key:1},[_("span",{class:"mention-icon",innerHTML:x(aw)(S.file.path,S.file.name),"aria-hidden":"true"},null,8,S_e),_("span",C_e,[(g(!0),C(Te,null,st(m(S),(T,$)=>(g(),C(Te,{key:$},[T.hit?(g(),C("span",A_e,N(T.text),1)):(g(),C(Te,{key:1},[qe(N(T.text),1)],64))],64))),128))]),h(S.file.path)?(g(),C("span",M_e,[(g(!0),C(Te,null,st(k(S),(T,$)=>(g(),C(Te,{key:$},[T.hit?(g(),C("span",E_e,N(T.text),1)):(g(),C(Te,{key:1},[qe(N(T.text),1)],64))],64))),128))])):oe("",!0)],64))],42,k_e))),128))],36),x(u)&&n.items.length>0?(g(),C("div",{key:3,class:"scroll-thumb",style:jt(x(d)),onPointerdown:b[1]||(b[1]=(...S)=>x(p)&&x(p)(...S))},null,36)):oe("",!0)],512))}}),I_e=ht(T_e,[["__scopeId","data-v-1db50d1d"]]),O7=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/auto",desc:"commands.auto.desc"},{name:"/yolo",desc:"commands.yolo.desc"},{name:"/thinking",desc:"commands.thinking.desc"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function $_e(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const N1="skill:";function N_e(e){return e.startsWith(N1)?e.slice(N1.length):e}function R7(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${N1}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...O7,...t]}function L_e(e,t=O7){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let r=0;return i===n?r=3:i.startsWith(n)?r=2:i.includes(n)&&(r=1),{item:o,index:s,score:r}}).filter(({score:o})=>o>0).sort((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function B0(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function P7(e){return e?.supportEfforts??[]}function F_e(e){return e[Math.floor(e.length/2)]}function Yp(e){if(B0(e)==="unsupported")return"off";const t=P7(e);return t.length>0?e?.defaultEffort??F_e(t):"on"}function kh(e){const t=P7(e),n=B0(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function Jp(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function O_e(e){return e!=="off"}function R_e(e,t){return kh(e).includes(t)}function Wx(e,t){return t==="off"?"off":t==="on"?Yp(e):t}function L1(e,t){return t??Yp(e)}function P_e(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function D_e(e,t,n){return!n||e===void 0?t:Yp(e)}const F1=100;function B_e(e){const t=Rd(rn.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>F1?n.slice(-F1):n,s={[e]:o};return Wa(rn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function z_e(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=V(B_e(s())),r=O(()=>i.value[s()??""]??[]);let l=-1,a="";function u(w){const v=s();if(l=-1,!v)return;const y=w.trim();if(!y)return;const b=i.value[v]??[];if(b.at(-1)===y)return;const S=[...b,y],I=S.length>F1?S.slice(-F1):S;i.value={...i.value,[v]:I},Wa(rn.inputHistory,i.value)}function c(){const w=n.value;return w?(w.selectionStart??0)===0:!1}function d(w){t.value=w,xt(()=>{const v=n.value;if(!v)return;o();const y=w.length;v.setSelectionRange(y,y)})}function f(){const w=r.value;if(w.length!==0){if(l===-1)a=t.value,l=w.length-1;else if(l>0)l-=1;else return;d(w[l])}}function p(){if(l===-1)return;const w=r.value;l0}return Ye(s,()=>{l=-1}),{push:u,caretAtTextStart:c,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function W_e(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:r,clearDraft:l}=e,a=V(!1),u=V([]),c=V(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(u.value=L_e(p,R7(s())),c.value=0,a.value=u.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,xt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",l?.(),r(p.name),i(p.name)}return{open:a,items:u,active:c,update:d,select:f}}function H_e(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:r}=e,l=V(!1),a=V([]),u=V(0),c=V(!1),d=V(!1);let f=null,p=0;function h(){const w=t.value,v=n.value?.selectionStart??w.length;let y=v-1;for(;y>=0&&!/\s/.test(w[y]);)y--;y++;const b=w.slice(y,v);return b.startsWith("@")?{token:b.slice(1),start:y,end:v}:null}function m(){const w=h(),v=s(),y=i?.();if(!w||!v&&!y){l.value=!1,d.value=!1;return}const b=w.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const S=++p;c.value=!0,l.value=!0,u.value=0,a.value.length>0&&(d.value=!0);try{const[I,T]=await Promise.all([v?v(b).catch(()=>[]):Promise.resolve([]),y?y(b).catch(()=>[]):Promise.resolve([])]);if(S!==p)return;a.value=[...I.map($=>({kind:$.path.endsWith("/")?"folder":"file",file:{...$,matchPositions:Z6(b,$.path)}})),...T.map($=>({kind:"skill",skill:$,matchPositions:Z6(b,$.name)}))]}catch{S===p&&(a.value=[])}finally{S===p&&(c.value=!1,d.value=!1)}},200)}function k(w){const v=h();if(!v)return;if(l.value=!1,w.kind==="skill"){r?.(w.skill.name);return}const y=t.value,b=w.file.name||w.file.path.split(/[\\/]/).findLast(Boolean)||w.file.path,S=b$({kind:w.kind,name:b,path:w.file.path});t.value=`${y.slice(0,v.start)}${S} ${y.slice(v.end)}`,xt(()=>{const I=n.value;if(!I)return;const T=v.start+S.length+1;I.setSelectionRange(T,T),I.focus(),o()})}return{open:l,items:a,active:u,loading:c,stale:d,update:m,select:k}}function j_e(e){const{sessionId:t}=e;function n(u){return zo(e4(u))??""}function o(u,c){const d=e4(u);c?ts(d,c):Hu(d)}const s=V(n(t())),i=V(null);function r(){const u=i.value;u&&(u.style.height="auto",u.style.height=`${u.scrollHeight}px`)}Ye(s,u=>{xt(r),o(t(),u)}),Ye(t,(u,c)=>{u!==c&&(o(c,s.value),s.value=n(u),xt(r))});function l(u){s.value=u,xt(()=>{const c=i.value;if(!c)return;c.focus();const d=u.length;c.setSelectionRange(d,d),r()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:r,loadForEdit:l,clearDraft:a}}function U_e(e){const{uploadImage:t,sessionId:n}=e,o=V({}),s=O(()=>o.value[n()??""]??[]),i=V(null),r=V(null),l=V(!1);let a=0;function u(){return`att_${++a}`}function c(L,W){o.value={...o.value,[L]:W}}function d(L){if(L.previewUrl!==void 0)try{URL.revokeObjectURL(L.previewUrl)}catch{}}function f(L){return L.startsWith("image/")?"image":L.startsWith("video/")?"video":"file"}async function p(L){const W=t();if(!W)return;const j=n()??"";if(L.length!==0)for(const re of L){const Q=f(re.type),Y=u(),G=Q==="file"?void 0:URL.createObjectURL(re),X={localId:Y,name:re.name,kind:Q,previewUrl:G,mediaType:re.type||"application/octet-stream",size:re.size,uploading:!0};c(j,[...o.value[j]??[],X]),W(re,re.name).then(te=>{const q=o.value[j]??[];c(j,q.map(me=>me.localId===Y?{...me,uploading:!1,fileId:te?.fileId,mediaType:te?.mediaType??me.mediaType,error:te===null}:me))}).catch(()=>{const te=o.value[j]??[];c(j,te.map(q=>q.localId===Y?{...q,uploading:!1,error:!0}:q))})}}function h(L){const W=n()??"",j=o.value[W]??[],re=j.find(Q=>Q.localId===L);i.value?.localId===L&&(i.value=null),re&&d(re),c(W,j.filter(Q=>Q.localId!==L))}function m(L){i.value=L}function k(){i.value=null}function w(){r.value?.click()}function v(L){const W=L.target,j=Array.from(W.files??[]);p(j),W.value=""}function y(L){if(!t())return;const W=L.clipboardData;if(!W)return;const j=[],re=new Set,Q=(Y,G)=>{const X=`${Y.size}:${Y.type}:${G}`;if(re.has(X))return;re.add(X);const te=Y.type.split("/")[1]??"png",q=G.includes(".")?G:`paste-${Date.now()}.${te}`;j.push(Y instanceof File?Y:new File([Y],q,{type:Y.type}))};for(const Y of Array.from(W.items))if(Y.kind==="file"){const G=Y.getAsFile();G&&Q(G,G.name||`paste-${Date.now()}.${Y.type.split("/")[1]??"png"}`)}for(const Y of Array.from(W.files))Q(Y,Y.name);j.length!==0&&(L.preventDefault(),p(j))}let b=0;function S(L){!t()||!Array.from(L.dataTransfer?.items??[]).some(j=>j.kind==="file")||(L.preventDefault(),L.stopPropagation(),l.value=!0)}function I(){l.value=!1}function T(L){if(b=0,l.value=!1,!t())return;L.preventDefault(),L.stopPropagation();const W=Array.from(L.dataTransfer?.files??[]);p(W)}function $(L){return Array.from(L.dataTransfer?.items??[]).some(W=>W.kind==="file")}function F(L){!t()||!$(L)||(L.preventDefault(),b+=1,l.value=!0)}function R(L){!t()||!$(L)||L.preventDefault()}function P(L){!t()||!$(L)||(b=Math.max(0,b-1),b===0&&(l.value=!1))}function M(L){if(b=0,l.value=!1,!t())return;L.preventDefault();const W=Array.from(L.dataTransfer?.files??[]);p(W)}function D(){const L=n()??"";for(const W of o.value[L]??[])d(W);c(L,[])}function B(L,W,j){const re=o.value[L]??[];re.some(Q=>Q.localId===W)&&c(L,re.map(Q=>Q.localId===W?{...Q,...j}:Q))}function z(L){return fetch(L).then(W=>{if(!W.ok)throw new Error(`fetch failed: ${W.status}`);return W.blob()})}function A(L){const W=n()??"";for(const j of o.value[W]??[])d(j);c(W,[]);for(const j of L){const re=u(),Q=/^data:/i.test(j.url),Y=/^blob:/i.test(j.url),G=j.name??j.kind;if(j.fileId){const X={localId:re,name:G,kind:j.kind,previewUrl:j.kind==="file"?void 0:j.url,uploading:!1,fileId:j.fileId};c(W,[...o.value[W]??[],X]),j.kind!=="file"&&!Q&&!Y&&St().getFileBlob(j.fileId).then(te=>{const q=URL.createObjectURL(te);if(!(o.value[W]??[]).some(xe=>xe.localId===re)){URL.revokeObjectURL(q);return}B(W,re,{previewUrl:q})}).catch(()=>{})}else{if(!j.url)continue;const X=t();if(!X)continue;const te={localId:re,name:G,kind:j.kind,previewUrl:j.url,uploading:!0};c(W,[...o.value[W]??[],te]),z(j.url).then(q=>{const me=G.includes(".")?G:`${G}.${q.type.split("/")[1]??"bin"}`;return X(q,me)}).then(q=>{if(q===null){const me=o.value[W]??[];c(W,me.filter(xe=>xe.localId!==re));return}B(W,re,{uploading:!1,fileId:q.fileId})}).catch(()=>{const q=o.value[W]??[];c(W,q.filter(me=>me.localId!==re))})}}}return Ye(n,()=>{i.value=null}),Sn(()=>{document.addEventListener("paste",y),document.addEventListener("dragenter",F),document.addEventListener("dragover",R),document.addEventListener("dragleave",P),document.addEventListener("drop",M)}),En(()=>{document.removeEventListener("paste",y),document.removeEventListener("dragenter",F),document.removeEventListener("dragover",R),document.removeEventListener("dragleave",P),document.removeEventListener("drop",M);for(const L of Object.values(o.value))for(const W of L)d(W);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:r,isDragOver:l,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:w,handleFileInputChange:v,handleDragOver:S,handleDragLeave:I,handleDrop:T,clearAfterSubmit:D,loadAttachments:A}}const V_e={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},q_e=["stroke-dasharray","stroke-dashoffset"],_k=7,K_e=Ze({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*_k;return(o,s)=>(g(),C("svg",V_e,[_("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:_k,fill:"none","stroke-width":"2.5"}),_("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:_k,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,q_e)]))}}),G_e=ht(K_e,[["__scopeId","data-v-97f3cf66"]]),Z_e=["aria-selected","onClick"],Y_e=Ze({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),C("div",{class:ze(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),C(Te,null,st(e.options,i=>(g(),C("button",{key:i.value,class:ze(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:r=>n("update:modelValue",i.value)},N(i.label),11,Z_e))),128))],2))}}),zs=ht(Y_e,[["__scopeId","data-v-bffb3dae"]]),Sk=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],D7=6e4;function J_e(e=Date.now()){const t=Math.floor(e/D7)%Sk.length;return Sk[t]??Sk[0]}function X_e(e=Date.now()){return`${J_e(e)}…`}const Cl=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],Bu=80,Q_e=["aria-label"],eSe=Ze({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=Cl.length*Bu,n=Bu/2,o=e,s=V(Date.now());let i;Sn(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},D7))}),En(()=>{i!==void 0&&clearInterval(i)});const r=O(()=>o.label??X_e(s.value));function l(a){return{"--spinner-frame-delay":`${a*Bu-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,u)=>(g(),C("span",{class:ze(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":r.value,role:"img"},[(g(!0),C(Te,null,st(x(Cl),(c,d)=>(g(),C("span",{key:c,class:"activity-frame",style:jt(l(d)),"aria-hidden":"true"},N(c),5))),128))],10,Q_e))}}),Ck=ht(eSe,[["__scopeId","data-v-c12d8332"]]),tSe=["disabled"],nSe={key:0,class:"leading"},oSe={class:"label"},sSe={key:1,class:"count"},iSe={key:2,class:"trailing"},rSe=Ze({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),C("button",{type:"button",class:ze(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),C("span",nSe,[An(t.$slots,"leading",{},void 0,!0)])):oe("",!0),_("span",oSe,[An(t.$slots,"label",{},()=>[An(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),C("span",sSe,N(e.count),1)):oe("",!0),t.$slots.trailing?(g(),C("span",iSe,[An(t.$slots,"trailing",{},void 0,!0)])):oe("",!0)],10,tSe))}}),Lc=ht(rSe,[["__scopeId","data-v-261bf74a"]]),lSe=["aria-checked","disabled"],aSe=Ze({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(r){n.disabled||r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),s())}return(r,l)=>(g(),C("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...l[0]||(l[0]=[_("span",{class:"track","aria-hidden":"true"},null,-1),_("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,lSe))}}),X6=ht(aSe,[["__scopeId","data-v-169237c7"]]);function uSe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const cSe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function _r(e){const t=e.replaceAll("\\","/"),n=cSe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function dSe(e,t){const n=_r(t.cwd);return e.find(o=>_r(o.root)===n)?.id??t.workspaceId??t.cwd}function fSe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(_r)),r=new Map;for(const d of t){const f=_r(d.root);i.has(f)||r.has(f)||r.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=_r(f);i.has(p)||r.has(p)||r.set(p,{id:d.workspaceId??f,root:f,name:uSe(f),sessionCount:0})}const l=new Map;for(const d of n){const f=dSe(t,d);l.set(f,(l.get(f)??0)+1)}const a=[];for(const d of t){const f=_r(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const u=[...r.keys()].filter(d=>!a.includes(d));u.sort((d,f)=>r.get(d).root.localeCompare(r.get(f).root));const c=[];for(const d of[...a,...u]){const f=r.get(d),p=l.get(f.id)??l.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);c.push({...f,sessionCount:h})}return c}function pSe(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(r=>r.id)),s=new Set(t.filter(r=>r.role==="user").map(r=>r.id)),i=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||o.has(r.id)||r.role==="user"&&r.promptId!==void 0&&s.has(r.promptId))});return i.length>0?[...i,...t]:t}function Q6(e,t){const n=new Set(e.map(a=>a.id)),o=t.filter(a=>a.kind==="subagent"&&!n.has(a.id));if(o.length===0)return e;const s=new Map(e.map(a=>[a.id,a])),i=new Set,r=o.map(a=>{const u=a.backgroundTaskId!==void 0?s.get(a.backgroundTaskId):void 0;if(u===void 0)return a;i.add(u.id);const c=a.status==="running"&&u.status!=="running";return{...a,status:a.status==="running"?u.status:a.status,subagentPhase:c?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":a.subagentPhase,agentId:a.agentId??u.agentId,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort,completedAt:a.completedAt??u.completedAt,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes}});return[...e.filter(a=>!i.has(a.id)),...r]}function hSe(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),o=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);return l?{...r,outputLines:l.outputLines,text:l.text}:r}),i=t.filter(r=>!o.has(r.id));return i.length===0?s:[...s,...i]}function mSe(e){const t=new Map,n=new Set;function o(i){const r=t.get(i);if(r!==void 0)return r;const l=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,l),l}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const gSe=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function vSe(e){return gSe.has(e.type)}const ySe=50,kSe=100,d2=32*1024,bSe={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,ySe)},cancelTask(e){clearTimeout(e)}};function wSe(e,t,n={}){const o=n.scheduler??bSe,s=Math.max(1,Math.floor(n.maxItemsPerSlice??kSe)),i=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>i.length-r,f=()=>{u+=1,l!==null&&(o.cancelFrame(l),l=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{r===i.length?(i.length=0,r=0):r>=1024&&(i.splice(0,r),r=0)};let h;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,v=()=>{w===u&&h()};l=o.requestFrame(v),a=o.requestTask(v)};h=()=>{f();let w=0;for(;!c&&w{if(!c){if(t(w)){const v=i.length>r?i.at(-1):void 0,y=v===void 0?void 0:n.coalesce?.(v,w);y===void 0?i.push(w):i[i.length-1]=y,m();return}if(d()===0){e(w);return}i.push(w),h()}});return k.flush=()=>{if(!c){for(f();!c&&r{if(c||d()===0)return;let v=r;for(let y=r;y{c||(c=!0,f(),i.length=0,r=0)},k}function f2(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function xSe(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=f2(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=d2)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[r-1])&&/[\uDC00-\uDFFF]/u.test(o.value[r])&&(r-=1);const l=o.value.slice(i,r);s.push({appEvent:{...t,delta:o.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=r}return s}function _Se(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=f2(e.appEvent),i=f2(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>d2)return;const r=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}const B7=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],z7=new Set(["blue","mono"]),W7=new Set(["light","dark","system"]),H7=14,SSe=12,CSe=20,ASe={small:12,medium:14,large:16,xlarge:18};function MSe(){const e=zo(rn.accent);return e&&z7.has(e)?e:"blue"}function ESe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function TSe(){const e=zo(rn.colorScheme);return e&&W7.has(e)?e:"system"}function ISe(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function Hx(e){return Number.isFinite(e)?Math.min(CSe,Math.max(SSe,Math.round(e))):H7}function jx(e){const t=Hx(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function j7(e){return ASe[e]}function $Se(){const e=zo(rn.uiFontSize);return e===null?H7:Hx(Number(e))}function NSe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=jx(e))}const Ux=V(TSe()),Vx=V(MSe()),qx=V($Se());Ye(Ux,ISe,{immediate:!0});Ye(Vx,ESe,{immediate:!0});Ye(qx,NSe,{immediate:!0});function LSe(e){W7.has(e)&&(Ux.value=e,ts(rn.colorScheme,e))}function FSe(e){z7.has(e)&&(Vx.value=e,ts(rn.accent,e))}function OSe(e){const t=Hx(e);qx.value=t,ts(rn.uiFontSize,String(t))}const RSe=600,PSe=250,z0=250,DSe=1e3,BSe=160,O1=V(!1);let Su=[],Iu=null,R1=-z0;function zSe(){Su=[],R1=-z0,O1.value=!1,Iu!==null&&(clearTimeout(Iu),Iu=null)}function WSe(){O1.value=!0,Iu!==null&&clearTimeout(Iu),Iu=setTimeout(()=>{Iu=null,Su=[],R1=-z0,O1.value=!1},DSe)}function HSe(e){if(e<=0)return;const t=Date.now();Su.push({time:t,chars:e});const n=t-RSe;if(Su=Su.filter(l=>l.time>=n),t-R1l+a.chars,0)/s*1e3>=BSe&&WSe()}function Kx(){return{colorScheme:Ux,accent:Vx,uiFontSize:qx,fastMoon:O1,setColorScheme:LSe,setAccent:FSe,setUiFontSize:OSe,resetFastMoon:zSe,recordMoonDelta:HSe}}function jSe(e,t,n){return e==="idle"&&!t&&!n}function Gx(e,t){const n=zo(e);return n===null?t:n==="1"}const Zx=V(Gx(rn.notifyOnComplete,!0)),Yx=V(Gx(rn.notifyOnQuestion,!1)),Jx=V(Gx(rn.notifyOnApproval,!1)),Xx=V(typeof Notification<"u"?Notification.permission:"denied"),USe="/favicon.ico";async function Qx(e,t,n){if(!n){e.value=!1,ts(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}Xx.value=o,o==="granted"&&(e.value=!0,ts(t,"1"))}function VSe(e){return Qx(Zx,rn.notifyOnComplete,e)}function qSe(e){return Qx(Yx,rn.notifyOnQuestion,e)}function KSe(e){return Qx(Jx,rn.notifyOnApproval,e)}function e_(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function GSe(e){return{title:fo.global.t("settings.notifyTitle"),body:e_(e,fo.global.t("settings.notifyFallback"))}}function ZSe(e,t){return{title:fo.global.t("settings.notifyQuestionTitle"),body:e_(t,e,fo.global.t("settings.notifyQuestionFallback"))}}function YSe(e,t){return{title:fo.global.t("settings.notifyApprovalTitle"),body:e_(t,e,fo.global.t("settings.notifyApprovalFallback"))}}function t_(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{Xx.value=i,i==="granted"&&eM(t,n,o)});return}eM(t,n,o)}}function eM(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:USe});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function JSe(e,t){t_(Zx.value,t,GSe(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function XSe(e){t_(Yx.value,e,ZSe(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function QSe(e){t_(Jx.value,e,YSe(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function eCe(){return{notifyOnComplete:Zx,notifyOnQuestion:Yx,notifyOnApproval:Jx,notifyPermission:Xx,setNotifyOnComplete:VSe,setNotifyOnQuestion:qSe,setNotifyOnApproval:KSe,maybeNotifyCompletion:JSe,maybeNotifyQuestion:XSe,maybeNotifyApproval:QSe}}function tCe(){return zo(rn.soundOnComplete)==="1"}const Hd=V(tCe());function nCe(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Ak=null;function U7(){const e=nCe();if(!e)return null;if(Ak===null)try{Ak=new e}catch{return null}return Ak}function V7(){if(!Hd.value)return;const e=U7();e!==null&&e.state==="suspended"&&e.resume().then(()=>{wl("sound: audio context resumed",{state:e.state})},t=>{wl("sound: audio context resume rejected",{error:String(t)})})}let tM=!1;function oCe(){if(tM||typeof window>"u")return;tM=!0;const e=()=>{V7()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}oCe();function sCe(e){Hd.value=e,ts(rn.soundOnComplete,e?"1":"0"),e&&V7()}function nM(e,t,n,o,s){const i=e.createOscillator(),r=e.createGain();i.type="sine",i.frequency.value=t,i.connect(r),r.connect(e.destination);const l=e.currentTime+n;r.gain.setValueAtTime(1e-4,l),r.gain.exponentialRampToValueAtTime(s,l+.01),r.gain.exponentialRampToValueAtTime(1e-4,l+o),i.start(l),i.stop(l+o+.02)}function n_(){const e=U7();if(e===null){wl("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){wl("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{wl("sound: context resumed for next time",{state:e.state})},t=>{wl("sound: resume rejected",{error:String(t)})});return}try{nM(e,880,0,.16,.18),nM(e,1320,.1,.22,.16),wl("sound: chime scheduled",{state:e.state})}catch(t){wl("sound: failed to play",{error:String(t)})}}function iCe(){Hd.value&&n_()}function rCe(){Hd.value&&n_()}function lCe(){Hd.value&&n_()}function aCe(){return{soundOnComplete:Hd,setSoundOnComplete:sCe,maybePlayCompletionSound:iCe,maybePlayQuestionSound:rCe,maybePlayApprovalSound:lCe}}const uCe=1e3,cCe=4096,oM=32*1024;function dCe(e,t){let n=null,o;const s=new Set;async function i(f){try{const h=await St().listTasks(f);e.tasksBySession={...e.tasksBySession,[f]:Q6(h,e.tasksBySession[f]??[])},await r(f,h)}catch{}}async function r(f,p){if(e.activeSessionId!==f)return;const h=p??e.tasksBySession[f]??[],m=St(),k=new Map;if(await Promise.all(h.map(async v=>{if((v.status==="completed"||v.status==="failed"||v.status==="cancelled")&&!s.has(v.id)&&!((v.outputLines?.length??0)>0))try{const b=await m.getTask(f,v.id,{withOutput:!0,outputBytes:oM});b.outputPreview!==void 0&&k.set(v.id,{preview:b.outputPreview,bytes:b.outputBytes}),s.add(v.id)}catch{}})),k.size===0)return;const w=e.tasksBySession[f]??[];e.tasksBySession={...e.tasksBySession,[f]:w.map(v=>{const y=k.get(v.id)??(v.backgroundTaskId!==void 0?k.get(v.backgroundTaskId):void 0);return y?{...v,outputPreview:y.preview,outputBytes:y.bytes}:v})}}async function l(f){if(e.activeSessionId!==f)return;const p=St();let h;try{h=await p.listTasks(f)}catch{return}const m=new Map;await Promise.all(h.map(async y=>{const b=y.status==="running",S=y.status==="completed"||y.status==="failed"||y.status==="cancelled";if(!(!b&&!S)&&!(S&&(s.has(y.id)||(y.outputLines?.length??0)>0)))try{const I=await p.getTask(f,y.id,{withOutput:!0,outputBytes:b?cCe:oM});I.outputPreview!==void 0&&m.set(y.id,{preview:I.outputPreview,bytes:I.outputBytes}),S&&s.add(y.id)}catch{}}));const k=e.tasksBySession[f]??[],w=new Map(k.map(y=>[y.id,y])),v=h.map(y=>{const b=w.get(y.id),S=m.get(y.id);return{...y,outputLines:b?.outputLines,text:b?.text,outputPreview:S?.preview??b?.outputPreview,outputBytes:S?.bytes??b?.outputBytes}});e.tasksBySession={...e.tasksBySession,[f]:Q6(v,k)}}function a(f){n!==null&&o===f||(u(),o=f,l(f),n=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===f?l(f):u())},uCe))}function u(){n!==null&&(clearInterval(n),n=null),o=void 0,s.clear()}const c=V(0);let d=null;return Ye(()=>t.value.some(f=>f.status==="running"),f=>{f&&d===null?d=setInterval(()=>{c.value=(c.value+1)%Number.MAX_SAFE_INTEGER},1e3):!f&&d!==null&&(clearInterval(d),d=null)},{immediate:!0}),Ye(()=>{const f=e.activeSessionId;if(!f)return{sid:void 0,hasRunning:!1};const p=e.tasksBySession[f]??[];return{sid:f,hasRunning:p.some(h=>h.status==="running")}},({sid:f,hasRunning:p},h,m)=>{let k;p&&f!==void 0?a(f):f!==void 0?k=setTimeout(()=>{(e.tasksBySession[f]??[]).some(v=>v.status==="running")||u()},1500):u(),m(()=>{k!==void 0&&clearTimeout(k)})},{deep:!0,immediate:!0}),{taskClock:O(()=>c.value),loadTasksForSession:i}}function fCe(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function pCe(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` +`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&fCe(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const r=i.charAt(0),l=i.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:o}),o+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const p2="/sessions/";function sM(e){const{pathname:t}=e;if(!t.startsWith(p2))return;const n=t.slice(p2.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function hCe(e){return e===void 0||e.length===0?"/":`${p2}${encodeURIComponent(e)}`}const mCe=50,h2=5,gCe=40402,vCe=40410,yCe=40902,kCe=2e3;function Mk(e){return nr(e)&&e.code===yCe}const bCe=40904;function wCe(e){return nr(e)&&e.code===bCe}const hu=Ms({}),Um=Ms({}),Ek=Ms({}),Hr=Ms(new Set),W0=new Map,Zu=new Map,P1=new Map;let xCe=0;const vu=new Map,_Ce=3;let iM=0;function SCe(){return iM+=1,`${Date.now().toString(36)}-${iM}`}function CCe(e){return{generation:W0.get(e)??0,pending:(Zu.get(e)?.size??0)>0}}function m2(e){const t=++xCe;W0.set(e,t);const n=Zu.get(e)??new Set;return n.add(t),Zu.set(e,n),t}function g2(e,t){const n=Zu.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Zu.delete(e);const o=P1.get(e);P1.delete(e),o?.()}function ACe(e){W0.delete(e),Zu.delete(e),P1.delete(e),vu.delete(e)}function MCe(e,t){return!t.pending&&t.generation===(W0.get(e)??0)}function ECe(e,t){if((Zu.get(e)?.size??0)===0){t();return}P1.set(e,t)}function TCe(e,t){const{t:n}=fo.global,{confirm:o}=Ka(),{taskPoller:s,sideChat:i,modelProvider:r,pushOperationFailure:l,activity:a,sessionsKnownEmpty:u,setSessions:c,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:w,getEventConn:v,syncSessionFromSnapshot:y,reopenSession:b,hasLoadedMessages:S,refreshSessionStatus:I,refreshSessionGoal:T,persistSessionProfile:$,mergedWorkspaces:F,workspacesView:R,status:P,workspaceIdForSession:M,savePermissionToStorage:D,savePlanModeToStorage:B,saveDynamicWorkflowModeToStorage:z,saveGoalModeToStorage:A,draftModes:L,saveUnread:W,saveActiveWorkspaceToStorage:j,saveHiddenWorkspacesToStorage:re,goalErrorMessage:Q,resetFastMoon:Y,initialized:G,connectIssue:X,selectedDiffPath:te,fileDiffLines:q,fileDiffLoading:me}=t;let xe=!1;async function We(ue){if(e.messagesLoadingMoreBySession[ue])return;const Ce=e.messagesBySession[ue];if(!Ce||Ce.length===0)return;const Ne=Ce[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ue]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ue]:!1};try{const Ue=await St().listMessages(ue,{beforeId:Ne,pageSize:mCe}),dt=[...Ue.items].toReversed();k(ue,yt=>[...dt,...yt]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[ue]:Ue.hasMore}}catch(Ue){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ue]:!0},l("loadOlderMessages",Ue,{sessionId:ue})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ue]:!1}}}function he(ue){s.loadTasksForSession(ue),H(ue),I(ue),T(ue),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,ue)||r.loadSkillsForSession(ue)}async function ee(ue){const Ce=e.activeSessionId;if(Ce){te.value=ue,q.value=[],me.value=!0;try{const Ue=await St().getFileDiff(Ce,ue);if(te.value!==ue)return;q.value=pCe(Ue.diff)}catch(Ne){te.value===ue&&(q.value=[]),console.warn("[loadFileDiff] diff unavailable for",ue,Ne)}finally{te.value===ue&&(me.value=!1)}}}function ne(){te.value=null,q.value=[],me.value=!1}async function H(ue){try{const Ne=await St().getGitStatus(ue);e.gitStatusBySession={...e.gitStatusBySession,[ue]:Ne}}catch{}}async function Z(){try{const Ce=await St().getAuth();return e.authReady=Ce.ready,e.defaultModel=Ce.defaultModel,e.managedProviderStatus=Ce.managedProvider?.status??null,X.value=null,"proceed"}catch(ue){return nr(ue)&&(ue.code===401||ue.code===C7)?(X.value=null,"server-auth-required"):(X.value=(ue instanceof Error?ue.message:String(ue)).slice(0,140),"retry")}}async function ye(){let ue=!0;for(;;){const Ce=await Z();if(Ce!=="retry")return Ce;ue&&(X.value=null,ue=!1),await new Promise(Ne=>{setTimeout(Ne,kCe)})}}async function fe(){try{const ue=St();e.config=await ue.getConfig()}catch{}}async function de(ue){try{const Ne=await St().setConfig(ue);return e.config=Ne,e.defaultModel=Ne.defaultModel??null,!0}catch(Ce){return l("setConfig",Ce),!1}}const J=100,ae=30,be=720*60*1e3;async function _e(){const ue=St(),Ce=[];let Ne,Ue;for(;;){let dt;try{dt=await ue.listSessions({pageSize:J,beforeId:Ne,excludeEmpty:!0})}catch(yt){if(Ce.length===0)throw yt;Ue=yt;break}if(Ce.push(...dt.items),!dt.hasMore||dt.items.length===0)break;Ne=dt.items.at(-1).id}return{sessions:Ce,error:Ue}}function ce(ue){const Ce=new Map(e.sessions.map(Ne=>[Ne.id,Ne.usage]));c(ue.map(Ne=>{const Ue=Ce.get(Ne.id);return Ue!==void 0&&t2(Ne.usage)&&!t2(Ue)?{...Ne,usage:Ue}:Ne}))}function Se(ue){const Ce=[...ue],Ne=new Set(Ce.map(Ue=>Ue.id));for(const Ue of e.sessions)Ne.has(Ue.id)||(Ce.push(Ue),Ne.add(Ue.id));return Ce.sort((Ue,dt)=>new Date(dt.updatedAt).getTime()-new Date(Ue.updatedAt).getTime()),Ce}async function ie(ue){const Ce=St(),Ne=[],Ue=Date.now(),dt=kn=>Ue-new Date(kn.updatedAt).getTime();let yt,Yt=!1,sn=!0,Qn;for(;;){let kn;try{kn=await Ce.listSessions({workspaceId:ue,pageSize:h2,beforeId:yt,excludeEmpty:!0})}catch(Dt){if(sn)throw Dt;Qn=Dt,Yt=!0;break}if(Yt=kn.hasMore,kn.items.length===0)break;const Tn=kn.items.at(-1),No=dt(Tn)>=be;if(!sn&&No){const Dt=kn.items.findIndex(dn=>dt(dn)>=be),Vt=Dt>=0?Dt+1:kn.items.length;Ne.push(...kn.items.slice(0,Vt)),Yt=kn.hasMore||Vtie(Dt.id))),Ne=[],Ue=new Set,dt=new Map,yt=new Set;let Yt;for(let Dt=0;Dtyt.has(Dt.id)).map(Dt=>Dt.root)),Qn=new Set(ue.map(Dt=>Dt.id));for(const Dt of e.sessions)!(Dt.workspaceId!==void 0&&Qn.has(Dt.workspaceId)?yt.has(Dt.workspaceId):sn.has(Dt.cwd)||yt.has(M(Dt)))||Ue.has(Dt.id)||(Ne.push(Dt),Ue.add(Dt.id));const kn={},Tn={},No={};for(const{id:Dt}of ue){const Vt=dt.get(Dt);if(Vt===void 0){const dn=e.sessionsHasMoreByWorkspace[Dt],lo=e.sessionsCursorByWorkspace[Dt],Yn=e.sessionsInitialCountByWorkspace[Dt];dn!==void 0&&(kn[Dt]=dn),lo!==void 0&&(Tn[Dt]=lo),Yn!==void 0&&(No[Dt]=Yn);continue}kn[Dt]=Vt.hasMore,Tn[Dt]=Vt.items.length>0?Vt.items.at(-1).id:void 0,No[Dt]=Math.max(Vt.items.length,h2)}return e.sessionsHasMoreByWorkspace=kn,e.sessionsCursorByWorkspace=Tn,e.sessionsInitialCountByWorkspace=No,e.sessionsFullyLoaded=!1,Ne.sort((Dt,Vt)=>new Date(Vt.updatedAt).getTime()-new Date(Dt.updatedAt).getTime()),yt.size>0&&l("load",Yt),Ne}async function Re(ue){if(e.sessionsLoadingMoreByWorkspace[ue]||e.sessionsHasMoreByWorkspace[ue]===!1)return;const Ce=e.sessionsCursorByWorkspace[ue];if(Ce!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ue]:!0};try{const Ne=await St().listSessions({workspaceId:ue,pageSize:ae,beforeId:Ce,excludeEmpty:!0}),Ue=new Set(e.sessions.map(yt=>yt.id)),dt=Ne.items.filter(yt=>!Ue.has(yt.id));dt.length>0&&c([...e.sessions,...dt]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[ue]:Ne.items.length>0?Ne.items.at(-1).id:Ce},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[ue]:Ne.hasMore}}catch(Ne){l("loadMoreSessions",Ne)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ue]:!1}}}}async function at(){if(e.sessionsFullyLoaded)return;const ue=await _e().catch(Ue=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",Ue),null));if(ue===null)return;const Ce=ue.error===void 0?ue.sessions:Se(ue.sessions);if(ce(Ce),e.sessionsFullyLoaded=ue.error===void 0,ue.error!==void 0)return;const Ne={};for(const Ue of e.workspaces)Ne[Ue.id]=!1;e.sessionsHasMoreByWorkspace=Ne}async function ft(){const ue=await St().getMeta().catch(()=>null);ue!==null&&(e.serverVersion=ue.serverVersion,e.availableOpenInApps=ue.openInApps,e.dangerousBypassAuth=ue.dangerousBypassAuth,e.backend=ue.backend)}async function Mt(){const ue=Date.now();let Ce="accepted";Go("app:load:start"),e.loading=!0;const Ne=!G.value;let Ue=!0;try{if(Ne&&await ye()==="server-auth-required"){Ue=!1,Ce="auth-required";return}const dt=St();await Promise.all([dt.getHealth().catch(()=>null),ft(),r.loadModels()]),Ne||await Z(),await fe(),await Tt();const yt=await we(),Yt=yt??e.sessions;yt!==void 0&&ce(yt);const sn=Yt[0],Qn=e.activeWorkspaceId;!(Qn!==null&&F.value.some(No=>No.id===Qn))&&sn&&Kt(M(sn)),Wo();const Tn=typeof window<"u"?sM(window.location):void 0;!e.activeSessionId&&Tn!==void 0&&(e.sessions.some(Dt=>Dt.id===Tn)||await jn(Tn))&&await vo(Tn,{urlMode:"replace"}),!e.activeSessionId&&Yt.length>0&&await vo(Yt[0].id,{urlMode:"replace"})}catch(dt){Ce="failed",l("load",dt)}finally{e.loading=!1,Ue&&(G.value=!0),Go("app:load:complete",{status:Ce,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-ue})}}async function Tt(){try{const ue=St(),[Ce,Ne]=await Promise.all([ue.listWorkspaces().catch(()=>[]),ue.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=tn(Ce),e.fsHome=Ne.home||null,e.recentRoots=Ne.recentRoots}catch{}}function tn(ue){const Ce=um();return Object.keys(Ce).length===0?ue:ue.map(Ne=>{const Ue=Ce[Ne.root];return Ue!==void 0?{...Ne,name:Ue}:Ne})}function Kt(ue){e.activeWorkspaceId=ue,j(ue)}function Qe(ue){Kt(ue);const Ce=e.sessions.filter(Ne=>M(Ne)===ue);if(Ce.length>0){const Ne=Ce[0];Ne&&Ne.id!==e.activeSessionId&&vo(Ne.id)}else m(void 0),Zt(void 0,"push")}function nt(ue){const Ce=um()[ue.root],Ne=Ce!==void 0?{...ue,name:Ce}:ue,Ue=_r(Ne.root);e.hiddenWorkspaceRoots.some(Yt=>_r(Yt)===Ue)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(Yt=>_r(Yt)!==Ue),re(e.hiddenWorkspaceRoots));const dt=e.workspaces.findIndex(Yt=>Yt.id===Ne.id||Yt.root===Ne.root);if(dt===-1){e.workspaces=[Ne,...e.workspaces];return}const yt=[...e.workspaces];yt[dt]=Ne,e.workspaces=yt}function ut(ue){if(ue.type==="workspaceCreated"||ue.type==="workspaceUpdated"){nt(ue.workspace);return}const Ce=e.workspaces.find(Ue=>Ue.id===ue.workspaceId)?.root??ue.root;if(Ce&&!e.hiddenWorkspaceRoots.includes(Ce)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ce],re(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Ue=>Ue.id!==ue.workspaceId&&Ue.root!==Ce),e.activeWorkspaceId===ue.workspaceId||e.activeWorkspaceId===Ce){const Ue=R.value[0]?.id??null;if(e.activeWorkspaceId=Ue,Ue)j(Ue);else try{Hu(rn.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,ne(),Zt(void 0,"replace")}}function Pt(){m(void 0),Zt(void 0,"push")}function Oe(ue){Kt(ue),Pt(),ne()}async function Je(ue){const Ce=F.value.find(Tn=>Tn.id===ue);if(!Ce)return null;const Ne=e.thinking,Ue=St();let dt,yt=Ce.root;try{const Tn=await Ue.addWorkspace({root:Ce.root});dt=Tn.id,yt=Tn.root,nt(Tn)}catch{}const Yt=r.draftModel.value??void 0,sn=await Ue.createSession({workspaceId:dt,cwd:yt,model:Yt});r.draftModel.value=null;const Qn=Yt!==void 0&&(!sn.model||sn.model.length===0)?{...sn,model:Yt}:sn;f(Qn),Kt(sn.workspaceId??dt??ue),await vo(sn.id);const kn=sn.id;return Ne!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[kn]:Ne}),L.planMode&&(e.planModeBySession={...e.planModeBySession,[kn]:!0},B()),L.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[kn]:!0},z()),L.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[kn]:!0},A()),L.planMode=!1,L.dynamicWorkflowMode=!1,L.goalMode=!1,kn}async function it(ue,Ce,Ne){if(!Hr.has(ue)){Hr.add(ue);try{const Ue=await Je(ue);if(!Ue)return;await Un(Ue,Ce,Ne)}catch(Ue){l("startSessionAndSendPrompt",Ue)}finally{Hr.delete(ue)}}}async function rt(ue,Ce,Ne){if(!Hr.has(ue)){Hr.add(ue);try{const Ue=await Je(ue);if(!Ue)return;const dt=e.planModeBySession[Ue]??!1,yt=e.dynamicWorkflowModeBySession[Ue]??!1,Yt=e.sessions.find(kn=>kn.id===Ue),sn=(Yt?.model&&Yt.model.length>0?Yt.model:e.defaultModel)??void 0;if(!await $({model:sn,planMode:dt,dynamicWorkflowMode:yt,permissionMode:e.permission},Ue))return;await r.activateSkill(Ce,Ne,Ue)}catch(Ue){l("startSessionAndActivateSkill",Ue)}finally{Hr.delete(ue)}}}async function vt(ue,Ce){if(!Hr.has(ue)){Hr.add(ue);try{const Ne=await Je(ue);if(!Ne)return;await i.openSideChatOn(Ne,Ce)}catch(Ne){l("startSessionAndOpenSideChat",Ne)}finally{Hr.delete(ue)}}}async function Nt(ue){const Ce=ue.trim();if(!Ce)return!1;const Ne=St();try{const Ue=await Ne.addWorkspace({root:Ce});return nt(Ue),Oe(Ue.id),!0}catch(Ue){return console.warn("[pythinker-web] addWorkspaceByPath failed for",Ce,Ue),!1}}async function on(ue){try{return await St().browseFs(ue)}catch{return{path:"",parent:null,entries:[]}}}async function mn(){try{return await St().getFsHome()}catch{return{home:"",recentRoots:[]}}}function Zt(ue,Ce){if(Ce==="none"||typeof window>"u"||!window.history)return;const Ne=hCe(ue);if(window.location.pathname!==Ne)try{Ce==="push"?window.history.pushState(null,"",Ne):window.history.replaceState(null,"",Ne)}catch{}}async function jn(ue){try{const Ce=await St().getSession(ue);return e.sessions.some(Ne=>Ne.id===Ce.id)||p(Ce),!0}catch{return!1}}function Xt(){const ue=sM(window.location);if(ue===void 0){m(void 0);return}if(ue!==e.activeSessionId){if(e.sessions.some(Ce=>Ce.id===ue)){vo(ue,{urlMode:"none"});return}(async()=>{if(await jn(ue)){await vo(ue,{urlMode:"none"});return}const Ce=e.sessions[0];Ce?await vo(Ce.id,{urlMode:"replace"}):(m(void 0),Zt(void 0,"replace"))})()}}let xo=!1;function Wo(){xo||typeof window>"u"||(xo=!0,window.addEventListener("popstate",Xt))}async function vo(ue,Ce){const Ne=S(ue),Ue=!Ne&&u.has(ue);u.delete(ue);try{Zt(ue,Ce?.urlMode??"push"),e.sessionLoading=!Ne&&!Ue,m(ue),Y(),e.unreadBySession[ue]&&(e.unreadBySession={...e.unreadBySession,[ue]:!1},W({[ue]:!1})),ne();const dt=e.sessions.find(yt=>yt.id===ue);if(dt){const yt=M(dt);e.activeWorkspaceId!==yt&&Kt(yt)}if(Ne){if(await b(ue)==="not-found")return}else if(await y(ue)==="not-found")return;he(ue)}catch(dt){l("selectSession",dt,{sessionId:ue})}finally{e.activeSessionId===ue&&(e.sessionLoading=!1)}}async function Un(ue,Ce,Ne){const Ue=m2(ue);e.inFlightBySession={...e.inFlightBySession,[ue]:!0};const dt=w();try{const yt=St(),Yt=[];Ce&&Yt.push({type:"text",text:Ce});for(const dn of Ne??[])dn.kind==="video"?Yt.push({type:"video",source:{kind:"file",fileId:dn.fileId}}):dn.kind==="file"?Yt.push({type:"file",fileId:dn.fileId,name:dn.name??"",mediaType:dn.mediaType||"application/octet-stream",size:dn.size??0}):Yt.push({type:"image",source:{kind:"file",fileId:dn.fileId}});if(Yt.length===0)return e.inFlightBySession={...e.inFlightBySession,[ue]:!1},"rejected";const sn={id:dt,sessionId:ue,role:"user",content:Yt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ue,dn=>[...dn,sn]);const Qn=e.sessions.find(dn=>dn.id===ue),kn=(Qn?.model&&Qn.model.length>0?Qn.model:e.defaultModel)??void 0,Tn=e.planModeBySession[ue]??!1,No=e.dynamicWorkflowModeBySession[ue]??!1,Dt=e.goalModeBySession[ue]??!1;if(Dt&&Ce)try{await yt.updateSession(ue,{goalObjective:Ce.trim()})}catch(dn){return l("createGoal",dn,{sessionId:ue}),e.inFlightBySession={...e.inFlightBySession,[ue]:!1},k(ue,lo=>lo.some(Yn=>Yn.id===dt)?lo.filter(Yn=>Yn.id!==dt):lo),"rejected"}const Vt=await yt.submitPrompt(ue,{content:Yt,model:kn,thinking:await r.resolveThinkingForPrompt(ue,kn)??e.thinking,permissionMode:e.permission,planMode:Tn,dynamicWorkflowMode:No});return Dt&&(e.goalModeBySession={...e.goalModeBySession,[ue]:!1},A()),e.promptIdBySession={...e.promptIdBySession,[ue]:Vt.promptId},k(ue,dn=>{const lo=dn.findIndex(Xe=>Xe.id===dt);if(lo===-1)return dn;const Yn=[...dn];return Yn[lo]={...Yn[lo],promptId:Yn[lo].promptId??Vt.promptId},Yn}),v()?.bindNextPromptId(ue,Vt.promptId),"ok"}catch(yt){return e.inFlightBySession={...e.inFlightBySession,[ue]:!1},k(ue,Yt=>Yt.some(sn=>sn.id===dt)?Yt.filter(sn=>sn.id!==dt):Yt),l("sendPrompt",yt,{sessionId:ue}),nr(yt)?"rejected":"uncertain"}finally{g2(ue,Ue)}}async function $s(ue,Ce){const Ne=e.activeSessionId;if(Ne){if(a.value!=="idle"||e.inFlightBySession[Ne]){wt(ue,Ce);return}if((e.queuedBySession[Ne]?.length??0)>0){wt(ue,Ce),Lt(Ne);return}await Un(Ne,ue,Ce)}}async function ot(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return;const Ue=e.queuedBySession[Ne]??[],dt=[],yt=[];for(const Vt of Ue){const dn=Vt.text.trim();dn&&dt.push(dn),Vt.attachments?.length&&yt.push(...Vt.attachments)}const Yt=ue.trim();if(Yt&&dt.push(Yt),Ce?.length&&yt.push(...Ce),dt.length===0&&yt.length===0)return;Ue.length>0&&(e.queuedBySession={...e.queuedBySession,[Ne]:[]});const sn=dt.join(` + +`),Qn=()=>{if(Ue.length===0)return;const Vt=e.queuedBySession[Ne]??[];e.queuedBySession={...e.queuedBySession,[Ne]:[...Ue,...Vt]}};if(a.value==="idle"&&!e.inFlightBySession[Ne]){await Un(Ne,sn,yt)==="rejected"&&Qn();return}const kn=[];sn&&kn.push({type:"text",text:sn});for(const Vt of yt)Vt.kind==="video"?kn.push({type:"video",source:{kind:"file",fileId:Vt.fileId}}):Vt.kind==="file"?kn.push({type:"file",fileId:Vt.fileId,name:Vt.name??"",mediaType:Vt.mediaType||"application/octet-stream",size:Vt.size??0}):kn.push({type:"image",source:{kind:"file",fileId:Vt.fileId}});const Tn=w(),No={id:Tn,sessionId:Ne,role:"user",content:kn,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(Ne,Vt=>[...Vt,No]);const Dt=m2(Ne);try{const Vt=St(),dn=e.sessions.find(Xe=>Xe.id===Ne),lo=(dn?.model&&dn.model.length>0?dn.model:e.defaultModel)??void 0,Yn=await Vt.submitPrompt(Ne,{content:kn,model:lo,thinking:await r.resolveThinkingForPrompt(Ne,lo)??e.thinking,permissionMode:e.permission,planMode:e.planModeBySession[Ne]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[Ne]??!1});if(k(Ne,Xe=>{const ge=Xe.findIndex(un=>un.id===Tn);if(ge===-1)return Xe;const Le=[...Xe];return Le[ge]={...Le[ge],promptId:Le[ge].promptId??Yn.promptId},Le}),Yn.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[Ne]:Yn.promptId},v()?.bindNextPromptId(Ne,Yn.promptId);return}try{await Vt.steerPrompts(Ne,[Yn.promptId])}catch{}}catch(Vt){k(Ne,dn=>dn.filter(lo=>lo.id!==Tn)),nr(Vt)&&Qn(),l("steer",Vt,{sessionId:Ne})}finally{g2(Ne,Dt)}}async function Ae(ue,Ce){try{const Ue=await St().uploadFile({file:ue,name:Ce});return{fileId:Ue.id,name:Ue.name,mediaType:Ue.mediaType}}catch(Ne){return l("uploadImage",Ne),null}}function wt(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return;const Ue=e.queuedBySession[Ne]??[],dt={text:ue,attachments:Ce,id:SCe()};e.queuedBySession={...e.queuedBySession,[Ne]:[...Ue,dt]}}function Lt(ue){const[Ce,...Ne]=e.queuedBySession[ue]??[];Ce!==void 0&&(e.queuedBySession={...e.queuedBySession,[ue]:Ne},Un(ue,Ce.text,Ce.attachments).then(Ue=>{if(Ue==="ok"){vu.delete(ue);return}if(Ue==="uncertain"){vu.delete(ue);return}if(!e.sessions.some(Qn=>Qn.id===ue)){vu.delete(ue);return}const dt=Ce.id??Ce.text,yt=vu.get(ue),Yt=yt!==void 0&&yt.key===dt?yt.count+1:1;if(Yt>=_Ce){vu.delete(ue),(e.queuedBySession[ue]?.length??0)>0&&Lt(ue);return}vu.set(ue,{key:dt,count:Yt});const sn=e.queuedBySession[ue]??[];e.queuedBySession={...e.queuedBySession,[ue]:[Ce,...sn]}}))}function Qt(ue,Ce){const Ne=e.inFlightBySession[ue]===!0;if(e.inFlightBySession={...e.inFlightBySession,[ue]:!1},e.promptIdBySession[ue]!==void 0){const dt={...e.promptIdBySession};delete dt[ue],e.promptIdBySession=dt}return ue===e.activeSessionId&&Y(),(Ne||Ce?.turnWasActive===!0||(e.turnActiveBySession[ue]??!1))&&Lt(ue),Ne}function _o(ue,Ce){Ce.inFlightTurn!==null&&Ce.busy||Qt(ue)}async function Zn(){const ue=e.activeSessionId;if(!ue)return;const Ce=e.sessions.find(dt=>dt.id===ue);let Ne=e.promptIdBySession[ue];if(Ne===void 0){const dt=Ce?.currentPromptId;dt!==void 0&&dt.length>0&&!dt.startsWith("pr_")&&(Ne=dt)}const Ue=St();if(Ne!==void 0)try{if((await Ue.abortPrompt(ue,Ne)).aborted)return;const yt={...e.promptIdBySession};delete yt[ue],e.promptIdBySession=yt}catch(dt){if(nr(dt)&&dt.code===gCe){const yt={...e.promptIdBySession};delete yt[ue],e.promptIdBySession=yt}else{l("abortCurrentPrompt",dt,{sessionId:ue});return}}try{await Ue.abortSession(ue)}catch(dt){l("abortCurrentPrompt",dt,{sessionId:ue})}}function Xn(ue,Ce){const Ne=e.approvalsBySession[ue]??[];e.approvalsBySession={...e.approvalsBySession,[ue]:Ne.filter(Ue=>Ue.approvalId!==Ce)}}function io(ue,Ce){const Ne=e.questionsBySession[ue]??[];e.questionsBySession={...e.questionsBySession,[ue]:Ne.filter(Ue=>Ue.questionId!==Ce)}}async function ro(ue,Ce){const Ne=e.activeSessionId;if(Ne&&!Um[ue]){Um[ue]=!0;try{const Ue=St(),dt={decision:Ce.decision,scope:Ce.scope,feedback:Ce.feedback,selectedLabel:Ce.selectedLabel};await Ue.respondApproval(Ne,ue,dt),Xn(Ne,ue)}catch(Ue){Mk(Ue)?Xn(Ne,ue):l("respondApproval",Ue,{sessionId:Ne})}finally{delete Um[ue]}}}async function ys(ue,Ce){const Ne=e.activeSessionId;if(Ne&&!hu[ue]){hu[ue]="answer";try{await St().respondQuestion(Ne,ue,Ce),io(Ne,ue)}catch(Ue){Mk(Ue)?io(Ne,ue):l("respondQuestion",Ue,{sessionId:Ne})}finally{delete hu[ue]}}}async function Ti(ue){const Ce=e.activeSessionId;if(Ce&&!hu[ue]){hu[ue]="dismiss";try{await St().dismissQuestion(Ce,ue),io(Ce,ue)}catch(Ne){Mk(Ne)?io(Ce,ue):l("dismissQuestion",Ne,{sessionId:Ce})}finally{delete hu[ue]}}}async function Ns(ue){const Ce=e.activeSessionId;if(Ce&&!Ek[ue]){Ek[ue]=!0;try{const Ne=St(),Ue=(e.tasksBySession[Ce]??[]).find(yt=>yt.id===ue)?.backgroundTaskId;await Ne.cancelTask(Ce,Ue??ue);const dt=e.tasksBySession[Ce]??[];e.tasksBySession={...e.tasksBySession,[Ce]:dt.map(yt=>yt.id===ue?{...yt,status:"cancelled"}:yt)}}catch(Ne){wCe(Ne)||l("cancelTask",Ne,{sessionId:Ce})}finally{delete Ek[ue]}}}function Us(ue){const Ce=e.activeSessionId;Ce?(e.planModeBySession={...e.planModeBySession,[Ce]:ue},B(),$({planMode:ue})):L.planMode=ue}function Vs(){const ue=e.activeSessionId,Ce=ue?e.planModeBySession[ue]??!1:L.planMode;Us(!Ce)}function li(ue){const Ce=e.activeSessionId;Ce?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[Ce]:ue},z(),$({dynamicWorkflowMode:ue})):L.dynamicWorkflowMode=ue}async function ss(){const ue=e.activeSessionId,Ne=!(ue?e.dynamicWorkflowModeBySession[ue]??!1:L.dynamicWorkflowMode);Ne&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||li(Ne)}function ai(ue){const Ce=e.activeSessionId;Ce?(e.goalModeBySession={...e.goalModeBySession,[Ce]:ue},A()):L.goalMode=ue}function ui(){const ue=e.activeSessionId,Ce=ue?e.goalModeBySession[ue]??!1:L.goalMode;ai(!Ce)}async function Cn(ue){const Ce=ue.trim();if(!Ce||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:Ce}),variant:"primary"}))return;let Ne=e.activeSessionId;if(!Ne){const Ue=e.activeWorkspaceId,dt=Ue&&R.value.some(yt=>yt.id===Ue)?Ue:R.value[0]?.id??null;if(!dt)return;try{Ne=await Je(dt)??void 0}catch(yt){l("createGoal",yt);return}if(!Ne)return}try{await St().updateSession(Ne,{goalObjective:Ce})}catch(Ue){l("createGoal",Ue,{sessionId:Ne,message:Q(Ue)});return}e.goalModeBySession[Ne]&&(e.goalModeBySession={...e.goalModeBySession,[Ne]:!1},A()),e.activeSessionId===Ne?await $s(Ce):await Un(Ne,Ce)}function Ls(ue){const Ce=e.activeSessionId;Ce&&Promise.resolve(St().updateSession(Ce,{goalControl:ue})).catch(Ne=>{l("controlGoal",Ne,{sessionId:Ce,message:Q(Ne)})})}function Fn(ue){e.permission=ue,D(ue),$({permissionMode:ue})}function Io(ue){const Ce=[...e.warnings];Ce.splice(ue,1),e.warnings=Ce}async function Ho(ue,Ce){try{await St().updateSession(ue,{title:Ce}),d(ue,Ue=>({...Ue,title:Ce}))}catch(Ne){l("renameSession",Ne,{sessionId:ue})}}async function Fs(ue){try{const Ne=await St().generateSessionTitle(ue,{force:!0,source:"digest"});return Ne.title.length>0?Ne.title:null}catch(Ce){return console.warn("[pythinker-web] generateSessionTitle failed for",ue,Ce),null}}async function qs(ue,Ce){const Ne=e.workspaces.find(dt=>dt.id===ue)?.root,Ue=()=>{e.workspaces=e.workspaces.map(dt=>dt.id===ue?{...dt,name:Ce}:dt)};try{if(await St().updateWorkspace(ue,{name:Ce}),Ne!==void 0){const dt=um();Ne in dt&&(delete dt[Ne],t4(dt))}Ue()}catch(dt){if(Ne!==void 0&&nr(dt)&&dt.code===vCe){t4({...um(),[Ne]:Ce}),Ue();return}l("renameWorkspace",dt)}}async function Ii(ue){const Ce=e.workspaces.find(yt=>yt.id===ue)?.root??F.value.find(yt=>yt.id===ue)?.root??ue,Ne=e.activeSessionId?e.sessions.find(yt=>yt.id===e.activeSessionId):void 0,Ue=e.activeWorkspaceId===ue||e.activeWorkspaceId===Ce,dt=!!(Ne&&(Ne.cwd===Ce||Ne.workspaceId===ue||M(Ne)===ue));Ce&&!e.hiddenWorkspaceRoots.includes(Ce)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ce],re(e.hiddenWorkspaceRoots));try{await St().deleteWorkspace(ue)}catch(yt){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",ue,yt)}if(e.workspaces=e.workspaces.filter(yt=>yt.id!==ue&&yt.root!==Ce),Ue||dt){const yt=R.value[0]?.id??null;if(e.activeWorkspaceId=yt,yt)j(yt);else try{Hu(rn.activeWorkspace)}catch{}}(Ue||dt)&&(m(void 0),e.sessionLoading=!1,ne(),Zt(void 0,"replace"))}async function cs(ue){try{await St().archiveSession(ue),h(ue),i.clearSideChatForSession(ue);const{[ue]:Ne,...Ue}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=Ue,e.activeSessionId===ue){const dt=e.sessions[0];dt?await vo(dt.id,{urlMode:"replace"}):(m(void 0),Zt(void 0,"replace"))}}catch(Ce){l("archiveSession",Ce,{sessionId:ue})}}async function Po(ue){if(xe)return!1;const Ce=ue??e.activeSessionId;if(!Ce){const Ue=n("commands.export.noSession");return Go("export:failed",{status:"no-session"}),l("exportSession",new Error(Ue),{message:Ue}),!1}xe=!0;const Ne=Date.now();Go("export:start",{sessionId:Ce});try{const Ue=Zye(),{blob:dt,fileName:yt}=await St().exportSession(Ce,Ue);if(typeof document>"u")throw new Error("Document is unavailable");const Yt=URL.createObjectURL(dt);let sn;try{sn=document.createElement("a"),sn.href=Yt,sn.download=yt,document.body.append(sn),sn.click()}finally{sn?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(Yt)}catch{}},0)}return Go("export:accepted",{sessionId:Ce,status:"accepted",zipBytes:dt.size,durationMs:Date.now()-Ne}),!0}catch(Ue){const dt=typeof Ue=="object"&&Ue!==null?Ue:void 0;return Go("export:failed",{sessionId:Ce,status:"failed",durationMs:Date.now()-Ne,errorName:typeof dt?.name=="string"?dt.name:typeof Ue,errorCode:typeof dt?.code=="number"?dt.code:void 0,requestId:typeof dt?.requestId=="string"?dt.requestId:void 0,phase:typeof dt?.phase=="string"?dt.phase:void 0,httpStatus:typeof dt?.status=="number"?dt.status:void 0}),l("exportSession",Ue,{sessionId:Ce}),!1}finally{xe=!1}}async function ln(ue){try{const Ce=await St().restoreSession(ue);return f(Ce),!0}catch(Ce){return l("restoreSession",Ce,{sessionId:ue}),!1}}function Os(ue){return St().listSessions({archivedOnly:!0,beforeId:ue?.beforeId,pageSize:ue?.pageSize??50})}async function ds(){try{await St().logout(),await Z(),await Mt()}catch(ue){l("logout",ue)}}function jo(ue){const Ce=e.activeSessionId;Ce&&St().compactSession(Ce,ue).catch(Ne=>{l("compact",Ne,{sessionId:Ce})})}async function Ks(ue){const Ce=ue??e.activeSessionId;if(Ce)try{const Ne=await St().forkSession(Ce);f(Ne),await vo(Ne.id)}catch(Ne){l("fork",Ne,{sessionId:Ce})}}async function $i(ue=1){const Ce=e.activeSessionId;if(!Ce)return null;const Ne=(()=>{const Ue=e.messagesBySession[Ce]??[];for(let dt=Ue.length-1;dt>=0;dt--){const yt=Ue[dt];if(yt.role==="user"&&!(yt.metadata?.origin&&yt.metadata.origin.kind!=="user"))return yt.content.filter(Yt=>Yt.type==="text").map(Yt=>Yt.text).join(` +`)}return null})();try{return await St().undoSession(Ce,ue),await y(Ce),Ne}catch(Ue){return l("undo",Ue,{sessionId:Ce}),null}}function ks(ue){const Ce=e.activeSessionId;if(!Ce)return;const Ne=e.queuedBySession[Ce]??[];if(ue<0||ue>=Ne.length)return;const Ue=[...Ne];Ue.splice(ue,1),e.queuedBySession={...e.queuedBySession,[Ce]:Ue}}function Nn(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return;const Ue=e.queuedBySession[Ne]??[];if(ue===Ce||ue<0||ue>=Ue.length||Ce<0||Ce>=Ue.length)return;const dt=[...Ue],[yt]=dt.splice(ue,1);yt!==void 0&&(dt.splice(Ce,0,yt),e.queuedBySession={...e.queuedBySession,[Ne]:dt})}async function $o(ue){const Ce=e.activeSessionId;if(!Ce)return[];try{return(await St().listDirectory(Ce,{path:ue,includeGitStatus:!0})).items}catch{return[]}}async function Lr(ue){const Ce=e.activeSessionId;if(!Ce)return null;try{const Ue=await St().readFile(Ce,{path:ue});return{path:Ue.path,content:Ue.content,encoding:Ue.encoding,mime:Ue.mime,languageId:Ue.languageId,isBinary:Ue.isBinary,size:Ue.size,lineCount:Ue.lineCount}}catch(Ne){return console.warn("[pythinker-web] readFileContent failed for",ue,Ne),null}}const Me=10485760;function Ie(ue){const Ce=e.activeSessionId;return Ce?St().getFileDownloadUrl(Ce,ue):null}async function Ve(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return!1;try{return await St().openFile(Ne,{path:ue,line:Ce}),!0}catch(Ue){return l("openFile",Ue,{sessionId:Ne}),!1}}async function an(ue){const Ce=e.activeSessionId;if(!Ce)return;const Ne=P.value.cwd||".";try{await St().openInApp(Ce,ue,Ne)}catch(Ue){l("openInApp",Ue,{sessionId:Ce})}}async function gn(ue){const Ce=e.activeSessionId;if(!Ce)return!1;try{return await St().revealFile(Ce,{path:ue}),!0}catch(Ne){return l("revealFile",Ne,{sessionId:Ce}),!1}}async function Ln(ue){if(/^(https?:|data:|blob:)/i.test(ue))return ue;const Ce=e.activeSessionId;if(!Ce)return ue;let Ne=ue;if(Ne.startsWith("/")){const Ue=e.sessions.find(dt=>dt.id===Ce)?.cwd;if(Ue&&(Ne===Ue||Ne.startsWith(Ue.endsWith("/")?Ue:`${Ue}/`))){if(Ne=Ne.slice(Ue.length).replace(/^\//,""),!Ne)return ue}else return ue}try{const dt=await St().readFile(Ce,{path:Ne,length:Me});return!dt.isBinary||dt.encoding!=="base64"||dt.truncated?ue:`data:${dt.mime};base64,${dt.content}`}catch{return ue}}async function xn(ue){const Ce=e.sessions.find(Ue=>Ue.id===e.activeSessionId),Ne=Ce===void 0?e.activeWorkspaceId:M(Ce);if(!Ne)return[];try{return(await St().searchFiles(Ne,{query:ue,limit:20})).items.map(yt=>({path:yt.path,name:yt.name}))}catch{return[]}}return{loadFileDiff:ee,clearFileDiff:ne,loadGitStatus:H,checkAuth:Z,loadConfig:fe,updateConfig:de,listAllSessionsGlobal:_e,load:Mt,refreshServerMeta:ft,loadWorkspaces:Tt,loadMoreSessions:Re,loadAllSessions:at,selectWorkspace:Kt,openWorkspace:Qe,upsertWorkspacePreserveOrder:nt,applyWorkspaceEvent:ut,clearActiveSession:Pt,openWorkspaceDraft:Oe,startSessionAndSendPrompt:it,startSessionAndActivateSkill:rt,startSessionAndOpenSideChat:vt,addWorkspaceByPath:Nt,browseFs:on,getFsHome:mn,writeSessionUrl:Zt,fetchSessionIntoList:jn,onSessionRoutePopState:Xt,bindSessionRoute:Wo,selectSession:vo,submitPromptInternal:Un,finishPromptLocal:Qt,localTurnStartState:CCe,isLocalTurnSnapshotCurrent:MCe,afterLocalTurnStartsSettle:ECe,handleSessionSnapshot:_o,sendPrompt:$s,steerPrompt:ot,uploadImage:Ae,enqueue:wt,unqueue:ks,reorderQueue:Nn,abortCurrentPrompt:Zn,respondApproval:ro,respondQuestion:ys,dismissQuestion:Ti,pendingQuestionActions:hu,pendingApprovalActions:Um,cancelTask:Ns,setPlanMode:Us,togglePlanMode:Vs,setDynamicWorkflowMode:li,toggleDynamicWorkflowMode:ss,setGoalMode:ai,toggleGoalMode:ui,createGoal:Cn,controlGoal:Ls,setPermission:Fn,dismissWarning:Io,renameSession:Ho,generateSessionTitle:Fs,renameWorkspace:qs,deleteWorkspace:Ii,archiveSession:cs,exportSession:Po,restoreSession:ln,loadArchivedSessions:Os,logout:ds,compact:jo,forkSession:Ks,undo:$i,listDir:$o,readFileContent:Lr,getFileDownloadUrl:Ie,openWorkspaceFile:Ve,openInApp:an,revealWorkspaceFile:gn,resolveImageUrl:Ln,searchFiles:xn,loadOlderMessages:We,refreshSessionSidecars:he,isStartingFirstPrompt:()=>Hr.size>0}}const q7=rn.starredModels,rM=new Error("profile persist failed");function ICe(){try{const e=zo(q7);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function $Ce(e){try{ts(q7,JSON.stringify(e))}catch{}}function NCe(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:r,updateSessionMessages:l}=t,a=V([]),u=V(ICe()),c=V({}),d=V({}),f=V([]),p=V([]),h=V(null);function m(G){if(!(G==null||G.length===0))return a.value.find(X=>X.id===G)??a.value.find(X=>X.model===G)}function k(){const G=e.activeSessionId?e.sessions.find(te=>te.id===e.activeSessionId):void 0,X=G===void 0?h.value??e.defaultModel:G.model||e.defaultModel;return m(X)?.id??X??void 0}function w(G){if(G===void 0)return;const X=m(G);return X===void 0?void 0:Yp(X)}function v(G,X){const te=G==null?void 0:e.thinkingBySession[G];return te!==void 0&&R_e(X,te)?te:Yp(X)}function y(G,X){if(X===void 0)return;const te=m(X);return te===void 0?void 0:v(G,te)}async function b(G,X){return G!=null&&e.thinkingBySession[G]===void 0&&await o(G),y(G,X)}function S(G){e.thinking=G;const X=e.activeSessionId;return G!==void 0&&X!==null&&X!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[X]:G}),G}Ye([()=>e.activeSessionId,()=>k(),()=>{const G=e.activeSessionId;return G==null?void 0:e.thinkingBySession[G]}],()=>{const G=m(k());G!==void 0&&(e.thinking=v(e.activeSessionId,G))});function I(G){St().setConfig({thinking:P_e(G,m(k())?.supportEfforts)}).catch(X=>n("setConfig",X))}async function T(G){try{const te=await St().listSkills(G);c.value={...c.value,[G]:te}}catch{}}async function $(G){try{const te=await St().listSkillsForWorkspace(G);d.value={...d.value,[G]:te}}catch{}}async function F(){try{const G=St();a.value=await G.listModels();const X=m(k());X!==void 0&&(e.thinking=v(e.activeSessionId,X))}catch(G){n("loadModels",G)}}async function R(){try{const G=St();f.value=await G.listProviders()}catch(G){n("loadProviders",G)}}async function P(){try{const G=St();p.value=await G.listCatalogProviders()}catch(G){n("loadCatalogProviders",G)}}async function M(G){const X=e.activeSessionId,te=m(G),q=e.thinking,me=X?e.sessions.find(he=>he.id===X)?.model:void 0,xe=k()!==(te?.id??G),We=D_e(te,q,xe);if(!X)return h.value=G,e.thinking=We,We!==q&&We!==void 0&&I(We),!0;r(X,he=>({...he,model:G})),We!==q&&(e.thinking=We,We!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[X]:We}));try{await St().updateSession(X,{model:G,thinking:We!==q?We:void 0})}catch(he){return r(X,ee=>({...ee,model:me??ee.model})),We!==q&&(e.thinking=q,q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[X]:q})),n("setModel",he,{sessionId:X}),!1}return We!==q&&We!==void 0&&I(We),await o(X),!0}function D(G){const X=new Set(u.value);X.has(G)?X.delete(G):X.add(G),u.value=Array.from(X),$Ce(u.value)}async function B(G,X,te){const q=te??e.activeSessionId;if(!q)return;const me=i.value==="idle"&&!e.inFlightBySession[q],xe=`msg_skill_opt_${Date.now().toString(36)}`,We=me?m2(q):void 0;if(me){e.inFlightBySession={...e.inFlightBySession,[q]:!0};const he={id:xe,sessionId:q,role:"user",content:[{type:"text",text:`/${G}${X?` ${X}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:G,skillArgs:X}}};l(q,ee=>[...ee,he])}try{const he=e.sessions.find(H=>H.id===q)?.model,ee=(he&&he.length>0?he:e.defaultModel)??void 0;if(!await s({thinking:await b(q,ee)??e.thinking},q))throw rM;await St().activateSkill(q,G,X)}catch(he){me&&(e.inFlightBySession={...e.inFlightBySession,[q]:!1},l(q,ee=>ee.filter(ne=>ne.id!==xe))),he!==rM&&n("activateSkill",he,{sessionId:q})}finally{We!==void 0&&g2(q,We)}}async function z(G){try{await St().importCatalogProvider(G),await Promise.all([R(),F()])}catch(X){n("importCatalogProvider",X)}}async function A(G){try{await St().deleteProvider(G),await Promise.all([R(),F()])}catch(X){n("deleteProvider",X)}}async function L(G){try{const X=await St().refreshProvider(G);for(const te of X.failed)n("refreshProvider",new Error(te.reason),{message:te.provider});await Promise.all([R(),F()])}catch(X){n("refreshProvider",X)}}async function W(){try{const G=await St().refreshAllProviders();for(const X of G.failed)n("refreshAllProviders",new Error(X.reason),{message:X.provider});await Promise.all([R(),F()])}catch(G){n("refreshAllProviders",G)}}async function j(){try{return await St().startOAuthLogin()}catch{return null}}async function re(){try{return await St().pollOAuthLogin()}catch(G){return console.warn("[pythinker-web] pollOAuthLogin failed",G),null}}async function Q(){try{await St().cancelOAuthLogin()}catch{}}function Y(G){const X=S(G);s({thinking:X}),X!==void 0&&I(X)}return{models:a,starredModelIds:u,providers:f,catalogProviders:p,draftModel:h,skillsBySession:c,skillsByWorkspace:d,loadSkillsForSession:T,loadSkillsForWorkspace:$,loadModels:F,loadProviders:R,loadCatalogProviders:P,setModel:M,thinkingLevelForModelId:w,thinkingLevelForSessionId:y,resolveThinkingForPrompt:b,toggleStarModel:D,activateSkill:B,importCatalogProvider:z,addProvider:G=>z({catalogId:G.type,apiKey:G.apiKey,baseUrl:G.baseUrl}),deleteProvider:A,refreshProvider:L,refreshAllProviders:W,startOAuthLogin:j,pollOAuthLogin:re,cancelOAuthLogin:Q,setThinking:Y}}const K7="pythinkerWeb.compaction",LCe=/^read[_-]?media(?:file)?$/i,FCe=/^data:([^;]+);base64,(.*)$/s,OCe=/^<(image|video|audio)\s+path="([^"]+)">$/,RCe=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,PCe=/Mime type:\s*([^.\s]+)/i,DCe=/Size:\s*(\d+)\s*bytes/i,BCe=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,zCe="Image compressed to fit model limits:",WCe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function HCe(e){return e.includes(zCe)?e.replace(WCe,""):e}function jCe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function UCe(e){const t=RCe.exec(e.trim());return t?{kind:t[1],path:jCe(t[2])}:null}const G7=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,VCe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function qCe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return G7.test(o)?o:void 0}const KCe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function GCe(e){const t=KCe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=VCe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&G7.test(o)?o:void 0}}function ZCe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function YCe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function JCe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function XCe(e,t){if(!LCe.test(e))return;const n=YCe(t);if(n===null)return;let o,s,i,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=OCe.exec(p);h&&(s=h[1],o=h[2]);const m=PCe.exec(p);m?.[1]&&(i=m[1]);const k=DCe.exec(p);k?.[1]&&(r=Number(k[1]));const w=BCe.exec(p);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=JCe(d);f&&(a=f)}if(a===null)return;const u=FCe.exec(a.url);return u?.[1]&&(i=u[1]),u?.[2]&&(r=ZCe(u[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function QCe(e){if(e!=null){if(typeof e=="string")return e.split(` +`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` +`));else if(n&&typeof n=="object"){const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` +`)):o.type==="think"&&typeof o.think=="string"?t.push(...o.think.split(` +`)):o.type==="image_url"||o.type==="image"?t.push("[image]"):typeof o.type=="string"?t.push(`[${o.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function e4e(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.subagentPhase??(e.status==="completed"?"completed":e.status==="failed"?"failed":"working"),status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,dynamicWorkflowIndex:e.dynamicWorkflowIndex}}function t4e(e,t){const n=e.split(` +`),o=t.split(` +`),s=[];return n.forEach((i,r)=>{s.push({kind:"rem",gutter:String(r+1),text:`- ${i}`})}),o.forEach((i,r)=>{s.push({kind:"add",gutter:String(r+1),text:`+ ${i}`})}),s}function n4e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:t4e(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const r=i??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:o,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function o4e(e){const t=` +`,n=` +`,o=e.indexOf(t),s=e.lastIndexOf(n);return o>=0&&s>=o+t.length?e.slice(o+t.length,s):s4e(e)}function s4e(e){const t=e.split(` +`);return t.length>=2&&t[0]?.startsWith(""?t.slice(1,-1).join(` +`):e}function i4e(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function r4e(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` +`);return o4e(t)}function l4e(e,t){const n=e.metadata?.origin??{},o=r4e(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function a4e(e,t,n){const{text:o,cron:s}=l4e(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function u4e(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function c4e(e){return e.metadata?.origin?.kind==="compaction_summary"}function d4e(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function f4e(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function p4e(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function h4e(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function o_(e,t,n,o=!0,s={}){const i=[];let r=1;const l=new Map;for(const p of t)l.set(p.toolCallId,p);let a=null;function u(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;my.kind==="tool"&&y.tool.id===w.id);v&&v.kind==="tool"&&(v.tool=w)}i.push({id:h.id,role:"assistant",no:r++,text:h.textParts.join(` +`),thinking:h.thinkingParts.length>0?h.thinkingParts.join(` +`):void 0,tools:h.tools.length>0?h.tools:void 0,blocks:h.blocks.length>0?h.blocks:void 0,approval:h.approval,approvalId:h.approvalId,durationMs:h.durationMs})}function c(p,h){for(const m of h)if(m.type==="text"){if(m.text){p.textParts.push(m.text);const k=p.blocks.at(-1);k&&k.kind==="text"?k.text+=` +`+m.text:p.blocks.push({kind:"text",text:m.text})}}else if(m.type==="thinking"){if(m.thinking){p.thinkingParts.push(m.thinking);const k=p.blocks.at(-1);k&&k.kind==="thinking"?k.thinking+=` +`+m.thinking:p.blocks.push({kind:"thinking",thinking:m.thinking})}}else if(m.type==="toolUse"){const k=l.get(m.toolCallId),w={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(w),p.blocks.push({kind:"tool",tool:w}),k&&(p.approval=n4e(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(w=>w.id===m.toolCallId);if(k!==-1){const w=p.tools[k],v={...w,status:m.isError?"error":"ok",output:QCe(m.output),media:m.isError?void 0:XCe(w.name,m.output)};v.name==="ExitPlanMode"&&!v.planPath&&(v.planPath=f4e(v.output)),p.tools[k]=v;const y=p.blocks.find(b=>b.kind==="tool"&&b.tool.id===m.toolCallId);y&&y.kind==="tool"&&(y.tool=v)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(b=>b.id===m.toolCallId);if(k===-1)continue;const w=p.tools[k];if(w.output!==void 0)continue;const v={...w,output:m.outputLines};p.tools[k]=v;const y=p.blocks.find(b=>b.kind==="tool"&&b.tool.id===m.toolCallId);y&&y.kind==="tool"&&(y.tool=v)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(c4e(p)){u();const v=p.metadata?.[K7];i.push({id:p.id,role:"compaction",no:r,text:p.content.filter(y=>y.type==="text").map(y=>y.text).join(` +`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}});continue}if(p.role==="user"){const v=i4e(p);if(u(),v!==void 0){i.push(a4e(p,r++,v));continue}if(!u4e(p))continue;const y=p.metadata?.origin,b=y?.kind==="skill_activation"&&y?.trigger==="user-slash",S=y?.kind==="plugin_command"&&y?.trigger==="user-slash",I=[],T=[];for(const $ of p.content){if($.type==="text")if(b)I.push(y.skillArgs??"");else if(S)I.push(y.commandArgs??"");else{const R=UCe($.text);if(R&&(R.kind==="video"||R.kind==="image")&&n){const D=qCe(R.path);if(D){T.push({url:n(D),kind:R.kind,fileId:D});continue}}const P=GCe($.text);if(P){T.push({kind:"file",url:P.fileId&&n?n(P.fileId):"",fileId:P.fileId,name:P.name,mediaType:P.mediaType,size:P.size});continue}const M=HCe($.text);if(M!==$.text&&M.trim().length===0)continue;I.push(M)}const F=f($);if(F){T.push({url:F.url,kind:F.kind,name:$.type==="file"?$.name:void 0,fileId:F.fileId});continue}$.type==="file"&&n&&T.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}i.push({id:p.id,role:"user",no:r++,text:I.join(` +`),attachments:T.length>0?T:void 0,skillActivation:b?{name:y.skillName,args:y.skillArgs}:void 0,pluginCommand:S?{pluginId:y.pluginId,commandName:y.commandName,args:y.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&c(a,p.content);continue}const h=p.promptId;d4e(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(u(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const w=p4e(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(v=>h4e(v,w))){d(k,p.content);continue}k.foldedSigs.push(w),c(k,p.content)}return u(!0),i}function m4e(e,t){const{pushOperationFailure:n,nextOptimisticMsgId:o,connectEventsIfNeeded:s,getEventConn:i,resolveThinkingForPrompt:r}=t,l=V({}),a=O(()=>{const R=e.activeSessionId;if(!R)return null;const P=l.value[R];return P?{parentId:R,agentId:P.agentId}:null}),u=O(()=>a.value?.parentId??null),c=O(()=>a.value!==null),d=O(()=>{const R=a.value;return R?!!e.sideChatSendingByAgent[R.agentId]:!1}),f=O(()=>{const R=a.value;return R?e.sideChatSendingByAgent[R.agentId]?!0:(e.tasksBySession[R.parentId]??[]).some(P=>P.id===R.agentId&&P.status==="running"):!1}),p=O(()=>{const R=a.value;if(!R)return[];const P=e.sideChatMessagesByAgent[R.agentId]??[];return o_(P,[],M=>St().getFileUrl(M),f.value)});function h(R,P){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[R]:P(e.sideChatMessagesByAgent[R]??[])}}function m(R,P){h(R,M=>[...M,P])}function k(R){h(R,P=>{const M=[...P].reverse().findIndex(B=>B.role==="user");if(M===-1)return P;const D=P.length-1-M;return P.filter((B,z)=>z!==D)})}function w(R,P){h(R,M=>{const D=[...M];for(let B=D.length-1;B>=0;B-=1){const z=D[B];if(z.role==="user")return D[B]={...z,promptId:z.promptId??P},D}return M})}function v(R,P,M){M&&h(R,D=>{const B=D.at(-1);if(B?.role==="assistant"){const z=B.content[0],A=z?.type==="text"?z.text:"";return[...D.slice(0,-1),{...B,content:[{type:"text",text:`${A}${M}`}]}]}return[...D,{id:o(),sessionId:P,role:"assistant",content:[{type:"text",text:M}],createdAt:new Date().toISOString()}]})}function y(R,P,M){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[R]:!1},!M)return;const B=(e.sideChatMessagesByAgent[R]??[]).at(-1);(B?.role==="assistant"&&B.content[0]?.type==="text"?B.content[0].text:"").trim().length>0||v(R,P,M)}async function b(R){const P=e.activeSessionId;P&&await S(P,R)}async function S(R,P){if(!l.value[R]){let M;try{({agentId:M}=await St().startBtw(R))}catch(D){n("openSideChat",D,{sessionId:R});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[M]:e.sideChatMessagesByAgent[M]??[]},l.value={...l.value,[R]:{agentId:M}},s(),i()?.markSideChannelAgent(M)}P&&P.trim()&&await I(R,P.trim())}async function I(R,P){const M=l.value[R],D=P.trim();if(!M||!D)return;const B=R,z=M.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[z]:!0};const A={id:o(),sessionId:B,role:"user",content:[{type:"text",text:D}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(z,A);try{const L=e.sessions.find(re=>re.id===B),W=(L?.model&&L.model.length>0?L.model:e.defaultModel)??void 0,j=await St().submitPrompt(B,{content:[{type:"text",text:D}],agentId:z,model:W,thinking:await r(B,W)??e.thinking,permissionMode:e.permission,planMode:e.planModeBySession[B]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[B]??!1});w(z,j.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[B]:[...e.sideChatUserMessageIdsBySession[B]??[],j.userMessageId]}}catch(L){n("sendSideChatPrompt",L,{sessionId:B}),k(z),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[z]:!1}}}function T(){const R=e.activeSessionId;if(!R)return;const{[R]:P,...M}=l.value;l.value=M}async function $(R){const P=a.value;P&&await I(P.parentId,R)}function F(R){if(!l.value[R])return;const{[R]:P,...M}=l.value;l.value=M}return{sideChatTargetBySession:l,sideChatSessionId:u,sideChatVisible:c,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:v,finishSideChatAgent:y,openSideChat:b,openSideChatOn:S,closeSideChat:T,sendSideChatPrompt:$,clearSideChatForSession:F}}const lM=20;class g4e{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new yme(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:lM}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:lM});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:v4e(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function v4e(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=Khe(s);n.has(i)||(n.add(i),o.push(s))}return o}function aM(e,t){return`${e}\0${t}`}function y4e(e){const t=new Map,n=new Map,o=new Map;function s(c){c.version.value+=1}function i(c,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(c,d,f),o.set(c,d))}function r(c,d){const f=aM(c,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new g4e(c,d,k=>e.api.getSessionTranscript(c,{...k,agentId:d}),()=>s(h),()=>void l(h)),version:Co(0)},t.set(f,h),h}async function l(c){try{await c.channel.refresh(),n.get(c.channel.sessionId)===c.channel.agentId&&i(c.channel.sessionId,c.channel.agentId,c.channel.seq)}catch{n.get(c.channel.sessionId)===c.channel.agentId&&i(c.channel.sessionId,c.channel.agentId)}}function a(c,d){e.connectEventsIfNeeded(),n.set(c,d);const f=r(c,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(c,d,f.channel.seq):l(f),f}function u(c,d){if(n.get(c)!==d)return;n.delete(c);const f=o.get(c);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(c,[f]),o.delete(c))}return{getEntry(c,d){return t.get(aM(c,d))},activate:a,deactivate:u,receiveReset(c,d,f,p){if(n.get(c)!==d)return;r(c,d).channel.receiveReset(f,p)},applyOps(c,d,f,p){return n.get(c)!==d?!0:r(c,d).channel.applyOps(f,p)},forgetSession(c){const d=n.get(c);d!==void 0&&u(c,d);for(const f of t.keys())f.startsWith(`${c}\0`)&&t.delete(f)}}}const k4e="pythinkerWeb.optimisticUserMessage",uM="Sub Agent";function b4e(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function w4e(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function x4e(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Tk(e){return e.role==="user"&&e.metadata?.[k4e]===!0}function _4e(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function S4e(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function C4e(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const A4e=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function cM(e){let t="",n=0;for(const o of e.content)o.type==="text"?A4e.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function M4e(e,t){const n=cM(e),o=cM(t);return n.text===o.text&&n.media===o.media}function E4e(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Tk(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Tk(s)&&S4e(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Tk(s)&&M4e(s,t))return o}return-1}function T4e(e,t,n){let o=!1;const s=e.map(i=>{let r=!1;const l=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(o=!0,{...i,content:l}):i});return o?s:e}const I4e={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function $4e(e){const t=fo.global.t,n=[],o=(r,l)=>{typeof l=="number"||typeof l=="boolean"?n.push({label:r,value:String(l)}):typeof l=="string"&&l.length>0&&n.push({label:r,value:l})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||o(r,l);const i=(e.code!==void 0?I4e[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function N4e(e,t,n){const o=w4e(e);switch(x4e(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:r,...l}=o.compactionBySession;if(o.compactionBySession=l,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],u=`compaction_${s}_${n.seq}`;if(!a.some(c=>c.id===u)){const c={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:u,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[K7]:c}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const r=o.messagesBySession[s]??[];if(!r.some(a=>a.id===t.message.id||C4e(a,t.message))){if(t.message.role==="user"&&!_4e(t.message)){const a=E4e(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,metadata:{...t.message.metadata,...c.metadata}},o.messagesBySession[s]=u;break}}o.messagesBySession[s]=[...r,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(r=>r.id!==t.messageId?r:{...r,content:t.content,durationMs:t.durationMs??r.durationMs});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(r=>{if(r.id!==t.messageId)return r;const l=[...r.content],a=t.contentIndex;for(;l.length<=a;)l.push({type:"text",text:""});const u=l[a];let c;return t.delta.text!==void 0?u.type==="text"?c={type:"text",text:u.text+t.delta.text}:c={type:"text",text:t.delta.text}:t.delta.thinking!==void 0?u.type==="thinking"?c={type:"thinking",thinking:u.thinking+t.delta.thinking,signature:u.signature}:c={type:"thinking",thinking:t.delta.thinking}:c=u,l[a]=c,{...r,content:l}});break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=T4e(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const l=t.approval.display;l?.kind==="plan_review"&&typeof l.plan=="string"&&l.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:l.plan,path:typeof l.path=="string"?l.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,r=o.approvalsBySession[s]??[];o.approvalsBySession[s]=r.filter(l=>l.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(l=>l.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,r=o.questionsBySession[s]??[];o.questionsBySession[s]=r.filter(l=>l.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],r=i.findIndex(l=>l.id===t.task.id);if(r===-1)o.tasksBySession[s]=[...i,t.task];else{const l=[...i],a=i[r],u=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued";l[r]={...t.task,outputLines:u?t.task.outputLines:a.outputLines,text:u?t.task.text:a.text,description:t.task.description===uM&&a.description!==uM?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=l}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(r=>{if(r.id!==t.taskId)return r;if(r.kind==="subagent"&&t.kind==="text")return{...r,text:(r.text??"")+t.outputChunk};const l=r.outputLines??[];if(l.at(-1)===t.outputChunk)return r;const a=[...l,t.outputChunk];return{...r,outputLines:r.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(r=>r.id!==t.taskId?r:{...r,status:t.status,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,$4e(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${fo.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function L4e(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function F4e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||Hs(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const r=i?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:L4e(a.status)}]:[]})}}return[]}const O4e=["queued","working","suspended","completed","failed","cancelled"];function Z7(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function R4e(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function P4e(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,phase:Z7(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((r,l)=>r.dynamicWorkflowIndex-l.dynamicWorkflowIndex||r.id.localeCompare(l.id)),i=R4e();for(const r of s)i[r.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function D4e(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of O4e)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function B4e(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,phase:Z7(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const yl=Kx(),qr=eCe(),Xp=aCe(),Y7=rn.permission,J7=rn.activeWorkspace,X7=rn.planMode,Q7=rn.planArmed,eN=rn.dynamicWorkflowMode,tN=rn.goalMode,dM=40401,nN=rn.onboarded;Hu(rn.codeFont);Hu(rn.theme);Hu(rn.thinking);function z4e(){try{const e=zo(Y7);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function W4e(e){try{ts(Y7,e)}catch{}}function Vm(e){const t=zo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function H0(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);ts(e,JSON.stringify(n))}catch{}}function oN(){H0(X7,Ee.planModeBySession)}function H4e(){H0(Q7,Ee.planArmedBySession)}function sN(){H0(eN,Ee.dynamicWorkflowModeBySession)}function iN(){H0(tN,Ee.goalModeBySession)}function j4e(){try{return zo(J7)}catch{return null}}const rN=rn.hiddenWorkspaces;function U4e(){try{const e=zo(rN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function V4e(e){try{ts(rN,JSON.stringify(e))}catch{}}function q4e(e){try{ts(J7,e)}catch{}}function K4e(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const Ee=Ms({...b4e(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",workspaceName:"pythinker-web",connection:"disconnected",permission:z4e(),thinking:void 0,thinkingBySession:{},planModeBySession:Vm(X7),planArmedBySession:Vm(Q7),dynamicWorkflowModeBySession:Vm(eN),goalModeBySession:Vm(tN),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:iw(),authReady:!1,defaultModel:null,managedProviderStatus:null,workspaces:[],activeWorkspaceId:j4e(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:U4e(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),bh=Ms({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function lN(e){Ee.sessions=e}function j0(e,t){Ee.sessions=Ee.sessions.map(n=>n.id===e?t(n):n)}function G4e(e){Ee.sessions=[e,...Ee.sessions.filter(t=>t.id!==e.id)]}function Z4e(e){Ee.sessions=[...Ee.sessions,e]}function Y4e(e){Ee.sessions=Ee.sessions.filter(t=>t.id!==e)}function aN(){const e=Ee.activeSessionId;e&&Ee.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Ee.unreadBySession={...Ee.unreadBySession,[e]:!1},rw({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===rn.unread&&(Ee.unreadBySession=iw(),aN())});function v2(){if(Hi===null||!Hi.health().stale)return;Go("ws:stale-reconnect",{sessionId:Ee.activeSessionId,status:"stale"}),wl("ws: stale socket on focus, reconnecting",{activeSessionId:Ee.activeSessionId}),Hi.reconnect();const e=Ee.activeSessionId;e&&z1.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(aN(),v2())});typeof window<"u"&&(window.addEventListener("focus",v2),window.addEventListener("online",v2));function s_(e){Ee.activeSessionId=e}function J4e(e){Ee.messagesBySession=e}function X4e(e,t){Ee.messagesBySession={...Ee.messagesBySession,[e]:t}}function uN(e,t){Ee.messagesBySession={...Ee.messagesBySession,[e]:t(Ee.messagesBySession[e]??[])}}function Q4e(e){const{[e]:t,...n}=Ee.messagesBySession;Ee.messagesBySession=n}function cN(e){Hi?.unsubscribe(e),_3e(e),D1.discard(({meta:t})=>t.sessionId===e),Y4e(e),Q4e(e),delete Ee.approvalsBySession[e],delete Ee.questionsBySession[e],delete Ee.tasksBySession[e],delete Ee.goalBySession[e],delete Ee.gitStatusBySession[e],delete Ee.lastSeqBySession[e],delete Ee.compactionBySession[e],delete Ee.messagesLoadingMoreBySession[e],delete Ee.messagesHasMoreBySession[e],delete Ee.messagesLoadMoreErrorBySession[e],delete k2[e],B1.delete(e),kg.delete(e),wN.delete(e),ACe(e),delete Ee.queuedBySession[e],delete Ee.promptIdBySession[e],delete Ee.inFlightBySession[e],delete Ee.turnActiveBySession[e],delete Ee.planModeBySession[e],delete Ee.planArmedBySession[e],delete Ee.dynamicWorkflowModeBySession[e],delete Ee.goalModeBySession[e],delete Ee.thinkingBySession[e],oN(),H4e(),sN(),iN()}const dN=V(null),fN=V([]),pN=V(!1),hN=V(!1),mN=V(null);async function wh(e){let t;try{t=await St().getSessionStatus(e)}catch{return}j0(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),Ee.dynamicWorkflowModeBySession={...Ee.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},Ee.planModeBySession={...Ee.planModeBySession,[e]:t.planMode},t.thinkingEffort.length>0&&(Ee.thinkingBySession={...Ee.thinkingBySession,[e]:t.thinkingEffort})}async function e3e(e){const t=Ee.goalVersionBySession[e]??0;let n;try{n=await St().getSessionGoal(e)}catch{return}if((Ee.goalVersionBySession[e]??0)!==t)return;const o={...Ee.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,Ee.goalBySession=o}function gN(e,t){const n=t??Ee.activeSessionId;return n?Promise.resolve(St().updateSession(n,e)).then(()=>wh(n)).then(()=>!0).catch(o=>(ec("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const vN=rn.conversationToc;function t3e(){try{const e=zo(vN);return e===null?!0:e==="true"}catch{return!0}}function n3e(e){try{ts(vN,e?"true":"false")}catch{}}const yN=V(t3e());function o3e(e){yN.value=e,n3e(e)}function s3e(e){try{return zo(e)??""}catch{return""}}const kN=V(s3e(nN)==="1");function i3e(e){kN.value=e;try{ts(nN,e?"1":"0")}catch{}}let Hi=null;const y2=y4e({api:St(),connectEventsIfNeeded:i_,getEventConnection:()=>Hi});let fM=0;function bN(){return fM+=1,`msg_opt_${Date.now().toString(36)}_${fM}`}function r3e(e,t,n){const o={sessions:Ee.sessions,activeSessionId:Ee.activeSessionId,messagesBySession:Ee.messagesBySession,approvalsBySession:Ee.approvalsBySession,planReviewByToolCallId:Ee.planReviewByToolCallId,questionsBySession:Ee.questionsBySession,tasksBySession:Ee.tasksBySession,goalBySession:Ee.goalBySession,goalVersionBySession:Ee.goalVersionBySession,lastSeqBySession:Ee.lastSeqBySession,turnActiveBySession:Ee.turnActiveBySession,compactionBySession:Ee.compactionBySession,config:Ee.config,warnings:Ee.warnings},s=N4e(o,e,{sessionId:t,seq:n});lN(s.sessions),s_(s.activeSessionId),J4e(s.messagesBySession),Ee.approvalsBySession=s.approvalsBySession,Ee.planReviewByToolCallId=s.planReviewByToolCallId,Ee.questionsBySession=s.questionsBySession,Ee.tasksBySession=s.tasksBySession,Ee.goalBySession=s.goalBySession,Ee.goalVersionBySession=s.goalVersionBySession,Ee.lastSeqBySession=s.lastSeqBySession,Ee.turnActiveBySession=s.turnActiveBySession,Ee.compactionBySession=s.compactionBySession,Ee.config=s.config??null,Ee.warnings=s.warnings,e.type==="configChanged"&&(Ee.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(ao.loadModels(),ao.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(Ee.dynamicWorkflowModeBySession={...Ee.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(Ee.planModeBySession={...Ee.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(Ee.thinkingBySession={...Ee.thinkingBySession,[e.sessionId]:e.thinking}))}function l3e(e,t){const n=Ee.lastSeqBySession[t.sessionId]??0,o=Ee.turnActiveBySession[t.sessionId]??!1;r3e(e,t.sessionId,t.seq);const s=Xs.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,r=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Xs.appendSideChatAssistantText(i,r,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Xs.finishSideChatAgent(i,r):e.type==="taskProgress"&&e.taskId===i?Xs.appendSideChatAssistantText(i,r,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Xs.finishSideChatAgent(i,r,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;Ee.promptIdBySession[i]!==e.message.promptId&&(Ee.promptIdBySession={...Ee.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===Ee.activeSessionId&&yl.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;HAe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&WAe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Ee.promptIdBySession[e.sessionId]===e.promptId&&Ot.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&jAe(e.sessionId,e.question),e.type==="approvalRequested"&&UAe(e.sessionId,e.approval)}const D1=wSe(({appEvent:e,meta:t})=>l3e(e,t),({appEvent:e})=>vSe(e),{coalesce:_Se});function i_(){if(Hi!==null||typeof WebSocket>"u")return;Go("ws:connection",{status:"connecting"}),Ee.connection="connecting",Hi=St().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Ot.applyWorkspaceEvent(t);return}for(const o of xSe({appEvent:t,meta:n}))D1(o)},onResync(t,n,o){Go("ws:resync",{sessionId:t,status:"required",seq:n}),D1.flush(),B1.add(t),z1.request(t)},onError(t,n,o){Go("ws:error",{status:"failed",errorCode:t,fatal:o}),r_({severity:"error",title:fo.global.t("warnings.wsTitle"),message:n,details:[So("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){Go("ws:connection",{status:t?"connected":"disconnected"}),Ee.connected=t,Ee.connection=t?"connected":"disconnected",t&&(m3e(),Ot.refreshServerMeta())},onTranscriptReset(t,n,o,s){y2.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return y2.applyOps(t,n,o,s)}})}const k2={},B1=new Set,kg=new Set,wN=new Set;function a3e(e){return nr(e)&&e.code===dM?!0:typeof e=="object"&&e!==null&&e.code===dM}function So(e,t){if(!(t==null||t===""))return{label:fo.global.t(`warnings.details.${e}`),value:xN(t)}}function xN(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function u3e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function c3e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function d3e(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function f3e(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function pM(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function p3e(e,t,n){const o=Ex(t),s=nr(t),i=o||s?t.timestamp:void 0,r=o||s?t.durationMs:void 0,l=[So("operation",e),So("sessionId",n??Ee.activeSessionId),So("connection",Ee.connection),So("timestamp",f3e(i??Date.now()))];return o?l.push(So("duration",pM(r)),So("request",`${t.method} ${t.path}`),So("endpoint",t.url),So("requestId",t.requestId),So("phase",t.phase),So("timeout",`${t.timeoutMs}ms`),So("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),So("contentType",t.contentType),So("responsePreview",t.bodyPreview),So("cause",t.cause)):s?l.push(So("duration",pM(r)),So("code",t.code),So("requestId",t.requestId),So("message",t.message),So("details",t.details)):l.push(So("errorName",u3e(t)),So("message",c3e(t)??xN(t)),So("stack",d3e(t))),l.filter(a=>a!==void 0)}function h3e(e,t,n={}){const o=Ex(t),s=nr(t),i=n.title??(o?fo.global.t("warnings.daemonNetworkTitle"):s?fo.global.t("warnings.daemonApiTitle"):fo.global.t("warnings.operationFailedTitle")),r=n.message??(o?fo.global.t("warnings.daemonNetworkMessage"):s?t.message:fo.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:r,details:p3e(e,t,n.sessionId)}}function r_(e){Ee.warnings=[...Ee.warnings,e]}function m3e(){const e=fo.global.t("warnings.wsTitle"),t=Ee.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==Ee.warnings.length&&(Ee.warnings=t)}function ec(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=nr(t),s=Ex(t);Go("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),r_(h3e(e,t,n))}const g3e={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function v3e(e){if(!nr(e))return;const t=g3e[e.code];return t?fo.global.t(t):void 0}async function y3e(e){if(cN(e),Ee.activeSessionId!==e)return;const t=Ee.sessions[0];t?await Ot.selectSession(t.id,{urlMode:"replace"}):(s_(void 0),Ee.sessionLoading=!1,Ot.writeSessionUrl(void 0,"replace"))}const hM=new Set;async function k3e(e){if(!hM.has(e)){hM.add(e);try{const t=await St().getSessionWarnings(e),n=fo.global.t("warnings.noteLabel");for(const o of t)r_(`${n}: ${o.message}`)}catch{}}}async function l_(e){const t=Ot.localTurnStartState(e);try{const o=await St().getSessionSnapshot(e);if(!Ee.sessions.some(a=>a.id===e))return"ok";D1.flush();const s=Ee.lastSeqBySession[e]??0,i=k2[e];if(!(B1.has(e)||W1.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return kg.delete(e)||(kg.add(e),z1.request(e)),"ok";if(!Ot.isLocalTurnSnapshotCurrent(e,t))return Ot.afterLocalTurnStartsSettle(e,()=>{z1.request(e)}),"ok";const l=t2(o.session.usage);j0(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:l?a.usage:o.session.usage})),X4e(e,pSe(Ee.messagesBySession[e]??[],o.messages)),Ee.tasksBySession={...Ee.tasksBySession,[e]:hSe(o.subagents,Ee.tasksBySession[e]??[])},Ee.messagesHasMoreBySession={...Ee.messagesHasMoreBySession,[e]:o.hasMoreMessages},Ee.approvalsBySession={...Ee.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const u=a.display;u?.kind==="plan_review"&&typeof u.plan=="string"&&u.plan.length>0&&(Ee.planReviewByToolCallId={...Ee.planReviewByToolCallId,[a.toolCallId]:{plan:u.plan,path:typeof u.path=="string"?u.path:void 0}})}Ee.questionsBySession={...Ee.questionsBySession,[e]:o.pendingQuestions},Ee.lastSeqBySession={...Ee.lastSeqBySession,[e]:o.asOfSeq},k2[e]=o.epoch,B1.delete(e),kg.delete(e),Ot.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={...Ee.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],Ee.turnActiveBySession=a}return i_(),Hi&&(Hi.seedSnapshot(e,o),Hi.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),x3e(e)),W1.delete(e),l&&wh(e),k3e(e),"ok"}catch(n){return a3e(n)?(await y3e(e),"not-found"):(ec("getSessionSnapshot",n,{title:fo.global.t("warnings.sessionSnapshotTitle"),message:fo.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const z1=mSe(l_);function b3e(e){return Object.prototype.hasOwnProperty.call(Ee.messagesBySession,e)}const w3e=4,kl=[],W1=new Set;function x3e(e){const t=kl.indexOf(e);for(t!==-1&&kl.splice(t,1),kl.unshift(e);kl.length>w3e;){let n=-1;for(let s=kl.length-1;s>=0;s--)if(kl[s]!==Ee.activeSessionId){n=s;break}if(n===-1)break;const[o]=kl.splice(n,1);if(o===void 0)break;Hi?.unsubscribe(o),W1.add(o)}}function _3e(e){const t=kl.indexOf(e);t!==-1&&kl.splice(t,1),W1.delete(e)}async function S3e(e){return l_(e)}function a_(e,t){return(Ee.inFlightBySession[e]??!1)||(Ee.turnActiveBySession[e]??!1)||(t??Ee.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function u_(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return fo.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const C3e=3e4,Qp=V(0);let Ik=null;function A3e(){Ik===null&&(Ik=setInterval(()=>{Qp.value=(Qp.value+1)%Number.MAX_SAFE_INTEGER},C3e),Ik.unref?.())}function M3e(e,t){const n=e.split(` +`),o=t.split(` +`),s=[];return n.forEach((i,r)=>{s.push({kind:"rem",gutter:String(r+1),text:`- ${i}`})}),o.forEach((i,r)=>{s.push({kind:"add",gutter:String(r+1),text:`+ ${i}`})}),s}function E3e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:M3e(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const r=i??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:o,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function T3e(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}function I3e(e){const t=Ee.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const r=i.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(i.toolCallId,l)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const l=n.get(i.toolCallId);if(l)return l}}}function $3e(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(o/1e3),a=Math.floor(l/60),u=l%60;n=fo.global.t("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const l=Math.round(o/1e3);n=fo.global.t("tasks.timingDone",{sec:l})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??I3e(e),r=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:r,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const N3e=O(()=>{const e=Ee.sessions.find(n=>n.id===Ee.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:Ee.workspaceName,branch:t}}),L3e=O(()=>(Qp.value,Ee.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:u_(e.updatedAt),busy:a_(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),F3e=O(()=>Ee.activeSessionId??""),O3e=O(()=>{const e=Ee.activeSessionId;if(e)return ao.skillsBySession.value[e]??[];const t=V0.value;return t?ao.skillsByWorkspace.value[t]??[]:[]}),Jf=V({}),b2=V([]),w2=V(!1),va=V([]),x2=V(!1),zc=V({}),R3e=O(()=>{const e=Ee.activeSessionId;return e?zc.value[e]??{}:{}});async function P3e(e){Jf.value={...Jf.value,[e]:!0};try{await ao.loadSkillsForSession(e)}finally{Jf.value={...Jf.value,[e]:!1}}}async function D3e(){w2.value=!0;try{b2.value=await St().listConnectors()}catch{b2.value=[]}finally{w2.value=!1}}async function _N(){x2.value=!0;try{va.value=await St().listPlugins()}catch{va.value=[]}finally{x2.value=!1}}async function B3e(e,t){const n=va.value.find(o=>o.id===e)?.enabled;va.value=va.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await St().setPluginEnabled(e,t)}catch(o){n!==void 0&&(va.value=va.value.map(s=>s.id===e?{...s,enabled:n}:s)),ec("setPluginEnabled",o);return}await _N()}async function z3e(e){await Promise.all([P3e(e),D3e(),_N()])}async function W3e(e){const t=Ee.activeSessionId;if(!t)return;const n=zc.value[t]??{};zc.value={...zc.value,[t]:{...n,...e}};try{await St().updateSession(t,e)}catch(o){throw zc.value={...zc.value,[t]:n},ec("updateCapabilities",o,{sessionId:t}),o}}const c_=O(()=>{const e=Ee.activeSessionId;return e?Ee.inFlightBySession[e]??!1:!1}),H3e=O(()=>Ot.isStartingFirstPrompt()),Xs=m4e(Ee,{pushOperationFailure:ec,nextOptimisticMsgId:bN,connectEventsIfNeeded:i_,getEventConn:()=>Hi,resolveThinkingForPrompt:(e,t)=>ao.resolveThinkingForPrompt(e,t)}),Td=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=Xs.sideChatTargetBySession.value[e]?.agentId;return(Ee.tasksBySession[e]??[]).filter(n=>n.id!==t)}),SN=dCe(Ee,Td),j3e=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=new Set(Ee.sideChatUserMessageIdsBySession[e]??[]),n=(Ee.messagesBySession[e]??[]).filter(s=>!t.has(s.id)),o=Ee.approvalsBySession[e]??[];return o_(n,o,s=>St().getFileUrl(s),U0.value,Ee.planReviewByToolCallId)}),U0=O(()=>{const e=Ee.activeSessionId;return e?(Ee.turnActiveBySession[e]??!1)||(Ee.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),U3e=O(()=>c_.value||U0.value),mM=new Map,V3e=O(()=>{SN.taskClock.value;const e=Td.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=Ee.activeSessionId??"__draft__",n=mM.get(t)??{indexes:new Map,next:1};mM.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return Td.value.map(o=>{const s=$3e(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),q3e=O(()=>{const e=Ee.activeSessionId;if(!e)return{};const t={};for(const n of Ee.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=Ee.planReviewByToolCallId[o.toolCallId],r=i?.plan??(typeof s.plan=="string"?s.plan:void 0),l=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:r,path:l}}return t}),CN=O(()=>P4e(Td.value)),K3e=O(()=>B4e(Td.value)),Wc=O(()=>{const e=Ee.activeSessionId;return e?Ee.goalBySession[e]??null:null}),G3e=O(()=>{const e=Ee.activeSessionId;return e?F4e(Ee.messagesBySession[e]??[]):[]}),Z3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.compactionBySession[e]??null:null}),Y3e=O(()=>Ee.connection),J3e=O(()=>Ee.loading),X3e=O(()=>Ee.sessionLoading),Q3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesLoadingMoreBySession[e]??!1:!1}),eAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesHasMoreBySession[e]??!1:!1}),tAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesLoadMoreErrorBySession[e]??!1:!1}),nAe=O(()=>Ee.serverVersion),oAe=O(()=>Ee.backend),sAe=O(()=>Ee.dangerousBypassAuth);function iAe(){Ee.dangerousBypassAuth=!1}const rAe=O(()=>Ee.permission),lAe=O(()=>Ee.thinking),AN=O(()=>{const e=Ee.activeSessionId;return e?Ee.planModeBySession[e]??!1:bh.planMode}),aAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.planArmedBySession[e]??!1:bh.planMode}),uAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.dynamicWorkflowModeBySession[e]??!1:bh.dynamicWorkflowMode}),cAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.goalModeBySession[e]??!1:bh.goalMode}),dAe=O(()=>{const e=D4e(CN.value);return{plan:AN.value,goal:Wc.value&&Wc.value.status!=="complete"?{status:Wc.value.status,turnsUsed:Wc.value.turnsUsed,elapsedMs:Wc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),fAe=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=St();return(Ee.queuedBySession[e]??[]).map(n=>({text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),pAe=O(()=>Ee.warnings),hAe=O(()=>{const e=Ee.activeSessionId;return e?(Ee.questionsBySession[e]??[]).map(T3e):[]}),mAe=O(()=>{const e=Ee.activeSessionId;return e?(Ee.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:E3e(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),d_=O(()=>{const e=Ee.activeSessionId;return e?(Ee.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Ee.questionsBySession[e]??[]).length>0?"awaiting-question":c_.value||U0.value?"running":"idle":"idle"}),ao=NCe(Ee,{pushOperationFailure:ec,refreshSessionStatus:wh,persistSessionProfile:gN,activity:d_,updateSession:j0,updateSessionMessages:uN}),_2=O(()=>{const e=Ee.activeSessionId;if(!e)return null;const t=Ee.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),gAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.gitStatusBySession[e]?.pullRequest??null:null}),vAe=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=Ee.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),yAe=O(()=>{const e=Ee.activeSessionId;if(!e)return null;const t=Ee.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),MN=O(()=>{const e=Ee.sessions.find(r=>r.id===Ee.activeSessionId),t=_2.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?ao.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??Ee.defaultModel)??"—",s=ao.models.value.find(r=>r.id===o)??ao.models.value.find(r=>r.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:Ee.permission,branch:t,cwd:e?.cwd??"",isGitRepo:_2.value!==null}}),kAe=O(()=>fN.value),bAe=O(()=>Ee.sessions.find(t=>t.id===Ee.activeSessionId)?.usage.totalCostUsd??0),wAe=O(()=>Ee.authReady),xAe=O(()=>Ee.defaultModel),_Ae=O(()=>Ee.managedProviderStatus),SAe=O(()=>Ee.config),CAe=O(()=>{const e=Ee.activeSessionId;if(!e)return{};const t=Ee.gitStatusBySession[e];return t?{...t.entries}:{}});function Id(e){const t=_r(e.cwd);return Ee.workspaces.find(n=>_r(n.root)===t)?.id??e.workspaceId??e.cwd}const f_=O(()=>fSe({workspaces:Ee.workspaces,sessions:Ee.sessions,hiddenWorkspaceRoots:Ee.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Ee.sessionsHasMoreByWorkspace})),H1=V(iB()),$d=V(rB()==="manual"?"manual":"recent");function AAe(e){const t=Rd(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Zr=V(AAe(rn.pinnedSessions)),bg=V(zo(rn.pinnedCollapsed)==="true");function MAe(e){Zr.value=Zr.value.includes(e)?Zr.value.filter(t=>t!==e):[...Zr.value,e],Wa(rn.pinnedSessions,Zr.value)}function EAe(e){const t=new Set(Zr.value),n=e.filter(o=>t.has(o));Zr.value=[...n,...Zr.value.filter(o=>!n.includes(o))],Wa(rn.pinnedSessions,Zr.value)}function TAe(){bg.value=!bg.value,ts(rn.pinnedCollapsed,String(bg.value))}Ye(()=>[f_.value.map(e=>e.id).join("\0"),Ee.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=lB(n,H1.value);o!==null&&(H1.value=o,zE(o))});const Yu=O(()=>{const e=f_.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:K4e(t.root,Ee.fsHome),sessionCount:t.sessionCount}));if($d.value==="recent"){const t=new Map;for(const n of Ee.sessions){if(n.parentSessionId)continue;const o=Id(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return cB(e,t)}return aB(e,H1.value)}),V0=O(()=>{const e=Ee.activeWorkspaceId,t=Yu.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ye(V0,e=>{e&&(Object.prototype.hasOwnProperty.call(ao.skillsByWorkspace.value,e)||ao.loadSkillsForWorkspace(e))},{immediate:!0});const IAe=O(()=>{const e=V0.value;return e?Yu.value.find(t=>t.id===e)??null:null}),$Ae=O(()=>{Qp.value;const e=new Set(Yu.value.map(n=>n.id)),t=new Map(Yu.value.map(n=>[n.id,n.name]));return Ee.sessions.filter(n=>!n.parentSessionId&&e.has(Id(n))).map(n=>{const o=Id(n);return{id:n.id,title:n.title,time:u_(n.updatedAt),busy:a_(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),NAe=O(()=>{Qp.value;const e=new Map;for(const t of Ee.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Id(t),o={id:t.id,title:t.title,time:u_(t.updatedAt),busy:a_(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return Yu.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:Ee.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:Ee.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:Ee.sessionsInitialCountByWorkspace[t.id]??h2}))});function LAe(e){H1.value=e,zE(e),$d.value!=="manual"&&($d.value="manual",WE("manual"))}function FAe(e){$d.value!==e&&($d.value=e,WE(e))}const EN=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(Ee.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),OAe=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(Ee.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),RAe=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.unreadBySession))n&&(e[t]=!0);return e}),PAe=O(()=>{const e={},t=EN.value;for(const n of Ee.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Id(n);e[s]=(e[s]??0)+o}return e}),DAe=O(()=>Ee.recentRoots),BAe=O(()=>Ee.availableOpenInApps),Ot=TCe(Ee,{taskPoller:SN,sideChat:Xs,modelProvider:ao,pushOperationFailure:ec,activity:d_,sessionsKnownEmpty:wN,setSessions:lN,updateSession:j0,upsertSessionFront:G4e,appendSession:Z4e,forgetSession:cN,setActiveSessionId:s_,updateSessionMessages:uN,nextOptimisticMsgId:bN,getEventConn:()=>Hi,syncSessionFromSnapshot:l_,reopenSession:S3e,hasLoadedMessages:b3e,refreshSessionStatus:wh,refreshSessionGoal:e3e,persistSessionProfile:gN,mergedWorkspaces:f_,workspacesView:Yu,status:MN,workspaceIdForSession:Id,savePermissionToStorage:W4e,savePlanModeToStorage:oN,saveDynamicWorkflowModeToStorage:sN,saveGoalModeToStorage:iN,draftModes:bh,saveUnread:rw,saveActiveWorkspaceToStorage:q4e,saveHiddenWorkspacesToStorage:V4e,goalErrorMessage:v3e,resetFastMoon:yl.resetFastMoon,initialized:hN,connectIssue:mN,selectedDiffPath:dN,fileDiffLines:fN,fileDiffLoading:pN});function zAe(e,t){const n=Ee.sessions.find(o=>o.id===e);return n?Ot.renameSession(e,KE(t,n.title)):Promise.resolve()}function p_(e){return e===Ee.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function WAe(e){if(Ee.turnActiveBySession[e]){const t={...Ee.turnActiveBySession};delete t[e],Ee.turnActiveBySession=t}Ee.inFlightBySession[e]&&(Ee.inFlightBySession={...Ee.inFlightBySession,[e]:!1})}function HAe(e,t,n){const o=Ee.promptIdBySession[e];Ot.finishPromptLocal(e,{turnWasActive:n}),e===Ee.activeSessionId?(Ot.loadGitStatus(e),wh(e)):t==="idle"&&(Ee.unreadBySession={...Ee.unreadBySession,[e]:!0},rw({[e]:!0}));const s=(Ee.approvalsBySession[e]??[]).length>0,i=(Ee.questionsBySession[e]??[]).length>0;jSe(t,s,i)&&qr.maybeNotifyCompletion(e,{isUserWatching:p_(e),sessionTitle:Ee.sessions.find(r=>r.id===e)?.title??"",promptId:o,onClick:()=>{Ot.selectSession(e)}}),t==="idle"&&Xp.maybePlayCompletionSound()}function jAe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;qr.maybeNotifyQuestion({isUserWatching:p_(e),sessionTitle:Ee.sessions.find(r=>r.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{Ot.selectSession(e)}}),Xp.maybePlayQuestionSound()}function UAe(e,t){qr.maybeNotifyApproval({isUserWatching:p_(e),sessionTitle:Ee.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Ot.selectSession(e)}}),Xp.maybePlayApprovalSound()}function q0(){return A3e(),{workspace:N3e,sessions:L3e,activeSessionId:F3e,workspacesView:Yu,workspaceSortMode:$d,pinnedSessionIds:Zr,pinnedCollapsed:bg,visibleWorkspace:IAe,activeWorkspaceId:V0,sessionsForView:$Ae,workspaceGroups:NAe,attentionBySession:EN,pendingBySession:OAe,attentionByWorkspace:PAe,unreadBySession:RAe,recentRoots:DAe,turns:j3e,tasks:V3e,activeAppTasks:Td,auxiliaryTranscripts:y2,todos:G3e,goal:Wc,dynamicWorkflows:CN,dynamicWorkflowMembersByToolCallId:K3e,activationBadges:dAe,compaction:Z3e,status:MN,sessionCost:bAe,fileDiff:kAe,selectedDiffPath:dN,fileDiffLoading:pN,changes:vAe,gitInfo:_2,gitDiffStats:yAe,activePullRequest:gAe,changesByPath:CAe,pendingApprovals:mAe,availableOpenInApps:BAe,connection:Y3e,loading:J3e,sessionLoading:X3e,loadingMoreMessages:Q3e,hasMoreMessages:eAe,loadMoreMessagesError:tAe,serverVersion:nAe,backend:oAe,dangerousBypassAuth:sAe,clearDangerousBypassAuth:iAe,initialized:hN,connectIssue:mN,permission:rAe,thinking:lAe,planMode:AN,planArmed:aAe,sessionPlans:q3e,dynamicWorkflowMode:uAe,goalMode:cAe,queued:fAe,warnings:pAe,questions:hAe,activity:d_,turnActive:U0,inFlight:c_,working:U3e,isStartingFirstPrompt:H3e,fastMoon:yl.fastMoon,models:ao.models,starredModelIds:ao.starredModelIds,providers:ao.providers,uiFontSize:yl.uiFontSize,setUiFontSize:yl.setUiFontSize,conversationToc:yN,setConversationToc:o3e,colorScheme:yl.colorScheme,setColorScheme:yl.setColorScheme,accent:yl.accent,setAccent:yl.setAccent,notifyOnComplete:qr.notifyOnComplete,notifyOnQuestion:qr.notifyOnQuestion,notifyOnApproval:qr.notifyOnApproval,notifyPermission:qr.notifyPermission,setNotifyOnComplete:qr.setNotifyOnComplete,setNotifyOnQuestion:qr.setNotifyOnQuestion,setNotifyOnApproval:qr.setNotifyOnApproval,soundOnComplete:Xp.soundOnComplete,setSoundOnComplete:Xp.setSoundOnComplete,onboarded:kN,setOnboarded:i3e,load:Ot.load,selectSession:Ot.selectSession,clearActiveSession:Ot.clearActiveSession,loadOlderMessages:Ot.loadOlderMessages,loadWorkspaces:Ot.loadWorkspaces,loadMoreSessions:Ot.loadMoreSessions,loadAllSessions:Ot.loadAllSessions,selectWorkspace:Ot.selectWorkspace,openWorkspace:Ot.openWorkspace,openWorkspaceDraft:Ot.openWorkspaceDraft,startSessionAndSendPrompt:Ot.startSessionAndSendPrompt,startSessionAndActivateSkill:Ot.startSessionAndActivateSkill,startSessionAndOpenSideChat:Ot.startSessionAndOpenSideChat,addWorkspaceByPath:Ot.addWorkspaceByPath,browseFs:Ot.browseFs,getFsHome:Ot.getFsHome,sendPrompt:Ot.sendPrompt,steerPrompt:Ot.steerPrompt,sideChatVisible:Xs.sideChatVisible,sideChatSessionId:Xs.sideChatSessionId,sideChatTurns:Xs.sideChatTurns,sideChatRunning:Xs.sideChatRunning,sideChatSending:Xs.sideChatSending,openSideChat:Xs.openSideChat,closeSideChat:Xs.closeSideChat,sendSideChatPrompt:Xs.sendSideChatPrompt,uploadImage:Ot.uploadImage,abortCurrentPrompt:Ot.abortCurrentPrompt,respondApproval:Ot.respondApproval,respondQuestion:Ot.respondQuestion,dismissQuestion:Ot.dismissQuestion,pendingQuestionActions:Ot.pendingQuestionActions,pendingApprovalActions:Ot.pendingApprovalActions,cancelTask:Ot.cancelTask,setPermission:Ot.setPermission,setThinking:ao.setThinking,setPlanMode:Ot.setPlanMode,togglePlanMode:Ot.togglePlanMode,setDynamicWorkflowMode:Ot.setDynamicWorkflowMode,toggleDynamicWorkflowMode:Ot.toggleDynamicWorkflowMode,setGoalMode:Ot.setGoalMode,toggleGoalMode:Ot.toggleGoalMode,createGoal:Ot.createGoal,controlGoal:Ot.controlGoal,enqueue:Ot.enqueue,dismissWarning:Ot.dismissWarning,renameSession:Ot.renameSession,renameWorkspace:Ot.renameWorkspace,deleteWorkspace:Ot.deleteWorkspace,reorderWorkspaces:LAe,setWorkspaceSortMode:FAe,togglePinnedSession:MAe,reorderPinnedSessions:EAe,togglePinnedCollapsed:TAe,setSessionEmoji:zAe,archiveSession:Ot.archiveSession,exportSession:Ot.exportSession,restoreSession:Ot.restoreSession,loadArchivedSessions:Ot.loadArchivedSessions,compact:Ot.compact,forkSession:Ot.forkSession,generateSessionTitle:Ot.generateSessionTitle,undo:Ot.undo,unqueue:Ot.unqueue,reorderQueue:Ot.reorderQueue,searchFiles:Ot.searchFiles,loadGitStatus:Ot.loadGitStatus,loadFileDiff:Ot.loadFileDiff,clearFileDiff:Ot.clearFileDiff,listDir:Ot.listDir,readFileContent:Ot.readFileContent,getFileDownloadUrl:Ot.getFileDownloadUrl,openWorkspaceFile:Ot.openWorkspaceFile,openInApp:Ot.openInApp,revealWorkspaceFile:Ot.revealWorkspaceFile,resolveImageUrl:Ot.resolveImageUrl,getFileUrl:e=>St().getFileUrl(e),loadModels:ao.loadModels,loadProviders:ao.loadProviders,skills:O3e,skillsLoadingBySession:Jf,connectors:b2,connectorsLoading:w2,plugins:va,pluginsLoading:x2,activeSessionCapabilities:R3e,loadCapabilityData:z3e,updateCapabilities:W3e,setPluginEnabled:B3e,activateSkill:ao.activateSkill,setModel:ao.setModel,toggleStarModel:ao.toggleStarModel,addProvider:ao.addProvider,deleteProvider:ao.deleteProvider,refreshProvider:ao.refreshProvider,refreshAllProviders:ao.refreshAllProviders,authReady:wAe,defaultModel:xAe,managedProviderStatus:_Ae,config:SAe,updateConfig:Ot.updateConfig,checkAuth:Ot.checkAuth,startOAuthLogin:ao.startOAuthLogin,pollOAuthLogin:ao.pollOAuthLogin,cancelOAuthLogin:ao.cancelOAuthLogin,logout:Ot.logout}}const VAe=["aria-expanded","aria-label"],qAe={class:"capability-trigger-label"},KAe={class:"capability-panel"},GAe={class:"capability-viewport"},ZAe={class:"capability-view"},YAe={key:1,class:"capability-group"},JAe={class:"capability-group-title"},XAe={class:"capability-caption"},QAe={key:0,class:"capability-loading"},e8e={class:"capability-view capability-view-secondary"},t8e={class:"capability-caption"},n8e={key:0,class:"capability-loading"},o8e={class:"capability-caption"},s8e={key:0,class:"capability-loading"},i8e=Ze({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=$t(),s=q0(),i=V(null),r=V(null),l=V(!1),a=V("root"),u=V([]),c=O(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=O(()=>{const B=n.sessionId;return B?s.skillsLoadingBySession.value[B]===!0:!1}),f=O(()=>s.connectors.value),p=O(()=>s.connectorsLoading.value),h=O(()=>s.plugins.value),m=O(()=>s.pluginsLoading.value),k=O(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),w=O(()=>d.value||c.value.length>0),v=O(()=>p.value||f.value.length>0),y=O(()=>m.value||h.value.length>0),b=O(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),S=O(()=>{switch(a.value){case"skills":return c.value.length;case"plugins":return h.value.length;case"root":return 0}});function I(){u.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(B=>B.id)}Ye([()=>n.sessionId,f,k],I,{immediate:!0}),Ye([c,d,h,m],()=>{a.value==="skills"&&!d.value&&c.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function T(){if(l.value=!l.value,!l.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:T});function $(){l.value=!1,a.value="root"}const F={tools:Promise.resolve(),mcpServers:Promise.resolve()},R={tools:0,mcpServers:0};function P(B,z,A){const L=++R[B],W=n.sessionId,j=F[B].then(async()=>{if(n.sessionId===W)try{await s.updateCapabilities({[B]:[...z.value]})}catch{L===R[B]&&n.sessionId===W&&(z.value=A)}});return F[B]=j,j}function M(B,z){const A=[...u.value],L=new Set(A);return z?L.add(B):L.delete(B),u.value=[...L],P("mcpServers",u,A)}function D(B,z){s.setPluginEnabled(B,z)}return(B,z)=>(g(),C("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?oe("",!0):(g(),C("button",{key:0,ref_key:"triggerRef",ref:r,type:"button",class:ze(["capability-trigger",{open:l.value}]),"aria-expanded":l.value,"aria-haspopup":"dialog","aria-label":x(o)("capabilityMenu.triggerLabel"),onClick:Ct(T,["stop"])},[z[5]||(z[5]=K2('',1)),_("span",qAe,N(x(o)("capabilityMenu.trigger")),1)],10,VAe)),K(YE,{anchor:n.triggerless?i.value:r.value,open:l.value,label:x(o)("capabilityMenu.triggerLabel"),onClose:$},{default:ve(()=>[_("div",KAe,[_("div",GAe,[_("div",{class:ze(["capability-track",{"is-drilled":a.value!=="root"}])},[_("div",ZAe,[w.value?(g(),pe(Lc,{key:0,count:c.value.length,onClick:z[0]||(z[0]=A=>a.value="skills")},{label:ve(()=>[qe(N(x(o)("capabilityMenu.skills.title")),1)]),trailing:ve(()=>[...z[6]||(z[6]=[_("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):oe("",!0),v.value?(g(),C("div",YAe,[_("div",JAe,N(x(o)("capabilityMenu.mcp.title")),1),_("p",XAe,N(x(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),C("div",QAe,[K(Ck,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Te,{key:1},st(f.value,A=>(g(),pe(Lc,{key:A.id,class:"mcp-row",selected:u.value.includes(A.id),title:A.name,onClick:L=>void M(A.id,!u.value.includes(A.id))},{label:ve(()=>[qe(N(A.name),1)]),trailing:ve(()=>[K(X6,{"model-value":u.value.includes(A.id),"aria-label":x(o)("capabilityMenu.mcp.toggle",{name:A.name}),onClick:z[1]||(z[1]=Ct(()=>{},["stop"])),"onUpdate:modelValue":L=>void M(A.id,L)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):oe("",!0),y.value?(g(),pe(Lc,{key:2,count:h.value.length,onClick:z[2]||(z[2]=A=>a.value="plugins")},{label:ve(()=>[qe(N(x(o)("capabilityMenu.plugins.title")),1)]),trailing:ve(()=>[...z[7]||(z[7]=[_("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):oe("",!0)]),_("div",e8e,[a.value!=="root"?(g(),pe(Lc,{key:0,class:"capability-back",count:S.value,onClick:z[3]||(z[3]=A=>a.value="root")},{leading:ve(()=>[...z[8]||(z[8]=[_("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ve(()=>[qe(N(b.value||x(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):oe("",!0),a.value==="skills"?(g(),C(Te,{key:1},[_("p",t8e,N(x(o)("capabilityMenu.skills.caption")),1),d.value?(g(),C("div",n8e,[K(Ck,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Te,{key:1},st(c.value,A=>(g(),pe(Lc,{key:A.name,class:"skill-row",disabled:"",title:A.description},{label:ve(()=>[qe(N(A.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),C(Te,{key:2},[_("p",o8e,N(x(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),C("div",s8e,[K(Ck,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Te,{key:1},st(h.value,A=>(g(),pe(Lc,{key:A.id,class:"plugin-row",selected:A.enabled,title:A.displayName,onClick:L=>D(A.id,!A.enabled)},{label:ve(()=>[qe(N(A.displayName),1)]),trailing:ve(()=>[K(X6,{"model-value":A.enabled,"aria-label":x(o)("capabilityMenu.plugins.toggle",{name:A.displayName}),onClick:z[4]||(z[4]=Ct(()=>{},["stop"])),"onUpdate:modelValue":L=>D(A.id,L)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):oe("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),r8e=ht(i8e,[["__scopeId","data-v-ff3a96c4"]]),l8e={class:"att-lightbox-card"},a8e=["src"],u8e=["src","alt"],c8e={class:"att-lightbox-name"},d8e={class:"composer-card"},f8e={key:0,class:"att-strip"},p8e={class:"att-scroll-content"},h8e={key:1,class:"att-row"},m8e={key:0,class:"att-more"},g8e={class:"cin-wrap"},v8e=["onClick"],y8e={class:"am-icon"},k8e={class:"am-name"},b8e={key:0,class:"am-desc"},w8e={class:"input-row"},x8e=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],_8e=["aria-label"],S8e={class:"toolbar-left"},C8e=["aria-label","onKeydown"],A8e={class:"perm-pill-label"},M8e=["onClick"],E8e={class:"pd-info"},T8e={class:"pd-desc"},I8e={class:"pd-check"},$8e={key:1,class:"workflow-chip"},N8e={class:"workflow-label"},L8e={class:"toolbar-right"},F8e=["aria-label"],O8e=["aria-expanded"],R8e={class:"mp-name"},P8e={key:0,class:"think-suffix"},D8e=["aria-label"],B8e=["aria-label","disabled"],z8e={class:"md-list"},W8e={key:0,class:"md-section"},H8e=["onClick"],j8e={class:"md-check"},U8e={class:"md-name"},V8e={class:"md-provider"},q8e={key:1,class:"md-divider"},K8e={key:2,class:"md-section"},G8e=["onClick"],Z8e={class:"md-check"},Y8e={class:"md-name"},J8e={key:0,class:"md-divider"},X8e={class:"md-thinking"},Q8e={class:"md-name"},e6e={key:0,class:"md-note"},t6e={key:2,class:"md-note"},n6e={class:"md-cache-note"},o6e={class:"md-check md-more-icon"},s6e={class:"md-name"},i6e={class:"drop-card"},gM=36,r6e=Ze({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=O(()=>o.starting?r("composer.starting"):o.running?r("composer.placeholderRunning"):o.goalMode?r("status.goalPlaceholder"):o.planArmed||o.planMode?r("status.planPlaceholder"):r("composer.placeholder")),i=n,{t:r,locale:l}=$t(),{text:a,textareaRef:u,autosize:c,loadForEdit:d,clearDraft:f}=j_e({sessionId:()=>o.sessionId});function p(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function h(){if(Ls.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const m=V(!1);function k(){m.value=!m.value,xt(()=>{c(),b(),u.value?.focus()})}function w(){m.value&&(m.value=!1,xt(c))}function v(Pe){if(typeof getComputedStyle>"u")return gM;const ct=Number.parseFloat(getComputedStyle(Pe).minHeight);return Number.isFinite(ct)&&ct>0?ct:gM}const y=V(!1);function b(){const Pe=u.value;y.value=!!Pe&&Pe.scrollHeight>v(Pe)}Ye(a,()=>{xt(b)}),Ye(()=>o.sessionId,()=>{m.value=!1,I.value=!1,P.value=!1});const S=z_e({text:a,textareaRef:u,autosize:c,sessionId:()=>o.sessionId}),{open:I,items:T,active:$,update:F,select:R}=W_e({text:a,textareaRef:u,autosize:c,skills:()=>o.skills,emitCommand:Pe=>{if(Pe==="/plan"){p();return}if(Pe==="/goal"){h();return}i("command",Pe)},historyPush:Pe=>S.push(Pe),clearDraft:f}),{open:P,items:M,active:D,loading:B,update:z,select:A}=H_e({text:a,textareaRef:u,autosize:c,searchFiles:()=>o.searchFiles});function L(){S.resetBrowsing(),F(),z()}const{attachments:W,previewAttachment:j,fileInputRef:re,isDragOver:Q,removeAttachment:Y,openAttachmentPreview:G,closeAttachmentPreview:X,openFilePicker:te,handleFileInputChange:q,handleDragOver:me,handleDragLeave:xe,handleDrop:We,clearAfterSubmit:he,loadAttachments:ee}=U_e({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function ne(){const Pe=W.value.map(ct=>ct.localId);for(const ct of Pe)Y(ct)}const H=O(()=>W.value.filter(Pe=>Pe.kind!=="file")),Z=O(()=>W.value.filter(Pe=>Pe.kind==="file")),ye=V(null),fe=V(null),de=V(!1);let J=null;function ae(){const Pe=ye.value;de.value=Pe!==null&&Pe.scrollHeight>Pe.clientHeight+1}Ye(ye,Pe=>{J?.disconnect(),J=null,Pe&&typeof ResizeObserver=="function"&&(J=new ResizeObserver(ae),J.observe(Pe)),ae()},{immediate:!0}),Ye(W,()=>void xt(ae),{deep:!0}),Ye(()=>[H.value.length,Z.value.length],([Pe,ct],[bt,pn])=>{Pe<=bt&&ct<=pn||xt(()=>{const Ni=ye.value;Ni&&(Ni.scrollTop=Pe>bt&&fe.value?fe.value.offsetHeight-Ni.clientHeight:Ni.scrollHeight)})}),Sn(()=>{a.value&&xt(()=>{c(),b()})}),En(()=>{document.removeEventListener("click",ot,!0),J?.disconnect(),Ks?.disconnect(),qs?.disconnect(),Tt()});function be(){u.value?.focus({preventScroll:!0})}function _e(Pe){ee(Pe)}const ce=O(()=>I.value||P.value||rt.value||vt.value||ln.value),Se=O(()=>a.value.trim().length===0&&W.value.length===0);t({loadForEdit:d,loadAttachmentsForEdit:_e,focus:be,anyPopupOpen:ce,isEmpty:Se});function ie(Pe){return{fileId:Pe.fileId,kind:Pe.kind,name:Pe.name,mediaType:Pe.mediaType,size:Pe.size}}function we(Pe){if(Pe.kind==="file"){Pe.fileId!==void 0&&M7(Pe.fileId,Pe.name,Pe.mediaType);return}G(Pe)}function Re(){const Pe=a.value.trim();if(W.value.some(pn=>pn.uploading))return;const ct=W.value.filter(pn=>!pn.uploading&&!pn.error&&pn.fileId);if(!Pe&&ct.length===0)return;if(S.push(Pe),Pe==="/plan"){a.value="",f(),I.value=!1,w(),p();return}if(Pe==="/goal"){a.value="",f(),I.value=!1,w(),h();return}if(Pe){const pn=$_e(Pe),Ni=pn?R7(o.skills).some(dr=>dr.name===pn.cmd||dr.name===`/${N1}${pn.cmd.slice(1)}`):!1;if(pn&&Ni){a.value="",f(),I.value=!1,w(),i("command",pn.arg?`${pn.cmd} ${pn.arg}`:pn.cmd);return}}const bt={text:Pe,attachments:ct.map(pn=>ie(pn))};j.value=null,he(),a.value="",f(),I.value=!1,P.value=!1,w(),i("submit",bt)}function at(){if(!o.running||W.value.some(pn=>pn.uploading))return;const Pe=a.value.trim(),ct=W.value.filter(pn=>!pn.uploading&&!pn.error&&pn.fileId);if(!Pe&&ct.length===0&&o.queued.length===0)return;const bt={text:Pe,attachments:ct.map(pn=>ie(pn))};he(),S.push(Pe),a.value="",f(),I.value=!1,P.value=!1,w(),i("steer",bt)}let ft=!1,Mt=null;function Tt(){Mt!==null&&(clearTimeout(Mt),Mt=null)}function tn(){Tt(),ft=!0}function Kt(){Tt(),Mt=setTimeout(()=>{Mt=null,ft=!1},0)}function Qe(Pe){return ft||Pe.isComposing||Pe.keyCode===229}function nt(Pe){if(!Qe(Pe)){if(Fn.value&&Pe.key==="Backspace"&&!Pe.shiftKey&&!Pe.altKey&&!Pe.metaKey&&!Pe.ctrlKey){const ct=u.value;if(ct&&ct.selectionStart===0&&ct.selectionEnd===0){Pe.preventDefault(),Ii();return}}if(Pe.key==="Escape"){if(ln.value){Pe.preventDefault(),Nn();return}if(rt.value){Pe.preventDefault(),Wo();return}if(vt.value){Pe.preventDefault(),Un();return}}if(I.value){if(Pe.key==="Escape"){Pe.preventDefault(),I.value=!1;return}if(Pe.key==="Tab"&&T.value.length===0){I.value=!1;return}if(Pe.key==="ArrowDown"){Pe.preventDefault(),$.value=($.value+1)%T.value.length;return}if(Pe.key==="ArrowUp"){Pe.preventDefault(),$.value=($.value-1+T.value.length)%T.value.length;return}if(Pe.key==="Enter"||Pe.key==="Tab"){Pe.preventDefault();const ct=T.value[$.value];ct&&R(ct);return}}if(P.value&&!B.value){if(Pe.key==="ArrowDown"){Pe.preventDefault(),D.value=(D.value+1)%Math.max(1,M.value.length);return}if(Pe.key==="ArrowUp"){Pe.preventDefault(),D.value=(D.value-1+Math.max(1,M.value.length))%Math.max(1,M.value.length);return}if(Pe.key==="Enter"||Pe.key==="Tab"){Pe.preventDefault();const ct=M.value[D.value];ct&&A(ct);return}if(Pe.key==="Escape"){Pe.preventDefault(),P.value=!1;return}}if(Pe.key==="s"&&(Pe.ctrlKey||Pe.metaKey)&&!Pe.shiftKey&&!Pe.altKey){o.running&&(Pe.preventDefault(),at());return}if(!m.value&&!I.value&&!P.value&&!Pe.shiftKey&&!Pe.altKey&&!Pe.metaKey&&!Pe.ctrlKey){const ct=S.isBrowsing();if(Pe.key==="ArrowUp"&&S.hasHistory()&&(ct||S.caretAtTextStart())){Pe.preventDefault(),S.recallOlder(),I.value=!1;return}if(Pe.key==="ArrowDown"&&ct){Pe.preventDefault(),S.recallNewer(),I.value=!1;return}}if(Pe.key==="Enter"&&!Pe.shiftKey){if(m.value&&!(Pe.metaKey||Pe.ctrlKey))return;Pe.preventDefault(),Re()}}}const ut=O(()=>r("composer.send")),Pt=O(()=>!!o.uploadImage),Oe=O(()=>!W.value.some(Pe=>Pe.uploading)&&(a.value.trim()!==""||W.value.some(Pe=>!Pe.error&&Pe.fileId))),Je=O(()=>{if(I.value)return"composer-slash-menu";if(P.value)return"composer-mention-menu"}),it=O(()=>{if(I.value&&T.value.length>0)return`composer-slash-option-${$.value}`;if(P.value&&M.value.length>0)return`composer-mention-option-${D.value}`}),rt=V(!1),vt=V(!1),Nt=V(null),on=V(null),mn=V(null),Zt=V(null),jn=V(""),Xt=V("");function xo(){rt.value=!rt.value,rt.value&&(wt(),vt.value=!1,Nn(),I.value=!1,P.value=!1,document.addEventListener("click",ot,!0))}function Wo(){rt.value=!1,$s()}function vo(){vt.value=!vt.value,vt.value&&(Ae(),rt.value=!1,Nn(),I.value=!1,P.value=!1,document.addEventListener("click",ot,!0))}function Un(){vt.value=!1,$s()}function $s(){!rt.value&&!vt.value&&!ln.value&&document.removeEventListener("click",ot,!0)}function ot(Pe){const ct=Pe.target;Nt.value?.contains(ct)||Os.value?.contains(ct)||(Wo(),Un(),Nn())}function Ae(){const Pe=on.value,ct=Nt.value;jn.value=Pe&&ct?`${Math.round(Pe.getBoundingClientRect().left-ct.getBoundingClientRect().left)}px`:""}function wt(){const Pe=mn.value,ct=Nt.value;Xt.value=Pe&&ct?`${Math.round(ct.getBoundingClientRect().right-Pe.getBoundingClientRect().right)}px`:""}const Lt=O(()=>{const Pe=o.status?.ctxMax??0;return Pe<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Pe*100)))}),Qt=O(()=>{const Pe=Pl(o.status?.ctxUsed??0),ct=Pl(o.status?.ctxMax??0);return r("status.ctxTooltip",{used:Pe,max:ct,pct:Lt.value})}),_o=O(()=>Lt.value>=80),Zn=O(()=>o.models?.find(Pe=>Pe.id===o.status?.modelId)),Xn=O(()=>B0(Zn.value)),io=O(()=>kh(Zn.value)),ro=O(()=>L1(Zn.value,o.thinking)),ys=O(()=>io.value.includes(ro.value)?ro.value:""),Ti=O(()=>O_e(ro.value)),Ns=O(()=>Xn.value==="unsupported"||io.value.length<=1),Us=O(()=>{if(!Ti.value)return"";const Pe=(Zn.value?.supportEfforts?.length??0)>0,ct=ro.value;return Pe&&ct!=="on"?r("composer.thinkingSuffixEffort",{level:ct}):r("composer.thinkingSuffix")});function Vs(Pe){Ns.value||i("setThinking",Wx(Zn.value,Pe))}function li(Pe){return Pe==="on"?r("status.thinkingOn"):Pe==="off"?r("status.thinkingOff"):Jp(Pe)}const ss=O(()=>io.value.map(Pe=>({value:Pe,label:li(Pe)}))),ai=O(()=>o.planArmed===!0||o.planMode===!0),ui=O(()=>o.workflowActive===!0),Cn=O(()=>o.goal?.status??o.activationBadges?.goal?.status??null),Ls=O(()=>Cn.value!==null&&Cn.value!=="complete"),Fn=O(()=>o.goalMode?"goal":o.planArmed?"plan":null),Io=V(null),Ho=V(""),Fs=O(()=>Ho.value?{textIndent:Ho.value}:void 0);let qs=null;function Ii(){Fn.value==="goal"?i("toggleGoal"):Fn.value==="plan"&&i("togglePlan")}function cs(){const Pe=Io.value;Ho.value=Pe?`calc(${Pe.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ye(Fn,async Pe=>{if(qs?.disconnect(),qs=null,!Pe){Ho.value="";return}await xt(),cs(),typeof ResizeObserver=="function"&&Io.value&&(qs=new ResizeObserver(cs),qs.observe(Io.value))},{immediate:!0});const Po=V(null),ln=V(!1),Os=V(null),ds=V(null),jo=V(null);let Ks=null;const $i=O(()=>{const Pe=[];return Pt.value&&Pe.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Ie}),Pe.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Ve},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:an},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:gn},{id:"workflow",icon:"sparkles",nameKey:"status.dynamicWorkflowLabel",descKey:"composer.addWorkflowDesc",action:Ln}),Pe});function ks(){const Pe=ds.value;if(!Pe||Pe.scrollHeight<=Pe.clientHeight+1){jo.value=null;return}const ct=getComputedStyle(Pe),bt=Number.parseFloat(ct.getPropertyValue("--menu-scrollbar-track-inset"))||0,pn=Number.parseFloat(ct.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Ni=Pe.clientHeight-bt*2,dr=Math.max(pn,Pe.clientHeight/Pe.scrollHeight*Ni),ci=Pe.scrollHeight-Pe.clientHeight;jo.value={top:Pe.offsetTop+bt+Pe.scrollTop/ci*(Ni-dr),height:dr}}Ye(ln,async Pe=>{Ks?.disconnect(),Ks=null,jo.value=null,Pe&&(await xt(),ks(),typeof ResizeObserver=="function"&&ds.value&&(Ks=new ResizeObserver(ks),Ks.observe(ds.value)))});function Nn(){ln.value=!1,$s()}function $o(){if(ln.value){Nn();return}Wo(),Un(),I.value=!1,P.value=!1,ln.value=!0,document.addEventListener("click",ot,!0),xt(()=>Os.value?.querySelector(".am-row")?.focus())}function Lr(Pe){Pe.action(),u.value?.focus()}function Me(Pe){if(Pe.key==="Escape"){Pe.preventDefault(),Nn(),u.value?.focus();return}if(Pe.key==="Tab"){Nn();return}if(Pe.key!=="ArrowDown"&&Pe.key!=="ArrowUp")return;Pe.preventDefault();const ct=Array.from(Os.value?.querySelectorAll(".am-row")??[]);if(ct.length===0)return;const bt=ct.indexOf(document.activeElement),pn=Pe.key==="ArrowDown"?(bt+1)%ct.length:(bt-1+ct.length)%ct.length;ct[pn]?.focus()}function Ie(){Nn(),te()}function Ve(){Nn(),Po.value?.toggleOpen()}function an(){Nn(),o.goalMode||h()}function gn(){Nn(),ai.value||p()}function Ln(){Nn(),ui.value||i("toggleWorkflow")}const xn=[{mode:"manual",icon:"fingerprint",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],ue=V(null),Ce=V("");function Ne(Pe){const ct={};return Pe&&(ct["--composer-menu-desc-width"]=Pe),ct}const Ue=O(()=>{const Pe=Ne(Ce.value);return jn.value&&(Pe.left=jn.value),Pe}),dt=O(()=>{const Pe={};return Xt.value&&(Pe.right=Xt.value),Pe});let yt=null;function Yt(Pe){const ct=Number.parseFloat(Pe);return Number.isFinite(ct)?ct:0}function sn(Pe){return`${Pe.fontStyle||"normal"} ${Pe.fontWeight||"400"} ${Pe.fontSize} ${Pe.fontFamily}`}function Qn(Pe){return Pe.letterSpacing==="normal"?0:Yt(Pe.letterSpacing)}function kn(Pe,ct){if(!Pe)return 0;const bt=o_e(Pe,sn(ct),{letterSpacing:Qn(ct)});return s_e(bt)}function Tn(){const Pe=ue.value?.querySelector(".pd-desc");if(!Pe)return;const ct=getComputedStyle(Pe),bt=Math.max(0,...xn.map(pn=>kn(r(pn.descKey),ct)));Ce.value=bt>0?`${Math.ceil(bt)}px`:""}function No(){typeof window>"u"||(yt!==null&&window.cancelAnimationFrame(yt),xt(()=>{yt=window.requestAnimationFrame(()=>{yt=null,Tn()})}))}Ye(l,No,{immediate:!0}),Sn(()=>{No(),document.fonts?.ready.then(No)}),En(()=>{yt!==null&&(window.cancelAnimationFrame(yt),yt=null)});function Dt(Pe){i("setPermission",Pe),Un()}const Vt=O(()=>xn.find(Pe=>Pe.mode===o.status?.permission)),dn=O(()=>Vt.value?r(Vt.value.labelKey):""),lo=O(()=>Vt.value?.icon??"fingerprint"),Yn=O(()=>Zn.value?.provider??""),Xe=O(()=>!Yn.value||!o.models?.length?[]:o.models.filter(Pe=>Pe.provider===Yn.value)),ge=O(()=>new Set(o.starredIds??[]));function Le(Pe){return ge.value.has(Pe)}const un=O(()=>o.models?.length?o.models.filter(Pe=>Le(Pe.id)&&Pe.provider!==Yn.value):[]);Ye(rt,async Pe=>{if(!Pe)return;await xt(),(Zt.value?.querySelector(".md-row.is-current")??Zt.value?.querySelector(".md-row"))?.focus()});function tl(Pe){if(Pe.key!=="ArrowDown"&&Pe.key!=="ArrowUp")return;const ct=Array.from(Zt.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(ct.length===0)return;Pe.preventDefault();const bt=ct.indexOf(document.activeElement),pn=Pe.key==="ArrowDown"?(bt+1)%ct.length:(bt-1+ct.length)%ct.length;ct[pn]?.focus()}function nl(Pe){i("selectModel",Pe),Wo()}return(Pe,ct)=>(g(),C("div",{class:ze(["composer",{"drag-over":x(Q),expanded:m.value}]),onDragover:ct[19]||(ct[19]=(...bt)=>x(me)&&x(me)(...bt)),onDragleave:ct[20]||(ct[20]=(...bt)=>x(xe)&&x(xe)(...bt)),onDrop:ct[21]||(ct[21]=(...bt)=>x(We)&&x(We)(...bt))},[x(j)?(g(),C("div",{key:0,class:"att-lightbox",onClick:ct[1]||(ct[1]=Ct((...bt)=>x(X)&&x(X)(...bt),["self"]))},[_("div",l8e,[K(Mn,{text:x(r)("model.close")},{default:ve(()=>[_("button",{type:"button",class:"att-lightbox-close",onClick:ct[0]||(ct[0]=(...bt)=>x(X)&&x(X)(...bt))},"✕")]),_:1},8,["text"]),x(j).kind==="video"?(g(),C("video",{key:0,class:"att-lightbox-media",src:x(j).previewUrl,controls:"",playsinline:""},null,8,a8e)):(g(),C("img",{key:1,class:"att-lightbox-media",src:x(j).previewUrl,alt:x(j).name},null,8,u8e)),_("div",c8e,N(x(j).name),1)])])):oe("",!0),_("div",d8e,[x(W).length>0?(g(),C("div",f8e,[_("div",{ref_key:"attachmentScrollRef",ref:ye,class:ze(["att-scroll",{"is-overflowing":de.value}])},[_("div",p8e,[H.value.length>0?(g(),C("div",{key:0,ref_key:"attachmentMediaRowRef",ref:fe,class:"att-row att-row-media"},[(g(!0),C(Te,null,st(H.value,bt=>(g(),pe(a2,{key:bt.localId,kind:bt.kind,name:bt.name,url:bt.previewUrl,"file-id":bt.fileId,"media-type":bt.mediaType,size:bt.size,uploading:bt.uploading,error:bt.error,removable:"","remove-label":x(r)("composer.removeNamed",{name:bt.name}),onActivate:pn=>we(bt),onRemove:pn=>x(Y)(bt.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):oe("",!0),Z.value.length>0?(g(),C("div",h8e,[(g(!0),C(Te,null,st(Z.value,bt=>(g(),pe(a2,{key:bt.localId,kind:"file",name:bt.name,"media-type":bt.mediaType,size:bt.size,uploading:bt.uploading,error:bt.error,removable:"","remove-label":x(r)("composer.removeNamed",{name:bt.name}),onActivate:pn=>we(bt),onRemove:pn=>x(Y)(bt.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):oe("",!0)])],2),de.value?(g(),C("span",m8e,N(x(r)("composer.attachmentCount",{n:x(W).length})),1)):oe("",!0),x(W).length>=2?(g(),pe(Mn,{key:1,text:x(r)("composer.clearAll")},{default:ve(()=>[K(Jt,{class:"att-clear",size:"sm",label:x(r)("composer.clearAll"),onClick:ne},{default:ve(()=>[K(Fe,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):oe("",!0)])):oe("",!0),_("div",g8e,[x(I)?(g(),pe(g_e,{key:0,id:"composer-slash-menu",items:x(T),"active-index":x($),onSelect:x(R),onHover:ct[2]||(ct[2]=bt=>$.value=bt)},null,8,["items","active-index","onSelect"])):oe("",!0),x(P)?(g(),pe(I_e,{key:1,id:"composer-mention-menu",items:x(M),"active-index":x(D),loading:x(B),onSelect:x(A),onHover:ct[3]||(ct[3]=bt=>D.value=bt)},null,8,["items","active-index","loading","onSelect"])):oe("",!0),K(Cr,{name:"composer-menu-pop"},{default:ve(()=>[ln.value?(g(),C("div",{key:0,ref_key:"modesMenuRef",ref:Os,class:"add-menu",onClick:ct[5]||(ct[5]=Ct(()=>{},["stop"])),onKeydown:Me},[_("div",{ref_key:"addMenuScrollRef",ref:ds,class:"am-scroll",role:"menu",onScroll:ks},[(g(!0),C(Te,null,st($i.value,bt=>(g(),C("button",{key:bt.id,type:"button",class:"am-row",role:"menuitem",onMousedown:ct[4]||(ct[4]=Ct(()=>{},["prevent"])),onClick:pn=>Lr(bt)},[_("span",y8e,[K(Fe,{name:bt.icon,size:"sm"},null,8,["name"])]),_("span",k8e,N(x(r)(bt.nameKey)),1),bt.descKey?(g(),C("span",b8e,N(x(r)(bt.descKey)),1)):oe("",!0)],40,v8e))),128))],544),jo.value?(g(),C("div",{key:0,class:"scroll-thumb",style:jt({top:`${jo.value.top}px`,height:`${jo.value.height}px`})},null,4)):oe("",!0)],544)):oe("",!0)]),_:1}),_("div",w8e,[Fn.value?(g(),C("span",{key:0,ref_key:"workModePillRef",ref:Io,class:"wm-pill"},[K(Fe,{name:Fn.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),_("span",null,N(Fn.value==="goal"?x(r)("status.goalLabel"):x(r)("status.planLabel")),1),K(Jt,{class:"wm-x",size:"sm",label:x(r)("status.workModeDismiss"),onMousedown:ct[6]||(ct[6]=Ct(()=>{},["prevent"])),onClick:Ii},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):oe("",!0),Bn(_("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":ct[7]||(ct[7]=bt=>Bo(a)?a.value=bt:null),class:"ph",style:jt(Fs.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!Je.value,"aria-controls":Je.value,"aria-activedescendant":it.value,onKeydown:nt,onCompositionstart:tn,onCompositionend:Kt,onInput:L,onBlur:ct[8]||(ct[8]=bt=>{I.value=!1,P.value=!1})},null,44,x8e),[[vs,x(a)]]),K(Mn,{text:m.value?x(r)("composer.collapseTitle"):x(r)("composer.expandTitle")},{default:ve(()=>[m.value||y.value?(g(),C("button",{key:0,class:"expand-btn",type:"button","aria-label":m.value?x(r)("composer.collapseTitle"):x(r)("composer.expandTitle"),onClick:k},[m.value?(g(),pe(Fe,{key:0,name:"collapse",size:"sm"})):(g(),pe(Fe,{key:1,name:"expand",size:"sm"}))],8,_8e)):oe("",!0)]),_:1},8,["text"])])]),Pt.value?(g(),C("input",{key:1,ref_key:"fileInputRef",ref:re,type:"file",multiple:"",class:"file-input-hidden",onChange:ct[9]||(ct[9]=(...bt)=>x(q)&&x(q)(...bt))},null,544)):oe("",!0),_("div",{ref_key:"toolbarRef",ref:Nt,class:"toolbar"},[_("div",{ref_key:"menuMeasureRef",ref:ue,class:"menu-measure","aria-hidden":"true"},[...ct[22]||(ct[22]=[_("span",{class:"pd-desc"},null,-1)])],512),_("div",S8e,[K(Jt,{size:"md",class:"composer-attach",label:x(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":ln.value,onMousedown:ct[10]||(ct[10]=Ct(()=>{},["prevent"])),onClick:Ct($o,["stop"])},{default:ve(()=>[K(Fe,{name:"plus"})]),_:1},8,["label","aria-expanded"]),K(r8e,{ref_key:"capMenuRef",ref:Po,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),C("span",{key:0,ref_key:"permissionPillRef",ref:on,class:ze(["perm-pill",["perm-"+e.status.permission,{open:vt.value}]]),role:"button",tabindex:"0","aria-label":dn.value,onClick:Ct(vo,["stop"]),onKeydown:[Do(vo,["enter"]),Do(Ct(vo,["prevent"]),["space"])]},[K(Fe,{class:"perm-pill-icon",name:lo.value,size:"md"},null,8,["name"]),_("span",A8e,N(dn.value),1)],42,C8e)):oe("",!0),K(Cr,{name:"composer-menu-pop"},{default:ve(()=>[vt.value&&e.status?(g(),C("div",{key:0,class:"perm-dropdown",style:jt(Ue.value),role:"menu",onClick:ct[11]||(ct[11]=Ct(()=>{},["stop"]))},[(g(),C(Te,null,st(xn,bt=>_("button",{key:bt.mode,class:ze(["pd-row",{"is-current":bt.mode===e.status.permission}]),role:"menuitem",onClick:pn=>Dt(bt.mode)},[_("span",{class:"pd-icon",style:jt({color:bt.color})},[K(Fe,{name:bt.icon,size:"md"},null,8,["name"])],4),_("span",E8e,[_("span",{class:"pd-name",style:jt({color:bt.color})},N(x(r)(bt.labelKey)),5),_("span",T8e,N(x(r)(bt.descKey)),1)]),_("span",I8e,[bt.mode===e.status.permission?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)])],10,M8e)),64))],4)):oe("",!0)]),_:1}),ui.value?(g(),C("span",$8e,[K(Fe,{class:"workflow-ic",name:"sparkles",size:"md"}),_("span",N8e,N(x(r)("status.dynamicWorkflowLabel")),1),K(Jt,{class:"workflow-x",size:"sm",label:x(r)("status.dynamicWorkflowDismiss"),onMousedown:ct[12]||(ct[12]=Ct(()=>{},["prevent"])),onClick:ct[13]||(ct[13]=Ct(bt=>i("toggleWorkflow"),["stop"]))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])])):oe("",!0)]),_("div",L8e,[_o.value?(g(),C("button",{key:0,class:"compact-chip",onClick:ct[14]||(ct[14]=Ct(bt=>i("compact"),["stop"]))},"/compact")):oe("",!0),K(Mn,{text:Qt.value},{default:ve(()=>[e.status&&!e.hideContext?(g(),C("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Qt.value},[K(G_e,{pct:Lt.value},null,8,["pct"])],8,F8e)):oe("",!0)]),_:1},8,["text"]),e.status?(g(),C("button",{key:1,ref_key:"modelPillRef",ref:mn,type:"button",class:ze(["model-pill",{open:rt.value}]),"aria-haspopup":"menu","aria-expanded":rt.value,onClick:Ct(xo,["stop"])},[_("span",R8e,N(e.status.model),1),Us.value?(g(),C("span",P8e,N(Us.value),1)):oe("",!0),K(Fe,{class:"cv",name:"chevron-down",size:"sm"})],10,O8e)):oe("",!0),e.working?(g(),pe(Mn,{key:2,text:x(r)("composer.interruptTitle")},{default:ve(()=>[_("button",{class:"stop","aria-label":x(r)("composer.interrupt"),onClick:ct[15]||(ct[15]=bt=>i("interrupt"))},[K(Fe,{name:"stop",size:"sm"})],8,D8e)]),_:1},8,["text"])):oe("",!0),_("button",{class:ze(["send",{"is-starting":e.starting}]),"aria-label":ut.value,disabled:e.starting||!Oe.value,onClick:ct[16]||(ct[16]=bt=>Re())},[e.starting?(g(),pe(ns,{key:0,size:"sm"})):(g(),pe(Fe,{key:1,name:"send",size:"sm"}))],10,B8e)]),K(Cr,{name:"composer-menu-pop"},{default:ve(()=>[rt.value&&e.status?(g(),C("div",{key:0,ref_key:"modelDropdownRef",ref:Zt,class:"model-dropdown",style:jt(dt.value),role:"menu",onClick:ct[18]||(ct[18]=Ct(()=>{},["stop"])),onKeydown:tl},[_("div",z8e,[un.value.length>0?(g(),C("div",W8e,N(x(r)("status.starredModels")),1)):oe("",!0),(g(!0),C(Te,null,st(un.value,bt=>(g(),C("button",{key:bt.id,class:ze(["md-row",{"is-current":bt.id===e.status.modelId}]),role:"menuitem",onClick:pn=>nl(bt.id)},[_("span",j8e,[bt.id===e.status.modelId?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)]),_("span",U8e,N(bt.displayName??bt.model),1),_("span",V8e,N(bt.provider),1),K(Fe,{class:"md-star",name:"star",size:"sm"})],10,H8e))),128)),un.value.length>0?(g(),C("div",q8e)):oe("",!0),Xe.value.length>0?(g(),C("div",K8e,N(Yn.value),1)):oe("",!0),(g(!0),C(Te,null,st(Xe.value,bt=>(g(),C("button",{key:bt.id,class:ze(["md-row",{"is-current":bt.id===e.status.modelId}]),role:"menuitem",onClick:pn=>nl(bt.id)},[_("span",Z8e,[bt.id===e.status.modelId?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)]),_("span",Y8e,N(bt.displayName??bt.model),1),Le(bt.id)?(g(),pe(Fe,{key:0,class:"md-star",name:"star",size:"sm"})):oe("",!0)],10,G8e))),128))]),Xe.value.length>0?(g(),C("div",J8e)):oe("",!0),_("div",X8e,[_("span",Q8e,N(x(r)("status.thinkingLabel")),1),Xn.value==="unsupported"?(g(),C("span",e6e,N(x(r)("status.modeNotSupported")),1)):io.value.length>1?(g(),pe(zs,{key:1,"model-value":ys.value,options:ss.value,size:"xs","onUpdate:modelValue":Vs},null,8,["model-value","options"])):(g(),C("span",t6e,N(li(io.value[0]??ro.value)),1))]),ct[23]||(ct[23]=_("div",{class:"md-divider"},null,-1)),_("div",n6e,N(x(r)("status.cacheNote")),1),ct[24]||(ct[24]=_("div",{class:"md-divider"},null,-1)),_("button",{class:"md-row md-row-more",role:"menuitem",onClick:ct[17]||(ct[17]=bt=>{Wo(),i("pickModel")})},[_("span",o6e,[K(Fe,{name:"list",size:"sm"})]),_("span",s6e,N(x(r)("status.moreModels")),1),K(Fe,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):oe("",!0)]),_:1})],512)]),_("div",{class:ze(["drop-overlay",{show:x(Q)}]),"aria-hidden":"true"},[_("div",i6e,[K(Fe,{name:"file-plus",size:"lg"}),_("span",null,N(x(r)("composer.dropToAttach")),1)])],2)],34))}}),TN=ht(r6e,[["__scopeId","data-v-e6685471"]]),l6e={class:"ah"},a6e={class:"akind"},u6e={class:"apath"},c6e={class:"ah-path"},d6e={class:"dg"},f6e={class:"dc"},p6e={key:2,class:"body-shell"},h6e={class:"shell-cmd"},m6e={key:0,class:"shell-cwd"},g6e={key:1,class:"shell-danger"},v6e={class:"file-bar"},y6e={class:"file-lang"},k6e={class:"file-ln"},b6e={class:"file-text"},w6e={key:4,class:"body-chip"},x6e={class:"chip-label"},_6e={class:"chip-value"},S6e={key:0,class:"chip-detail"},C6e={key:5,class:"body-chip"},A6e={key:0,class:"chip-label"},M6e={class:"chip-value"},E6e={key:6,class:"body-chip"},T6e={class:"chip-label"},I6e={class:"chip-value"},$6e={key:0,class:"chip-detail"},N6e={key:7,class:"body-chip"},L6e={class:"chip-label"},F6e={class:"chip-value"},O6e={key:0,class:"chip-detail"},R6e={key:8,class:"body-todo"},P6e={class:"todo-glyph"},D6e={key:10,class:"body-generic"},B6e={class:"gen-text"},z6e={key:11,class:"feedback-wrap"},W6e=["placeholder"],H6e={class:"feedback-hint"},j6e={key:0,class:"plan-actions"},U6e={key:1,class:"abtn"},V6e=.4,q6e=Ze({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>{const ne=n.block;return ne.kind!=="plan_review"?null:{plan:ne.plan,path:ne.path,options:ne.options??[]}}),r=V(!1),l=V(!1),a=O(()=>["plan_review","diff","file"].includes(n.block.kind)),u=V(null),c=V(null),d=V(null),f=V({top:!1,bottom:!1}),p=V({top:!1,bottom:!1}),h=V({top:!1,bottom:!1});function m(ne){return H=>{const Z=H.currentTarget;Z instanceof HTMLElement&&(ne.value={top:Z.scrollTop>0,bottom:Z.scrollTop+Z.clientHeight{const{top:H,bottom:Z}=ne.value;if(!H&&!Z)return;const ye="var(--menu-scroll-fade)",fe=H&&Z?`linear-gradient(to bottom, transparent 0, black ${ye}, black calc(100% - ${ye}), transparent 100%)`:H?`linear-gradient(to bottom, transparent, black ${ye})`:`linear-gradient(to top, transparent, black ${ye})`;return{maskImage:fe,WebkitMaskImage:fe}})}const b=y(f),S=y(p),I=y(h);function T(){const ne=[[u.value,f],[c.value,p],[d.value,h]];for(const[H,Z]of ne)H&&(Z.value={top:H.scrollTop>0,bottom:H.scrollTop+H.clientHeightvoid xt(T)),Ye(r,()=>void xt(T)),Ye(()=>n.block,()=>void xt(T));const $=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function F(){const ne=$.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${ne}`)}const R=V(!1),P=V(""),M=V(null);function D(){const ne=M.value;if(!ne)return;ne.style.height="auto";const Z=(window.visualViewport?.height??window.innerHeight)*V6e,ye=Math.min(ne.scrollHeight,Z);ne.style.height=`${ye}px`,ne.style.overflowY=ne.scrollHeight>Z?"auto":"hidden"}let B=null,z=0;function A(){if(B?.disconnect(),B=null,typeof ResizeObserver>"u")return;const ne=M.value;ne&&(B=new ResizeObserver(H=>{const Z=H[0]?.contentRect.width??0;Z!==z&&(z=Z,D())}),B.observe(ne))}Ye(P,()=>void xt(D)),Ye(R,ne=>{if(!ne){B?.disconnect(),B=null;return}xt(()=>{D(),A()})}),Ye(r,ne=>{ne||xt(D)});const{uiFontSize:L}=Kx();Ye(L,()=>void xt(D));function W(){n.busy||(R.value=!0,P.value="",setTimeout(()=>M.value?.focus(),0))}function j(){if(n.busy)return;const ne=P.value.trim();i.value?G("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:ne||void 0}):G("feedback",{decision:"rejected",feedback:ne||void 0}),R.value=!1,P.value=""}function re(){R.value=!1,P.value=""}function Q(ne){ne.key==="Enter"&&!ne.shiftKey?(ne.preventDefault(),j()):ne.key==="Escape"&&(ne.preventDefault(),re())}const Y=V(null);Ye(()=>n.busy,ne=>{ne||(Y.value=null)});function G(ne,H){n.busy||(Y.value=ne,o("decide",H))}function X(){G("approve",{decision:"approved"})}function te(){G("approveSession",{decision:"approved",scope:"session"})}function q(){G("reject",{decision:"rejected"})}function me(){G("approvePlan",{decision:"approved"})}function xe(ne){G(`option:${ne}`,{decision:"approved",selectedLabel:ne})}function We(){n.busy||W()}function he(){G("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function ee(ne){const H=(document.activeElement?.tagName??"").toLowerCase();if(H==="input"||H==="textarea"||n.busy||r.value)return;const Z=i.value;if(Z){if(Z.options.length===0){ne.key==="1"?(ne.preventDefault(),me()):ne.key==="2"?(ne.preventDefault(),We()):ne.key==="3"&&(ne.preventDefault(),he());return}ne.key==="1"&&Z.options[0]?(ne.preventDefault(),xe(Z.options[0].label)):ne.key==="2"&&Z.options[1]?(ne.preventDefault(),xe(Z.options[1].label)):ne.key==="3"&&Z.options[2]&&(ne.preventDefault(),xe(Z.options[2].label));return}ne.key==="1"?(ne.preventDefault(),X()):ne.key==="2"?(ne.preventDefault(),te()):ne.key==="3"?(ne.preventDefault(),q()):ne.key==="4"&&(ne.preventDefault(),W())}return Sn(()=>{document.addEventListener("keydown",ee),window.addEventListener("resize",D),window.visualViewport?.addEventListener("resize",D)}),En(()=>{document.removeEventListener("keydown",ee),window.removeEventListener("resize",D),window.visualViewport?.removeEventListener("resize",D),B?.disconnect(),B=null}),(ne,H)=>(g(),pe($x,{class:ze(["appr",{minimized:r.value}])},Ap({head:ve(()=>[_("div",l6e,[H[6]||(H[6]=_("span",{class:"ah-ic"},"!",-1)),_("span",a6e,N(F()),1),_("span",u6e,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),C(Te,{key:0},[qe(N(e.block.path),1)],64)):e.block.kind==="shell"?(g(),C(Te,{key:1},[qe(N(e.block.command),1)],64)):e.block.kind==="url"?(g(),C(Te,{key:2},[qe(N(e.block.url),1)],64)):e.block.kind==="search"?(g(),C(Te,{key:3},[qe(N(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),C(Te,{key:4},[qe(N(e.block.name),1)],64)):e.block.kind==="generic"?(g(),C(Te,{key:5},[qe(N(e.block.summary),1)],64)):oe("",!0)]),e.agentName&&!r.value?(g(),pe(wr,{key:0,variant:"neutral",size:"sm"},{default:ve(()=>[qe(N(x(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):oe("",!0),r.value?oe("",!0):(g(),pe(wr,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ve(()=>[qe(N(x(s)("approval.required")),1)]),_:1})),a.value&&!r.value?(g(),pe(Jt,{key:2,class:"aexpand",size:"sm",label:l.value?x(s)("approval.collapsePlan"):x(s)("approval.expandPlan"),tooltip:l.value?x(s)("approval.collapsePlan"):x(s)("approval.expandPlan"),onClick:H[0]||(H[0]=Z=>l.value=!l.value)},{default:ve(()=>[K(Fe,{name:l.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):oe("",!0),K(Jt,{class:"amin",size:"sm",label:r.value?x(s)("question.expand"):x(s)("question.minimize"),onClick:H[1]||(H[1]=Z=>r.value=!r.value)},{default:ve(()=>[r.value?(g(),pe(Fe,{key:0,name:"chevron-up",size:"md"})):(g(),pe(Fe,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[r.value?void 0:{name:"default",fn:ve(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),pe(Mn,{key:0,text:e.block.path},{default:ve(()=>[_("div",c6e,N(e.block.path),1)]),_:1},8,["text"])):oe("",!0),e.block.kind==="diff"?(g(),C("div",{key:1,ref_key:"diffBodyRef",ref:u,class:ze(["diff",{expanded:l.value}]),style:jt(x(b)),onScroll:H[2]||(H[2]=(...Z)=>x(k)&&x(k)(...Z))},[(g(!0),C(Te,null,st(e.block.diff,(Z,ye)=>(g(),C("div",{key:ye,class:ze(["dl",Z.kind==="add"?"add":Z.kind==="rem"?"del":""])},[_("span",d6e,N(Z.gutter),1),_("span",f6e,N(Z.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),C("div",p6e,[_("div",h6e,[H[7]||(H[7]=_("span",{class:"shell-dollar"},"$",-1)),qe(" "+N(e.block.command),1)]),e.block.cwd?(g(),C("div",m6e,"cwd: "+N(e.block.cwd),1)):oe("",!0),e.block.danger?(g(),C("div",g6e,N(x(s)("approval.danger",{detail:e.block.danger})),1)):oe("",!0)])):e.block.kind==="file"?(g(),C("div",{key:3,class:ze(["body-file",{expanded:l.value}])},[_("div",v6e,[_("span",y6e,N(e.block.language??""),1)]),_("div",{class:"file-content",ref_key:"fileBodyRef",ref:c,style:jt(x(S)),onScroll:H[3]||(H[3]=(...Z)=>x(w)&&x(w)(...Z))},[(g(!0),C(Te,null,st(e.block.content.split(` +`),(Z,ye)=>(g(),C("div",{key:ye,class:"file-line"},[_("span",k6e,N(ye+1),1),_("span",b6e,N(Z),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),C("div",w6e,[_("span",x6e,N(e.block.op),1),_("span",_6e,N(e.block.path),1),e.block.detail?(g(),C("span",S6e,N(e.block.detail),1)):oe("",!0)])):e.block.kind==="url"?(g(),C("div",C6e,[e.block.method?(g(),C("span",A6e,N(e.block.method),1)):oe("",!0),_("span",M6e,N(e.block.url),1)])):e.block.kind==="search"?(g(),C("div",E6e,[_("span",T6e,N(x(s)("approval.searchQueryLabel")),1),_("span",I6e,N(e.block.query),1),e.block.scope?(g(),C("span",$6e,N(x(s)("approval.searchScope",{scope:e.block.scope})),1)):oe("",!0)])):e.block.kind==="invocation"?(g(),C("div",N6e,[_("span",L6e,N(e.block.kind2),1),_("span",F6e,N(e.block.name),1),e.block.description?(g(),C("span",O6e,N(e.block.description),1)):oe("",!0)])):e.block.kind==="todo"?(g(),C("div",R6e,[(g(!0),C(Te,null,st(e.block.items,(Z,ye)=>(g(),C("div",{key:ye,class:"todo-item"},[_("span",P6e,N(Z.status==="done"||Z.status==="completed"?"✓":"○"),1),_("span",{class:ze(["todo-title",{"todo-done":Z.status==="done"||Z.status==="completed"}])},N(Z.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),C("div",{key:9,ref_key:"planBodyRef",ref:d,class:ze(["body-plan",{expanded:l.value}]),style:jt(x(I)),onScroll:H[4]||(H[4]=(...Z)=>x(v)&&x(v)(...Z))},[K(Bl,{text:e.block.plan},null,8,["text"])],38)):(g(),C("div",D6e,[_("span",B6e,N(e.block.summary),1)])),R.value?(g(),C("div",z6e,[Bn(_("textarea",{ref_key:"feedbackRef",ref:M,"onUpdate:modelValue":H[5]||(H[5]=Z=>P.value=Z),class:"feedback-ta",placeholder:x(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:Q},null,40,W6e),[[vs,P.value]]),_("div",H6e,N(x(s)("approval.feedbackHint")),1)])):oe("",!0)]),key:"0"},r.value?void 0:{name:"foot",fn:ve(()=>[i.value?(g(),C("div",j6e,[i.value.options.length>0?(g(!0),C(Te,{key:0},st(i.value.options,(Z,ye)=>(g(),pe(Mn,{key:ye,text:Z.description},{default:ve(()=>[K(nn,{class:"kbtn",size:"sm",variant:"primary",loading:Y.value===`option:${Z.label}`,disabled:e.busy,onClick:fe=>xe(Z.label)},{default:ve(()=>[qe(N(Z.label),1),K(fl,{class:"k",keys:[String(ye+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),pe(nn,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:Y.value==="approvePlan",disabled:e.busy,onClick:me},{default:ve(()=>[qe(N(x(s)("approval.approvePlan")),1),K(fl,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),K(nn,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:We},{default:ve(()=>[qe(N(x(s)("approval.revise")),1),i.value.options.length===0?(g(),pe(fl,{key:0,class:"k",keys:["2"]})):oe("",!0)]),_:1},8,["disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"danger-soft",loading:Y.value==="rejectAndExit",disabled:e.busy,onClick:he},{default:ve(()=>[qe(N(x(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),pe(fl,{key:0,class:"k",keys:["3"]})):oe("",!0)]),_:1},8,["loading","disabled"])])):(g(),C("div",U6e,[K(nn,{class:"kbtn",size:"sm",variant:"primary",loading:Y.value==="approve",disabled:e.busy,onClick:X},{default:ve(()=>[qe(N(x(s)("approval.approve")),1),K(fl,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"secondary",loading:Y.value==="approveSession",disabled:e.busy,onClick:te},{default:ve(()=>[qe(N(x(s)("approval.approveSession")),1),K(fl,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"secondary",loading:Y.value==="reject",disabled:e.busy,onClick:q},{default:ve(()=>[qe(N(x(s)("approval.reject")),1),K(fl,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:W},{default:ve(()=>[qe(N(x(s)("approval.feedback")),1),K(fl,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),K6e=ht(q6e,[["__scopeId","data-v-1c39b16f"]]),G6e={class:"goal-panel"},Z6e={key:0,class:"goal-criterion"},Y6e={class:"goal-criterion-label"},J6e=Ze({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),C("div",G6e,[K(Bl,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),C("div",Z6e,[_("div",Y6e,[K(Fe,{name:"check-list",size:"md"}),_("span",null,N(x(t)("status.goalDoneWhen")),1)]),K(Bl,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):oe("",!0)]))}}),X6e=ht(J6e,[["__scopeId","data-v-81a928ba"]]),Q6e={class:"plan-panel"},eMe={key:0,class:"plan-review-row"},tMe={class:"plan-review-label"},nMe={key:1,class:"plan-review-row plan-review-feedback"},oMe={class:"plan-review-label"},sMe={key:3,class:"plan-path-only"},iMe={class:"plan-path-hint"},rMe={key:4,class:"plan-empty"},lMe=Ze({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=$t();return(o,s)=>(g(),C("div",Q6e,[e.plan?.selectedOption?(g(),C("div",eMe,[_("span",tMe,N(x(n)("tools.plan.selectedOption")),1),_("span",null,N(e.plan.selectedOption),1)])):oe("",!0),e.plan?.feedback?(g(),C("div",nMe,[_("span",oMe,N(x(n)("tools.plan.feedback")),1),_("span",null,N(e.plan.feedback),1)])):oe("",!0),e.plan?.plan?(g(),pe(Bl,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),C("div",sMe,[_("span",iMe,N(x(n)("tools.plan.pathOnlyHint")),1),K(nn,{class:"plan-path",variant:"ghost",size:"sm",onClick:s[0]||(s[0]=i=>t.openFile?.({path:e.plan.path}))},{default:ve(()=>[qe(N(e.plan.path),1)]),_:1})])):(g(),C("div",rMe,[K(Fe,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),_("span",null,N(x(n)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),aMe=ht(lMe,[["__scopeId","data-v-bc8a415c"]]),uMe={class:"qh"},cMe={class:"qtitle"},dMe={key:0,class:"qstep"},fMe={key:1,class:"qmin-peek"},pMe={class:"qbody"},hMe=["aria-label"],mMe=["aria-selected","aria-label","onClick"],gMe={class:"qstep-num"},vMe={key:1,class:"qheader-chip"},yMe={class:"qtext"},kMe={class:"qopts"},bMe=["onClick"],wMe={class:"qopt-key"},xMe={class:"qopt-glyph"},_Me={key:0,class:"chk"},SMe={key:1,class:"rad"},CMe={class:"qopt-text"},AMe={class:"qopt-label"},MMe={key:0,class:"qopt-desc"},EMe={class:"qopt-glyph"},TMe={key:0,class:"chk"},IMe={key:1,class:"rad"},$Me={class:"qopt-label"},NMe=["placeholder"],LMe={class:"qfoot"},FMe=Ze({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=$t(),s=t,i=V(0),r=V(!1),l=O(()=>n.question.questions[i.value]),a=O(()=>n.question.questions.length);function u(){i.value>0&&i.value--}function c(){i.value=0&&A0:L.kind==="multiWithOther"?L.optionIds.length>0||L.otherText.trim().length>0:L.kind==="other"?L.text.trim().length>0:!0:!1}function p(){return f(l.value.id)}const h=V({});function m(A){return A.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${A.label} ${A.description??""}`.toLowerCase())}function k(){const A={...h.value};let L=!1;for(const W of n.question.questions){if(A[W.id])continue;const j=W.options.filter(m);j.length!==0&&(A[W.id]=W.multiSelect?{kind:"multi",optionIds:j.map(re=>re.id)}:{kind:"single",optionId:j[0].id},L=!0)}L&&(h.value=A)}Ye(()=>n.question.questionId,()=>{i.value=0,r.value=!1,h.value={},y.value={}}),Ye(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function w(A,L){const W=h.value[A];if(W&&W.kind==="single"&&W.optionId===L){const j={...h.value};delete j[A],h.value=j}else h.value={...h.value,[A]:{kind:"single",optionId:L}}}function v(A,L){const W=h.value[A],j=W&&(W.kind==="multi"||W.kind==="multiWithOther")?W.kind==="multi"?[...W.optionIds]:[...W.optionIds]:[],re=j.indexOf(L);re>=0?j.splice(re,1):j.push(L);const Q=h.value[A],Y=Q&&Q.kind==="multiWithOther"?Q.otherText:"";Y?h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:j,otherText:Y}}:h.value={...h.value,[A]:{kind:"multi",optionIds:j}}}const y=V({}),b=V(null);function S(A){const L=n.question.questions.find(j=>j.id===A),W=y.value[A]??"";if(L.multiSelect){const j=h.value[A],re=j&&(j.kind==="multi"||j.kind==="multiWithOther")?j.kind==="multi"?[...j.optionIds]:[...j.optionIds]:[];h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:re,otherText:W}}}else h.value={...h.value,[A]:{kind:"other",text:W}}}function I(A){S(A),xt(()=>b.value?.focus())}function T(A,L){const W=h.value[A];return W?W.kind==="single"?W.optionId===L:W.kind==="multi"||W.kind==="multiWithOther"?W.optionIds.includes(L):!1:!1}function $(A){const L=h.value[A];return!!(L&&(L.kind==="other"||L.kind==="multiWithOther"))}function F(){return n.question.questions.every(A=>f(A.id))}const R=O(()=>n.busyKind==="answer"),P=O(()=>n.busyKind==="dismiss"),M=O(()=>!!n.busyKind);function D(){if(M.value||!F())return;const A={answers:h.value,method:"click"};s("answer",n.question.questionId,A)}function B(){M.value||s("dismiss",n.question.questionId)}function z(A){const L=(document.activeElement?.tagName??"").toLowerCase(),W=L==="input"||L==="textarea";if(M.value)return;if(A.key==="Enter"){if(A.preventDefault(),r.value)return;i.value=1&&j<=9){A.preventDefault();const re=l.value,Q=j-1,Y=re.options[Q];Y&&(re.multiSelect?v(re.id,Y.id):w(re.id,Y.id))}}return Sn(()=>document.addEventListener("keydown",z)),En(()=>document.removeEventListener("keydown",z)),(A,L)=>(g(),pe($x,{class:ze(["qcard",{minimized:r.value}])},Ap({head:ve(()=>[_("div",uMe,[L[5]||(L[5]=_("span",{class:"qh-ic"},"?",-1)),_("span",cMe,N(x(o)("question.title")),1),a.value>1&&!r.value?(g(),C("span",dMe,N(x(o)("question.step",{current:i.value+1,total:a.value})),1)):oe("",!0),r.value?(g(),C("span",fMe,N(l.value.question),1)):oe("",!0),K(Jt,{class:"qmin",size:"sm",label:r.value?x(o)("question.expand"):x(o)("question.minimize"),onClick:L[0]||(L[0]=W=>r.value=!r.value)},{default:ve(()=>[r.value?(g(),pe(Fe,{key:0,name:"chevron-up",size:"md"})):(g(),pe(Fe,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[r.value?void 0:{name:"default",fn:ve(()=>[_("div",pMe,[a.value>1?(g(),C("div",{key:0,class:"qsteps",role:"tablist","aria-label":x(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),C(Te,null,st(n.question.questions,(W,j)=>(g(),C("button",{key:W.id,type:"button",class:ze(["qstep-dot",{active:j===i.value,answered:f(W.id)}]),"aria-selected":j===i.value,"aria-label":x(o)("question.step",{current:j+1,total:a.value}),onClick:re=>d(j)},[_("span",gMe,N(j+1),1)],10,mMe))),128))],8,hMe)):oe("",!0),l.value.header?(g(),C("div",vMe,[K(wr,{variant:"neutral",size:"sm"},{default:ve(()=>[qe(N(l.value.header),1)]),_:1})])):oe("",!0),_("div",yMe,N(l.value.question),1),l.value.body?(g(),pe(Bl,{key:2,text:l.value.body,class:"qmdbody"},null,8,["text"])):oe("",!0),_("div",kMe,[(g(!0),C(Te,null,st(l.value.options,(W,j)=>(g(),C("label",{key:W.id,class:ze(["qopt",{selected:T(l.value.id,W.id)}]),onClick:Ct(re=>l.value.multiSelect?v(l.value.id,W.id):w(l.value.id,W.id),["prevent"])},[_("span",wMe,N(j+1),1),_("span",xMe,[l.value.multiSelect?(g(),C("span",_Me,N(T(l.value.id,W.id)?"■":"□"),1)):(g(),C("span",SMe,N(T(l.value.id,W.id)?"●":"○"),1))]),_("span",CMe,[_("span",AMe,N(W.label),1),W.description?(g(),C("span",MMe,N(W.description),1)):oe("",!0)])],10,bMe))),128)),l.value.allowOther?(g(),C("label",{key:0,class:ze(["qopt",{selected:$(l.value.id)}]),onClick:L[4]||(L[4]=Ct(W=>I(l.value.id),["prevent"]))},[L[6]||(L[6]=_("span",{class:"qopt-key"},null,-1)),_("span",EMe,[l.value.multiSelect?(g(),C("span",TMe,N($(l.value.id)?"■":"□"),1)):(g(),C("span",IMe,N($(l.value.id)?"●":"○"),1))]),_("span",$Me,N(l.value.otherLabel??x(o)("question.otherDefault")),1),Bn(_("input",{ref_key:"otherInputEl",ref:b,"onUpdate:modelValue":L[1]||(L[1]=W=>y.value[l.value.id]=W),class:"other-input",type:"text",placeholder:l.value.otherLabel??x(o)("question.otherDefault"),onInput:L[2]||(L[2]=W=>S(l.value.id)),onFocus:L[3]||(L[3]=W=>S(l.value.id))},null,40,NMe),[[vs,y.value[l.value.id]]])],2)):oe("",!0)])])]),key:"0"},r.value?void 0:{name:"foot",fn:ve(()=>[_("div",LMe,[i.value[qe(N(x(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),pe(nn,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!F(),loading:R.value,onClick:D},{default:ve(()=>[qe(N(x(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),pe(nn,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||M.value,onClick:u},{default:ve(()=>[qe(N(x(o)("question.back")),1)]),_:1},8,["disabled"])):oe("",!0),K(nn,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:P.value,disabled:M.value,onClick:B},{default:ve(()=>[qe(N(x(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),OMe=ht(FMe,[["__scopeId","data-v-29d475ec"]]),RMe=Ze({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),C("span",{class:ze(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},N(n[t.status]),3))}}),j1=ht(RMe,[["__scopeId","data-v-f870866a"]]),PMe={key:0,class:"sg-empty"},DMe={key:1,class:"sg-grid"},BMe=["aria-label","onClick"],zMe={class:"sg-top"},WMe={class:"sg-num"},HMe={class:"sg-name"},jMe={key:1,class:"sg-desc"},UMe={class:"sg-foot"},VMe={key:0,class:"sg-model"},qMe={class:"sg-status"},KMe={class:"sg-state"},GMe={key:0,class:"sg-time"},ZMe=Ze({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(c){return c}function i(c){return c==="running"?"tasks.emptyRunning":c==="done"?"tasks.emptyDone":c==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function r(c){const{model:d,thinkingEffort:f}=c;return[d,f?Jp(f):void 0].filter(Boolean).join(" · ")||void 0}function l(c){const d=c.state;return o(d==="done"?"tasks.stateDone":d==="fail"?"tasks.stateFail":d==="cancelled"?"tasks.stateCancelled":"tasks.running")}function a(c,d){return String(c.dynamicWorkflowIndex??d+1).padStart(2,"0")}function u(c){return!!(c.agentId||c.output?.length)}return(c,d)=>e.tasks.length===0?(g(),C("div",PMe,N(x(o)(i(e.filter))),1)):(g(),C("div",DMe,[(g(!0),C(Te,null,st(e.tasks,(f,p)=>(g(),C("article",{key:f.id,class:ze(["sg-card",[`s-${f.state}`,{openable:u(f)}]])},[u(f)?(g(),C("button",{key:0,class:"sg-open",type:"button","aria-label":f.name,onClick:h=>n("open",f.agentId??f.id)},null,8,BMe)):oe("",!0),_("div",zMe,[_("span",WMe,N(a(f,p)),1),_("span",HMe,N(f.name),1)]),f.meta?(g(),C("div",jMe,N(f.meta),1)):oe("",!0),_("div",UMe,[r(f)?(g(),C("div",VMe,[_("span",null,N(r(f)),1)])):oe("",!0),_("div",qMe,[_("span",KMe,[f.state==="run"?(g(),pe(j1,{key:0,status:"run"})):f.state==="done"?(g(),pe(Fe,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),pe(Fe,{key:2,name:"close",size:"sm"})),qe(" "+N(l(f)),1)]),f.timing?(g(),C("span",GMe,[K(Fe,{name:"clock",size:"sm"}),qe(" "+N(f.timing),1)])):oe("",!0)])]),f.state==="run"?(g(),pe(Jt,{key:2,class:"sg-cancel",size:"sm",label:x(o)("tasks.stop"),onClick:Ct(h=>n("cancel",f.id),["stop"])},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):oe("",!0)],2))),128))]))}}),YMe=ht(ZMe,[["__scopeId","data-v-b4cfb2fc"]]),JMe={class:"taskspane"},XMe={class:"tp-list"},QMe={key:0,class:"tp-empty"},e5e={class:"tp-main"},t5e=["aria-label","onClick"],n5e=["aria-label"],o5e={class:"tp-name"},s5e={key:1,class:"tp-meta"},i5e={key:2,class:"tp-model"},r5e={key:3,class:"tp-model"},l5e={key:4,class:"tp-time"},a5e=Ze({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(d){return d}function i(d){return d==="running"?"tasks.emptyRunning":d==="done"?"tasks.emptyDone":d==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function r(d){return d.kind==="subagent"||!!(d.output?.length||d.meta)}function l(d){r(d)&&n("open",d.agentId??d.id)}function a(d){const f=d.state;return o(f==="done"?"tasks.stateDone":f==="fail"?"tasks.stateFail":f==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(d){return d.kind==="subagent"?d.model:void 0}function c(d){const f=d.thinkingEffort;return d.kind==="subagent"&&f?Jp(f):void 0}return(d,f)=>(g(),C("div",JMe,[_("div",XMe,[e.tasks.length===0?(g(),C("div",QMe,N(x(o)(i(e.filter))),1)):(g(!0),C(Te,{key:1},st(e.tasks,p=>(g(),C("div",{key:p.id,class:ze(["tp-row",{fail:p.state==="fail",expandable:r(p)}])},[_("div",e5e,[r(p)?(g(),C("button",{key:0,class:"tp-open",type:"button","aria-label":p.name,onClick:h=>l(p)},null,8,t5e)):oe("",!0),_("span",{class:"tp-glyph",role:"img","aria-label":a(p)},[p.state==="run"?(g(),pe(j1,{key:0,status:"run"})):p.state==="done"?(g(),pe(Fe,{key:1,class:"tp-done",name:"check",size:"sm"})):p.state==="cancelled"?(g(),pe(Fe,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),pe(Fe,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,n5e),_("span",o5e,N(p.name),1),p.meta?(g(),C("span",s5e,N(p.meta),1)):oe("",!0),u(p)?(g(),C("span",i5e,N(u(p)),1)):oe("",!0),c(p)?(g(),C("span",r5e,N(c(p)),1)):oe("",!0),p.timing?(g(),C("span",l5e,N(p.timing),1)):oe("",!0),p.state==="run"?(g(),pe(Jt,{key:5,class:"tp-stop",size:"sm",label:x(o)("tasks.stop"),onClick:Ct(h=>n("cancel",p.id),["stop"])},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):oe("",!0),r(p)?(g(),pe(Fe,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):oe("",!0)])],2))),128))])]))}}),u5e=ht(a5e,[["__scopeId","data-v-ac309aaa"]]),c5e={class:"todo-card"},d5e={key:0,class:"tc-empty"},f5e={class:"tc-name"},p5e=Ze({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=$t();return(n,o)=>(g(),C("div",c5e,[e.todos.length===0?(g(),C("div",d5e,[K(Fe,{class:"tc-empty-ico",name:"list",size:"lg"}),_("span",null,N(x(t)("tasks.emptyTodo")),1)])):(g(!0),C(Te,{key:1},st(e.todos,(s,i)=>(g(),C("div",{key:i,class:ze(["tc-row",`s-${s.status}`])},[_("span",{class:ze(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),pe(Fe,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),pe(ns,{key:1,class:"tc-spin",size:"sm"})):oe("",!0)],2),_("span",f5e,N(s.title),1)],2))),128))]))}}),h5e=ht(p5e,[["__scopeId","data-v-4e4d0054"]]),m5e=["disabled","aria-pressed"],g5e=Ze({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),C("button",{key:0,class:ze(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[An(t.$slots,"default",{},void 0,!0)],10,m5e)):(g(),C("span",{key:1,class:ze(["ui-pill",{"is-active":e.active}])},[An(t.$slots,"default",{},void 0,!0)],2))}}),IN=ht(g5e,[["__scopeId","data-v-0fb1a50d"]]),v5e={class:"fc-label"},y5e=Ze({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=O(()=>n.options.find(R=>R.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=V(null),l=V(!1);let a=0,u=null;async function c(){const R=r.value?.closest(".dock-work-head");if(!R)return;const P=R.querySelector(".wp-head-tab"),M=getComputedStyle(R),D=(Number.parseFloat(M.columnGap)||0)*2,B=R.clientWidth-Number.parseFloat(M.paddingLeft)-Number.parseFloat(M.paddingRight)-D,z=P?.scrollWidth??0;if(!l.value){const L=r.value?.querySelector(".ui-seg");L&&L.offsetWidth>0&&(a=L.offsetWidth)}const A=z+a>B;if(l.value=A,!A){await xt();const L=r.value?.querySelector(".ui-seg");L&&L.offsetWidth>0&&(a=L.offsetWidth),l.value=z+a>B}}const d=V(!1),f=V(null),p=V(null),h=V({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){w();return}d.value=!0,await xt(),v(),y(),window.addEventListener("mousedown",I,!0),window.addEventListener("keydown",T,!0),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0)}function w(R){d.value=!1,window.removeEventListener("mousedown",I,!0),window.removeEventListener("keydown",T,!0),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0),R?.refocus&&m()?.focus()}function v(){const R=m();if(!R)return;const P=R.getBoundingClientRect(),M=p.value?.offsetHeight??0,D=getComputedStyle(document.documentElement),B=Number.parseFloat(D.getPropertyValue("--space-2"))||0,z=Number.parseFloat(D.getPropertyValue("--space-1"))||0,A=p.value?.offsetWidth??0,L=Math.min(P.left,Math.max(B,window.innerWidth-A-B));P.bottom+z+M<=window.innerHeight-B?h.value={left:`${L}px`,top:`${P.bottom+z}px`}:h.value={left:`${L}px`,bottom:`${window.innerHeight-P.top+z}px`}}function y(){const R=p.value;if(!R)return;(R.querySelector(".ui-menu-item.is-active")??R.querySelector(".ui-menu-item"))?.focus()}function b(){d.value||k()}function S(R){const P=R.relatedTarget;P&&(p.value?.contains(P)||m()?.contains(P))||w()}function I(R){const P=R.target;if(P){if(p.value?.contains(P)){R.stopImmediatePropagation();return}m()?.contains(P)||w()}}function T(R){R.key==="Escape"&&(R.preventDefault(),R.stopImmediatePropagation(),w({refocus:!0}))}function $(R){if(R.key!=="ArrowDown"&&R.key!=="ArrowUp")return;R.preventDefault();const P=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if(P.length===0)return;const M=P.indexOf(document.activeElement),D=R.key==="ArrowDown"?(M+1)%P.length:(M-1+P.length)%P.length;P[D]?.focus()}function F(R){o("update:modelValue",R),w({refocus:!0})}return Sn(()=>{const R=r.value?.closest(".dock-work-head");!R||typeof ResizeObserver!="function"||(u=new ResizeObserver(()=>void c()),u.observe(R),c())}),Ye(l,R=>{!R&&d.value&&w()}),Ye(()=>n.options,async()=>{a=0,await xt(),await c()},{flush:"post"}),po(()=>{u?.disconnect(),d.value&&w()}),(R,P)=>(g(),C("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(g(),C(Te,{key:0},[K(IN,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[Do(Ct(b,["prevent"]),["down"]),Do(Ct(b,["prevent"]),["up"])],onFocusout:S},{default:ve(()=>[s.value?.icon?(g(),pe(Fe,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):oe("",!0),_("span",null,N(s.value?.label),1),K(Fe,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),pe(Hl,{to:"body"},[d.value?(g(),C("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:jt(h.value),onKeydown:$,onFocusout:S},[K(Ar,null,{default:ve(()=>[(g(!0),C(Te,null,st(e.options,M=>(g(),pe(vn,{key:M.value,role:"menuitemradio",active:M.value===e.modelValue,"aria-checked":M.value===e.modelValue,size:x(i),onClick:D=>F(M.value)},{default:ve(()=>[M.icon?(g(),pe(Fe,{key:0,name:M.icon,size:"sm","data-icon":M.icon},null,8,["name","data-icon"])):oe("",!0),_("span",v5e,N(M.label),1),M.value===e.modelValue?(g(),pe(Fe,{key:1,class:"fc-check",name:"check",size:"sm"})):oe("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):oe("",!0)]))],64)):(g(),pe(zs,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":P[0]||(P[0]=M=>o("update:modelValue",M))},null,8,["model-value","options"]))],512))}}),vM=ht(y5e,[["__scopeId","data-v-658870b5"]]),k5e={class:"wp-head-tab"},b5e={key:0,class:"wp-head-meta"},w5e={key:0,class:"wp-head-actions"},x5e=Ze({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),C(Te,null,[_("span",k5e,[K(Fe,{name:e.icon,size:"md"},null,8,["name"]),_("span",null,N(e.title),1),e.meta?(g(),C("span",b5e,N(e.meta),1)):oe("",!0)]),t.$slots.actions?(g(),C("span",w5e,[An(t.$slots,"actions",{},void 0,!0)])):oe("",!0)],64))}}),$f=ht(x5e,[["__scopeId","data-v-408c4b07"]]),Nf=Ze({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),pe(IN,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ve(()=>[K(Fe,{name:e.icon,size:"md"},null,8,["name"]),_("span",null,[An(t.$slots,"default")]),An(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),_5e={class:"dock-work-head"},S5e={key:0,class:"dock-workbar"},C5e={class:"dw-running"},A5e={class:"dw-running"},M5e={class:"dw-count"},E5e=Ze({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{confirm:r,current:l}=Ka(),a=V(null),u=V(null),c=V(null),d=V(null),f=V(!1),p=V(!1),h=V("50% 100%"),m=V("active"),k=V("active"),w=O(()=>Object.values(o.sessionPlans??{}).at(-1)),v=O(()=>a.value?.anyPopupOpen??!1),y=O(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),b=O(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),S=O(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),I=O(()=>{const Q=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),Y=Math.floor(Q/3600),G=Math.floor(Q%3600/60);return Y?`${Y}${i("status.timeUnitHour")} ${G}${i("status.timeUnitMinute")}`:G?`${G}${i("status.timeUnitMinute")} ${Q%60}${i("status.timeUnitSecond")}`:`${Q}${i("status.timeUnitSecond")}`}),T=O(()=>o.bashTasks.some(Q=>Q.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function $(Q,Y){if(Y==="all")return Q;if(Y==="running")return Q.filter(te=>te.state==="run");if(Y==="done")return Q.filter(te=>te.state!=="run");const G=Q.filter(te=>te.state==="run"),X=Q.filter(te=>te.state!=="run").toSorted((te,q)=>Date.parse(q.completedAt??q.createdAt??"")-Date.parse(te.completedAt??te.createdAt??"")).slice(0,5);return[...G,...X]}const F=O(()=>$(o.bashTasks,m.value)),R=O(()=>$(o.subagentTasks,k.value));function P(Q,Y){const G=Y.currentTarget,X=u.value;if(G&&X){const te=G.getBoundingClientRect(),q=X.getBoundingClientRect();h.value=`${te.left+te.width/2-q.left}px 100%`}s("toggle-dock-panel",Q)}function M(){p.value=(d.value?.scrollTop??0)>0}function D(Q){if(!o.dockPanel)return;const Y=Q.target;!Y||c.value?.contains(Y)||Y.closest(".ui-pill")||s("close-dock-panel")}function B(Q){o.dockPanel&&(Q.key!=="Escape"||Q.repeat||Q.isComposing||Q.defaultPrevented||v.value||l.value||o.overlayOpen||(Q.preventDefault(),Q.stopImmediatePropagation(),s("close-dock-panel")))}async function z(){await r({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function A(){const Q=u.value;if(!Q)return;document.documentElement.style.setProperty("--dock-h",`${Q.offsetHeight}px`);const Y=Number.parseFloat(getComputedStyle(Q).getPropertyValue("--p-bp-sm"))||640;f.value=Q.offsetWidth{document.addEventListener("mousedown",D,!0),document.addEventListener("keydown",B,!0),typeof ResizeObserver=="function"&&u.value&&(L=new ResizeObserver(()=>{A(),M()}),L.observe(u.value),A())}),En(()=>{document.removeEventListener("mousedown",D,!0),document.removeEventListener("keydown",B,!0),L?.disconnect()}),Ye(()=>o.dockPanel,()=>{p.value=!1,xt(M)});function W(Q){return a.value?.loadForEdit(Q)??!1}function j(Q){a.value?.loadAttachmentsForEdit(Q)}function re(){a.value?.focus()}return t({loadForEdit:W,loadAttachmentsForEdit:j,focus:re,anyPopupOpen:v,isEmpty:O(()=>a.value?.isEmpty??!0)}),(Q,Y)=>(g(),C("div",{ref_key:"dockRef",ref:u,class:ze(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":v.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:Y[36]||(Y[36]=Ct(()=>{},["stop"]))},[K(Cr,{name:"dock-panel"},{default:ve(()=>[e.dockPanel?(g(),C("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:c,class:ze(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:jt({transformOrigin:h.value})},[_("div",_5e,[e.dockPanel==="bash"?(g(),pe($f,{key:0,icon:"terminal",title:T.value,meta:`${e.bashRunning} ${x(i)("tasks.running")}`},{actions:ve(()=>[K(vM,{modelValue:m.value,"onUpdate:modelValue":Y[0]||(Y[0]=G=>m.value=G),options:y.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),pe($f,{key:1,icon:"sparkles",title:x(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${x(i)("tasks.running")}`},{actions:ve(()=>[K(vM,{modelValue:k.value,"onUpdate:modelValue":Y[1]||(Y[1]=G=>k.value=G),options:y.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),pe($f,{key:2,icon:b.value?"check-list":"list",title:x(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),pe($f,{key:3,icon:"target",title:x(i)("status.goalLabel"),meta:I.value},{actions:ve(()=>[e.goal?.status==="active"?(g(),pe(Jt,{key:0,size:"sm",label:x(i)("status.goalPause"),onClick:Y[2]||(Y[2]=G=>s("controlGoal","pause"))},{default:ve(()=>[K(Fe,{name:"pause",size:"sm"})]),_:1},8,["label"])):oe("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),pe(Jt,{key:1,size:"sm",label:x(i)("status.goalResume"),onClick:Y[3]||(Y[3]=G=>s("controlGoal","resume"))},{default:ve(()=>[K(Fe,{name:"play",size:"sm"})]),_:1},8,["label"])):oe("",!0),K(Jt,{size:"sm",label:x(i)("status.goalCancel"),onClick:z},{default:ve(()=>[K(Fe,{name:"power",size:"sm"})]),_:1},8,["label"]),K(Jt,{size:"sm",label:x(i)("tasks.closePanel"),onClick:Y[4]||(Y[4]=G=>s("close-dock-panel"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),pe($f,{key:4,icon:"file-edit",title:x(i)("status.planLabel"),meta:w.value?.reviewState?x(i)(`tools.plan.review.${w.value.reviewState}`):""},{actions:ve(()=>[w.value?.path?(g(),pe(Jt,{key:0,size:"sm",label:x(i)("tasks.openPanel"),onClick:Y[5]||(Y[5]=G=>e.openFile?.({path:w.value.path,content:w.value.plan}))},{default:ve(()=>[K(Fe,{name:"external-link",size:"sm"})]),_:1},8,["label"])):oe("",!0),e.planArmed||e.planMode?(g(),pe(Jt,{key:1,size:"sm",label:x(i)("status.workModeDismiss"),onClick:Y[6]||(Y[6]=G=>s("togglePlan"))},{default:ve(()=>[K(Fe,{name:"power",size:"sm"})]),_:1},8,["label"])):oe("",!0),K(Jt,{size:"sm",label:x(i)("tasks.closePanel"),onClick:Y[7]||(Y[7]=G=>s("close-dock-panel"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),_("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:M},[e.dockPanel==="bash"?(g(),pe(u5e,{key:0,tasks:F.value,filter:m.value,onCancel:Y[8]||(Y[8]=G=>s("cancelTask",G)),onOpen:Y[9]||(Y[9]=G=>s("openAgent",G))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),pe(YMe,{key:1,tasks:R.value,filter:k.value,onCancel:Y[10]||(Y[10]=G=>s("cancelTask",G)),onOpen:Y[11]||(Y[11]=G=>s("openAgent",G))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),pe(h5e,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),pe(X6e,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),pe(aMe,{key:4,plan:w.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"]))],544)],6)):oe("",!0)]),_:1}),e.hasDockWork||e.planMode||w.value?(g(),C("div",S5e,[e.goal?(g(),pe(Nf,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${x(i)("status.goalLabel")} ${S.value}`,onClick:Y[12]||(Y[12]=G=>P("goal",G))},{meta:ve(()=>[_("span",{class:ze(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},N(S.value),3)]),default:ve(()=>[qe(N(x(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):oe("",!0),e.planMode||w.value?(g(),pe(Nf,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:x(i)("status.planLabel"),onClick:Y[13]||(Y[13]=G=>P("plan",G))},{default:ve(()=>[qe(N(x(i)("status.planLabel")),1)]),_:1},8,["active","label"])):oe("",!0),e.bashTasks.length?(g(),pe(Nf,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:T.value,onClick:Y[14]||(Y[14]=G=>P("bash",G))},Ap({default:ve(()=>[qe(N(T.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ve(()=>[_("span",C5e,[K(j1,{status:"run"}),qe(N(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):oe("",!0),e.subagentTasks.length?(g(),pe(Nf,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:x(i)("tasks.dockSubagent"),onClick:Y[15]||(Y[15]=G=>P("subagent",G))},Ap({default:ve(()=>[qe(N(x(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ve(()=>[_("span",A5e,[K(j1,{status:"run"}),qe(N(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):oe("",!0),e.todos?.length?(g(),pe(Nf,{key:4,icon:b.value?"check-list":"list",active:e.dockPanel==="todos",label:x(i)("tasks.todoProgressTitle"),onClick:Y[16]||(Y[16]=G=>P("todos",G))},{meta:ve(()=>[_("span",M5e,N(e.todoDoneCount)+"/"+N(e.todos?.length),1)]),default:ve(()=>[qe(N(x(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):oe("",!0)])):oe("",!0),e.pendingQuestion?(g(),pe(OMe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:Y[17]||(Y[17]=(G,X)=>s("answer",G,X)),onDismiss:Y[18]||(Y[18]=G=>s("dismiss",G))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),pe(K6e,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:Y[19]||(Y[19]=G=>s("approval",e.pendingApproval.approvalId,G))},null,8,["block","agent-name","busy"])):(g(),pe(TN,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:Y[20]||(Y[20]=G=>s("submit",G)),onSteer:Y[21]||(Y[21]=G=>s("steer",G)),onCommand:Y[22]||(Y[22]=G=>s("command",G)),onInterrupt:Y[23]||(Y[23]=G=>s("interrupt")),onSetPermission:Y[24]||(Y[24]=G=>s("setPermission",G)),onSetThinking:Y[25]||(Y[25]=G=>s("setThinking",G)),onTogglePlan:Y[26]||(Y[26]=G=>s("togglePlan")),onToggleWorkflow:Y[27]||(Y[27]=G=>s("toggleWorkflow")),onToggleGoal:Y[28]||(Y[28]=G=>s("toggleGoal")),onOpenBtw:Y[29]||(Y[29]=G=>s("openBtw")),onCreateGoal:Y[30]||(Y[30]=G=>s("createGoal",G)),onControlGoal:Y[31]||(Y[31]=G=>s("controlGoal",G)),onFocusGoal:Y[32]||(Y[32]=G=>s("focusGoal")),onCompact:Y[33]||(Y[33]=G=>s("compact")),onPickModel:Y[34]||(Y[34]=G=>s("pickModel")),onSelectModel:Y[35]||(Y[35]=G=>s("selectModel",G))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),T5e=ht(E5e,[["__scopeId","data-v-6b44ef59"]]),I5e=["aria-label","aria-hidden"],$5e={class:"toc-scroll"},N5e=["onClick"],L5e={class:"toc-label"},F5e=240,O5e=Ze({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),r=V(!0);let l=null;function a(){const c=i.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,p=d.getBoundingClientRect().right;r.value=p-f>=F5e}const u=O(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Ye(u,c=>{l?.disconnect(),l=null,c&&xt(()=>{const d=i.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),po(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(g(),C("nav",{key:0,ref_key:"navRef",ref:i,class:ze(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":x(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[_("div",$5e,[(g(!0),C(Te,null,st(e.items,f=>(g(),C("button",{key:f.id,type:"button",class:ze(["toc-row",{active:e.activeTurnId===f.id}]),onClick:p=>o("select",f.id)},[d[0]||(d[0]=_("span",{class:"toc-bar"},null,-1)),_("span",L5e,N(f.title),1)],10,N5e))),128))])],10,I5e)):oe("",!0)}}),R5e=ht(O5e,[["__scopeId","data-v-f846d889"]]),yM="script, style, noscript, template, [inert], .top-sentinel",$N="pythinker-transcript-search",S2="pythinker-transcript-search-current",P5e=1e3;function D5e(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function B5e(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,l)=>l)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let r=0;rkM(u.text)),o=[];let s="";for(let u=0;u0&&e[u].gapBefore&&(s+="\0"),o[u]=s.length,s+=n[u].folded;const i=W5e(kM(t).folded);if(i===null)return;const r=new RegExp(i,"g");function l(u){let c=0,d=o.length-1,f=0;for(;c<=d;){const p=c+d>>1;o[p]<=u?(f=p,c=p+1):d=p-1}return f}let a;for(;;){const u=r.exec(s);if(u===null)return;const c=u.index,d=c+u[0].length-1,f=l(c),p=l(d),h=n[f].map[c-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const j5e=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),U5e=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function V5e(e,t){const n=t.get(e);if(n!==void 0)return n;const o=j5e.has(e.tagName)||!U5e.has(getComputedStyle(e).display);return t.set(e,o),o}function q5e(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!V5e(o,n);)o=o.parentElement;return o??t}function K5e(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const u=a;return u.matches(yM)?n.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(yM)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,r=[];let l=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){l=!0;continue}const u=a.nodeValue??"";if(u.length===0)continue;const c=a.parentElement;if(c===null)continue;let d=i.get(c);d===void 0&&(d=D5e(getComputedStyle(c).whiteSpace),i.set(c,d));let{text:f,map:p}=B5e(u,d);if(f.length===0)continue;const h=q5e(a,e,s),m=r.at(-1),k=l||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(r.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),l=!1)}return r}function G5e(e,t){if(t.length===0)return[];const n=K5e(e),o=[];for(const s of H5e(n,t)){const i=n[s.startSegment],r=n[s.endSegment],l=e.ownerDocument.createRange();l.setStart(i.node,i.whitespaceMap[s.startOffset]),l.setEnd(r.node,r.whitespaceMap[s.endOffset-1]+1),o.push(l)}return o}function Z5e(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of G5e(e,t))if(n(s)){if(o.length>=P5e)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function NN(){return globalThis.CSS?.highlights??null}function bM(e,t){const n=NN(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){wg();return}const s=new o;for(const r of e)s.add(r);n.set($N,s);const i=e[t];if(i){const r=new o;r.add(i),n.set(S2,r)}else n.delete(S2)}function wg(){const e=NN();e?.delete($N),e?.delete(S2)}const Y5e={class:"tsearch-main"},J5e=["placeholder"],X5e=["inert"],Q5e={class:"tsearch-foot"},eEe={class:"tsearch-count","aria-live":"polite"},tEe={class:"tsearch-rings"},nEe=Ze({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=Zm("input"),r=Co(""),l=Co(!1),a=Co([]),u=Co(0),c=Co(!1),d=Co(!1),f=Co([]),p=O(()=>a.value.length),h=O(()=>r.value.trim()!==""),m=O(()=>{if(l.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const W={current:u.value+1,total:p.value};return c.value?s("conversation.search.resultsCapped",W):s("conversation.search.results",W)});let k=null,w=null,v=null,y=null,b=null;function S(){return n.pane.querySelector(".chat")}function I(){const W=a.value[u.value];if(!W){f.value=[];return}const j=n.pane.getBoundingClientRect();f.value=Array.from(W.getClientRects(),re=>({top:`${re.top-j.top+n.pane.scrollTop}px`,left:`${re.left-j.left}px`,width:`${re.width}px`,height:`${re.height}px`}))}function T(){f.value.length!==0&&(v!==null&&clearTimeout(v),v=setTimeout(()=>{v=null,I()},120))}function $(W){const j=n.pane.getBoundingClientRect().top,re=W.findIndex(Q=>{const Y=Q.getClientRects(),G=Y[Y.length-1];return G!==void 0&&G.bottom>=j});return re===-1?0:re}function F(){const W=a.value[u.value];bM(a.value,u.value),(W?.startContainer instanceof Element?W.startContainer:W?.startContainer.parentElement)?.scrollIntoView({block:"center"}),I()}function R(W="first"){k!==null&&(clearTimeout(k),k=null),l.value=!1;const j=S(),re=r.value.trim();if(!j||re===""){a.value=[],c.value=!1,u.value=0,wg(),I();return}const Q=a.value[u.value],Y=Q?.startContainer,G=Q?.startOffset,X=Z5e(j,re);if(a.value=X.ranges,c.value=X.truncated,X.ranges.length===0){u.value=0,wg(),I();return}if(W!==!1){const q=$(X.ranges);u.value=W==="backward"?(q-1+X.ranges.length)%X.ranges.length:q,F();return}const te=X.ranges.findIndex(q=>q.startContainer===Y&&q.startOffset===G);u.value=te>=0?te:$(X.ranges),bM(X.ranges,u.value),I()}function P(){if(k!==null&&clearTimeout(k),r.value.trim()===""){l.value=!1,R();return}l.value=!0,k=setTimeout(()=>R(),150)}function M(W){p.value!==0&&(u.value=(u.value+W+p.value)%p.value,F())}function D(W){if(!(W.key!=="Enter"||d.value||W.isComposing)){if(W.preventDefault(),k!==null){R(W.shiftKey?"backward":"first");return}M(W.shiftKey?-1:1)}}function B(W){W.key!=="Escape"||d.value||W.isComposing||(W.preventDefault(),W.stopPropagation(),o("close"))}function z(W){return W instanceof Element&&(W.classList.contains("tsearch-rings")||W.closest(".tsearch-rings")!==null)}function A(W){if(W.type==="attributes"&&W.target===n.pane||z(W.target))return!0;if(W.type!=="childList")return!1;const j=[...W.addedNodes,...W.removedNodes];return j.length>0&&j.every(z)}function L(W){r.value.trim()===""||W.every(A)||k!==null||(w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,k===null&&R(!1)},150))}return Sn(()=>{if(xt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(y=new MutationObserver(L),y.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",T,{passive:!0}),window.addEventListener("resize",T,{passive:!0}),typeof ResizeObserver=="function"){b=new ResizeObserver(I),b.observe(n.pane);const W=n.pane.querySelector(".content-wrap");W&&b.observe(W)}}),En(()=>{k!==null&&clearTimeout(k),w!==null&&clearTimeout(w),v!==null&&clearTimeout(v),y?.disconnect(),b?.disconnect(),n.pane.removeEventListener("scroll",T),window.removeEventListener("resize",T),wg()}),(W,j)=>(g(),C("div",{class:ze(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:B},[_("div",Y5e,[K(Fe,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Bn(_("input",{ref:"input","onUpdate:modelValue":j[0]||(j[0]=re=>r.value=re),type:"text",class:"tsearch-input",placeholder:x(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:P,onKeydown:D,onCompositionstart:j[1]||(j[1]=re=>d.value=!0),onCompositionend:j[2]||(j[2]=re=>d.value=!1)},null,40,J5e),[[vs,r.value]]),l.value?(g(),pe(ns,{key:0,class:"tsearch-spin",size:"sm",label:x(s)("conversation.search.searching")},null,8,["label"])):oe("",!0),j[6]||(j[6]=_("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),K(Jt,{class:"tsearch-close",size:"sm",label:x(s)("conversation.search.close"),onClick:j[3]||(j[3]=re=>o("close"))},{default:ve(()=>[K(Fe,{name:"close"})]),_:1},8,["label"])]),_("div",{class:ze(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[_("div",Q5e,[K(Jt,{size:"sm",label:x(s)("conversation.search.previous"),disabled:p.value===0,onClick:j[4]||(j[4]=re=>M(-1))},{default:ve(()=>[K(Fe,{name:"arrow-up"})]),_:1},8,["label","disabled"]),K(Jt,{size:"sm",label:x(s)("conversation.search.next"),disabled:p.value===0,onClick:j[5]||(j[5]=re=>M(1))},{default:ve(()=>[K(Fe,{name:"arrow-down"})]),_:1},8,["label","disabled"]),_("span",eEe,N(m.value),1)])],10,X5e),(g(),pe(Hl,{to:e.pane},[_("div",tEe,[(g(!0),C(Te,null,st(f.value,(re,Q)=>(g(),C("div",{key:Q,class:"tsearch-ring",style:jt(re)},null,4))),128))])],8,["to"]))],34))}}),oEe=ht(nEe,[["__scopeId","data-v-d7187e08"]]),sEe=5;function iEe(e,t,n,o=sEe){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(r=>r.id===t);i&&(s[o-1]=i)}return s}const rEe={key:0,class:"recent"},lEe={class:"recent-caption"},aEe=["onClick"],uEe={class:"recent-title"},cEe={class:"recent-time"},dEe={class:"recent-foot"},fEe=Ze({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>e.sessions.length?(g(),C("section",rEe,[_("h2",lEe,N(x(o)("sessions.recentSessions")),1),(g(!0),C(Te,null,st(e.sessions,r=>(g(),C("button",{key:r.id,type:"button",class:"recent-row",onClick:l=>n("select",r.id)},[_("span",{class:ze(["recent-ico",r.archived?"recent-ico--done":"recent-ico--open"])},[K(Fe,{name:r.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),_("span",uEe,N(r.title),1),_("span",cEe,N(r.time),1)],8,aEe))),128)),_("div",dEe,[K(Mn,{text:x(o)("conversation.sessionAdminTooltip")},{default:ve(()=>[_("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=r=>n("openSessionAdmin"))},[qe(N(x(o)("conversation.viewMoreSessions"))+" ",1),K(Fe,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):oe("",!0)}}),pEe=ht(fEe,[["__scopeId","data-v-cd5a729d"]]),hEe={class:"empty-hint"},mEe={key:0,class:"empty-hint-text"},gEe={key:1,class:"ws-pick"},vEe={class:"ws-pick-name"},yEe={key:1,class:"ws-pick-menu"},kEe=["onClick"],bEe={class:"ws-pick-item-name"},wEe={class:"ws-pick-item-path"},xEe=["aria-label"],_Ee={key:0,class:"abort-toast",role:"status","aria-live":"polite"},SEe={class:"abort-toast-text"},CEe=48,$k=80,wM=1e3,AEe=420,MEe=3e3,EEe=Ze({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openCompaction","openAgent","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","continueTurn","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),s=e,i=n,r=V(!1),l=V(!1),a=O(()=>s.workspaces?.find(Ie=>Ie.id===s.activeWorkspaceId)?.name??s.workspaceName??""),u=O(()=>(s.workspaces?.length??0)>0),c=O(()=>iEe(s.workspaces??[],s.activeWorkspaceId,l.value)),d=O(()=>(s.workspaces?.length??0)-c.value.length);Ye(r,Me=>{Me||(l.value=!1)});function f(Me){r.value=!1,Me!==s.activeWorkspaceId&&i("selectWorkspace",Me)}Hu(rn.contentAlign);const p=V(null),h=V(null),m=V(null),k=V(!1);let w=null;function v(Me,Ie){const Ve=m.value??h.value;return!Ve||Ve.loadForEdit(Me)===!1?!1:(Ve.loadAttachmentsForEdit(Ie??[]),!0)}function y(){k.value=!0,w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,k.value=!1},2e3)}function b(){s.goal&&(M.value="goal")}const S=O(()=>s.tasks.filter(Me=>Me.kind==="bash"||Me.kind==="tool"&&!Me.id.startsWith("question-"))),I=O(()=>s.tasks.filter(Me=>Me.kind==="subagent"&&Me.runInBackground)),T=O(()=>S.value.filter(Me=>Me.state==="run").length),$=O(()=>I.value.filter(Me=>Me.state==="run").length);function F(Me){const Ie=s.tasks,Ve=Ie.find(gn=>gn.id===Me)??Ie.find(gn=>gn.parentToolCallId===Me);if(Ve)return Ve.id;const an=Ie.filter(gn=>gn.kind==="subagent"&&!gn.parentToolCallId);if(an.length===1)return an[0].id}Vn("resolveAgentTaskId",F),Vn("resolvePlan",Me=>s.sessionPlans?.[Me]),Vn("pinScroll",Xt);const R=O(()=>(s.todos??[]).filter(Me=>Me.status==="done").length),P=O(()=>s.goal!==null&&s.goal!==void 0||S.value.length>0||I.value.length>0||(s.todos?.length??0)>0),M=V(null),D=O(()=>s.gitInfo?s.changes?.length??0:0);function B(Me){M.value=M.value===Me?null:Me}function z(){M.value=null}Ye([M,()=>s.goal,S,I,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(M.value==="goal"&&!s.goal||M.value==="bash"&&S.value.length===0||M.value==="subagent"&&I.value.length===0||M.value==="todos"&&(s.todos?.length??0)===0||M.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&z()});function A(Me){if(Me.role==="compaction")return o("conversation.compactedPlain");if(Me.role==="user"){if(Me.skillActivation)return`/${Me.skillActivation.name}`;if(Me.pluginCommand)return`/${Me.pluginCommand.pluginId}:${Me.pluginCommand.commandName}`;const Ve=Me.text.trim().replaceAll(/\s+/g," ");return Ve.length>0?Ve:"user"}const Ie=(Me.text||Me.thinking||"").trim().replaceAll(/\s+/g," ");return Ie.length>0?Ie:(Me.tools?.length??0)>0?`${Me.tools.length} tools`:"pythinker"}const L=O(()=>s.turns.filter(Me=>Me.role==="user").map((Me,Ie)=>({id:Me.id,role:Me.role,no:Ie+1,title:A(Me)}))),W=V(null);function j(){const Me=xe.value;if(!Me)return;const Ie=Me.querySelectorAll(".turn-anchor[data-turn-id]");if(Ie.length===0)return;const Ve=L.value;if(Ve.length===0)return;const an=new Set(Ve.map(ue=>ue.id));if(_e()<=$k){W.value=Ve[Ve.length-1].id;return}const gn=Me.getBoundingClientRect(),Ln=gn.height/2;let xn=null;Ie.forEach(ue=>{const Ce=ue.dataset.turnId;if(!Ce||!an.has(Ce))return;ue.getBoundingClientRect().top-gn.top<=Ln&&(xn=Ce)}),W.value=xn??Ve[0].id}const re=V(!1);let Q=0;function Y(){Q||(Q=rt(()=>{Q=0,G()}))}function G(){const Me=xe.value,Ie=!s.mobile&&s.conversationToc&&Me?Me.closest(".con")?.querySelector(".conversation-toc"):null,Ve=Ie?.querySelector(".toc-bar");let an=!1;if(Me&&Ie&&Ve){const gn=Ve.getBoundingClientRect(),Ln=Ie.getBoundingClientRect(),xn=gn.left+gn.width/2;an=Array.from(Me.querySelectorAll(".table-node-wrapper")).some(ue=>{const Ce=ue.getBoundingClientRect();return Ce.left<=xn&&xn<=Ce.right&&Ce.topLn.top})}re.value!==an&&(re.value=an)}const X=O(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),te=O(()=>{const Me=X.value;if(Me)return s.pendingQuestionActions?.[Me.questionId]}),q=O(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),me=O(()=>{const Me=q.value;return Me?!!s.pendingApprovalActions?.[Me.approvalId]:!1}),xe=V(null),We=V(!1),he=V(null),ee=V(0),ne=V(0),H=O(()=>({"--panes-scrollbar-width":`${ee.value}px`})),Z=O(()=>({"--chat-dock-height":`${ne.value+CEe}px`}));function ye(Me){return Me instanceof HTMLElement?Me:Me&&"$el"in Me&&Me.$el instanceof HTMLElement?Me.$el:null}function fe(){const Me=xe.value;ee.value=Me?Math.max(0,Me.offsetWidth-Me.clientWidth):0,ne.value=he.value?.offsetHeight??0}function de(Me){const Ie=ye(Me);xe.value=Ie,Ie&&Po()}function J(Me){const Ie=ye(Me);he.value=Ie??null,Me&&"loadForEdit"in Me&&typeof Me.loadForEdit=="function"&&"focus"in Me&&typeof Me.focus=="function"?m.value={loadForEdit:Me.loadForEdit.bind(Me),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Me&&typeof Me.loadAttachmentsForEdit=="function"?Me.loadAttachmentsForEdit.bind(Me):()=>{},focus:Me.focus.bind(Me)}:m.value=null,cs()}const ae=V(!0),be=V(!1);function _e(){const Me=xe.value;return Me?Me.scrollHeight-Me.scrollTop-Me.clientHeight:0}let ce=0,Se=0,ie=0,we=0,Re=0,at=0;function ft(){return Date.now()1?(ae.value=!1,be.value=!0):Ve<=$k&&Ie>ce+1&&(ae.value=!0,be.value=!1),ce=Ie,j()}function Tt(Me=!1){const Ie=xe.value;ae.value=!0,be.value=!1,Ie&&(!Me&&performance.now()({node:Ln,top:tn(Me,Ln)})),an=Ve.findIndex(Ln=>Ln.top>=Ie),gn=an<0?Math.max(0,Ve.length-1):an;return Ve.slice(gn,gn+2).flatMap(Ln=>{const xn=Ln.node.dataset.scrollAnchorId,ue=xn??Ln.node.dataset.turnId;return ue?[{kind:xn?"tool":"turn",id:ue,top:Ln.top}]:[]})}const Qe=new Map;function nt(Me,Ie){for(const Ve of Ie.anchors){const an=Ve.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",gn=Me.querySelector(`[${an}="${Oe(Ve.id)}"]`);if(gn)return tn(Me,gn)-Ve.top}return Me.scrollHeight-Ie.oldHeight}function ut(Me,Ie,Ve=Me.scrollTop){return Me.scrollTop=Ve+nt(Me,Ie),ce=Me.scrollTop,Me.scrollTop}async function Pt(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Vs.value||!s.hasMoreMessages)return;const Me=s.sessionId,Ie=xe.value,Ve=Ie?.scrollTop??0,an={anchors:Ie?Kt(Ie,Ve):[],oldHeight:Ie?.scrollHeight??0};li(Me,!0),ai();try{if(await xt(),await s.loadOlderMessages(Me),await xt(),s.sessionId!==Me){Qe.set(Me,an);return}const gn=xe.value;if(!gn)return;ut(gn,an),Qe.delete(Me)}finally{li(Me,!1)}}function Oe(Me){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Me):Me.replaceAll(/["\\]/g,"\\$&")}function Je(Me){const Ie=xe.value;if(!Ie)return;const Ve=Ie.querySelector(`.turn-anchor[data-turn-id="${Oe(Me)}"]`);Ve&&(ui(),ae.value=!1,be.value=_e()>$k,Ve.scrollIntoView({behavior:"smooth",block:"center"}))}function it(){const Me=xe.value;if(!Me)return"none";const Ie=Me.firstElementChild,Ve=Ie instanceof HTMLElement?Ie.offsetHeight:0,an=he.value?.offsetHeight??0;return`${Me.scrollHeight}:${Me.clientHeight}:${Ve}:${an}`}function rt(Me){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Me):setTimeout(Me,16)}function vt(Me){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Me):clearTimeout(Me)}let Nt=0,on=0,mn=null,Zt=0;function jn(){return performance.now(){if(on=0,performance.now()>=Nt||!mn){mn=null;return}const gn=mn.getBoundingClientRect().top-Zt;gn&&(Ve.scrollTop+=gn),on=rt(an)};on=rt(an)}function xo(Me=36){if(!ae.value&&!ft())return;const Ie=++at;let Ve="",an=0,gn=0;Re&&(vt(Re),Re=0);const Ln=()=>{if(Re=0,Ie!==at||!ae.value&&!ft())return;Tt(!1);const xn=it();an=xn===Ve?an+1:0,Ve=xn,gn++,an<3&&gn0&&Ie.length>=Me.length&&Me.firstId!==Ie.firstId&&Me.lastId===Ie.lastId&&Me.lastTextLen===Ie.lastTextLen&&Me.lastThinkingLen===Ie.lastThinkingLen&&Me.lastToolsLen===Ie.lastToolsLen&&Me.approvalIds===Ie.approvalIds}const vo=O(()=>{const Me=(s.approvals??[]).map(Ln=>Ln.approvalId).join(","),Ie=s.turns,Ve=Ie.at(-1),an=Ve?.thinking?.length??0,gn=Ve?.tools?.reduce((Ln,xn)=>Ln+xn.name.length+(xn.arg?.length??0)+(xn.output?.join("").length??0),0)??0;return{length:Ie.length,firstId:Ie[0]?.id??"",lastId:Ve?.id??"",lastTextLen:Ve?.text.length??0,lastThinkingLen:an,lastToolsLen:gn,approvalIds:Me}});Ye(vo,async(Me,Ie)=>{if(Vs.value&&Wo(Ie,Me)){j();return}await xt(),ae.value||ft()?Tt(Me.length{cs()}),Ye(()=>s.mobile,async()=>{await xt(),fe()});const Un=new Map;Ye(()=>s.fileReloadKey,async(Me,Ie)=>{const Ve=xe.value;Ie&&Ve&&Un.set(String(Ie),{top:Ve.scrollTop,following:ae.value}),ui(),await xt();const an=xe.value,gn=Me?Un.get(String(Me)):void 0;if(gn&&an){const Ln=Qe.get(String(Me)),xn=Ln?ut(an,Ln,gn.top):gn.top;Ln&&Qe.delete(String(Me)),ae.value=gn.following,an.scrollTop=xn,ce=an.scrollTop,be.value=!gn.following&&_e()>1,gn.following&&xo()}else ae.value=!0,ce=0,Tt(!1),xo();j()}),Ye(()=>s.sessionLoading,async(Me,Ie)=>{Me||!Ie||(ae.value=!0,await xt(),xo(),j())}),Ye(()=>s.turnActive,async(Me,Ie)=>{Me||!Ie||!ae.value&&!ft()||(await xt(),xo(48),j())});function $s(){ae.value=!0,be.value=!1,Se=Date.now()+wM,xt(()=>{Tt(!0),xo(16)})}function ot(Me){$s(),i("submit",Me)}function Ae(Me){ae.value=!0,be.value=!1,Se=Date.now()+wM,i("editMessage",Me)}function wt(Me){const Ie=s.queued?.[Me],Ve=Ie?.text??"";v(Ve,Ie?.attachments)&&i("editQueued",Me)}function Lt(Me){i("reorderQueue",Me)}function Qt(Me,Ie){$s(),i("answer",Me,Ie)}function _o(Me,Ie){!Me||!Ie||i("approval",Me,Ie)}let Zn=null,Xn=null,io=null,ro=null,ys=0,Ti=0,Ns=0;const Us=V(new Set),Vs=O(()=>!!s.sessionId&&Us.value.has(s.sessionId));function li(Me,Ie){const Ve=new Set(Us.value);Ie?Ve.add(Me):Ve.delete(Me),Us.value=Ve}function ss(){Vs.value||Ns||(Ns=rt(()=>{Ns=0,!Vs.value&&(jn()||(ae.value||ft())&&Tt(!1))}))}function ai(){at++,Re&&(vt(Re),Re=0),Ns&&(vt(Ns),Ns=0)}function ui(){const Me=xe.value;if(Se=0,ai(),Nt=0,mn=null,Me){const Ie=Me.scrollTop;typeof Me.scrollTo=="function"?Me.scrollTo({top:Ie,behavior:"auto"}):Me.scrollTop=Ie}we=0,ie=Number.NEGATIVE_INFINITY,Me&&(ce=Me.scrollTop)}function Cn(){const Me=xe.value;!Me||Me.scrollHeight-Me.clientHeight<=1&&!s.hasMoreMessages||(ae.value=!1,ui(),Me.scrollHeight-Me.clientHeight>1&&(be.value=!0))}function Ls(Me){const Ie=xe.value;if(!Ie)return!1;for(const Ve of Me.composedPath()){if(Ve===Ie)return!1;if(Ve instanceof HTMLElement&&Ve.scrollHeight>Ve.clientHeight+1&&Ve.scrollTop>1)return!0}return!1}function Fn(Me){Me.defaultPrevented||Me.ctrlKey||Me.shiftKey||Me.deltaY>=0||Ls(Me)||Cn()}function Io(Me){const Ie=xe.value;if(!Ie||Me.defaultPrevented||Me.button!==0||Me.pointerType==="touch")return;const Ve=Ie.getBoundingClientRect(),an=Ie.offsetWidth-Ie.clientWidth,gn=an>0?an:12;Me.target===Ie&&Me.clientX>=Ve.right-gn&&Cn()}let Ho=null;function Fs(Me){Ho=Me.touches.length===1?Me.touches[0].clientY:null}function qs(Me){const Ie=Me.touches.length===1?Me.touches[0].clientY:null;Ie!==null&&Ho!==null&&Ie>Ho+2&&!Ls(Me)&&Cn(),Ho=Ie}function Ii(){if(!Xn)return;const Me=xe.value?.firstElementChild??null;Me!==io&&(io&&Xn.unobserve(io),io=Me,Me&&Xn.observe(Me))}function cs(){if(!Xn)return;const Me=he.value;Me!==ro&&(ro&&Xn.unobserve(ro),ro=Me,Me&&Xn.observe(Me))}function Po(){const Me=xe.value;fe(),Zn&&(Zn.disconnect(),Me&&Zn.observe(Me,{childList:!0,subtree:!0,characterData:!0})),Xn&&(Xn.disconnect(),io=null,ro=null,Me&&Xn.observe(Me),Ii(),cs()),ys=Me?.scrollHeight??0,Ti=Me?.clientHeight??0,Y()}function ln(){Ii(),ss(),Y()}function Os(){typeof document>"u"||document.visibilityState==="visible"&&ae.value&&xo()}const ds=V(!1);let jo=null;function Ks(){ds.value=!0,jo!==null&&clearTimeout(jo),jo=setTimeout(()=>{ds.value=!1},MEe)}function $i(){Ks(),i("interrupt")}function ks(Me){if((Me.metaKey||Me.ctrlKey)&&Me.key.toLowerCase()==="f"){if(s.overlayOpen)return;Me.preventDefault(),We.value=!0,xt(()=>{xe.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Me.key==="Escape"&&(s.running||s.working)&&(Me.preventDefault(),$i())}function Nn(){We.value=!1,xt(()=>xe.value?.focus({preventScroll:!0}))}function $o(){ae.value&&ss()}Sn(()=>{xt(()=>{typeof MutationObserver=="function"&&(Zn=new MutationObserver(ln)),typeof ResizeObserver=="function"&&(Xn=new ResizeObserver(()=>{Y(),fe();const Me=xe.value;if(!Me)return;const{scrollHeight:Ie,clientHeight:Ve}=Me,an=Ie>ys+1,gn=Ve{Zn&&Zn.disconnect(),Xn&&Xn.disconnect(),Ns&&vt(Ns),Re&&vt(Re),on&&vt(on),Q&&vt(Q),jo!==null&&clearTimeout(jo),w!==null&&(clearTimeout(w),w=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Os),document.removeEventListener("keydown",ks)),window.visualViewport?.removeEventListener("resize",$o)});function Lr(){(m.value??h.value)?.focus()}return t({loadComposerForEdit:v,focusComposer:Lr}),(Me,Ie)=>(g(),C("section",{class:ze(["con",{mobile:e.mobile}])},[We.value&&xe.value?(g(),pe(oEe,{key:0,pane:xe.value,mobile:e.mobile,onClose:Nn},null,8,["pane","mobile"])):oe("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),pe(bwe,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":D.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,onOpenChanges:Ie[0]||(Ie[0]=Ve=>i("openChanges")),onCopyAll:Ie[1]||(Ie[1]=Ve=>p.value?.copyConversation()),onCopyFinalSummary:Ie[2]||(Ie[2]=Ve=>p.value?.copyFinalSummary()),onOpenPr:Ie[3]||(Ie[3]=Ve=>e.pr&&i("openPr",e.pr.url)),onRenameSession:Ie[4]||(Ie[4]=(Ve,an)=>i("renameSession",Ve,an)),onForkSession:Ie[5]||(Ie[5]=Ve=>i("forkSession",Ve)),onTogglePin:Ie[6]||(Ie[6]=Ve=>i("togglePin",Ve)),onArchiveSession:Ie[7]||(Ie[7]=Ve=>i("archiveSession",Ve)),onRestoreSession:Ie[8]||(Ie[8]=Ve=>i("restoreSession",Ve)),onExportSession:Ie[9]||(Ie[9]=Ve=>i("exportSession",Ve))},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned"])):oe("",!0),e.conversationToc?(g(),pe(R5e,{key:2,items:L.value,"active-turn-id":W.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:re.value,onSelect:Je},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):oe("",!0),_("div",{class:"chat-layout",style:jt(Z.value)},[_("div",{ref:de,class:ze(["panes chat-scroll",{"is-following":ae.value,"history-prepending":Vs.value}]),tabindex:"-1",onScrollPassive:Mt,onWheelPassive:Fn,onPointerdownPassive:Io,onTouchstartPassive:Fs,onTouchmovePassive:qs},[_("div",{class:ze(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),C(Te,{key:0},[Ie[60]||(Ie[60]=_("div",{class:"empty-spacer"},null,-1)),_("div",hEe,[_("span",{class:ze(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),pe(ns,{key:0,size:"sm"})):(g(),pe(lw,{key:1,size:"md",label:"","aria-hidden":"true"})),_("span",null,N(e.starting?x(o)("conversation.starting"):x(o)("composer.emptyConversationTitle")),1)],2),e.starting?oe("",!0):(g(),C("span",mEe,N(x(o)("composer.emptyConversation")),1)),u.value&&!e.starting?(g(),C("div",gEe,[K(Mn,{text:x(o)("conversation.switchWorkspace")},{default:ve(()=>[_("button",{type:"button",class:"ws-pick-btn",onClick:Ie[10]||(Ie[10]=Ct(Ve=>r.value=!r.value,["stop"]))},[K(Fe,{name:"folder",size:"sm"}),_("span",vEe,N(a.value),1),K(Fe,{class:ze(["ws-pick-chev",{open:r.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),r.value?(g(),C("div",{key:0,class:"ws-pick-backdrop",onClick:Ie[11]||(Ie[11]=Ve=>r.value=!1)})):oe("",!0),r.value?(g(),C("div",yEe,[(g(!0),C(Te,null,st(c.value,Ve=>(g(),C("button",{key:Ve.id,type:"button",class:ze(["ws-pick-item",{on:Ve.id===e.activeWorkspaceId}]),onClick:Ct(an=>f(Ve.id),["stop"])},[_("span",bEe,N(Ve.name),1),_("span",wEe,N(Ve.shortPath),1)],10,kEe))),128)),d.value>0?(g(),C("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:Ie[12]||(Ie[12]=Ct(Ve=>l.value=!l.value,["stop"]))},[_("span",null,N(x(o)("conversation.moreWorkspaces",{count:d.value})),1)])):oe("",!0),Ie[59]||(Ie[59]=_("div",{class:"ws-pick-divider"},null,-1)),_("button",{type:"button",class:"ws-pick-action",onClick:Ie[13]||(Ie[13]=Ct(Ve=>{r.value=!1,i("addWorkspace")},["stop"]))},[K(Fe,{name:"plus",size:"sm"}),_("span",null,N(x(o)("conversation.addWorkspace")),1)])])):oe("",!0)])):e.starting?oe("",!0):(g(),C("button",{key:2,type:"button",class:"empty-add-workspace",onClick:Ie[14]||(Ie[14]=Ve=>i("addWorkspace"))},[K(Fe,{name:"folder-plus",size:"sm"}),_("span",null,N(x(o)("conversation.addWorkspace")),1)]))]),e.sessionId?oe("",!0):(g(),pe(pEe,{key:0,sessions:e.recentSessions??[],onSelect:Ie[15]||(Ie[15]=Ve=>i("selectSession",Ve)),onOpenSessionAdmin:Ie[16]||(Ie[16]=Ve=>i("openSessionAdmin"))},null,8,["sessions"])),K(TN,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:ot,onSteer:Ie[17]||(Ie[17]=Ve=>i("steer",Ve)),onCommand:Ie[18]||(Ie[18]=Ve=>i("command",Ve)),onInterrupt:$i,onUnqueue:Ie[19]||(Ie[19]=Ve=>i("unqueue",Ve)),onEditQueued:Ie[20]||(Ie[20]=Ve=>i("editQueued",Ve)),onSetPermission:Ie[21]||(Ie[21]=Ve=>i("setPermission",Ve)),onSetThinking:Ie[22]||(Ie[22]=Ve=>i("setThinking",Ve)),onTogglePlan:Ie[23]||(Ie[23]=Ve=>i("togglePlan")),onToggleWorkflow:Ie[24]||(Ie[24]=Ve=>i("toggleWorkflow")),onToggleGoal:Ie[25]||(Ie[25]=Ve=>i("toggleGoal")),onOpenBtw:Ie[26]||(Ie[26]=Ve=>i("command","/btw")),onCreateGoal:Ie[27]||(Ie[27]=Ve=>i("createGoal",Ve)),onControlGoal:Ie[28]||(Ie[28]=Ve=>i("controlGoal",Ve)),onFocusGoal:b,onCompact:Ie[29]||(Ie[29]=Ve=>i("compact")),onPickModel:Ie[30]||(Ie[30]=Ve=>i("pickModel")),onSelectModel:Ie[31]||(Ie[31]=Ve=>i("selectModel",Ve))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),Ie[61]||(Ie[61]=_("div",{class:"empty-spacer"},null,-1))],64)):(g(),pe(Lx,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":ae.value,"tool-diff-panel":!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:Ie[32]||(Ie[32]=Ve=>i("openFile",Ve)),onOpenMedia:Ie[33]||(Ie[33]=Ve=>i("openMedia",Ve)),onCopyConversationCopied:y,onOpenCompaction:Ie[34]||(Ie[34]=Ve=>i("openCompaction",Ve)),onOpenAgent:Ie[35]||(Ie[35]=Ve=>i("openAgent",Ve)),onOpenToolDiff:Ie[36]||(Ie[36]=Ve=>i("openToolDiff",Ve)),onOpenTurnDiff:Ie[37]||(Ie[37]=Ve=>i("openTurnDiff",Ve)),onEditMessage:Ae,onLoadOlderMessages:Pt,onUnqueue:Ie[38]||(Ie[38]=Ve=>i("unqueue",Ve)),onEditQueued:wt,onReorderQueue:Lt,onContinueTurn:Ie[39]||(Ie[39]=Ve=>i("continueTurn",Ve))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),e.turns.length===0&&!e.sessionLoading?oe("",!0):(g(),pe(T5e,{key:0,ref:J,style:jt(H.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":Ve=>i("openFile",Ve),"dock-panel":M.value,"bash-tasks":S.value,"subagent-tasks":I.value,"bash-running":T.value,"subagent-running":$.value,"todo-done-count":R.value,"has-dock-work":P.value,todos:e.todos,"pending-question":X.value,"question-busy-kind":te.value,"pending-approval":q.value,"approval-busy":me.value,mobile:e.mobile,onToggleDockPanel:Ie[40]||(Ie[40]=Ve=>B(Ve)),onCloseDockPanel:Ie[41]||(Ie[41]=Ve=>z()),onOpenAgent:Ie[42]||(Ie[42]=Ve=>i("openAgent",Ve)),onAnswer:Qt,onDismiss:Ie[43]||(Ie[43]=Ve=>i("dismiss",Ve)),onApproval:_o,onCancelTask:Ie[44]||(Ie[44]=Ve=>i("cancelTask",Ve)),onControlGoal:Ie[45]||(Ie[45]=Ve=>i("controlGoal",Ve)),onSubmit:ot,onSteer:Ie[46]||(Ie[46]=Ve=>i("steer",Ve)),onCommand:Ie[47]||(Ie[47]=Ve=>i("command",Ve)),onInterrupt:$i,onSetPermission:Ie[48]||(Ie[48]=Ve=>i("setPermission",Ve)),onSetThinking:Ie[49]||(Ie[49]=Ve=>i("setThinking",Ve)),onTogglePlan:Ie[50]||(Ie[50]=Ve=>i("togglePlan")),onToggleWorkflow:Ie[51]||(Ie[51]=Ve=>i("toggleWorkflow")),onToggleGoal:Ie[52]||(Ie[52]=Ve=>i("toggleGoal")),onOpenBtw:Ie[53]||(Ie[53]=Ve=>i("command","/btw")),onCreateGoal:Ie[54]||(Ie[54]=Ve=>i("createGoal",Ve)),onFocusGoal:b,onCompact:Ie[55]||(Ie[55]=Ve=>i("compact")),onPickModel:Ie[56]||(Ie[56]=Ve=>i("pickModel")),onSelectModel:Ie[57]||(Ie[57]=Ve=>i("selectModel",Ve))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],4),K(Cr,{name:"pill"},{default:ve(()=>[be.value?(g(),C("button",{key:0,class:"newmsg-pill",style:jt({bottom:`${ne.value+12}px`}),"aria-label":x(o)("conversation.jumpToLatestAria"),onClick:Ie[58]||(Ie[58]=Ve=>Tt(!0))},[K(Fe,{class:"pill-chevron",name:"chevron-down",size:"md"}),qe(" "+N(x(o)("conversation.newMessages")),1)],12,xEe)):oe("",!0)]),_:1}),K(Cr,{name:"abort-toast"},{default:ve(()=>[ds.value?(g(),C("div",_Ee,[_("span",SEe,N(x(o)("conversation.manuallyAborted")),1)])):oe("",!0)]),_:1})],2))}}),TEe=ht(EEe,[["__scopeId","data-v-8e4bb730"]]);let Lf=0,Nk=null;function LN(){function e(){typeof document>"u"||(Lf+=1,Lf===1&&(Nk=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Lf<=0||(Lf-=1,Lf===0&&typeof document<"u"&&(document.body.style.overflow=Nk??"",Nk=null))}return{lock:e,unlock:t}}const IEe=["aria-label"],$Ee={class:"media-lightbox-card"},NEe=["src","alt"],LEe=["src"],FEe={key:0,class:"media-preview-caption"},OEe=Ze({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=Zm("overlay"),r=Zm("close"),l=Zm("image"),a=O(()=>n.media.kind==="image"),u=O(()=>n.media.path??(a.value?"Image preview":"Video preview")),c=Co(1),d=Co(0),f=Co(0),p=Co(!1),h=O(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${c.value})`,cursor:c.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,w=0,v=0,y=0,b=0;const{lock:S,unlock:I}=LN();function T(){c.value=1,d.value=0,f.value=0}function $(B){if(!a.value)return;B.preventDefault();const z=Math.min(8,Math.max(1,c.value*(B.deltaY<0?1.1:.9)));c.value=z,z===1&&(d.value=0,f.value=0)}function F(){if(c.value!==1){T();return}const B=l.value;B&&(c.value=Math.min(8,Math.max(1,B.naturalWidth/B.clientWidth)))}function R(B){c.value<=1||(k=B.pointerId,w=B.clientX,v=B.clientY,y=d.value,b=f.value,p.value=!0,l.value?.setPointerCapture(B.pointerId))}function P(B){k===B.pointerId&&(d.value=y+B.clientX-w,f.value=b+B.clientY-v)}function M(B){k===B.pointerId&&(l.value?.releasePointerCapture(B.pointerId),k=null,p.value=!1)}function D(B){if(B.key==="Escape"){B.preventDefault(),B.stopPropagation(),o("close");return}if(B.key!=="Tab"||!i.value)return;const z=i.value.querySelectorAll(s),A=z[0],L=z[z.length-1];!A||!L||(i.value.contains(document.activeElement)?B.shiftKey&&document.activeElement===A?(B.preventDefault(),L.focus()):!B.shiftKey&&document.activeElement===L&&(B.preventDefault(),A.focus()):(B.preventDefault(),(B.shiftKey?L:A).focus()))}return Sn(()=>{S(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",D),r.value?.focus()}),En(()=>{I(),window.removeEventListener("keydown",D),m?.focus()}),(B,z)=>(g(),pe(Hl,{to:"body"},[_("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":u.value,onMousedown:z[1]||(z[1]=Ct(A=>o("close"),["self"]))},[_("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:z[0]||(z[0]=A=>o("close"))},[K(Fe,{name:"close",size:"sm"})],512),_("div",$Ee,[_("div",{class:"media-lightbox-frame",onWheel:$},[a.value?(g(),C("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:jt(h.value),onDblclick:F,onPointerdown:R,onPointermove:P,onPointerup:M,onPointercancel:M},null,44,NEe)):(g(),C("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,LEe))],32)]),e.media.path?(g(),C("div",FEe,N(e.media.path),1)):oe("",!0)],40,IEe)]))}}),REe=ht(OEe,[["__scopeId","data-v-a5036dce"]]),PEe={class:"ui-panel-header__title"},DEe={key:0,class:"ui-panel-header__sub"},BEe=Ze({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-panel-header",{wrap:e.wrap}])},[_("span",PEe,N(e.title),1),K(Mn,{text:e.subtitle},{default:ve(()=>[e.subtitle?(g(),C("span",DEe,N(e.subtitle),1)):oe("",!0)]),_:1},8,["text"]),An(t.$slots,"default",{},void 0,!0),e.closable?(g(),pe(Jt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])):oe("",!0)],2))}}),Pa=ht(BEe,[["__scopeId","data-v-a01b4e04"]]),zEe={key:0,class:"fp-empty fp-error"},WEe={key:1,class:"fp-empty"},HEe={key:2,class:"fp-loading"},jEe={class:"fp-path"},UEe={class:"fp-meta"},VEe={key:0,class:"fp-lines"},qEe={class:"fp-size"},KEe={key:3,class:"fp-search"},GEe=["placeholder"],ZEe={key:0,class:"fp-search-count"},YEe=["href","aria-label"],JEe={key:1,class:"fp-code"},XEe={class:"fp-line-table"},QEe=["data-line"],eTe={class:"fp-gutter"},tTe=["innerHTML"],nTe={key:1,class:"fp-body fp-code"},oTe={class:"fp-line-table"},sTe=["data-line"],iTe={class:"fp-gutter"},rTe=["innerHTML"],lTe={key:2,class:"fp-body"},aTe=["srcdoc","title"],uTe={key:1,class:"fp-code"},cTe={class:"fp-line-table"},dTe=["data-line"],fTe={class:"fp-gutter"},pTe=["innerHTML"],hTe={key:3,class:"fp-body fp-pdf-wrap"},mTe=["src","title"],gTe={key:1,class:"fp-binary-card"},vTe={class:"fp-binary-label"},yTe={key:4,class:"fp-body fp-table-wrap"},kTe={class:"fp-table"},bTe=["data-line"],wTe={key:5,class:"fp-body fp-image-wrap"},xTe=["src","alt"],_Te={key:1,class:"fp-binary-card"},STe={class:"fp-binary-icon"},CTe={class:"fp-binary-label"},ATe={key:6,class:"fp-body fp-image-wrap"},MTe=["src"],ETe={key:1,class:"fp-binary-card"},TTe={class:"fp-binary-icon"},ITe={class:"fp-binary-label"},$Te={key:7,class:"fp-body fp-code"},NTe={class:"fp-line-table"},LTe=["data-line"],FTe={class:"fp-gutter"},OTe=["innerHTML"],RTe={key:8,class:"fp-body fp-binary-wrap"},PTe={class:"fp-binary-card"},DTe={class:"fp-binary-icon"},BTe={class:"fp-binary-label"},zTe=Ze({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal"],setup(e,{emit:t}){const{t:n}=$t();function o(he,ee){const ne=ee?ee.split("/").filter(Boolean):[];for(const H of he.split("/"))H===""||H==="."||(H===".."?ne.pop():ne.push(H));return ne.join("/")}const s=wn("resolveImage",async he=>he),i=O(()=>{const he=u.file?.path??"",ee=he.lastIndexOf("/");return ee>0?he.slice(0,ee):""});function r(he){if(/^(https?:|data:|blob:)/i.test(he)||he.startsWith("/"))return he;const ee=i.value;return ee?o(he,ee):he}async function l(he){const ee=r(he);return s?s(ee):ee}Vn("resolveImage",l);function a(he){let ee=he.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(ee)||ee.startsWith("/"))return he;for(const H of["#","?"]){const Z=ee.indexOf(H);Z!==-1&&(ee=ee.slice(0,Z))}const ne=i.value;return{...he,path:o(ee,ne)}}const u=e,c=t;function d(he){u.openFile?.(a(he))}const f=V(null),p=O(()=>{const he=u.file;if(!he)return"binary";const ee=he.mime??"",ne=he.languageId??"",H=he.path.toLowerCase();return ee==="text/markdown"||ne==="markdown"||ne==="md"||H.endsWith(".mdx")?"markdown":ee==="application/json"||ne==="json"?"json":ee==="text/html"||ne==="html"||H.endsWith(".html")||H.endsWith(".htm")?"html":ee==="application/pdf"||H.endsWith(".pdf")?"pdf":ee==="text/csv"||ne==="csv"||H.endsWith(".csv")?"csv":ee.startsWith("image/")?"image":ee.startsWith("video/")?"video":he.isBinary?"binary":ee.startsWith("text/")||ne!==""?"text":"binary"});function h(he){const ee=atob(he),ne=Uint8Array.from(ee,H=>H.charCodeAt(0));return new TextDecoder().decode(ne)}const m=O(()=>{const he=u.file;if(!he)return"";if(he.encoding==="base64")try{return h(he.content)}catch{return he.content}return he.content}),k=O(()=>{if(p.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),w=O(()=>u.file?(p.value==="json"?k.value:m.value).split(` +`):[]),v=O(()=>u.file?p.value==="json"?k.value:m.value:""),y=V(""),b=V(0),S=O(()=>{const he=y.value.trim().toLowerCase();if(!he)return[];const ee=[];return w.value.forEach((ne,H)=>{ne.toLowerCase().includes(he)&&ee.push(H+1)}),ee});Ye(y,()=>{b.value=0});function I(he,ee=!1){he&&xt(()=>{const ne=f.value?.querySelector(".fp-body"),H=ne?.querySelector(`[data-line="${he}"]`);if(!ne||!H)return;ee&&(ne.scrollTop=0);const Z=ne.getBoundingClientRect(),ye=H.getBoundingClientRect(),fe=ye.top-Z.top+ne.scrollTop;ne.scrollTop=fe-ne.clientHeight/2+ye.height/2})}Ye(()=>[u.file?.path,u.line],()=>I(u.line,!0),{immediate:!0});function T(he){const ee=S.value;ee.length!==0&&(b.value=(b.value+he+ee.length)%ee.length,I(ee[b.value]))}function $(he){const ee=S.value;return{target:u.line===he,hit:ee.includes(he),active:ee[b.value]===he}}function F(he){return he<1024?`${he} B`:he<1024*1024?`${(he/1024).toFixed(1)} KB`:`${(he/(1024*1024)).toFixed(1)} MB`}const R=V(!1),P=V(!1);function M(){u.file&&Jo(v.value).then(he=>{he&&(R.value=!0,setTimeout(()=>{R.value=!1},1400))})}function D(){u.file&&Jo(u.file.path).then(he=>{he&&(P.value=!0,setTimeout(()=>{P.value=!1},1400))})}const B=V("preview"),z=V("preview"),A=V("fit");function L(he){B.value=he}function W(he){z.value=he}function j(he){A.value=he}Ye(p,he=>{B.value=he==="html"?"preview":"source",z.value="preview",A.value="fit"});const re=O(()=>{const he=u.file;return!he||p.value!=="image"?null:he.sourceUrl?he.sourceUrl:he.encoding==="base64"?`data:${he.mime};base64,${he.content}`:he.mime==="image/svg+xml"?`data:${he.mime};charset=utf-8,${encodeURIComponent(he.content)}`:null}),Q=O(()=>{const he=u.file;return!he||p.value!=="video"?null:he.sourceUrl?he.sourceUrl:he.encoding==="base64"?`data:${he.mime};base64,${he.content}`:null}),Y=O(()=>{const he=u.file;return!he||p.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:he.encoding==="base64"?`data:${he.mime};base64,${he.content}`:null}),G=O(()=>u.file?["",'',``,m.value].join(""):"");function X(he){const ee=[];let ne="",H=!1;for(let Z=0;Zw.value.slice(0,200).map(X));function q(he){return he.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function me(){const he=u.file;if(!he)return"";const ee=he.languageId?.toLowerCase();return ee||(he.path.split(".").pop()?.toLowerCase()??"")}function xe(he){const ee=me();let ne=q(he);return p.value==="json"||ee==="json"||ee==="jsonc"?(ne=ne.replace(/("[^&]*?")(\s*:)/g,'$1$2'),ne=ne.replace(/(:\s*)("[^&]*?")/g,'$1$2'),ne=ne.replace(/\b(true|false|null)\b/g,'$1'),ne=ne.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),ne):p.value==="html"||ee==="html"||ee==="xml"||ee==="svg"?(ne=ne.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),ne=ne.replace(/(".*?")/g,'$1'),ne=ne.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),ne):(ne=ne.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),ne=ne.replace(/(".*?"|'.*?')/g,'$1'),ne=ne.replace(/(\/\/.*)$/g,'$1'),ne)}function We(he,ee=55){return!he||he.length<=ee?he:"…"+he.slice(he.length-ee+1)}return(he,ee)=>(g(),C("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(g(),C("div",zEe,[_("span",null,N(e.error),1),e.closable?(g(),pe(nn,{key:0,variant:"secondary",size:"sm",onClick:ee[0]||(ee[0]=ne=>c("close"))},{default:ve(()=>[qe(N(x(n)("filePreview.close")),1)]),_:1})):oe("",!0)])):!e.file&&!e.loading?(g(),C("div",WEe,N(x(n)("filePreview.empty")),1)):e.loading?(g(),C("div",HEe,[ee[7]||(ee[7]=_("span",{class:"spinner"},null,-1)),_("span",null,N(x(n)("filePreview.loading")),1)])):e.file?(g(),C(Te,{key:3},[K(Pa,{wrap:"",title:x(n)("common.preview"),closable:e.closable,"close-label":x(n)("filePreview.close"),onClose:ee[6]||(ee[6]=ne=>c("close"))},{default:ve(()=>[K(Mn,{text:e.file.path},{default:ve(()=>[_("span",jEe,N(We(e.file.path)),1)]),_:1},8,["text"]),_("span",UEe,[e.file.lineCount?(g(),C("span",VEe,N(x(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):oe("",!0),_("span",qEe,N(F(e.file.size)),1)]),p.value==="html"?(g(),pe(zs,{key:0,"model-value":B.value,size:"sm",options:[{value:"preview",label:x(n)("filePreview.preview")},{value:"source",label:x(n)("filePreview.source")}],"onUpdate:modelValue":L},null,8,["model-value","options"])):oe("",!0),p.value==="markdown"?(g(),pe(zs,{key:1,"model-value":z.value,size:"sm",options:[{value:"preview",label:x(n)("filePreview.preview")},{value:"source",label:x(n)("filePreview.source")}],"onUpdate:modelValue":W},null,8,["model-value","options"])):oe("",!0),p.value==="image"?(g(),pe(zs,{key:2,"model-value":A.value,size:"sm",options:[{value:"fit",label:x(n)("filePreview.fit")},{value:"actual",label:x(n)("filePreview.actual")}],"onUpdate:modelValue":j},null,8,["model-value","options"])):oe("",!0),p.value==="text"||p.value==="json"||p.value==="html"||p.value==="csv"?(g(),C("div",KEe,[Bn(_("input",{"onUpdate:modelValue":ee[1]||(ee[1]=ne=>y.value=ne),class:"fp-search-input",type:"search",placeholder:x(n)("filePreview.search")},null,8,GEe),[[vs,y.value]]),y.value.trim()?(g(),C("span",ZEe,N(S.value.length),1)):oe("",!0),K(Jt,{size:"sm",disabled:S.value.length===0,label:x(n)("filePreview.prevMatch"),onClick:ee[2]||(ee[2]=ne=>T(-1))},{default:ve(()=>[K(Fe,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),K(Jt,{size:"sm",disabled:S.value.length===0,label:x(n)("filePreview.nextMatch"),onClick:ee[3]||(ee[3]=ne=>T(1))},{default:ve(()=>[K(Fe,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):oe("",!0),K(Jt,{size:"sm",class:ze({copied:P.value}),label:P.value?x(n)("filePreview.copied"):x(n)("filePreview.copyPath"),onClick:D},{default:ve(()=>[P.value?(g(),pe(Fe,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),pe(Fe,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.externalActions?(g(),pe(Jt,{key:4,size:"sm",label:x(n)("filePreview.openInEditor"),onClick:ee[4]||(ee[4]=ne=>c("openExternal"))},{default:ve(()=>[K(Fe,{name:"external-link",size:"md"})]),_:1},8,["label"])):oe("",!0),e.externalActions?(g(),pe(Jt,{key:5,size:"sm",label:x(n)("filePreview.reveal"),onClick:ee[5]||(ee[5]=ne=>c("reveal"))},{default:ve(()=>[K(Fe,{name:"folder",size:"md"})]),_:1},8,["label"])):oe("",!0),e.downloadUrl?(g(),C("a",{key:6,class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":x(n)("filePreview.download")},[K(Fe,{name:"download",size:"md"})],8,YEe)):oe("",!0),!e.file.isBinary&&p.value!=="image"?(g(),pe(Jt,{key:7,size:"sm",class:ze({copied:R.value}),label:R.value?x(n)("filePreview.copied"):x(n)("filePreview.copy"),onClick:M},{default:ve(()=>[R.value?(g(),pe(Fe,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),pe(Fe,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):oe("",!0)]),_:1},8,["title","closable","close-label"]),p.value==="markdown"?(g(),C("div",{key:0,class:ze(["fp-body",{"fp-markdown":z.value==="preview"}])},[z.value==="preview"?(g(),pe(Bl,{key:0,text:m.value,"open-file":u.openFile?d:void 0},null,8,["text","open-file"])):(g(),C("div",JEe,[_("div",XEe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",eTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,tTe)],10,QEe))),128))])]))],2)):p.value==="json"?(g(),C("div",nTe,[_("div",oTe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",iTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,rTe)],10,sTe))),128))])])):p.value==="html"?(g(),C("div",lTe,[B.value==="preview"?(g(),C("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:G.value,title:e.file.path},null,8,aTe)):(g(),C("div",uTe,[_("div",cTe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",fTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,pTe)],10,dTe))),128))])]))])):p.value==="pdf"?(g(),C("div",hTe,[Y.value?(g(),C("iframe",{key:0,class:"fp-pdf-frame",src:Y.value,title:e.file.path},null,8,mTe)):(g(),C("div",gTe,[_("span",vTe,N(x(n)("filePreview.pdfNoPreview")),1)]))])):p.value==="csv"?(g(),C("div",yTe,[_("table",kTe,[_("tbody",null,[(g(!0),C(Te,null,st(te.value,(ne,H)=>(g(),C("tr",{key:H,class:ze($(H+1)),"data-line":H+1},[_("th",null,N(H+1),1),(g(!0),C(Te,null,st(ne,(Z,ye)=>(g(),C("td",{key:ye},N(Z),1))),128))],10,bTe))),128))])])])):p.value==="image"?(g(),C("div",wTe,[re.value?(g(),C("img",{key:0,src:re.value,alt:e.file.path,class:ze(["fp-image",{actual:A.value==="actual"}])},null,10,xTe)):(g(),C("div",_Te,[_("span",STe,[K(Fe,{name:"image-off",size:"lg"})]),_("span",CTe,N(x(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:F(e.file.size)})),1)]))])):p.value==="video"?(g(),C("div",ATe,[Q.value?(g(),C("video",{key:0,src:Q.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,MTe)):(g(),C("div",ETe,[_("span",TTe,[K(Fe,{name:"image-off",size:"lg"})]),_("span",ITe,N(x(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:F(e.file.size)})),1)]))])):p.value==="text"?(g(),C("div",$Te,[_("div",NTe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",FTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,OTe)],10,LTe))),128))])])):(g(),C("div",RTe,[_("div",PTe,[_("span",DTe,[K(Fe,{name:"file-off",size:"lg"})]),_("span",BTe,N(x(n)("filePreview.binaryNoPreview",{mime:e.file.mime||x(n)("filePreview.unknownType"),size:F(e.file.size)})),1)])]))],64)):oe("",!0)],512))}}),WTe=ht(zTe,[["__scopeId","data-v-f6cbb2b4"]]),HTe={class:"tp"},jTe=Ze({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);return Ye(()=>n.text,()=>{const r=i.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||xt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(r,l)=>(g(),C("div",HTe,[K(Pa,{title:x(s)("common.preview"),subtitle:e.subtitle??x(s)("thinking.panelTitle"),"close-label":x(s)("thinking.close"),onClose:l[0]||(l[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),_("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},N(e.text),513)]))}}),UTe=ht(jTe,[["__scopeId","data-v-e1ad626c"]]),VTe=640,qTe=`(max-width: ${VTe}px)`;function FN(){const e=V(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(qTe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),En(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),En(()=>t.removeListener(n))),e}const KTe={class:"agent-panel"},GTe={key:0,class:"agent-fallback"},ZTe={key:0,class:"agent-error"},YTe={key:1,class:"fallback-lines"},JTe=Ze({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=FN(),r=O(()=>i.value?"lg":"md"),l=O(()=>i.value?"lg":"sm"),a=V(null),u=V(!0),c=V(!1),d=V(null),f=V(null),p=V({}),h=V(null);let m=null,k=0;const w=O(()=>{const D=new Set,B=[],z=n.member.prompt?.trim(),A=z?`$ ${z}`:void 0;for(const L of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` +`),n.member.summary]){const W=L?.trim();!W||D.has(W)||W===A||(D.add(W),B.push(W))}return B}),v=O(()=>w.value.filter(D=>D!==n.member.prompt?.trim()).join(` +`)),y=O(()=>[n.member.subagentType,n.member.model,n.member.thinkingEffort].filter(Boolean).join(" · ")||void 0);function b(){const D=a.value;D&&(u.value=D.scrollHeight-D.scrollTop-D.clientHeight<24)}function S(){xt(()=>{const D=a.value;D&&(D.scrollTop=D.scrollHeight)})}Vn("pinScroll",D=>{const B=a.value;if(!B)return;const z=D.getBoundingClientRect().top;requestAnimationFrame(()=>{B.scrollTop+=D.getBoundingClientRect().top-z})}),Ye(()=>{const D=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${D?.text.length??0}:${D?.tools?.length??0}`},()=>{u.value&&S()},{immediate:!0});function I(D){const B=D[0].toUpperCase()+D.slice(1);return s(`tools.dynamic_workflow.phase${B}`)}function T(){const D=d.value?.el,B=f.value?.el;if(!D||!B)return;const z=D.getBoundingClientRect(),A=8,L=8,W=Math.max(L,Math.min(z.right-B.offsetWidth,window.innerWidth-B.offsetWidth-L));z.bottom+A+B.offsetHeight<=window.innerHeight-L?p.value={left:`${W}px`,top:`${z.bottom+A}px`}:p.value={left:`${W}px`,bottom:`${window.innerHeight-z.top+A}px`}}function $(D=!1){c.value=!1,window.removeEventListener("mousedown",R,!0),window.removeEventListener("keydown",P,!0),window.removeEventListener("resize",T),window.removeEventListener("scroll",T,!0),D&&d.value?.el?.focus()}async function F(){if(c.value){$(!0);return}c.value=!0,await xt(),T(),f.value?.el?.querySelector(".ui-menu-item:not(:disabled)")?.focus(),window.addEventListener("mousedown",R,!0),window.addEventListener("keydown",P,!0),window.addEventListener("resize",T),window.addEventListener("scroll",T,!0)}function R(D){const B=D.target;f.value?.el?.contains(B)||d.value?.el?.contains(B)||$()}function P(D){D.key==="Escape"&&(D.preventDefault(),D.stopImmediatePropagation(),$(!0))}async function M(D){const B=D==="command"?n.member.prompt:D==="output"?v.value:[n.member.prompt?.trim(),v.value].filter(Boolean).join(` + +`);if(!B)return;const z=++k;!await Jo(B)||z!==k||(m!==null&&clearTimeout(m),h.value=D,m=setTimeout(()=>{m=null,h.value=null},1400),$(!0))}return Ye(()=>n.member.id,()=>{k+=1,m!==null&&clearTimeout(m),m=null,h.value=null,$()}),En(()=>{m!==null&&clearTimeout(m),$()}),(D,B)=>(g(),C("div",KTe,[K(Pa,{title:e.member.name,subtitle:y.value,"close-label":x(s)("thinking.close"),onClose:B[0]||(B[0]=z=>o("close"))},{default:ve(()=>[K(wr,{variant:"neutral",size:"sm"},{default:ve(()=>[qe(N(I(e.member.phase)),1)]),_:1}),e.member.prompt||v.value?(g(),pe(Jt,{key:0,ref_key:"copyTriggerRef",ref:d,size:l.value,class:ze({"copy-menu-open":c.value}),label:x(s)("tasks.copy"),tooltip:x(s)("tasks.copy"),"aria-haspopup":"menu","aria-expanded":c.value,onClick:F},{default:ve(()=>[K(Fe,{name:h.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","class","label","tooltip","aria-expanded"])):oe("",!0)]),_:1},8,["title","subtitle","close-label"]),_("div",{ref_key:"bodyEl",ref:a,class:"agent-transcript",onScrollPassive:b},[e.turns.length===0&&!e.loading&&(e.loadError||w.value.length>0)?(g(),C("div",GTe,[e.loadError?(g(),C("div",ZTe,N(x(s)("tasks.transcriptLoadError")),1)):oe("",!0),w.value.length>0?(g(),C("pre",YTe,N(w.value.join(` +`)),1)):oe("",!0)])):(g(),pe(Lx,{key:1,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":u.value,"read-only":"",inspector:"",onLoadOlderMessages:B[1]||(B[1]=z=>o("loadOlderMessages")),onOpenAgent:B[2]||(B[2]=z=>o("openAgent",z)),onOpenFile:B[3]||(B[3]=z=>o("openFile",z)),onOpenMedia:B[4]||(B[4]=z=>o("openMedia",z)),onOpenTurnDiff:B[5]||(B[5]=z=>o("openTurnDiff",z))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],544),c.value?(g(),pe(Ar,{key:0,ref_key:"copyMenuRef",ref:f,class:"copy-menu",style:jt(p.value),onClick:B[9]||(B[9]=Ct(()=>{},["stop"]))},{default:ve(()=>[e.member.prompt?(g(),pe(vn,{key:0,size:r.value,onClick:B[6]||(B[6]=z=>M("command"))},{default:ve(()=>[K(Fe,{name:"terminal",size:"sm"}),_("span",null,N(x(s)("tasks.copyCommand")),1)]),_:1},8,["size"])):oe("",!0),K(vn,{size:r.value,disabled:!v.value,onClick:B[7]||(B[7]=z=>M("output"))},{default:ve(()=>[K(Fe,{name:"file-text",size:"sm"}),_("span",null,N(x(s)("tasks.copyOutput")),1)]),_:1},8,["size","disabled"]),K(vn,{separator:""}),K(vn,{size:r.value,onClick:B[8]||(B[8]=z=>M("all"))},{default:ve(()=>[K(Fe,{name:"copy",size:"sm"}),_("span",null,N(x(s)("tasks.copyAll")),1)]),_:1},8,["size"])]),_:1},8,["style"])):oe("",!0)]))}}),XTe=ht(JTe,[["__scopeId","data-v-b44fe40c"]]),QTe={class:"tdp"},e9e={class:"tdp-body"},t9e={key:1,class:"tdp-output"},n9e={key:2,class:"tdp-empty"},o9e=Ze({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>(g(),C("div",QTe,[K(Pa,{title:e.target.title,subtitle:e.target.path,"close-label":x(o)("thinking.close"),onClose:i[0]||(i[0]=r=>n("close"))},null,8,["title","subtitle","close-label"]),_("div",e9e,[e.target.lines&&e.target.lines.length>0?(g(),pe(tT,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),C("div",t9e,[(g(!0),C(Te,null,st(e.target.output,(r,l)=>(g(),C("div",{key:l},N(r),1))),128))])):(g(),C("div",n9e,N(x(o)("diff.noDiff")),1))])]))}}),s9e=ht(o9e,[["__scopeId","data-v-8b9af3ab"]]),i9e={class:"hl-body"},r9e={key:0,class:"hl-gutter"},l9e={key:1,class:"hl-gutter new"},a9e={class:"hl-sign"},u9e={class:"hl-text"},c9e=["data-line"],d9e={key:0,class:"hl-gutter"},f9e={class:"hl-text"},p9e=200,h9e=Ze({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(B){const z=B?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!z)return;const A=n[z];if(A)return A;const L=z.lastIndexOf(".");if(!(L<=0))return t[z.slice(L+1)]}function s(B){return B.split(/\r?\n/)}function i(B){const z={};B.color&&(z.color=B.color);const A=B.fontStyle??0;return A&1&&(z.fontStyle="italic"),A&2&&(z.fontWeight="var(--weight-semibold)"),A&4&&(z.textDecoration="underline"),z}const r=e,l=m$(),a=O(()=>r.lines!==void 0),u=O(()=>(r.lines??[]).some(B=>B.oldNo!==void 0)),c=O(()=>(r.lines??[]).some(B=>B.newNo!==void 0)),d=O(()=>r.lineNumbers===!0&&a.value),f=O(()=>Array.isArray(r.lineNumbers)?r.lineNumbers:null),p=O(()=>Array.isArray(r.code)?r.code:s(r.code??"")),h=O(()=>{const B=r.lines;return B?r.fullTexts?r.fullTexts:{before:B.filter(z=>z.oldNo!==void 0).map(z=>z.text).join(` +`),after:B.filter(z=>z.newNo!==void 0).map(z=>z.text).join(` +`)}:null}),m=V(null),k=V(null),w=V(null);function v(){m.value=null,k.value=null,w.value=null}let y=0,b=0,S=null,I=null;async function T(){const B=++y;b=Date.now();const z=o(r.path);if(!z){B===y&&v();return}try{I??=Ts(()=>import("./index-Cm2yfvYH.js").then(j=>j.i),[]).then(j=>j.codeToTokens);const A=await I,L=l.value?"github-dark":"github-light",W=h.value;if(W){const[j,re]=await Promise.all([W.before?A(W.before,{lang:z,theme:L}):null,W.after?A(W.after,{lang:z,theme:L}):null]);if(B!==y)return;k.value=j?.tokens??null,w.value=re?.tokens??null}else{const j=p.value.length>0?await A(p.value.join(` +`),{lang:z,theme:L}):null;if(B!==y)return;m.value=j?.tokens??null}}catch{B===y&&v()}}function $(){if(S!==null)return;const B=Math.max(0,p9e-(Date.now()-b));S=setTimeout(()=>{S=null,T()},B)}Ye([()=>p.value.join(` +`),()=>h.value?.before??null,()=>h.value?.after??null],$),Ye([()=>r.path,l,()=>r.fullTexts],()=>{y++,v(),$()}),Sn(()=>void T()),po(()=>{y++,S!==null&&clearTimeout(S)});const F=O(()=>{const B=new Map;let z=0;for(const A of r.lines??[])A.oldNo!==void 0&&B.set(A.oldNo,z++);return B}),R=O(()=>{const B=new Map;let z=0;for(const A of r.lines??[])A.newNo!==void 0&&B.set(A.newNo,z++);return B});function P(B){if(B.type==="del"){if(B.oldNo===void 0)return null;const A=r.fullTexts?B.oldNo-1:F.value.get(B.oldNo);return A===void 0?null:k.value?.[A]??null}if(B.newNo===void 0)return null;const z=r.fullTexts?B.newNo-1:R.value.get(B.newNo);return z===void 0?null:w.value?.[z]??null}function M(B){return B.type==="add"?"+":B.type==="del"?"-":" "}const D=O(()=>{let B=0;if(f.value)for(const z of f.value)z>B&&(B=z);else for(const z of r.lines??[])z.oldNo!==void 0&&z.oldNo>B&&(B=z.oldNo),z.newNo!==void 0&&z.newNo>B&&(B=z.newNo);return Math.max(4,String(B).length)});return(B,z)=>(g(),C("div",{class:ze(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed}]),style:jt({"--gutter-ch":`${D.value}ch`})},[_("div",i9e,[a.value?(g(!0),C(Te,{key:0},st(e.lines,(A,L)=>(g(),C("div",{key:L,class:ze(["hl-row",`row-${A.type}`])},[d.value?(g(),C(Te,{key:0},[u.value?(g(),C("span",r9e,N(A.oldNo??""),1)):oe("",!0),c.value?(g(),C("span",l9e,N(A.newNo??""),1)):oe("",!0)],64)):oe("",!0),_("span",a9e,N(M(A)),1),_("span",u9e,[P(A)?(g(!0),C(Te,{key:0},st(P(A),(W,j)=>(g(),C("span",{key:j,style:jt(i(W))},N(W.content),5))),128)):(g(),C(Te,{key:1},[qe(N(A.text),1)],64))])],2))),128)):(g(!0),C(Te,{key:1},st(p.value,(A,L)=>(g(),C("div",{key:L,class:ze(["hl-row",e.lineClass?e.lineClass(f.value?.[L]??-1):void 0]),"data-line":f.value?f.value[L]:void 0},[f.value?(g(),C("span",d9e,N(f.value[L]??""),1)):oe("",!0),_("span",f9e,[m.value&&m.value[L]?(g(!0),C(Te,{key:0},st(m.value[L],(W,j)=>(g(),C("span",{key:j,style:jt(i(W))},N(W.content),5))),128)):(g(),C(Te,{key:1},[qe(N(A),1)],64))])],10,c9e))),128))])],6))}}),ON=ht(h9e,[["__scopeId","data-v-4878c39c"]]),m9e={class:"turn-diff-panel"},g9e={class:"tdp-body"},v9e={class:"tdp-file-head"},y9e={class:"tdp-path"},k9e={key:0,class:"tdp-diff"},b9e={key:1,class:"tdp-unavailable"},w9e=Ze({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(a,u){if(!u)return null;const c=v=>v.replaceAll("\\","/"),d=c(a);let f=c(u);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const w=m===h?"":d.slice(k.length);return w.split("/").includes("..")?null:w||null}function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}function l(a){return i(a.path,n.cwd)??a.path}return(a,u)=>(g(),C("div",m9e,[K(Pa,{title:x(s)("conversation.turnFiles.diffTitle"),onClose:u[0]||(u[0]=c=>o("close"))},null,8,["title"]),_("div",g9e,[(g(!0),C(Te,null,st(e.changes,c=>(g(),C("section",{key:c.path,class:"tdp-file"},[_("div",v9e,[K(Mn,{text:c.path},{default:ve(()=>[_("span",y9e,N(r(l(c))),1)]),_:2},1032,["text"]),K(nn,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:c.path})},{default:ve(()=>[qe(N(x(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),c.diff?(g(),C("div",k9e,[K(ON,{lines:c.diff,path:c.path,framed:!1},null,8,["lines","path"])])):(g(),C("div",b9e,[_("p",null,N(x(s)("conversation.turnFiles.diffUnavailable")),1),K(nn,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:c.path})},{default:ve(()=>[qe(N(x(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),x9e=ht(w9e,[["__scopeId","data-v-67a3cc7e"]]),_9e=["aria-label"],S9e=Ze({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=Cl.length*Bu;function n(o){return{"--thinking-frame-delay":`${o*Bu-t}ms`,"--thinking-frame-fast-delay":`${o*(Bu/2)-t/2}ms`}}return(o,s)=>(g(),C("span",{class:ze(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),C(Te,null,st(x(Cl),(i,r)=>(g(),C("span",{key:i,class:"ui-thinking-indicator__frame",style:jt(n(r)),"aria-hidden":"true"},N(i),5))),128))],10,_9e))}}),C9e=ht(S9e,[["__scopeId","data-v-ed8aef9e"]]),A9e={class:"sc"},M9e={key:0,class:"sc-empty"},E9e={key:2,class:"sc-loading","aria-hidden":"true"},T9e={class:"sc-composer"},I9e=["placeholder"],$9e=["disabled"],N9e=Ze({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>n.turns.find(v=>v.role==="user")?.text?.trim()??""),r=O(()=>n.title?.trim()||s("sideChat.title")),l=O(()=>n.subtitle?.trim()?n.subtitle.trim():i.value||s("sideChat.subtitle")),a=V(""),u=V(null),c=V(null);function d(){const w=a.value.trim();w&&(o("send",w),a.value="",xt(()=>{u.value&&(u.value.style.height="auto"),f()}))}function f(){const w=c.value;w&&(w.scrollTop=w.scrollHeight)}const p=O(()=>{const w=n.turns;if(w.length===0)return"0";const v=w.at(-1),y=v.thinking?.length??0,b=v.tools?.reduce((S,I)=>S+I.name.length+(I.arg?.length??0)+(I.output?.join("").length??0),0)??0;return`${w.length}:${v.text.length}:${y}:${b}`});Ye(p,async()=>{!n.running&&!n.sending||(await xt(),f())});const h=O(()=>n.sending?n.turns.at(-1)?.role==="user":!1);function m(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),d())}function k(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}return(w,v)=>(g(),C("div",A9e,[K(Pa,{title:r.value,subtitle:l.value,"close-label":x(s)("thinking.close"),onClose:v[0]||(v[0]=y=>o("close"))},null,8,["title","subtitle","close-label"]),_("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(g(),C("div",M9e,N(x(s)("sideChat.empty")),1)):(g(),pe(Lx,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),h.value?(g(),C("div",E9e,[K(C9e)])):oe("",!0)],512),_("div",T9e,[Bn(_("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":v[1]||(v[1]=y=>a.value=y),class:"sc-input",rows:"1",placeholder:x(s)("sideChat.placeholder"),onInput:k,onKeydown:m},null,40,I9e),[[vs,a.value]]),K(Mn,{text:x(s)("sideChat.send")},{default:ve(()=>[_("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:d},[K(Fe,{name:"arrow-right",size:"sm"})],8,$9e)]),_:1},8,["text"])])]))}}),L9e=ht(N9e,[["__scopeId","data-v-4572766b"]]),F9e={class:"changes-pane"},O9e={class:"dv-path"},R9e={class:"diff-head"},P9e={class:"back-label"},D9e={key:"loading",class:"empty-state diff-loading"},B9e={key:"lines",class:"dv-lines-wrap"},z9e={key:"empty",class:"empty-state"},W9e={class:"dv-change-count"},H9e={class:"ch-head"},j9e={class:"br-label"},U9e={class:"br-name"},V9e={key:0,class:"sync-info"},q9e={key:0,class:"ahead"},K9e={key:0,class:"behind"},G9e={key:1,class:"empty-head"},Z9e={key:0,class:"ch-list"},Y9e=["onClick"],J9e={class:"fpath"},X9e={key:1,class:"ch-list ch-tree"},Q9e={class:"tree-list"},eIe=["onClick"],tIe={class:"tree-name"},nIe=["onClick"],oIe={class:"tree-name"},sIe={key:2,class:"empty-state"},iIe={key:3,class:"empty-state"},rIe=Ze({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(P){const M=P.toLowerCase();return M==="modified"?"modified":M==="added"?"added":M==="deleted"?"deleted":M==="renamed"?"renamed":M==="untracked"?"untracked":M==="conflicted"?"conflicted":M==="ignored"?"ignored":M==="clean"?"clean":"unknown"}const r={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function l(P){return r[i(P)]??"?"}function a(P,M=60){return P.length<=M?P:"…"+P.slice(P.length-M+1)}const u=O(()=>o.gitInfo!==null),c=O(()=>o.changes.length>0),d=O(()=>(o.selectedDiffPath??null)!==null),f=O(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=O(()=>o.fileDiff??[]),h=O(()=>o.fileDiffLoading===!0);function m(P){s("open",P)}function k(){s("back")}function w(){s("close")}const v=V("list");function y(P){v.value=P}function b(P){const M={children:[]},D=[...P].sort((B,z)=>B.path.localeCompare(z.path));for(const B of D){const z=B.path.split("/");let A=M;for(let L=0;LY.name===W&&Y.kind===(j?"file":"folder"));Q||(Q={name:W,path:re,kind:j?"file":"folder",status:j?B.status:void 0,children:[]},A.children.push(Q)),A=Q}}return M.children}const S=O(()=>b(o.changes)),I=V(new Set);function T(P){return!I.value.has(P)}const $=O(()=>{const P=[];function M(D,B){for(const z of D)P.push({node:z,depth:B}),z.kind==="folder"&&T(z.path)&&M(z.children,B+1)}return M(S.value,0),P});function F(P){const M=new Set(I.value);M.has(P.path)?M.delete(P.path):M.add(P.path),I.value=M}function R(P){return`${16+P*16}px`}return(P,M)=>(g(),C("div",F9e,[f.value?(g(),C(Te,{key:0},[K(Pa,{title:x(n)("diff.title"),closable:e.closable,"close-label":x(n)("diff.close"),onClose:w},{default:ve(()=>[K(Mn,{text:e.selectedDiffPath??""},{default:ve(()=>[_("span",O9e,N(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),_("div",R9e,[e.hideBack?oe("",!0):(g(),pe(nn,{key:0,variant:"ghost",size:"sm",onClick:k},{default:ve(()=>[M[0]||(M[0]=_("span",{"aria-hidden":"true"},"←",-1)),_("span",P9e,N(x(n)("diff.back")),1)]),_:1}))]),K(Cr,{name:"diff-content",mode:"out-in"},{default:ve(()=>[h.value?(g(),C("div",D9e,[K(ns,{size:"md"}),_("span",null,N(x(n)("diff.loading")),1)])):p.value.length>0?(g(),C("div",B9e,[K(ON,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts},null,8,["lines","path","full-texts"])])):(g(),C("div",z9e,N(e.emptyFile?x(n)("diff.emptyFile"):x(n)("diff.noDiff")),1))]),_:1})],64)):(g(),C(Te,{key:1},[K(Pa,{title:x(n)("diff.title"),closable:e.closable,"close-label":x(n)("diff.close"),onClose:w},{default:ve(()=>[_("span",W9e,N(x(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),K(zs,{"model-value":v.value,size:"sm",options:[{value:"list",label:x(n)("diff.list")},{value:"tree",label:x(n)("diff.tree")}],"onUpdate:modelValue":y},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),_("div",H9e,[u.value?(g(),C(Te,{key:0},[_("span",j9e,N(x(n)("diff.branch")),1),_("span",U9e,N(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),C("span",V9e,[K(Mn,{text:x(n)("diff.aheadTitle")},{default:ve(()=>[e.gitInfo.ahead>0?(g(),C("span",q9e,"↑"+N(e.gitInfo.ahead),1)):oe("",!0)]),_:1},8,["text"]),K(Mn,{text:x(n)("diff.behindTitle")},{default:ve(()=>[e.gitInfo.behind>0?(g(),C("span",K9e,"↓"+N(e.gitInfo.behind),1)):oe("",!0)]),_:1},8,["text"])])):oe("",!0)],64)):(g(),C("span",G9e,N(x(n)("diff.empty")),1))]),c.value&&v.value==="list"?(g(),C("div",Z9e,[(g(!0),C(Te,null,st(e.changes,D=>(g(),pe(Mn,{key:D.path,text:D.path},{default:ve(()=>[_("button",{type:"button",class:"ch-row",onClick:B=>m(D.path)},[_("span",{class:ze(["badge",i(D.status)])},N(l(D.status)),3),_("span",J9e,N(a(D.path)),1)],8,Y9e)]),_:2},1032,["text"]))),128))])):c.value&&v.value==="tree"?(g(),C("div",X9e,[_("ul",Q9e,[(g(!0),C(Te,null,st($.value,({node:D,depth:B})=>(g(),C("li",{key:D.path,class:"tree-node"},[D.kind==="folder"?(g(),C("button",{key:0,type:"button",class:"tree-row tree-folder",style:jt({paddingLeft:R(B)}),onClick:z=>F(D)},[K(Fe,{class:"tree-icon",name:"folder-solid",size:"sm"}),_("span",tIe,N(D.name),1)],12,eIe)):(g(),pe(Mn,{key:1,text:D.path},{default:ve(()=>[_("button",{type:"button",class:"tree-row tree-file",style:jt({paddingLeft:R(B)}),onClick:z=>m(D.path)},[_("span",{class:ze(["badge",i(D.status)])},N(l(D.status)),3),_("span",oIe,N(D.name),1)],12,nIe)]),_:2},1032,["text"]))]))),128))])])):u.value?(g(),C("div",sIe,N(x(n)("diff.clean")),1)):(g(),C("div",iIe,N(x(n)("diff.empty")),1))],64))]))}}),lIe=ht(rIe,[["__scopeId","data-v-67ba251c"]]);function RN(e,t){let n=null;Sn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,xt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),po(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const aIe={class:"search-wrap"},uIe={key:0,class:"tab-strip"},cIe={key:1,class:"state-row"},dIe={key:2,class:"state-row unavail"},fIe={key:3,class:"model-list"},pIe=["aria-selected","onClick","onMouseenter"],hIe={class:"check"},mIe={class:"model-main"},gIe={class:"model-name"},vIe={class:"model-id"},yIe={key:0,class:"caps"},kIe={class:"model-provider"},bIe={class:"model-ctx"},wIe={key:0,class:"empty"},xIe={class:"footer-hint"},_Ie=Ze({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=O(()=>new Set(o.starredIds??[]));function r(S){return i.value.has(S)}const l=V(""),a=V(null),u=V(null),c=V("all");RN(u,a);const d=O(()=>{const S=new Set,I=[{id:"all",label:n("model.allTab")}];for(const T of o.models)S.has(T.provider)||(S.add(T.provider),I.push({id:T.provider,label:T.provider}));return I}),f=O(()=>{const S=l.value.toLowerCase().trim(),I=o.models.filter(T=>{if(c.value!=="all"&&T.provider!==c.value)return!1;const $=(T.displayName??T.model).toLowerCase().includes(S),F=T.provider.toLowerCase().includes(S),R=T.id.toLowerCase().includes(S);return!S||$||F||R});return c.value!=="all"?I:I.sort((T,$)=>{const F=r(T.id)?1:0;return(r($.id)?1:0)-F})}),p=O(()=>f.value),h=V(0);Ye([l,c],()=>{h.value=0}),Ye(d,S=>{S.some(I=>I.id===c.value)||(c.value="all")}),Ye(p,S=>{h.value=Math.min(h.value,Math.max(S.length-1,0))});function m(S){if(S.key==="Escape"){s("close");return}if(S.key==="ArrowDown")S.preventDefault(),h.value=Math.min(h.value+1,p.value.length-1);else if(S.key==="ArrowUp")S.preventDefault(),h.value=Math.max(h.value-1,0);else if(S.key==="Enter"){const I=p.value[h.value];I&&s("select",I.id)}}Sn(()=>{document.addEventListener("keydown",m)}),En(()=>{document.removeEventListener("keydown",m)});function k(S){s("select",S)}function w(S){return p.value.indexOf(S)}function v(S){c.value=S}const y={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function b(S){const I=y[S];return I?n(`model.capabilities.${I}`):n("model.capabilities.unknown",{capability:S})}return(S,I)=>(g(),pe(Pd,{open:!0,"close-on-esc":!1,title:x(n)("model.title"),size:"xl",height:"fixed",onClose:I[1]||(I[1]=T=>s("close"))},{default:ve(()=>[_("div",{ref_key:"dialogRef",ref:u,class:"mp"},[_("div",aIe,[K(ms,{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=T=>l.value=T),placeholder:x(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),d.value.length>1?(g(),C("div",uIe,[(g(!0),C(Te,null,st(d.value,T=>(g(),pe(nn,{key:T.id,variant:T.id===c.value?"secondary":"ghost",size:"sm",onClick:$=>v(T.id)},{default:ve(()=>[qe(N(T.label),1)]),_:2},1032,["variant","onClick"]))),128))])):oe("",!0),e.loading?(g(),C("div",cIe,[K(ns,{size:"sm"}),_("span",null,N(x(n)("model.loading")),1)])):e.unavailable?(g(),C("div",dIe,[K(Fe,{name:"alert-triangle",size:"lg"}),_("span",null,N(x(n)("model.unavailable")),1)])):(g(),C("div",fIe,[(g(!0),C(Te,null,st(p.value,T=>(g(),C("div",{key:T.id,class:ze(["model-row",{"is-current":T.id===e.current,"is-selected":w(T)===h.value}]),role:"option","aria-selected":T.id===e.current,onClick:$=>k(T.id),onMouseenter:$=>h.value=w(T)},[_("span",hIe,[T.id===e.current?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)]),_("span",mIe,[_("span",gIe,N(T.displayName??T.model),1),_("span",vIe,N(T.id),1),T.capabilities&&T.capabilities.length>0?(g(),C("span",yIe,[(g(!0),C(Te,null,st(T.capabilities,$=>(g(),pe(wr,{key:$,variant:"info",size:"sm"},{default:ve(()=>[qe(N(b($)),1)]),_:2},1024))),128))])):oe("",!0)]),_("span",kIe,N(T.provider),1),_("span",bIe,N(x(n)("model.contextSuffix",{size:x(Pl)(T.maxContextSize)})),1),K(Jt,{size:"sm",label:r(T.id)?x(n)("model.unstarTitle"):x(n)("model.starTitle"),onClick:Ct($=>s("toggle-star",T.id),["stop"])},{default:ve(()=>[r(T.id)?(g(),pe(Fe,{key:0,name:"star",size:"md"})):(g(),pe(Fe,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,pIe))),128)),p.value.length===0&&!e.loading&&!e.unavailable?(g(),C("div",wIe,N(o.models.length===0?x(n)("model.emptyNoModels"):x(n)("model.emptyNoMatch")),1)):oe("",!0)])),_("div",xIe,N(x(n)("model.footerHint")),1)],512)]),_:1},8,["title"]))}}),SIe=ht(_Ie,[["__scopeId","data-v-92ec064d"]]),CIe=["aria-checked","aria-label","disabled"],AIe=Ze({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),C("button",{class:ze(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[_("span",{class:"ui-switch__thumb"},null,-1)])],10,CIe))}}),mr=ht(AIe,[["__scopeId","data-v-d7337ade"]]),MIe=["value","disabled"],EIe=Ze({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),C("select",{class:ze(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[An(s.$slots,"default",{},void 0,!0)],42,MIe))}}),C2=ht(EIe,[["__scopeId","data-v-77d887db"]]),TIe={key:0,class:"ui-field__label"},IIe={key:1,class:"ui-field__error"},$Ie={key:2,class:"ui-field__hint"},NIe=Ze({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),C("label",TIe,N(e.label),1)):oe("",!0),An(t.$slots,"default",{},void 0,!0),e.error?(g(),C("span",IIe,N(e.error),1)):e.hint?(g(),C("span",$Ie,N(e.hint),1)):oe("",!0)],2))}}),Al=ht(NIe,[["__scopeId","data-v-bd93f701"]]),LIe=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],FIe=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function A2(){return{model:"",maxContextSize:"",displayName:""}}function xM(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[A2()]}}function OIe(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function RIe(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!FIe.test(n))return"idInvalid";if(t.apiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.baseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const o of e.models){if(o.model.trim()==="")return"modelRequired";const s=o.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function PN(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function PIe(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:PN(e.models)}}function DIe(e,t,n,o){const s=PN(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(r=>r.model===i)?i:void 0,models:s}}const BIe={key:0,class:"provider-form__managed"},zIe={class:"provider-form__fields"},WIe=["value"],HIe={class:"provider-form__key"},jIe={class:"provider-form__models-head"},UIe={class:"provider-form__models"},VIe={class:"provider-form__model provider-form__model--head"},qIe={key:1,class:"provider-form__error",role:"alert"},KIe={class:"provider-form__actions"},GIe=Ze({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=xM(),r=Ms(i),l=V(""),a=V(!1),u=V(!1),c=V(!1),d=V(!1),f=O(()=>n.provider?.id.startsWith("managed:")===!0),p=O(()=>LIe.map(b=>({value:b,label:s(`providers.types.${b}`)})));function h(){const b=n.provider;if(n.mode==="edit"&&b!==void 0){r.id=b.id,r.type=b.type,r.apiKey="",r.baseUrl=b.baseUrl??"";const S=OIe(b,n.config?.models);r.models=S.length>0?S:[A2()]}else Object.assign(r,xM());l.value="",o("dirtyChange",!1)}async function m(){const b=n.provider;if(!(n.mode!=="edit"||b===void 0||f.value||!b.hasApiKey))try{const S=await St().getProvider(b.id);S.apiKey&&!d.value&&(r.apiKey=S.apiKey,c.value=!0)}catch{c.value=!1}}function k(){o("dirtyChange",!0)}function w(){r.models.push(A2()),k()}function v(b){r.models.length<=1||(r.models.splice(b,1),k())}async function y(){if(a.value||f.value)return;const b=RIe(r,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(b!==null){l.value=s(`providers.error.${b}`);return}a.value=!0,l.value="";try{if(n.mode==="add"){const T=await St().addProvider(PIe(r));o("dirtyChange",!1),o("saved",T.id);return}const S=n.provider;if(S===void 0)return;const I=await St().updateProvider(S.id,DIe(r,S,c.value,n.config?.providers[S.id]?.defaultModel));o("dirtyChange",!1),o("saved",I.provider.id)}catch{l.value=s("providers.saveFailed")}finally{a.value=!1}}return Sn(()=>{h(),m()}),(b,S)=>(g(),C("form",{class:"provider-form",onSubmit:Ct(y,["prevent"]),onInput:k},[f.value?(g(),C("div",BIe,N(x(s)("providers.managedHint")),1)):oe("",!0),_("div",zIe,[K(Al,{label:x(s)("providers.fieldId")},{default:ve(()=>[K(ms,{modelValue:r.id,"onUpdate:modelValue":S[0]||(S[0]=I=>r.id=I),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldType")},{default:ve(()=>[K(C2,{modelValue:r.type,"onUpdate:modelValue":S[1]||(S[1]=I=>r.type=I),disabled:f.value},{default:ve(()=>[(g(!0),C(Te,null,st(p.value,I=>(g(),C("option",{key:I.value,value:I.value},N(I.label),9,WIe))),128))]),_:1},8,["modelValue","disabled"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",HIe,[K(ms,{modelValue:r.apiKey,"onUpdate:modelValue":[S[2]||(S[2]=I=>r.apiKey=I),S[3]||(S[3]=I=>d.value=!0)],type:u.value?"text":"password",disabled:f.value,placeholder:e.provider?.hasApiKey?x(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","disabled","placeholder"]),K(Jt,{class:"provider-form__eye",size:"sm",disabled:f.value,label:u.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:S[4]||(S[4]=I=>u.value=!u.value)},{default:ve(()=>[K(Fe,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["disabled","label"])])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldBaseUrl")},{default:ve(()=>[K(ms,{modelValue:r.baseUrl,"onUpdate:modelValue":S[5]||(S[5]=I=>r.baseUrl=I),disabled:f.value,placeholder:x(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_("div",jIe,[_("strong",null,N(x(s)("providers.fieldModels")),1),K(nn,{type:"button",size:"sm",variant:"secondary",disabled:f.value,onClick:w},{default:ve(()=>[K(Fe,{name:"plus",size:"sm"}),qe(N(x(s)("providers.addModel")),1)]),_:1},8,["disabled"])]),_("div",UIe,[_("div",VIe,[_("span",null,N(x(s)("providers.colModelId")),1),_("span",null,N(x(s)("providers.colContext")),1),_("span",null,N(x(s)("providers.colDisplayName")),1),S[7]||(S[7]=_("span",null,null,-1))]),(g(!0),C(Te,null,st(r.models,(I,T)=>(g(),C("div",{key:T,class:"provider-form__model"},[K(ms,{modelValue:I.model,"onUpdate:modelValue":$=>I.model=$,disabled:f.value,placeholder:x(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),K(ms,{modelValue:I.maxContextSize,"onUpdate:modelValue":$=>I.maxContextSize=$,disabled:f.value,inputmode:"numeric",placeholder:x(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),K(ms,{modelValue:I.displayName,"onUpdate:modelValue":$=>I.displayName=$,disabled:f.value,placeholder:x(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),K(Jt,{size:"sm",disabled:f.value||r.models.length<=1,label:x(s)("providers.removeModel"),onClick:$=>v(T)},{default:ve(()=>[K(Fe,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])]))),128))]),l.value?(g(),C("div",qIe,N(l.value),1)):oe("",!0),_("div",KIe,[K(nn,{type:"button",variant:"secondary",onClick:S[6]||(S[6]=I=>o("cancel"))},{default:ve(()=>[qe(N(x(s)("common.cancel")),1)]),_:1}),f.value?oe("",!0):(g(),pe(nn,{key:0,type:"submit",variant:"primary",loading:a.value},{default:ve(()=>[qe(N(x(s)("providers.save")),1)]),_:1},8,["loading"]))])],32))}}),DN=ht(GIe,[["__scopeId","data-v-e7c6ed44"]]),ZIe={class:"add-provider-flow"},YIe={key:0,class:"add-provider-flow__section"},JIe={key:0,class:"add-provider-flow__state"},XIe={key:1,class:"add-provider-flow__state"},QIe={class:"add-provider-flow__catalog"},e$e=["disabled","onClick"],t$e={class:"add-provider-flow__name"},n$e={key:0,class:"add-provider-flow__empty"},o$e={class:"add-provider-flow__key"},s$e={key:1,class:"add-provider-flow__warning"},i$e={class:"add-provider-flow__note"},r$e={key:2,class:"add-provider-flow__error",role:"alert"},l$e={class:"add-provider-flow__actions"},a$e={class:"add-provider-flow__note"},u$e={class:"add-provider-flow__key"},c$e={key:0,class:"add-provider-flow__error",role:"alert"},d$e={class:"add-provider-flow__actions"},f$e={key:2,class:"add-provider-flow__section"},p$e=Ze({__name:"AddProviderFlow",props:{config:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V("catalog"),r=O(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),l=V([]),a=V("loading"),u=V(""),c=V(null),d=Ms({id:"",apiKey:"",baseUrl:""}),f=V(""),p=V(!1),h=V(!1),m=Ms({url:"",apiKey:""}),k=V(""),w=V(!1),v=V(!1),y=O(()=>{const P=u.value.trim().toLowerCase();return P===""?l.value:l.value.filter(M=>M.name.toLowerCase().includes(P)||M.id.toLowerCase().includes(P))}),b=O(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function S(){a.value="loading";try{l.value=await St().listCatalogProviders(),a.value="ready";const P=l.value.filter(M=>!M.rejected);P.length===1&&c.value===null&&T(P[0])}catch{a.value="error"}}function I(P){const M=P.rejectReason===null?"":`providers.catalog.rejectReason.${P.rejectReason}`;return M!==""&&s(M)!==M?s(M):s("providers.catalog.rejected")}function T(P){P.rejected||(c.value=P,d.id=P.id,d.apiKey="",d.baseUrl="",f.value="")}function $(){o("dirtyChange",!0)}async function F(){const P=c.value;if(P===null||p.value)return;const M=d.id.trim();if(M===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if(P.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await St().importCatalogProvider({catalogId:P.id,id:M===P.id?void 0:M,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",M)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function R(){if(w.value)return;const P=m.url.trim();if(P===""){k.value=s("providers.error.registryUrlRequired");return}w.value=!0,k.value="";try{const M=await St().importCustomRegistry({url:P,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const D=M.providers[0];D===void 0?o("cancel"):o("added",D.id)}catch{k.value=s("providers.addFailed")}finally{w.value=!1}}return Sn(S),(P,M)=>(g(),C("div",ZIe,[K(zs,{modelValue:i.value,"onUpdate:modelValue":M[0]||(M[0]=D=>i.value=D),size:"sm",options:r.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),C("section",YIe,[a.value==="loading"?(g(),C("div",JIe,[K(ns,{size:"sm"}),qe(N(x(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),C("div",XIe,[_("span",null,N(x(s)("providers.catalog.loadError")),1),K(nn,{size:"sm",variant:"secondary",onClick:S},{default:ve(()=>[qe(N(x(s)("providers.catalog.retry")),1)]),_:1})])):c.value===null?(g(),C(Te,{key:2},[K(ms,{modelValue:u.value,"onUpdate:modelValue":M[1]||(M[1]=D=>u.value=D),placeholder:x(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),_("div",QIe,[(g(!0),C(Te,null,st(y.value,D=>(g(),C("button",{key:D.id,type:"button",class:"add-provider-flow__entry",disabled:D.rejected,onClick:B=>T(D)},[_("span",t$e,N(D.name),1),D.wireType?(g(),pe(wr,{key:0,size:"sm",variant:"neutral"},{default:ve(()=>[qe(N(D.wireType),1)]),_:2},1024)):oe("",!0),M[15]||(M[15]=_("span",{class:"add-provider-flow__grow"},null,-1)),_("span",null,N(D.rejected?I(D):x(s)("providers.modelCount",{count:D.models.length})),1)],8,e$e))),128)),y.value.length===0?(g(),C("div",n$e,N(x(s)("providers.catalog.empty")),1)):oe("",!0)])],64)):(g(),C("form",{key:3,class:"add-provider-flow__form",onSubmit:Ct(F,["prevent"]),onInput:$},[_("button",{type:"button",class:"add-provider-flow__back",onClick:M[2]||(M[2]=D=>c.value=null)},[K(Fe,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),qe(N(x(s)("providers.catalog.backToList")),1)]),K(Al,{label:x(s)("providers.fieldId")},{default:ve(()=>[K(ms,{modelValue:d.id,"onUpdate:modelValue":M[3]||(M[3]=D=>d.id=D),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",o$e,[K(ms,{modelValue:d.apiKey,"onUpdate:modelValue":M[4]||(M[4]=D=>d.apiKey=D),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),K(Jt,{class:"add-provider-flow__eye",size:"sm",label:h.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:M[5]||(M[5]=D=>h.value=!h.value)},{default:ve(()=>[K(Fe,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),c.value.needsBaseUrl?(g(),pe(Al,{key:0,label:x(s)("providers.fieldBaseUrl")},{default:ve(()=>[K(ms,{modelValue:d.baseUrl,"onUpdate:modelValue":M[6]||(M[6]=D=>d.baseUrl=D),placeholder:x(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):oe("",!0),b.value?(g(),C("div",s$e,N(x(s)("providers.catalog.overwriteWarning")),1)):oe("",!0),_("div",i$e,N(x(s)("providers.catalog.willImport",{count:c.value.models.length})),1),f.value?(g(),C("div",r$e,N(f.value),1)):oe("",!0),_("div",l$e,[K(nn,{type:"button",variant:"secondary",onClick:M[7]||(M[7]=D=>o("cancel"))},{default:ve(()=>[qe(N(x(s)("common.cancel")),1)]),_:1}),K(nn,{type:"submit",variant:"primary",loading:p.value},{default:ve(()=>[qe(N(x(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),C("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:Ct(R,["prevent"]),onInput:$},[_("p",a$e,N(x(s)("providers.catalog.registryHint")),1),K(Al,{label:x(s)("providers.catalog.registryUrlLabel")},{default:ve(()=>[K(ms,{modelValue:m.url,"onUpdate:modelValue":M[8]||(M[8]=D=>m.url=D),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",u$e,[K(ms,{modelValue:m.apiKey,"onUpdate:modelValue":M[9]||(M[9]=D=>m.apiKey=D),type:v.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),K(Jt,{class:"add-provider-flow__eye",size:"sm",label:v.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:M[10]||(M[10]=D=>v.value=!v.value)},{default:ve(()=>[K(Fe,{name:v.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),C("div",c$e,N(k.value),1)):oe("",!0),_("div",d$e,[K(nn,{type:"button",variant:"secondary",onClick:M[11]||(M[11]=D=>o("cancel"))},{default:ve(()=>[qe(N(x(s)("common.cancel")),1)]),_:1}),K(nn,{type:"submit",variant:"primary",loading:w.value},{default:ve(()=>[qe(N(x(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),C("div",f$e,[K(DN,{mode:"add",config:e.config,onDirtyChange:M[12]||(M[12]=D=>o("dirtyChange",D)),onSaved:M[13]||(M[13]=D=>o("added",D)),onCancel:M[14]||(M[14]=D=>o("cancel"))},null,8,["config"])]))]))}}),h$e=ht(p$e,[["__scopeId","data-v-f7a8fd45"]]),m$e={class:"providers-panel"},g$e={class:"providers-panel__heading"},v$e={key:0,class:"providers-panel__state"},y$e={key:1,class:"providers-panel__state providers-panel__state--warning"},k$e={class:"providers-panel__add-icon"},b$e={key:0,class:"providers-panel__details"},w$e={key:0,class:"providers-panel__state"},x$e=["data-testid","aria-expanded","onClick"],_$e={class:"providers-panel__identity"},S$e={class:"providers-panel__count"},C$e={key:0,class:"providers-panel__details"},A$e={key:0,class:"providers-panel__model-list"},M$e={class:"providers-panel__delete"},E$e=Ze({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{confirm:s}=Ka(),i=V([]),r=V(null),l=V(!1),a=V(!1),u=V(null),c=V(!1),d=O(()=>i.value.toSorted((w,v)=>w.id.localeCompare(v.id))),f=O(()=>u.value==="$add");Ye(c,w=>n("dirtyChange",w),{immediate:!0}),Ye(()=>e.discardToken,()=>{c.value=!1,u.value=null});async function p(){l.value=!0,a.value=!1;try{i.value=await St().listProviders()}catch{i.value=[],a.value=!0}try{r.value=await St().getConfig()}catch{r.value=null}finally{l.value=!1}}function h(w){c.value||(u.value=u.value===w?null:w)}async function m(w){c.value=!1,await p(),u.value=w}async function k(w){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:w.id,count:w.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await St().deleteProvider(w.id),u.value=null,c.value=!1,await p()}})}return Sn(p),(w,v)=>(g(),C("section",m$e,[_("div",g$e,[_("div",null,[_("h3",null,N(x(o)("providers.title")),1),_("p",null,N(x(o)("providers.description")),1)])]),l.value?(g(),C("div",v$e,[K(ns,{size:"sm"}),qe(N(x(o)("providers.loading")),1)])):a.value?(g(),C("div",y$e,[K(Fe,{name:"alert-triangle",size:"md"}),qe(N(x(o)("providers.unavailable")),1)])):(g(),C(Te,{key:2},[_("section",{class:ze(["providers-panel__card providers-panel__add",{"is-open":f.value}])},[_("button",{type:"button",class:"providers-panel__summary",onClick:v[0]||(v[0]=y=>h("$add"))},[_("span",k$e,[K(Fe,{name:"plus",size:"sm"})]),_("strong",null,N(x(o)("providers.addProvider")),1),v[5]||(v[5]=_("span",{class:"providers-panel__grow"},null,-1)),K(Fe,{name:"chevron-right",size:"sm",class:ze({"is-rotated":f.value})},null,8,["class"])]),f.value?(g(),C("div",b$e,[K(h$e,{config:r.value,onDirtyChange:v[1]||(v[1]=y=>c.value=y),onAdded:m,onCancel:v[2]||(v[2]=y=>{u.value=null,c.value=!1})},null,8,["config"])])):oe("",!0)],2),i.value.length===0?(g(),C("div",w$e,N(x(o)("providers.empty")),1)):oe("",!0),(g(!0),C(Te,null,st(d.value,y=>(g(),C("section",{key:y.id,class:"providers-panel__card"},[_("button",{type:"button",class:"providers-panel__summary","data-testid":`provider-${y.id}-toggle`,"aria-expanded":u.value===y.id,onClick:b=>h(y.id)},[K(Mn,{text:x(o)(`providers.status.${y.status}`)},{default:ve(()=>[_("span",{class:ze(["providers-panel__status",`is-${y.status}`])},null,2)]),_:2},1032,["text"]),_("span",_$e,[_("strong",null,N(y.id),1),_("span",null,[qe(N(y.type),1),y.baseUrl?(g(),C(Te,{key:0},[qe(" · "+N(y.baseUrl),1)],64)):oe("",!0)])]),v[6]||(v[6]=_("span",{class:"providers-panel__grow"},null,-1)),K(wr,{variant:y.hasApiKey?"success":"neutral",size:"sm"},{default:ve(()=>[qe(N(y.hasApiKey?x(o)("providers.keySet"):x(o)("providers.keyNotSet")),1)]),_:2},1032,["variant"]),_("span",S$e,N(x(o)("providers.modelCount",{count:y.models?.length??0})),1),K(Fe,{name:"chevron-right",size:"sm",class:ze({"is-rotated":u.value===y.id})},null,8,["class"])],8,x$e),u.value===y.id?(g(),C("div",C$e,[y.models?.length?(g(),C("div",A$e,[(g(!0),C(Te,null,st(y.models,b=>(g(),C("code",{key:b},N(b),1))),128))])):oe("",!0),K(DN,{mode:"edit",provider:y,config:r.value,onDirtyChange:v[3]||(v[3]=b=>c.value=b),onSaved:m,onCancel:v[4]||(v[4]=b=>{u.value=null,c.value=!1})},null,8,["provider","config"]),_("div",M$e,[K(nn,{variant:"danger-soft",size:"sm","data-testid":`provider-${y.id}-delete`,onClick:b=>k(y)},{default:ve(()=>[qe(N(x(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid","onClick"])])])):oe("",!0)]))),128))],64))]))}}),T$e=ht(E$e,[["__scopeId","data-v-b143e58f"]]),I$e=["aria-expanded","aria-label","disabled"],$$e=["aria-label"],N$e=["aria-label"],L$e={class:"sm-picker__group"},F$e=["aria-selected","onMouseenter","onClick"],O$e={class:"sm-picker__option-label"},R$e=["aria-label"],P$e={class:"sm-picker__group"},D$e=["aria-selected","onMouseenter","onClick"],B$e={class:"sm-picker__option-label"},z$e=250,W$e=188,H$e=Ze({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,r=V(null),l=V(null),a=V(null),u=V(!1),c=V(!1),d=V({}),f=V(null),p=V(""),h=V(0),m=V("models"),k=V(0),w=V(0),v=V("right"),y=new Map;let b=null;const S=O(()=>n.groups.flatMap(he=>he.options)),I=O(()=>n.modelValue?S.value.find(he=>he.id===n.modelValue)?.label??n.modelValue:""),T=O(()=>n.modelValue?n.effort?`${I.value} · ${n.effort}`:I.value:s("settings.noSecondaryModel")),$=O(()=>{const he=f.value;if(he===null)return[];const ee=kh(n.modelInfoById[he]),ne=n.effort===""?[null,...ee]:[...ee];return n.modelValue===he&&n.effort!==""&&!ee.includes(n.effort)&&ne.push(n.effort),ne});function F(he){return n.modelValue!==f.value?!1:he===null?n.effort==="":n.effort===he}function R(){const he=$.value.findIndex(F);return he>=0?he:0}function P(he,ee){he instanceof HTMLElement?y.set(ee,he):y.delete(ee)}function M(){b!==null&&(clearTimeout(b),b=null)}function D(){M(),b=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},z$e)}function B(he){he!==p.value&&(p.value=he,h.value=Math.max(0,S.value.findIndex(ee=>ee.id===he)))}function z(){const he=r.value,ee=l.value;if(!he||!ee)return;const ne=he.getBoundingClientRect(),H=ee.offsetHeight,Z=window.innerHeight-ne.bottom;c.value=ZH;const ye=Math.max(8,window.innerWidth-ne.right);d.value=c.value?{right:`${ye}px`,bottom:`${window.innerHeight-ne.top+4}px`,top:"auto"}:{right:`${ye}px`,top:`${ne.bottom+4}px`,bottom:"auto"}}function A(){const he=l.value,ee=f.value===null?void 0:y.get(f.value);if(!he||!ee)return;const ne=he.getBoundingClientRect(),H=ee.getBoundingClientRect(),Z=a.value?.offsetHeight??0,ye=Math.max(0,window.innerHeight-8-Z-ne.top);w.value=Math.max(0,Math.min(H.top-ne.top-4,he.offsetHeight-40,ye));const fe=window.innerWidth-ne.right;v.value=fe>=W$e||fe>=ne.left?"right":"left"}function L(){u.value||n.disabled||(u.value=!0,p.value=n.modelValue||S.value[0]?.id||"",h.value=Math.max(0,S.value.findIndex(he=>he.id===p.value)),f.value=null,m.value="models",xt(z))}function W({restoreFocus:he=!1}={}){u.value&&(M(),u.value=!1,f.value=null,he&&xt(()=>r.value?.focus()))}function j(){u.value?W({restoreFocus:!0}):L()}function re(){f.value=null,m.value="models"}function Q(he,{moveFocus:ee=!1}={}){B(he),M(),f.value=he,xt(A),ee&&(m.value="efforts",k.value=R())}function Y(he){const ee=f.value;if(ee===null)return;const ne={model:ee,...he===null?{}:{effort:he}};(ne.model!==n.modelValue||(ne.effort??"")!==n.effort)&&o("select",ne),W({restoreFocus:!0})}function G(){xt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function X(he){const ee=S.value;if(ee.length===0)return;const ne=ee[(h.value+he+ee.length)%ee.length];B(ne.id),f.value!==null&&Q(ne.id),G()}function te(he){const ee=$.value;ee.length!==0&&(k.value=(k.value+he+ee.length)%ee.length,G())}function q(he){if(!u.value){(he.key==="Enter"||he.key===" "||he.key==="ArrowDown")&&(he.preventDefault(),L());return}if(he.key==="ArrowDown")he.preventDefault(),m.value==="models"?X(1):te(1);else if(he.key==="ArrowUp")he.preventDefault(),m.value==="models"?X(-1):te(-1);else if(he.key==="ArrowRight")he.preventDefault(),Q(p.value,{moveFocus:!0});else if(he.key==="ArrowLeft")he.preventDefault(),f.value!==null&&re();else if(he.key==="Enter"||he.key===" ")he.preventDefault(),m.value==="models"?Q(p.value,{moveFocus:!0}):Y($.value[k.value]??null);else if(he.key==="Home"||he.key==="End"){he.preventDefault();const ee=he.key==="Home";if(m.value==="models"){const ne=S.value;if(ne.length===0)return;const H=(ee?ne[0]:ne.at(-1)).id;B(H),f.value!==null&&Q(H)}else k.value=ee?0:$.value.length-1;G()}else he.key==="Escape"&&(he.preventDefault(),W({restoreFocus:!0}))}function me(he){const ee=he.target;ee instanceof Node&&(r.value?.contains(ee)||l.value?.contains(ee)||W())}function xe(he){if(u.value){if(l.value?.contains(he.target instanceof Node?he.target:null)){A();return}W(),z()}}function We(){u.value&&z()}return Sn(()=>{document.addEventListener("pointerdown",me),document.addEventListener("scroll",xe,!0),window.addEventListener("resize",We)}),En(()=>{document.removeEventListener("pointerdown",me),document.removeEventListener("scroll",xe,!0),window.removeEventListener("resize",We),M()}),(he,ee)=>(g(),C("div",{class:ze(["sm-picker",{"is-open":u.value}])},[_("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":u.value,"aria-haspopup":"dialog","aria-label":x(s)("settings.secondaryModel"),disabled:e.disabled,onClick:j,onKeydown:q},[_("span",{class:ze(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[_("span",null,N(T.value),1)],2),K(Fe,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,I$e),(g(),pe(Hl,{to:"body"},[u.value?(g(),C("div",{key:0,id:i,ref_key:"menuRef",ref:l,class:ze(["sm-picker__menu",{"sm-picker__menu--up":c.value}]),style:jt(d.value),role:"dialog","aria-label":x(s)("settings.secondaryModel")},[_("div",{class:"sm-picker__models",role:"listbox","aria-label":x(s)("settings.secondaryModel")},[(g(!0),C(Te,null,st(e.groups,ne=>(g(),C(Te,{key:ne.provider},[_("div",L$e,N(ne.provider),1),(g(!0),C(Te,null,st(ne.options,H=>(g(),C("button",{key:H.id,ref_for:!0,ref:Z=>P(Z,H.id),type:"button",class:ze(["sm-picker__option",{"is-selected":H.id===e.modelValue,"is-active":H.id===p.value,"is-kb-active":m.value==="models"&&H.id===p.value}]),role:"option","aria-selected":H.id===e.modelValue,onMouseenter:Z=>Q(H.id),onMouseleave:D,onClick:Z=>Q(H.id,{moveFocus:!0})},[K(Fe,{class:"sm-picker__check",name:"check",size:"sm"}),_("span",O$e,N(H.label),1),K(Fe,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,F$e))),128))],64))),128))],8,N$e),f.value!==null?(g(),C("div",{key:0,ref_key:"flyoutRef",ref:a,class:ze(["sm-picker__flyout",`sm-picker__flyout--${v.value}`]),style:jt({top:`${w.value}px`}),role:"listbox","aria-label":x(s)("settings.secondaryModelEffort"),onMouseenter:M,onMouseleave:D},[_("div",P$e,N(x(s)("settings.secondaryModelEffort")),1),(g(!0),C(Te,null,st($.value,(ne,H)=>(g(),C("button",{key:ne??"__default__",type:"button",class:ze(["sm-picker__option",{"is-selected":F(ne),"is-kb-active":m.value==="efforts"&&H===k.value,"is-muted":ne===null}]),role:"option","aria-selected":F(ne),onMouseenter:Z=>{m.value="efforts",k.value=H},onClick:Z=>Y(ne)},[K(Fe,{class:"sm-picker__check",name:"check",size:"sm"}),_("span",B$e,N(ne??x(s)("settings.secondaryModelEffortAuto")),1)],42,D$e))),128))],46,R$e)):oe("",!0)],14,$$e)):oe("",!0)]))],2))}}),j$e=ht(H$e,[["__scopeId","data-v-57066bcd"]]),U$e=["aria-label"],V$e=["aria-selected","onClick"],q$e={class:"body"},K$e={class:"panel"},G$e={class:"sec"},Z$e={class:"sec-title"},Y$e={class:"row"},J$e={class:"rlabel"},X$e={class:"row"},Q$e={class:"rlabel"},e7e={class:"row"},t7e={class:"rlabel"},n7e={class:"row"},o7e={class:"rlabel"},s7e={class:"hint"},i7e={class:"sec"},r7e={class:"sec-title"},l7e={class:"row"},a7e={class:"rlabel"},u7e={key:0,class:"hint"},c7e={class:"row"},d7e={class:"rlabel"},f7e={key:0,class:"hint"},p7e={class:"row"},h7e={class:"rlabel"},m7e={key:0,class:"hint"},g7e={class:"row"},v7e={class:"rlabel"},y7e={class:"panel"},k7e={class:"sec"},b7e={class:"sec-title"},w7e={class:"row"},x7e={class:"rlabel"},_7e={key:0,class:"rvalue"},S7e={class:"actions"},C7e={class:"panel"},A7e={class:"panel"},M7e={class:"sec"},E7e={class:"sec-head"},T7e={class:"sec-title"},I7e={key:0,class:"saving"},$7e={class:"row"},N7e={class:"rlabel"},L7e={class:"hint"},F7e={key:0,class:"select-wrap"},O7e={key:0,value:"",disabled:""},R7e=["label"],P7e=["value"],D7e={key:1,class:"rvalue mono"},B7e={class:"row"},z7e={class:"rlabel"},W7e={class:"hint"},H7e={class:"row"},j7e={class:"rlabel"},U7e={class:"hint"},V7e={class:"row"},q7e={class:"rlabel"},K7e={class:"hint"},G7e={class:"row"},Z7e={class:"rlabel"},Y7e={class:"hint"},J7e={key:0,class:"sec"},X7e={class:"sec-title"},Q7e={class:"row"},eNe={class:"rlabel"},tNe={class:"hint"},nNe={key:1,class:"rvalue"},oNe={key:1,class:"empty-config"},sNe={class:"panel"},iNe={class:"sec"},rNe={class:"sec-title"},lNe={class:"row"},aNe={class:"rlabel"},uNe={class:"hint"},cNe={class:"rvalue mono"},dNe={class:"row"},fNe={class:"rlabel"},pNe={class:"hint"},hNe={class:"value-wrap"},mNe={class:"rvalue mono"},gNe={class:"row"},vNe={class:"rlabel"},yNe={class:"hint"},kNe={class:"value-wrap"},bNe={class:"rvalue mono"},wNe={class:"row"},xNe={class:"rlabel"},_Ne={class:"rvalue mono"},SNe={key:0,class:"sec"},CNe={key:0,class:"row"},ANe={class:"rlabel"},MNe={class:"hint"},ENe={class:"hint"},TNe={class:"sec"},INe={class:"sec-title"},$Ne={class:"row"},NNe={class:"rlabel"},LNe={key:0,class:"hint"},FNe={class:"row"},ONe={class:"rlabel"},RNe={class:"panel"},PNe={class:"sec"},DNe={class:"sec-title"},BNe={class:"row"},zNe={class:"rlabel"},WNe={class:"hint"},HNe={class:"row"},jNe={class:"rlabel"},UNe={class:"hint"},VNe={key:1,class:"empty-config"},qNe={class:"panel"},KNe={class:"panel-head"},GNe={class:"panel-title"},ZNe={class:"panel-desc"},YNe={class:"archive-toolbar"},JNe={class:"archive-search"},XNe=["placeholder"],QNe={value:"all"},eLe=["value"],tLe={key:0,class:"archive-empty"},nLe={key:0,class:"archive-list"},oLe={class:"archive-workspace"},sLe={class:"path"},iLe={class:"count"},rLe={class:"setting-card"},lLe={class:"archive-meta"},aLe={class:"archive-name"},uLe={class:"archive-time"},cLe={key:1,class:"archive-empty"},dLe=100,fLe=Ze({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","logout","openOnboarding","updateConfig","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(o.initialTab??"general"),r=O(()=>jx(o.uiFontSize)),l=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"robot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"}],a=_$().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",c=V(null),d=O(()=>c.value?.serverVersion||o.serverVersion||"-"),f=O(()=>c.value?.backend??o.backend??"v1"),p=O(()=>f.value==="v2"?"agent-gateway":"server"),h=V(!1),m=V(!1),k=V(0),{confirm:w,current:v}=Ka(),y=["manual","yolo","auto"],b={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},S=V(null);RN(S);function I(Qe){Qe.key==="Escape"&&v.value===null&&G()}Sn(()=>{document.addEventListener("keydown",I),T()}),En(()=>{document.removeEventListener("keydown",I),xe!==null&&clearTimeout(xe)});async function T(){try{c.value=await St().getMeta()}catch{c.value=null}}function $(){g7()}const F=O(()=>{const Qe=new Map;for(const nt of o.models??[])Qe.set(nt.id,{id:nt.id,label:nt.displayName??nt.model??nt.id,provider:nt.provider});for(const[nt,ut]of Object.entries(o.config?.models??{})){if(Qe.has(nt))continue;const Pt=M(ut);Qe.set(nt,{id:nt,label:D(nt,ut,Pt),provider:Pt??nt})}return Array.from(Qe.values())}),R=O(()=>{const Qe=new Map;for(const nt of F.value){const ut=Qe.get(nt.provider)??[];ut.push(nt),Qe.set(nt.provider,ut)}for(const[nt,ut]of Qe)Qe.set(nt,ut.toSorted((Pt,Oe)=>Pt.label.localeCompare(Oe.label)));return Array.from(Qe.entries()).toSorted(([nt],[ut])=>nt.localeCompare(ut)).map(([nt,ut])=>({provider:nt,options:ut}))}),P=O(()=>{const Qe=o.config?.defaultPermissionMode;return Qe==="auto"||Qe==="yolo"||Qe==="manual"?Qe:"manual"});function M(Qe){if(!Qe||typeof Qe!="object")return;const nt=Qe;return typeof nt.provider=="string"?nt.provider:void 0}function D(Qe,nt,ut){if(!nt||typeof nt!="object")return Qe;const Pt=nt,Oe=typeof Pt.model=="string"?Pt.model:void 0,Je=ut??M(nt);return Oe&&Je?`${Qe} (${Je}/${Oe})`:Oe?`${Qe} (${Oe})`:Qe}function B(Qe){return Qe===!0}function z(Qe){!Qe||Qe===o.config?.defaultModel||s("updateConfig",{defaultModel:Qe})}function A(Qe){Qe!==P.value&&s("updateConfig",{defaultPermissionMode:Qe})}function L(Qe){const nt=o.config?.[Qe];s("updateConfig",{[Qe]:!B(nt)})}function W(){const Qe=o.config?.thinking;return!Qe||typeof Qe!="object"?!0:Qe.enabled!==!1}function j(){s("updateConfig",{thinking:{enabled:!W()}})}function re(){const Qe=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!Qe})}async function Q(Qe){Qe!==i.value&&await Y()&&(i.value=Qe)}async function Y(){if(!m.value)return!0;const Qe=await w({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return Qe&&(m.value=!1,k.value+=1),Qe}async function G(){await Y()&&s("close")}function X(){return[`App version: ${u}`,`Server version: ${d.value}`,`Backend: ${f.value}`,`Server address: ${a}`,`Server ID: ${c.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` +`)}async function te(){h.value=await Jo(X())}const q=V(!1),me=V(!1);let xe=null;function We(){xe!==null&&clearTimeout(xe),xe=setTimeout(()=>{q.value=!1,me.value=!1,xe=null},1500)}async function he(){await Jo(d.value)&&(q.value=!0,We())}async function ee(){await Jo(a)&&(me.value=!0,We())}const ne=O(()=>fe("secondary-model")),H=O(()=>o.config?.secondaryModel?.model??""),Z=O(()=>o.config?.secondaryModel?.defaultEffort??""),ye=O(()=>Object.fromEntries((o.models??[]).map(Qe=>[Qe.id,Qe])));function fe(Qe){return o.config?.experimental?.[Qe]===!0}function de(Qe,nt){const ut={...o.config?.experimental,[Qe]:nt};s("updateConfig",{experimental:ut})}function J(Qe){const nt=Qe.effort?{model:Qe.model,defaultEffort:Qe.effort}:{model:Qe.model};nt.model===H.value&&(Qe.effort??"")===Z.value||s("updateConfig",{secondaryModel:nt})}function ae(Qe){const nt=j7(Qe);nt!==void 0&&s("setUiFontSize",nt)}const be=q0(),_e=V([]),ce=V(!1),Se=V(!1),ie=V(""),we=V("all"),Re=V("archived-desc");async function at(){if(!(ce.value||Se.value)){ce.value=!0;try{const Qe=[];let nt;for(;;){const ut=await be.loadArchivedSessions({beforeId:nt,pageSize:dLe});if(Qe.push(...ut.items),!ut.hasMore||ut.items.length===0)break;const Pt=ut.items.at(-1)?.id;if(Pt===void 0)break;nt=Pt}_e.value=Qe,Se.value=!0}catch(Qe){console.warn("loadAllArchived failed",Qe)}finally{ce.value=!1}}}Ye(i,Qe=>{Qe==="archived"&&!Se.value&&at()});const ft=O(()=>{const Qe=new Set;for(const nt of _e.value)Qe.add(nt.cwd);return Array.from(Qe).toSorted((nt,ut)=>nt.localeCompare(ut))}),Mt=O(()=>{const Qe=ie.value.trim().toLowerCase();let nt=_e.value.filter(ut=>ut.archived===!0);return we.value!=="all"&&(nt=nt.filter(ut=>ut.cwd===we.value)),Qe&&(nt=nt.filter(ut=>ut.title.toLowerCase().includes(Qe))),Re.value==="archived-desc"?nt.toSorted((ut,Pt)=>Pt.updatedAt.localeCompare(ut.updatedAt)):Re.value==="created-desc"?nt.toSorted((ut,Pt)=>Pt.createdAt.localeCompare(ut.createdAt)):nt.toSorted((ut,Pt)=>ut.title.localeCompare(Pt.title,"en"))}),Tt=O(()=>{const Qe=new Map;for(const nt of Mt.value){const ut=Qe.get(nt.cwd)??[];ut.push(nt),Qe.set(nt.cwd,ut)}return Array.from(Qe.entries()).map(([nt,ut])=>({cwd:nt,items:ut}))});async function tn(Qe){await be.restoreSession(Qe)&&(_e.value=_e.value.filter(ut=>ut.id!==Qe))}function Kt(Qe){const nt=new Date(Qe);if(Number.isNaN(nt.getTime()))return Qe;const ut=Pt=>String(Pt).padStart(2,"0");return`${nt.getFullYear()}-${ut(nt.getMonth()+1)}-${ut(nt.getDate())} ${ut(nt.getHours())}:${ut(nt.getMinutes())}`}return(Qe,nt)=>(g(),pe(Pd,{open:!0,"close-on-esc":!1,title:x(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:G},{default:ve(()=>[_("div",{ref_key:"dialogRef",ref:S,class:"sd"},[_("nav",{class:"settings-tabs",role:"tablist","aria-label":x(n)("settings.title")},[(g(),C(Te,null,st(l,ut=>_("button",{key:ut.id,type:"button",class:ze(["tab",{on:i.value===ut.id}]),role:"tab","aria-selected":i.value===ut.id,onClick:Pt=>Q(ut.id)},[K(Fe,{name:ut.icon,size:"sm"},null,8,["name"]),qe(" "+N(x(n)(ut.labelKey)),1)],10,V$e)),64))],8,U$e),_("div",q$e,[Bn(_("section",K$e,[_("section",G$e,[_("h3",Z$e,N(x(n)("settings.appearance")),1),_("div",Y$e,[_("span",J$e,N(x(n)("theme.colorSchemeLabel")),1),K(zs,{"model-value":e.colorScheme,options:[{value:"light",label:x(n)("theme.light")},{value:"dark",label:x(n)("theme.dark")},{value:"system",label:x(n)("theme.system")}],"onUpdate:modelValue":nt[0]||(nt[0]=ut=>s("setColorScheme",ut))},null,8,["model-value","options"])]),_("div",X$e,[_("span",Q$e,N(x(n)("theme.accentLabel")),1),K(zs,{"model-value":e.accent,options:[{value:"blue",label:x(n)("theme.accentBlue")},{value:"mono",label:x(n)("theme.accentBlack")}],"onUpdate:modelValue":nt[1]||(nt[1]=ut=>s("setAccent",ut))},null,8,["model-value","options"])]),_("div",e7e,[_("span",t7e,N(x(n)("settings.uiFontSize")),1),K(zs,{"model-value":r.value,options:x(B7),"aria-label":x(n)("settings.uiFontSize"),"onUpdate:modelValue":ae},null,8,["model-value","options","aria-label"])]),_("div",n7e,[_("span",o7e,[qe(N(x(n)("settings.conversationToc"))+" ",1),_("span",s7e,N(x(n)("settings.conversationTocHint")),1)]),K(mr,{"model-value":e.conversationToc??!0,label:x(n)("settings.conversationToc"),"onUpdate:modelValue":nt[2]||(nt[2]=ut=>s("setConversationToc",ut))},null,8,["model-value","label"])])]),_("section",i7e,[_("h3",r7e,N(x(n)("settings.notifications")),1),_("div",l7e,[_("span",a7e,[qe(N(x(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",u7e,N(x(n)("settings.notifyDenied")),1)):oe("",!0)]),K(mr,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnComplete"),"onUpdate:modelValue":nt[3]||(nt[3]=ut=>s("setNotify",ut))},null,8,["model-value","disabled","label"])]),_("div",c7e,[_("span",d7e,[qe(N(x(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",f7e,N(x(n)("settings.notifyDenied")),1)):oe("",!0)]),K(mr,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":nt[4]||(nt[4]=ut=>s("setNotifyQuestion",ut))},null,8,["model-value","disabled","label"])]),_("div",p7e,[_("span",h7e,[qe(N(x(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",m7e,N(x(n)("settings.notifyDenied")),1)):oe("",!0)]),K(mr,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnApproval"),"onUpdate:modelValue":nt[5]||(nt[5]=ut=>s("setNotifyApproval",ut))},null,8,["model-value","disabled","label"])]),_("div",g7e,[_("span",v7e,N(x(n)("settings.soundOnComplete")),1),K(mr,{"model-value":e.sound,label:x(n)("settings.soundOnComplete"),"onUpdate:modelValue":nt[6]||(nt[6]=ut=>s("setSound",ut))},null,8,["model-value","label"])])])],512),[[yi,i.value==="general"]]),Bn(_("section",y7e,[_("section",k7e,[_("h3",b7e,N(x(n)("settings.account")),1),_("div",w7e,[_("span",x7e,N(e.authReady?x(n)("settings.providers"):x(n)("sidebar.notSignedIn")),1),K(Mn,{text:e.accountModel},{default:ve(()=>[e.authReady&&e.accountModel?(g(),C("span",_7e,N(e.accountModel),1)):oe("",!0)]),_:1},8,["text"])]),_("div",S7e,[K(nn,{variant:"secondary",size:"sm",onClick:nt[7]||(nt[7]=ut=>{s("openOnboarding"),s("close")})},{default:ve(()=>[qe(N(x(n)("onboarding.reopen")),1)]),_:1}),K(nn,{variant:"primary",size:"sm",onClick:nt[8]||(nt[8]=ut=>Q("providers"))},{default:ve(()=>[qe(N(x(n)("settings.manageProviders")),1)]),_:1})])])],512),[[yi,i.value==="account"]]),Bn(_("section",C7e,[K(T$e,{"discard-token":k.value,onDirtyChange:nt[9]||(nt[9]=ut=>m.value=ut)},null,8,["discard-token"])],512),[[yi,i.value==="providers"]]),Bn(_("section",A7e,[_("section",M7e,[_("div",E7e,[_("h3",T7e,N(x(n)("settings.agentDefaults")),1),e.configSaving?(g(),C("span",I7e,N(x(n)("settings.saving")),1)):oe("",!0)]),e.config?(g(),C(Te,{key:0},[_("div",$7e,[_("span",N7e,[qe(N(x(n)("settings.defaultModel"))+" ",1),_("span",L7e,N(x(n)("settings.defaultModelHint")),1)]),R.value.length>0?(g(),C("div",F7e,[K(C2,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":x(n)("settings.defaultModel"),"onUpdate:modelValue":z},{default:ve(()=>[e.config.defaultModel?oe("",!0):(g(),C("option",O7e,N(x(n)("settings.noDefaultModel")),1)),(g(!0),C(Te,null,st(R.value,ut=>(g(),C("optgroup",{key:ut.provider,label:ut.provider},[(g(!0),C(Te,null,st(ut.options,Pt=>(g(),C("option",{key:Pt.id,value:Pt.id},N(Pt.label),9,P7e))),128))],8,R7e))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),C("span",D7e,N(e.config.defaultModel??x(n)("settings.noDefaultModel")),1))]),_("div",B7e,[_("span",z7e,[qe(N(x(n)("settings.defaultPermission"))+" ",1),_("span",W7e,N(x(n)("settings.defaultPermissionHint")),1)]),K(zs,{"model-value":P.value,options:y.map(ut=>({value:ut,label:x(n)(b[ut])})),"onUpdate:modelValue":nt[10]||(nt[10]=ut=>A(ut))},null,8,["model-value","options"])]),_("div",H7e,[_("span",j7e,[qe(N(x(n)("settings.defaultThinking"))+" ",1),_("span",U7e,N(x(n)("settings.defaultThinkingHint")),1)]),K(mr,{"model-value":W(),disabled:e.configSaving,label:x(n)("settings.defaultThinking"),"onUpdate:modelValue":nt[11]||(nt[11]=ut=>j())},null,8,["model-value","disabled","label"])]),_("div",V7e,[_("span",q7e,[qe(N(x(n)("settings.defaultPlanMode"))+" ",1),_("span",K7e,N(x(n)("settings.defaultPlanModeHint")),1)]),K(mr,{"model-value":B(e.config.defaultPlanMode),disabled:e.configSaving,label:x(n)("settings.defaultPlanMode"),"onUpdate:modelValue":nt[12]||(nt[12]=ut=>L("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),_("div",G7e,[_("span",Z7e,[qe(N(x(n)("settings.mergeSkills"))+" ",1),_("span",Y7e,N(x(n)("settings.mergeSkillsHint")),1)]),K(mr,{"model-value":B(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:x(n)("settings.mergeSkills"),"onUpdate:modelValue":nt[13]||(nt[13]=ut=>L("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])]),ne.value?(g(),C("section",J7e,[_("h3",X7e,N(x(n)("settings.secondaryModelSection")),1),_("div",Q7e,[_("span",eNe,[qe(N(x(n)("settings.secondaryModel"))+" ",1),_("span",tNe,N(x(n)("settings.secondaryModelHint")),1)]),R.value.length>0?(g(),pe(j$e,{key:0,"model-value":H.value,effort:Z.value,groups:R.value,"model-info-by-id":ye.value,disabled:e.configSaving,onSelect:J},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),C("span",nNe,N(x(n)("settings.noSecondaryModel")),1))])])):oe("",!0)],64)):(g(),C("div",oNe,N(x(n)("settings.configUnavailable")),1))])],512),[[yi,i.value==="agent"]]),Bn(_("section",sNe,[_("section",iNe,[_("h3",rNe,N(x(n)("settings.versionAndUpdates")),1),_("div",lNe,[_("span",aNe,[qe(N(x(n)("settings.appVersion"))+" ",1),_("span",uNe,N(x(n)("settings.appVersionHint")),1)]),_("span",cNe,N(x(u)),1)]),_("div",dNe,[_("span",fNe,[qe(N(x(n)("settings.serverVersion"))+" ",1),_("span",pNe,N(x(n)("settings.serverVersionHint")),1)]),_("span",hNe,[_("span",mNe,N(d.value),1),K(Jt,{size:"sm",label:q.value?x(n)("settings.copied"):x(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:he},{default:ve(()=>[K(Fe,{name:q.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_("div",gNe,[_("span",vNe,[qe(N(x(n)("settings.serverAddress"))+" ",1),_("span",yNe,N(x(n)("settings.serverAddressHint")),1)]),_("span",kNe,[_("span",bNe,N(x(a)),1),K(Jt,{size:"sm",label:me.value?x(n)("settings.copied"):x(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:ee},{default:ve(()=>[K(Fe,{name:me.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_("div",wNe,[_("span",xNe,N(x(n)("settings.backend")),1),_("span",_Ne,N(p.value),1)])]),e.config?(g(),C("section",SNe,[e.config?(g(),C("div",CNe,[_("span",ANe,[qe(N(x(n)("settings.telemetry"))+" ",1),_("span",MNe,N(x(n)("settings.telemetryHint")),1),_("span",ENe,N(x(n)("settings.telemetryRestartHint")),1)]),K(mr,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:x(n)("settings.telemetry"),"onUpdate:modelValue":nt[14]||(nt[14]=ut=>re())},null,8,["model-value","disabled","label"])])):oe("",!0)])):oe("",!0),_("section",TNe,[_("h3",INe,N(x(n)("settings.diagnostics")),1),_("div",$Ne,[_("span",NNe,[qe(N(x(n)("settings.exportLog"))+" ",1),x(Nr)()?oe("",!0):(g(),C("span",LNe,N(x(n)("settings.logHint")),1))]),K(nn,{variant:"secondary",size:"sm",onClick:$},{default:ve(()=>[qe(N(x(n)("settings.exportLogBtn")),1)]),_:1})]),_("div",FNe,[_("span",ONe,N(x(n)("settings.copyDetails")),1),K(nn,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:te},{default:ve(()=>[qe(N(h.value?x(n)("settings.copied"):x(n)("settings.copyDetails")),1)]),_:1})])])],512),[[yi,i.value==="advanced"]]),Bn(_("section",RNe,[_("section",PNe,[_("h3",DNe,N(x(n)("settings.tabs.lab")),1),e.config?(g(),C(Te,{key:0},[_("div",BNe,[_("span",zNe,[qe(N(x(n)("settings.lab.sidebarTabs"))+" ",1),_("span",WNe,N(x(n)("settings.lab.sidebarTabsHint")),1)]),K(mr,{"model-value":fe("sidebarTabs"),disabled:e.configSaving,label:x(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":nt[15]||(nt[15]=ut=>de("sidebarTabs",ut))},null,8,["model-value","disabled","label"])]),_("div",HNe,[_("span",jNe,[qe(N(x(n)("settings.lab.secondaryModel"))+" ",1),_("span",UNe,N(x(n)("settings.lab.secondaryModelHint")),1)]),K(mr,{"model-value":fe("secondary-model"),disabled:e.configSaving,label:x(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":nt[16]||(nt[16]=ut=>de("secondary-model",ut))},null,8,["model-value","disabled","label"])])],64)):(g(),C("div",VNe,N(x(n)("settings.configUnavailable")),1))])],512),[[yi,i.value==="lab"]]),Bn(_("section",qNe,[_("div",KNe,[nt[20]||(nt[20]=_("div",{class:"panel-kicker"},"Archived sessions",-1)),_("h4",GNe,N(x(n)("settings.archivedTitle")),1),_("p",ZNe,N(x(n)("settings.archivedDesc")),1)]),_("div",YNe,[_("label",JNe,[nt[21]||(nt[21]=_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("circle",{cx:"11",cy:"11",r:"7"}),_("path",{d:"m21 21-4.3-4.3"})],-1)),Bn(_("input",{"onUpdate:modelValue":nt[17]||(nt[17]=ut=>ie.value=ut),placeholder:x(n)("settings.archivedSearch")},null,8,XNe),[[vs,ie.value]])]),K(C2,{"model-value":we.value,size:"sm","aria-label":x(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":nt[18]||(nt[18]=ut=>we.value=ut)},{default:ve(()=>[_("option",QNe,N(x(n)("settings.archivedAllWorkspaces")),1),(g(!0),C(Te,null,st(ft.value,ut=>(g(),C("option",{key:ut,value:ut},N(ut),9,eLe))),128))]),_:1},8,["model-value","aria-label"]),K(zs,{size:"sm","model-value":Re.value,options:[{value:"archived-desc",label:x(n)("settings.archivedSortArchived")},{value:"created-desc",label:x(n)("settings.archivedSortCreated")},{value:"name-asc",label:x(n)("settings.archivedSortName")}],"onUpdate:modelValue":nt[19]||(nt[19]=ut=>Re.value=ut)},null,8,["model-value","options"])]),ce.value?(g(),C("div",tLe,N(x(n)("settings.archivedLoadingAll")),1)):(g(),C(Te,{key:1},[Tt.value.length>0?(g(),C("div",nLe,[(g(!0),C(Te,null,st(Tt.value,ut=>(g(),C("section",{key:ut.cwd,class:"archive-card"},[_("div",oLe,[nt[22]||(nt[22]=_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M3 7h6l2 2h10v9H3z"}),_("path",{d:"M3 7V5h6l2 2"})],-1)),_("span",sLe,N(ut.cwd),1),_("span",iLe,N(x(n)("settings.archivedSessionsCount",{count:ut.items.length})),1)]),_("div",rLe,[(g(!0),C(Te,null,st(ut.items,Pt=>(g(),C("div",{key:Pt.id,class:"archive-row"},[_("div",lLe,[_("div",aLe,N(Pt.title),1),_("div",uLe,N(x(n)("settings.archivedAt",{time:Kt(Pt.updatedAt)})),1)]),K(nn,{variant:"secondary",size:"sm",onClick:Oe=>tn(Pt.id)},{default:ve(()=>[qe(N(x(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),C("div",cLe,N(_e.value.length===0?x(n)("settings.archivedEmpty"):x(n)("settings.archivedNoMatch")),1))],64))],512),[[yi,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),pLe=ht(fLe,[["__scopeId","data-v-8ba6a8d4"]]),hLe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,BN=/^[A-Za-z]:[\\/]/,mLe=/^\/\/(?!\/)/;function Lk(e){return hLe.test(e.trim())}function gLe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function vLe(e){return mLe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function yLe(e){return BN.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function kLe(e){return BN.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function M2(e,t){let n=vLe(gLe(e.trim(),t));const o=yLe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const r=n.lastIndexOf("/"),l=o?n.lastIndexOf("\\"):-1,a=Math.max(r,l),u=l>r?"\\":"/",c=kLe(n),d=ad.value.trim().length>0);let m=0,k=null;const w=O(()=>Lk(d.value)),v=V("idle"),y=V(""),b=V("/"),S=V([]),I=V(""),T=V(null),$=V(null),F=O(()=>v.value!=="valid"?null:wLe(d.value,I.value,$.value));let R=0,P=null;function M(te,q){const me=te.toLowerCase(),xe=q.toLowerCase();let We=0;for(let he=0;he0&&ee=_M))break;ne.depth+1{k&&clearTimeout(k),P&&clearTimeout(P),R++,v.value="idle",S.value=[],$.value=null;const q=te.trim();if(q===""){m++,p.value=[],f.value=!1;return}if(Lk(q)){if(m++,p.value=[],f.value=!1,l.value)return;v.value="checking",P=setTimeout(()=>void B(q),150);return}k=setTimeout(()=>void D(te),220)});async function B(te){const q=++R;v.value="checking",$.value=null;const me=M2(te,I.value),{target:xe}=me;try{const he=await o.browseFs(xe);if(q!==R)return;if(he.path){v.value="valid",S.value=[],$.value=xe,a.value=he.path,u.value=he.parent,c.value=he.entries,l.value=!1;return}}catch{}if(q!==R)return;const We=me.base.toLowerCase();y.value=me.parent,b.value=me.separator;try{const he=await o.browseFs(me.parent);if(q!==R)return;if(he.path){S.value=he.entries.filter(ee=>ee.isDir&&ee.name.toLowerCase().startsWith(We)),v.value="not-found";return}}catch{}q===R&&(S.value=[],v.value="bad-parent")}function z(te){d.value=bLe(y.value,te,b.value),T.value?.focus()}const A=O(()=>l.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),L=O(()=>l.value?n("workspace.degradedHint"):w.value&&v.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function W(te){if(te.key==="Escape"){d.value?d.value="":s("close");return}if(te.key!=="Enter")return;const q=d.value.trim();if(Lk(q)){if(te.preventDefault(),l.value){const{target:me}=M2(q,I.value);me&&s("add",me);return}v.value==="valid"?X():v.value==="not-found"&&S.value[0]&&z(S.value[0].name)}}const j=O(()=>{const te=a.value;if(!te)return[];const q=te.split("/").filter(Boolean),me=[{label:"/",path:"/"}];let xe="";for(const We of q)xe+=`/${We}`,me.push({label:We,path:xe});return me}),re=O(()=>!(a.value.length===0||w.value&&F.value===null));async function Q(te){r.value=!0;try{const q=await o.browseFs(te);if(!q.path){l.value=!0;return}a.value=q.path,u.value=q.parent,c.value=q.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function Y(te){te.isDir&&Q(te.path)}function G(){u.value&&Q(u.value)}function X(){re.value&&s("add",F.value??a.value)}return Sn(async()=>{r.value=!0;try{const te=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(te.home&&(I.value=te.home),o.defaultPath&&(await Q(o.defaultPath),!l.value))return;I.value?await Q(I.value):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),En(()=>{k&&clearTimeout(k),P&&clearTimeout(P)}),(te,q)=>(g(),pe(Pd,{open:i.value,"onUpdate:open":q[2]||(q[2]=me=>i.value=me),title:x(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:q[3]||(q[3]=me=>s("close"))},{default:ve(()=>[_("div",xLe,[l.value?oe("",!0):(g(),C("div",_Le,[K(Jt,{size:"sm",disabled:!u.value,label:x(n)("workspace.up"),onClick:G},{default:ve(()=>[K(Fe,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),_("div",SLe,[(g(!0),C(Te,null,st(j.value,(me,xe)=>(g(),C(Te,{key:me.path},[xe>1?(g(),C("span",CLe,"/")):oe("",!0),_("button",{class:ze(["crumb",{last:xe===j.value.length-1}]),onClick:We=>Q(me.path)},N(me.label),11,ALe)],64))),128))])])),!r.value||l.value?(g(),C("div",{key:1,class:ze(["filterbar",{"has-error":v.value==="not-found"||v.value==="bad-parent"}])},[K(Fe,{class:"filter-icon",name:"search",size:"md"}),Bn(_("input",{ref_key:"filterEl",ref:T,"onUpdate:modelValue":q[0]||(q[0]=me=>d.value=me),class:"filter-input",type:"text",placeholder:A.value,autocomplete:"off",spellcheck:"false",onKeydown:Ct(W,["stop"])},null,40,MLe),[[vs,d.value]]),f.value||v.value==="checking"?(g(),pe(ns,{key:0,size:"sm"})):oe("",!0)],2)):oe("",!0),l.value?(g(),C("div",jLe,N(x(n)("workspace.degradedHint")),1)):(g(),C("div",ELe,[r.value?(g(),C("div",TLe,N(x(n)("workspace.browsing")),1)):w.value&&v.value!=="valid"?(g(),C(Te,{key:1},[v.value==="checking"?(g(),C("div",ILe,N(x(n)("workspace.checkingPath")),1)):v.value==="not-found"?(g(),C(Te,{key:1},[S.value.length>0?(g(),C("div",$Le,N(x(n)("workspace.pathPickHint")),1)):oe("",!0),(g(!0),C(Te,null,st(S.value,me=>(g(),C("button",{key:me.path,class:"folder-row",onClick:xe=>z(me.name)},[K(Fe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",LLe,N(me.name),1)],8,NLe))),128)),S.value.length===0?(g(),C("div",FLe,N(x(n)("workspace.noPathMatch",{parent:y.value})),1)):oe("",!0)],64)):v.value==="bad-parent"?(g(),C("div",OLe,N(x(n)("workspace.badParent",{parent:y.value})),1)):oe("",!0)],64)):h.value&&!w.value?(g(),C(Te,{key:2},[(g(!0),C(Te,null,st(p.value,me=>(g(),C("button",{key:me.path,class:"folder-row",onClick:xe=>Q(me.path)},[K(Fe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",PLe,N(me.rel),1)],8,RLe))),128)),!f.value&&p.value.length===0?(g(),C("div",DLe,N(x(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),C("div",BLe,N(x(n)("workspace.searching")),1)):oe("",!0)],64)):(g(),C(Te,{key:3},[(g(!0),C(Te,null,st(c.value,me=>(g(),C("button",{key:me.path,class:"folder-row",onClick:xe=>Y(me)},[K(Fe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",WLe,N(me.name),1)],8,zLe))),128)),c.value.length===0?(g(),C("div",HLe,N(x(n)("workspace.noSubfolders")),1)):oe("",!0)],64))])),e.error?(g(),C("div",ULe,N(e.error),1)):oe("",!0),_("div",VLe,[K(Mn,{text:a.value},{default:ve(()=>[l.value?oe("",!0):(g(),pe(nn,{key:0,variant:"primary",disabled:!re.value,onClick:X},{default:ve(()=>[qe(N(x(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),K(nn,{variant:"secondary",onClick:q[1]||(q[1]=me=>s("close"))},{default:ve(()=>[qe(N(x(n)("workspace.cancel")),1)]),_:1})]),_("div",qLe,N(L.value),1)])]),_:1},8,["open","title"]))}}),YLe=ht(ZLe,[["__scopeId","data-v-09b74e91"]]),JLe={key:0,class:"confirm-dialog__message"},XLe=Ze({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(){n.loading||(o("update:open",!1),o("cancel"))}function r(l){if(l.key!=="Enter"||!n.open||n.loading)return;const a=l.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(l.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),po(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(g(),pe(Pd,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=u=>o("update:open",u)),onClose:i},{foot:ve(()=>[K(nn,{variant:"secondary",disabled:e.loading,onClick:i},{default:ve(()=>[qe(N(e.cancelLabel??x(s)("common.cancel")),1)]),_:1},8,["disabled"]),K(nn,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>o("confirm"))},{default:ve(()=>[qe(N(e.confirmLabel??x(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ve(()=>[e.message?(g(),C("p",JLe,N(e.message),1)):oe("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),QLe=ht(XLe,[["__scopeId","data-v-074405fe"]]),eFe=Ze({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=Ka();function i(){s()}return(r,l)=>(g(),pe(QLe,{open:x(t)!==null,title:x(t)?.title??"",message:x(t)?.message,"confirm-label":x(t)?.confirmLabel,"cancel-label":x(t)?.cancelLabel,variant:x(t)?.variant,loading:x(n),onConfirm:i,onCancel:l[0]||(l[0]=a=>x(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),tFe={class:"rows"},nFe={class:"row"},oFe={class:"row"},sFe={class:"row"},iFe={class:"row"},rFe={class:"row"},lFe={class:"row"},aFe={class:"ctx-text"},uFe={key:0,class:"bar"},cFe={class:"row"},dFe=Ze({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(!0),r=O(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),l=O(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:Pl(o.status.ctxUsed),max:Pl(o.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const u=O(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),c=O(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=O(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=O(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=O(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),pe(Pd,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:x(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ve(()=>[_("dl",tFe,[_("div",nFe,[_("dt",null,N(x(n)("status.statusModel")),1),_("dd",null,N(e.status.model),1)]),_("div",oFe,[_("dt",null,N(x(n)("status.statusThinking")),1),_("dd",null,N(e.thinking),1)]),_("div",sFe,[_("dt",null,N(x(n)("status.statusPermission")),1),_("dd",{style:jt({color:u.value})},N(a(e.status.permission)),5)]),_("div",iFe,[_("dt",null,N(x(n)("status.statusPlanMode")),1),_("dd",{class:ze({"plan-on":e.planMode})},N(c.value),3)]),_("div",rFe,[_("dt",null,N(x(n)("status.statusDynamicWorkflowMode")),1),_("dd",{class:ze({"workflow-on":e.dynamicWorkflowMode})},N(d.value),3)]),_("div",lFe,[_("dt",null,N(x(n)("status.statusContext")),1),_("dd",null,[_("span",aFe,N(l.value),1),e.status.ctxMax>0?(g(),C("span",uFe,[_("i",{style:jt({width:r.value+"%"})},null,4)])):oe("",!0)])]),_("div",cFe,[_("dt",null,N(x(n)("status.statusCost")),1),_("dd",null,N(p.value),1)])])]),_:1},8,["open","title"]))}}),fFe=ht(dFe,[["__scopeId","data-v-7992546c"]]),pFe={class:"ui-toast__icon","aria-hidden":"true"},hFe={class:"ui-toast__body"},mFe={class:"ui-toast__title"},gFe={key:0,class:"ui-toast__msg"},vFe=Ze({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-toast",`ui-toast--${e.variant}`])},[_("span",pFe,[An(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),pe(Fe,{key:0,name:"check"})):e.variant==="danger"?(g(),pe(Fe,{key:1,name:"close"})):e.variant==="warning"?(g(),pe(Fe,{key:2,name:"alert-triangle"})):(g(),pe(Fe,{key:3,name:"info"}))],!0)]),_("div",hFe,[_("div",mFe,N(e.title),1),e.message?(g(),C("div",gFe,N(e.message),1)):oe("",!0),An(t.$slots,"default",{},void 0,!0)]),K(Jt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),yFe=ht(vFe,[["__scopeId","data-v-44bc260b"]]),kFe={key:0,class:"actions"},bFe=["onClick"],wFe=["onClick"],xFe={key:1,class:"details"},_Fe=Ze({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(F){return typeof F=="object"&&F!==null}function r(F){return i(F)?F.title:F}function l(F){return i(F)?F.message??"":""}function a(F){return i(F)?F.details:void 0}function u(F){return i(F)?F.severity==="error":F.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(F)}function c(F){if(!i(F))return u(F)?"danger":"warning";switch(F.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(F){return i(F)?`notice:${F.severity}:${F.title}:${F.message??""}:${JSON.stringify(F.details??[])}`:`text:${F}`}function f(F){if(!i(F))return F;const R=[F.title];F.message&&R.push(F.message);const P=F.details??[];if(P.length>0){R.push("",`${s("warnings.diagnostics")}:`);for(const M of P)R.push(`${M.label}: ${M.value}`)}return R.join(` +`)}let p=1;const h=V([]),m=new Map,k=new Map;function w(F){const R=u(F)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?R+5e3:R}function v(F,R){const P=m.get(F)??{handle:null,deadline:0,remaining:0};P.handle=setTimeout(()=>$(F),R),P.deadline=Date.now()+R,m.set(F,P)}function y(F){const R=m.get(F);R&&R.handle!==null&&clearTimeout(R.handle),m.delete(F)}function b(F){const R=m.get(F);!R||R.handle===null||(clearTimeout(R.handle),R.handle=null,R.remaining=Math.max(0,R.deadline-Date.now()))}function S(F){if(h.value.find(M=>M.id===F)?.detailsOpen)return;const P=m.get(F);!P||P.handle!==null||v(F,P.remaining)}function I(F){F.detailsOpen=!F.detailsOpen,F.detailsOpen?b(F.id):S(F.id)}async function T(F){if(!await Jo(f(F.warning)))return;F.copied=!0;const P=k.get(F.id);P&&clearTimeout(P),k.set(F.id,setTimeout(()=>{F.copied=!1,k.delete(F.id)},1400))}function $(F){y(F);const R=k.get(F);R&&clearTimeout(R),k.delete(F);const P=h.value.findIndex(M=>M.id===F);P!==-1&&(h.value=h.value.filter(M=>M.id!==F),o("dismiss",P))}return Ye(()=>n.warnings,F=>{const R=[...h.value];h.value=F.map(P=>{const M=d(P),D=R.findIndex(A=>A.key===M),B=D===-1?void 0:R.splice(D,1)[0];if(B)return B.warning=P,B;const z={id:p++,key:M,warning:P,detailsOpen:!1,copied:!1};return v(z.id,w(P)),z});for(const P of R){y(P.id);const M=k.get(P.id);M&&clearTimeout(M),k.delete(P.id)}},{immediate:!0,flush:"post"}),En(()=>{m.forEach(F=>{F.handle!==null&&clearTimeout(F.handle)}),m.clear(),k.forEach(F=>clearTimeout(F)),k.clear()}),(F,R)=>(g(),pe(IR,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ve(()=>[(g(!0),C(Te,null,st(h.value,P=>(g(),pe(yFe,{key:P.id,variant:c(P.warning),title:r(P.warning),message:l(P.warning),"dismiss-label":x(s)("warnings.dismiss"),onDismiss:M=>$(P.id),onPointerenter:M=>b(P.id),onPointerleave:M=>S(P.id)},{default:ve(()=>[a(P.warning)?.length?(g(),C("div",kFe,[_("button",{class:"link",type:"button",onClick:M=>I(P)},N(P.detailsOpen?x(s)("warnings.hideDetails"):x(s)("warnings.showDetails")),9,bFe),_("button",{class:"link",type:"button",onClick:M=>T(P)},N(P.copied?x(s)("warnings.copied"):x(s)("warnings.copyDetails")),9,wFe)])):oe("",!0),P.detailsOpen&&a(P.warning)?.length?(g(),C("dl",xFe,[(g(!0),C(Te,null,st(a(P.warning),M=>(g(),C("div",{key:`${M.label}:${M.value}`,class:"detail-row"},[_("dt",null,N(M.label),1),_("dd",null,N(M.value),1)]))),128))])):oe("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),SFe=ht(_Fe,[["__scopeId","data-v-6d8f28b8"]]),CFe={key:0,class:"update-toast",role:"status","aria-live":"polite"},AFe={class:"body"},MFe={class:"title"},EFe={class:"msg"},TFe={class:"acts"},IFe=["disabled"],SM="pythinker.update.skipped",$Fe=Ze({__name:"UpdateToast",setup(e){const{t}=$t(),n=typeof window<"u"?window.pythinkerDesktop:void 0,o=V(),s=V(!1),i=V(l());let r;function l(){try{const f=JSON.parse(localStorage.getItem(SM)??"[]");return Array.isArray(f)?f.filter(p=>typeof p=="string"):[]}catch{return[]}}const a=O(()=>{const f=o.value;return f===void 0||f.status!=="downloaded"&&!(f.status==="available"&&!f.autoUpdate)?!1:!i.value.includes(f.version??"")}),u=O(()=>o.value?.version?t("update.availableVersion",{version:o.value.version}):t("update.available"));async function c(){if(!(n===void 0||s.value)){s.value=!0;try{o.value=await n.quitAndInstall()}finally{s.value=!1}}}function d(){const f=[...i.value,o.value?.version??""];i.value=f;try{localStorage.setItem(SM,JSON.stringify(f.filter(p=>p!=="")))}catch{}}return Sn(()=>{n!==void 0&&(r=n.onUpdateState(f=>{o.value=f}),n.getUpdateState().then(f=>{o.value=f},()=>{}))}),En(()=>{r?.()}),(f,p)=>a.value?(g(),C("div",CFe,[_("div",AFe,[_("div",MFe,N(u.value),1),_("div",EFe,N(x(t)("update.prompt")),1)]),_("div",TFe,[_("button",{type:"button",class:"skip",onClick:d},N(x(t)("update.skip")),1),_("button",{type:"button",class:"go",disabled:s.value,onClick:p[0]||(p[0]=h=>void c())},N(x(t)("update.install")),9,IFe)])])):oe("",!0)}}),NFe=ht($Fe,[["__scopeId","data-v-f7646e4e"]]),LFe={class:"ui-action-toast-host"},FFe={class:"ui-action-toast__body"},OFe=Ze({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t();let s=null,i=0,r=e.duration;function l(c){if(c<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),c),i=Date.now()+c}function a(){s!==null&&(clearTimeout(s),s=null,r=Math.max(0,i-Date.now()))}function u(){s===null&&l(r)}return l(e.duration),En(()=>{s!==null&&clearTimeout(s)}),(c,d)=>(g(),C("div",LFe,[_("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:u},[_("span",FFe,[An(c.$slots,"default",{},void 0,!0)]),K(Jt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??x(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),Fk=ht(OFe,[["__scopeId","data-v-9efa207b"]]),RFe={key:0,class:"window-controls"},PFe=["aria-label"],DFe=["aria-label"],BFe=["aria-label"],zFe=Ze({__name:"WindowControls",setup(e){const{t}=$t(),n=O(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(r,l)=>n.value?(g(),C("div",RFe,[_("button",{type:"button",class:"wc wc-min","aria-label":x(t)("app.minimizeWindow"),onClick:o},[...l[0]||(l[0]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[_("path",{d:"M2.5 5h5"})],-1)])],8,PFe),_("button",{type:"button",class:"wc wc-max","aria-label":x(t)("app.maximizeWindow"),onClick:s},[...l[1]||(l[1]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[_("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,DFe),_("button",{type:"button",class:"wc wc-close","aria-label":x(t)("app.closeWindow"),onClick:i},[...l[2]||(l[2]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[_("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,BFe)])):oe("",!0)}}),WFe=ht(zFe,[["__scopeId","data-v-041ca08b"]]),HFe={class:"topbar"},jFe={class:"wsq"},UFe=["aria-label"],VFe={class:"tb-path"},qFe={class:"ws"},KFe={class:"se"},GFe={class:"tb-sub"},ZFe=Ze({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=O(()=>{const a=o.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=O(()=>o.workspace?.name??n("workspace.noWorkspace")),l=O(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(g(),C("div",HFe,[_("span",jFe,N(i.value),1),_("button",{type:"button",class:"tb-mid","aria-label":x(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[_("span",VFe,[_("span",qFe,N(r.value),1),e.sessionTitle?(g(),C(Te,{key:0},[u[2]||(u[2]=_("span",{class:"sl"},"/",-1)),_("span",KFe,N(e.sessionTitle),1)],64)):oe("",!0),u[3]||(u[3]=_("span",{class:"cv"},"⌄",-1))]),_("span",GFe,[_("span",{class:ze(["rd",{on:e.running}])},null,2),_("span",null,N(l.value),1),e.branch?(g(),C(Te,{key:0},[qe(" · "+N(e.branch),1)],64)):oe("",!0),e.sessionCount>0?(g(),C(Te,{key:1},[qe(" · "+N(x(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):oe("",!0)])],8,UFe),K(Jt,{size:"lg",label:x(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:ve(()=>[K(Fe,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),YFe=ht(ZFe,[["__scopeId","data-v-27a83eb2"]]),JFe={key:0,class:"sheet-root"},XFe=["aria-label"],QFe=["aria-label"],eOe={key:0,class:"sheet-head"},tOe={class:"sheet-title"},nOe={class:"sheet-body"},oOe=Ze({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{lock:i,unlock:r}=LN();function l(){s("update:modelValue",!1),s("close")}function a(u){u.key==="Escape"&&o.closeOnEsc&&l()}return Ye(()=>o.modelValue,u=>{typeof document>"u"||(u?(i(),document.addEventListener("keydown",a)):(r(),document.removeEventListener("keydown",a)))},{immediate:!0}),En(()=>{typeof document<"u"&&(r(),document.removeEventListener("keydown",a))}),(u,c)=>(g(),pe(Cr,{name:"sheet"},{default:ve(()=>[e.modelValue?(g(),C("div",JFe,[_("div",{class:"sheet-scrim",onClick:l}),_("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||x(n)("mobile.sheetLabel")},[_("button",{type:"button",class:"sheet-grab","aria-label":x(n)("mobile.closeSheet"),onClick:l},null,8,QFe),e.title?(g(),C("div",eOe,[_("span",tOe,N(e.title),1)])):oe("",!0),_("div",nOe,[An(u.$slots,"default",{},void 0,!0)])],8,XFe)])):oe("",!0)]),_:3}))}}),zN=ht(oOe,[["__scopeId","data-v-92ecd88c"]]),sOe={class:"mlist"},iOe={key:0,class:"mempty"},rOe=["onClick"],lOe={class:"mgh-main"},aOe={class:"mgh-name"},uOe={class:"mgh-path"},cOe={key:2,class:"att"},dOe={key:0,class:"mempty small"},fOe=["onClick"],pOe={class:"m"},hOe={class:"s"},mOe={key:0,class:"att"},gOe=["disabled","onClick"],vOe=["onClick"],yOe=Ze({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1)}function r(P){s("select",P),i()}function l(P){s("createInWorkspace",P),i()}function a(){s("create"),i()}function u(){s("addWorkspace"),i()}const c=V(new Set);function d(P){return c.value.has(P)}function f(P){const M=new Set(c.value);M.has(P)?M.delete(P):M.add(P),c.value=M,y.value=null,T.value=null}const p=V(new Set);function h(P){return p.value.has(P)}function m(P){const M=new Set(p.value);M.has(P)?M.delete(P):M.add(P),p.value=M}function k(P){if(h(P.workspace.id))return P.sessions;const M=P.sessions.slice(0,P.initialCount);if(o.activeId&&!M.some(D=>D.id===o.activeId)){const D=P.sessions.find(B=>B.id===o.activeId);if(D)return[...M,D]}return M}function w(P){if(!p.value.has(P)){const M=new Set(p.value);M.add(P),p.value=M}s("loadMore",P)}function v(P){return o.attentionByWorkspace[P]??0}const y=V(null);function b(P){y.value=y.value===P?null:P,T.value=null}function S(P){y.value=null;const D=(typeof window<"u"?window.prompt(n("sidebar.rename"),P.title):null)?.trim();D&&s("rename",P.id,D)}function I(P){y.value=null,s("archive",P)}const T=V(null);function $(P){T.value=T.value===P?null:P,y.value=null}function F(P){Jo(P.root),T.value=null}function R(P){T.value=null,s("deleteWorkspace",P.id)}return(P,M)=>(g(),pe(zN,{"model-value":e.modelValue,"onUpdate:modelValue":M[2]||(M[2]=D=>s("update:modelValue",D))},{default:ve(()=>[_("button",{type:"button",class:"newrow",onClick:a},[K(Fe,{name:"message",size:"sm"}),qe(" "+N(x(n)("sidebar.newChat")),1)]),_("button",{type:"button",class:"newrow secondary",onClick:u},[K(Fe,{name:"folder",size:"sm"}),qe(" "+N(x(n)("sidebar.newWorkspace")),1)]),_("div",sOe,[e.groups.length===0?(g(),C("div",iOe,N(x(n)("workspace.noWorkspace")),1)):oe("",!0),(g(!0),C(Te,null,st(e.groups,D=>(g(),C("div",{key:D.workspace.id,class:"mgroup"},[_("div",{class:ze(["mgh",{on:D.workspace.id===e.activeWorkspaceId}]),onClick:B=>f(D.workspace.id)},[d(D.workspace.id)?(g(),pe(Fe,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),pe(Fe,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),_("div",lOe,[_("span",aOe,N(D.workspace.name),1),K(Mn,{text:D.workspace.root},{default:ve(()=>[_("span",uOe,N(D.workspace.shortPath),1)]),_:2},1032,["text"])]),d(D.workspace.id)&&v(D.workspace.id)>0?(g(),C("span",cOe,N(v(D.workspace.id)),1)):oe("",!0),K(Jt,{size:"lg",class:"mgh-more",label:x(n)("sidebar.options"),onClick:Ct(B=>$(D.workspace.id),["stop"])},{default:ve(()=>[K(Fe,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),K(Jt,{size:"lg",class:"mgh-add",label:x(n)("workspace.newInGroup"),onClick:Ct(B=>l(D.workspace.id),["stop"])},{default:ve(()=>[K(Fe,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),T.value===D.workspace.id?(g(),pe(Ar,{key:3,class:"kmenu wsmenu",onClick:M[0]||(M[0]=Ct(()=>{},["stop"]))},{default:ve(()=>[K(vn,{size:"lg",onClick:B=>F(D.workspace)},{default:ve(()=>[qe(N(x(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),K(vn,{size:"lg",danger:"",onClick:B=>R(D.workspace)},{default:ve(()=>[qe(N(x(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):oe("",!0)],10,rOe),Bn(_("div",null,[D.sessions.length===0?(g(),C("div",dOe,N(x(n)("sidebar.noSessions")),1)):oe("",!0),(g(!0),C(Te,null,st(k(D),B=>(g(),C("div",{key:B.id,class:ze(["srow",{cur:B.id===e.activeId}]),onClick:z=>r(B.id)},[_("div",pOe,[_("div",{class:ze(["t",{run:B.busy,aborted:!B.busy&&(e.attentionBySession[B.id]??0)===0&&(B.lastTurnReason==="cancelled"||B.lastTurnReason==="failed")}])},N(B.title),3),_("div",hOe,N(B.time),1)]),(e.attentionBySession[B.id]??0)>0?(g(),C("span",mOe,N(e.attentionBySession[B.id]),1)):oe("",!0),K(Jt,{size:"lg",class:"kb",label:x(n)("sidebar.options"),onClick:Ct(z=>b(B.id),["stop"])},{default:ve(()=>[K(Fe,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),y.value===B.id?(g(),pe(Ar,{key:1,class:"kmenu",onClick:M[1]||(M[1]=Ct(()=>{},["stop"]))},{default:ve(()=>[K(vn,{size:"lg",onClick:z=>S(B)},{default:ve(()=>[qe(N(x(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),K(vn,{size:"lg",danger:"",onClick:z=>I(B.id)},{default:ve(()=>[qe(N(x(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):oe("",!0)],10,fOe))),128)),D.hasMore||D.loadingMore?(g(),C("button",{key:1,type:"button",class:"mshow-more",disabled:D.loadingMore,onClick:Ct(B=>w(D.workspace.id),["stop"])},N(D.loadingMore?x(n)("sidebar.loadingMore"):x(n)("sidebar.showMore",{count:Math.max(0,D.workspace.sessionCount-D.sessions.length)})),9,gOe)):oe("",!0),D.sessions.length>D.initialCount?(g(),C("button",{key:2,type:"button",class:"mshow-more",onClick:Ct(B=>m(D.workspace.id),["stop"])},N(h(D.workspace.id)?x(n)("sidebar.showLess"):x(n)("sidebar.showAll",{count:D.sessions.length-D.initialCount})),9,vOe)):oe("",!0)],512),[[yi,!d(D.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),kOe=ht(yOe,[["__scopeId","data-v-4c7bceaf"]]),bOe={class:"group-title"},wOe={class:"srow-main"},xOe={class:"srow-label"},_Oe={class:"srow-sub"},SOe={class:"srow read-only"},COe={class:"srow-main"},AOe={class:"srow-label"},MOe={key:0,class:"srow-sub"},EOe={class:"cache-note"},TOe={class:"srow-main"},IOe={class:"srow-label"},$Oe={class:"srow-sub"},NOe=["aria-checked"],LOe={key:0,class:"srow read-only"},FOe={class:"srow-main"},OOe={class:"srow-label"},ROe={class:"srow-sub"},POe={class:"goal-actions"},DOe=["aria-checked"],BOe={class:"srow-main"},zOe={class:"srow-label"},WOe={class:"srow-sub"},HOe=["aria-checked"],jOe={class:"srow-main"},UOe={class:"srow-label"},VOe={class:"srow-sub"},qOe={class:"srow-main"},KOe={class:"srow-label"},GOe={class:"srow read-only"},ZOe={class:"srow-main"},YOe={class:"srow-label"},JOe={class:"srow-sub"},XOe=["aria-label"],QOe={class:"group-title"},eRe={class:"srow-main"},tRe={class:"srow-label"},nRe={class:"srow-sub"},oRe={class:"srow read-only pref"},sRe={class:"srow-main"},iRe={class:"srow-label"},rRe={class:"srow read-only pref"},lRe={class:"srow-main"},aRe={class:"srow-label"},uRe={class:"srow-main"},cRe={class:"srow-label"},dRe={class:"srow-sub"},fRe=["aria-checked"],pRe={class:"srow-main"},hRe={class:"srow-label"},mRe={key:2,class:"srow read-only"},gRe={class:"srow-main"},vRe={class:"srow-label"},yRe={class:"srow-val dim"},kRe={class:"arch-subhead"},bRe={class:"arch-count"},wRe={class:"arch-tools"},xRe={key:0,class:"arch-empty"},_Re={class:"arch-meta"},SRe={class:"arch-name"},CRe={class:"arch-time"},ARe={key:2,class:"arch-empty"},MRe=100,ERe=Ze({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},authReady:{type:Boolean,default:!1},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleWorkflow","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{confirm:i}=Ka();function r(q){s("setColorScheme",q)}const l=["manual","yolo","auto"],a=O(()=>o.models?.find(q=>q.id===o.status?.modelId)),u=O(()=>B0(a.value)),c=O(()=>kh(a.value)),d=O(()=>L1(a.value,o.thinking)),f=O(()=>c.value.includes(d.value)?d.value:""),p=O(()=>c.value.map(q=>({value:q,label:Jp(q)}))),h=O(()=>o.planMode===!0),m=O(()=>o.goalMode===!0),k=O(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),w=O(()=>{const q=o.goal?.status;return q?n(`status.goalStatus${q[0].toUpperCase()}${q.slice(1)}`):""});async function v(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const y=O(()=>jx(o.uiFontSize));function b(q){const me=j7(q);me!==void 0&&s("setUiFontSize",me)}const S=O(()=>{const q=o.status.permission;return q==="yolo"?"var(--color-warning)":q==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),I=O(()=>{const q=o.status.permission,me=n(q==="yolo"?"mobile.permYoloSub":q==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${q} · ${me}`}),T=O(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),$=O(()=>o.status.ctxMax>0?`${Pl(o.status.ctxUsed)}/${Pl(o.status.ctxMax)}`:n("status.statusNone"));function F(q){s("setThinking",Wx(a.value,q))}function R(){const q=l.indexOf(o.status.permission),me=l[(q+1)%l.length];s("setPermission",me)}function P(){s("pickModel"),s("update:modelValue",!1)}function M(){s("login"),s("update:modelValue",!1)}const D=q0(),B=V("main"),z=V([]),A=V(!1),L=V(!1),W=V(""),j=V("archived-desc");async function re(){if(!A.value){A.value=!0,L.value=!1;try{const q=[];let me;for(;;){const xe=await D.loadArchivedSessions({beforeId:me,pageSize:MRe});if(q.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const We=xe.items.at(-1)?.id;if(We===void 0)break;me=We}z.value=q,L.value=!0}catch(q){console.warn("loadAllArchived failed",q)}finally{A.value=!1}}}function Q(){B.value="archived",W.value="",re()}function Y(){B.value="main"}const G=O(()=>{const q=W.value.trim().toLowerCase();let me=z.value.filter(xe=>xe.archived===!0);return q&&(me=me.filter(xe=>xe.title.toLowerCase().includes(q))),me=me.slice(),j.value==="archived-desc"?me.sort((xe,We)=>We.updatedAt.localeCompare(xe.updatedAt)):j.value==="created-desc"?me.sort((xe,We)=>We.createdAt.localeCompare(xe.createdAt)):me.sort((xe,We)=>xe.title.localeCompare(We.title,"en")),me});async function X(q){await D.restoreSession(q)&&(z.value=z.value.filter(xe=>xe.id!==q))}function te(q){const me=new Date(q);if(Number.isNaN(me.getTime()))return q;const xe=We=>String(We).padStart(2,"0");return`${me.getFullYear()}-${xe(me.getMonth()+1)}-${xe(me.getDate())} ${xe(me.getHours())}:${xe(me.getMinutes())}`}return Ye(()=>o.modelValue,q=>{q||(B.value="main")}),(q,me)=>(g(),pe(zN,{"model-value":e.modelValue,title:x(n)("mobile.settingsTitle"),"onUpdate:modelValue":me[8]||(me[8]=xe=>s("update:modelValue",xe))},{default:ve(()=>[B.value==="main"?(g(),C(Te,{key:0},[_("div",bOe,N(x(n)("mobile.groupSession")),1),_("button",{type:"button",class:"srow",onClick:P},[_("span",wOe,[_("span",xOe,N(x(n)("status.statusModel")),1),_("span",_Oe,N(e.status.model),1)]),me[9]||(me[9]=_("span",{class:"chev"},"›",-1))]),_("div",SOe,[_("span",COe,[_("span",AOe,N(x(n)("status.statusThinking")),1),u.value==="unsupported"?(g(),C("span",MOe,N(x(n)("status.modeNotSupported")),1)):oe("",!0)]),c.value.length>1?(g(),pe(zs,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":F},null,8,["model-value","options"])):(g(),C("span",{key:1,class:ze(["srow-val",{dim:d.value==="off"}])},N(d.value==="off"?x(n)("status.planOff"):x(Jp)(d.value)),3))]),_("div",EOe,N(x(n)("status.cacheNote")),1),_("button",{type:"button",class:"srow",onClick:me[0]||(me[0]=xe=>s("togglePlan"))},[_("span",TOe,[_("span",IOe,N(x(n)("status.statusPlanMode")),1),_("span",$Oe,N(x(n)("mobile.planModeSub")),1)]),_("span",{class:ze(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,NOe)]),k.value?(g(),C("div",LOe,[_("span",FOe,[_("span",OOe,N(x(n)("status.goalLabel")),1),_("span",ROe,N(w.value),1)]),_("span",POe,[e.goal?.status==="active"?(g(),pe(nn,{key:0,variant:"secondary",size:"sm",onClick:me[1]||(me[1]=xe=>s("controlGoal","pause"))},{default:ve(()=>[qe(N(x(n)("status.goalPause")),1)]),_:1})):oe("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),pe(nn,{key:1,variant:"secondary",size:"sm",onClick:me[2]||(me[2]=xe=>s("controlGoal","resume"))},{default:ve(()=>[qe(N(x(n)("status.goalResume")),1)]),_:1})):oe("",!0),K(nn,{variant:"ghost",size:"sm",onClick:v},{default:ve(()=>[qe(N(x(n)("status.goalCancel")),1)]),_:1})])])):(g(),C("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:me[3]||(me[3]=xe=>s("toggleGoal"))},[_("span",BOe,[_("span",zOe,N(x(n)("status.goalLabel")),1),_("span",WOe,N(x(n)("mobile.goalModeSub")),1)]),_("span",{class:ze(["toggle",{on:m.value}])},null,2)],8,DOe)),_("button",{type:"button",class:"srow",role:"switch","aria-checked":e.dynamicWorkflowMode,onClick:me[4]||(me[4]=xe=>s("toggleWorkflow"))},[_("span",jOe,[_("span",UOe,N(x(n)("status.statusDynamicWorkflowMode")),1),_("span",VOe,N(x(n)("mobile.workflowModeSub")),1)]),_("span",{class:ze(["toggle",{on:e.dynamicWorkflowMode}])},null,2)],8,HOe),_("button",{type:"button",class:"srow",onClick:R},[_("span",qOe,[_("span",KOe,N(x(n)("status.statusPermission")),1),_("span",{class:"srow-sub",style:jt({color:S.value})},N(I.value),5)]),me[10]||(me[10]=_("span",{class:"chev"},"›",-1))]),_("div",GOe,[_("span",ZOe,[_("span",YOe,N(x(n)("status.statusContext")),1),_("span",JOe,N($.value),1)]),_("span",{class:"ctx-meter","aria-label":$.value},[_("i",{style:jt({width:T.value+"%"})},null,4)],8,XOe)]),_("div",QOe,N(x(n)("mobile.groupApp")),1),_("button",{type:"button",class:"srow",onClick:Q},[_("span",eRe,[_("span",tRe,N(x(n)("mobile.archivedSessions")),1),_("span",nRe,N(x(n)("mobile.archivedSessionsSub")),1)]),me[11]||(me[11]=_("span",{class:"chev"},"›",-1))]),_("div",oRe,[_("span",sRe,[_("span",iRe,N(x(n)("theme.colorSchemeLabel")),1)]),K(zs,{"model-value":e.colorScheme??"system",options:[{value:"light",label:x(n)("theme.light")},{value:"dark",label:x(n)("theme.dark")},{value:"system",label:x(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),_("div",rRe,[_("span",lRe,[_("span",aRe,N(x(n)("settings.uiFontSize")),1)]),K(zs,{"model-value":y.value,options:x(B7),"aria-label":x(n)("settings.uiFontSize"),"onUpdate:modelValue":b},null,8,["model-value","options","aria-label"])]),_("button",{type:"button",class:"srow",onClick:me[5]||(me[5]=xe=>s("setConversationToc",!e.conversationToc))},[_("span",uRe,[_("span",cRe,N(x(n)("settings.conversationToc")),1),_("span",dRe,N(x(n)("settings.conversationTocHint")),1)]),_("span",{class:ze(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,fRe)]),_("button",{type:"button",class:"srow acct in",onClick:M},[_("span",pRe,[_("span",hRe,N(x(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),C("div",mRe,[_("span",gRe,[_("span",vRe,N(x(n)("settings.serverVersion")),1)]),_("span",yRe,N(e.serverVersion),1)])):oe("",!0)],64)):(g(),C(Te,{key:1},[_("div",kRe,[_("button",{type:"button",class:"arch-back",onClick:Y},[me[12]||(me[12]=_("span",{class:"chev back"},"‹",-1)),qe(" "+N(x(n)("mobile.archivedBack")),1)]),_("span",bRe,N(x(n)("mobile.sessionCount",{n:G.value.length})),1)]),_("div",wRe,[K(ms,{class:"arch-search-input","model-value":W.value,size:"sm",placeholder:x(n)("settings.archivedSearch"),"onUpdate:modelValue":me[6]||(me[6]=xe=>W.value=xe)},null,8,["model-value","placeholder"]),K(zs,{size:"sm","model-value":j.value,options:[{value:"archived-desc",label:x(n)("settings.archivedSortArchived")},{value:"created-desc",label:x(n)("settings.archivedSortCreated")},{value:"name-asc",label:x(n)("settings.archivedSortName")}],"onUpdate:modelValue":me[7]||(me[7]=xe=>j.value=xe)},null,8,["model-value","options"])]),A.value?(g(),C("div",xRe,N(x(n)("settings.archivedLoadingAll")),1)):G.value.length>0?(g(!0),C(Te,{key:1},st(G.value,xe=>(g(),C("div",{key:xe.id,class:"arch-row"},[_("div",_Re,[_("div",SRe,N(xe.title),1),_("div",CRe,N(x(n)("settings.archivedAt",{time:te(xe.updatedAt)})),1)]),K(nn,{variant:"secondary",size:"sm",onClick:We=>X(xe.id)},{default:ve(()=>[qe(N(x(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),C("div",ARe,N(z.value.length===0?x(n)("settings.archivedEmpty"):x(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),TRe=ht(ERe,[["__scopeId","data-v-da4b6716"]]),IRe=["aria-label"],$Re={class:"wiz-body"},NRe={class:"wiz-step"},LRe={class:"wiz-title"},FRe={class:"wiz-sub"},ORe={class:"wiz-step-fill"},RRe={class:"pref-group"},PRe={class:"pref-label"},DRe={class:"theme-cards"},BRe=["onClick"],zRe={class:"opt-label"},WRe={class:"pref-group"},HRe={class:"pref-label"},jRe={class:"accent-cards"},URe=["onClick"],VRe={class:"opt-label"},qRe={class:"wiz-foot"},KRe=Ze({__name:"Onboarding",emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{colorScheme:s,accent:i,setColorScheme:r,setAccent:l}=Kx(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],u=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(c,d)=>(g(),C("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":x(o)("onboarding.title")},[_("div",$Re,[_("section",NRe,[K(lw,{size:"lg",animated:!1,label:"Pythinker Code"}),_("h1",LRe,N(x(o)("onboarding.title")),1),_("p",FRe,N(x(o)("onboarding.subtitle")),1),_("div",ORe,[_("div",RRe,[_("div",PRe,N(x(o)("theme.colorSchemeLabel")),1),_("div",DRe,[(g(),C(Te,null,st(a,f=>_("button",{key:f.value,type:"button",class:ze(["opt-card theme-card",{selected:x(s)===f.value}]),onClick:p=>x(r)(f.value)},[_("span",{class:ze(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),C(Te,{key:0},[d[2]||(d[2]=K2('',2))],64)):(g(),C(Te,{key:1},[d[3]||(d[3]=_("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=_("span",{class:"theme-lines"},[_("span"),_("span"),_("span")],-1))],64))],2),_("span",zRe,N(f.label),1)],10,BRe)),64))])]),_("div",WRe,[_("div",HRe,N(x(o)("theme.accentLabel")),1),_("div",jRe,[(g(),C(Te,null,st(u,f=>_("button",{key:f.value,type:"button",class:ze(["opt-card accent-card",{selected:x(i)===f.value}]),onClick:p=>x(l)(f.value)},[_("span",{class:ze(["opt-radio",{on:x(i)===f.value}])},null,2),_("span",{class:ze(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),_("span",VRe,N(f.label),1)],10,URe)),64))])])])]),_("div",qRe,[K(nn,{variant:"primary",size:"lg",class:"wiz-primary",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ve(()=>[qe(N(x(o)("onboarding.start")),1)]),_:1}),K(nn,{variant:"ghost",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ve(()=>[qe(N(x(o)("onboarding.skip")),1)]),_:1})])])],8,IRe))}}),GRe=ht(KRe,[["__scopeId","data-v-043d59e7"]]),ZRe="/logo.png",YRe=["aria-label"],JRe={class:"gload-box"},XRe={class:"gload-text"},QRe={key:0,class:"gload-issue"},ePe={class:"gload-issue-detail"},tPe=Ze({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=$t();return(n,o)=>(g(),C("div",{class:"gload",role:"status","aria-label":x(t)("app.connecting")},[_("div",JRe,[o[0]||(o[0]=_("img",{class:"gload-logo",src:ZRe,alt:"Pythinker",width:"120",height:"120"},null,-1)),K(ns,{size:"md",label:x(t)("app.connecting")},null,8,["label"]),_("div",XRe,N(x(t)("app.connecting")),1),e.issue?(g(),C("div",QRe,[_("div",null,N(x(t)("app.connectRetrying")),1),_("div",ePe,N(e.issue),1)])):oe("",!0)])],8,YRe))}}),nPe=ht(tPe,[["__scopeId","data-v-2468172e"]]),oPe={class:"kap-root"},sPe={class:"kap-head"},iPe={class:"kap-count"},rPe={class:"kap-head-actions"},lPe={class:"kap-filters"},aPe=["value"],uPe={class:"kap-check"},cPe={class:"kap-check"},dPe={class:"kap-view-toggle",role:"group"},fPe={key:0,class:"kap-empty"},pPe=["onClick"],hPe={class:"kap-ts"},mPe={class:"kap-label"},gPe={key:0,class:"kap-detail"},vPe={class:"kap-detail-actions"},yPe=["onClick"],kPe={key:1,class:"kap-agg"},bPe={class:"mono"},wPe={class:"mono"},xPe={class:"num"},_Pe={class:"num"},SPe={key:0},CPe={class:"mono"},APe={class:"num"},MPe={class:"num"},EPe={key:0},TPe=Ze({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=V("all"),s=V(""),i=V(""),r=V(!1),l=V("timeline"),a=O(()=>(Ax.value,[...Bye()])),u=O(()=>{const F=new Set;for(const R of a.value)R.sessionId&&F.add(R.sessionId);return[...F].sort()});function c(F){return F.kind==="rest:error"||F.code!==void 0&&F.code!==0||F.eventType==="error"||F.eventType==="parse-error"}const d=O(()=>{const F=s.value.trim().toLowerCase();return a.value.filter(R=>!(o.value!=="all"&&R.source!==o.value||i.value&&R.sessionId!==i.value||r.value&&!c(R)||F&&!`${R.label} ${R.kind} ${R.eventType??""} ${R.sessionId??""} ${R.requestId??""}`.toLowerCase().includes(F)))}),f=O(()=>{const F=new Map;for(const R of d.value){if(R.kind!=="ws:in"&&R.kind!=="ws:out")continue;const P=R.kind==="ws:in"?"←":"→",M=`${P} ${R.eventType??"?"} @ ${R.sessionId??"-"}`,D=F.get(M)??{key:M,sessionId:R.sessionId??"-",eventType:R.eventType??"?",dir:P,count:0};D.count++,R.seq!==void 0&&(D.lastSeq=R.seq),F.set(M,D)}return[...F.values()].sort((R,P)=>P.count-R.count)}),p=O(()=>{const F=new Map;for(const R of d.value){if(R.source!=="rest"||R.kind==="rest:request")continue;const P=`${R.method??"?"} ${R.path??"?"}`,M=F.get(P)??{count:0,errors:0,totalMs:0,timed:0};M.count++,c(R)&&M.errors++,R.durationMs!==void 0&&(M.totalMs+=R.durationMs,M.timed++),F.set(P,M)}return[...F.entries()].map(([R,P])=>({key:R,count:P.count,errors:P.errors,avgMs:P.timed>0?Math.round(P.totalMs/P.timed):0})).sort((R,P)=>P.count-R.count)}),h=V(null),m=V(!0),k=V(null),w=V(null);Ye(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await xt();const F=k.value;F&&(F.scrollTop=F.scrollHeight)});function v(F){h.value=h.value===F?null:F}function y(F){const R=new Date(F),P=(M,D=2)=>String(M).padStart(D,"0");return`${P(R.getHours())}:${P(R.getMinutes())}:${P(R.getSeconds())}.${P(R.getMilliseconds(),3)}`}function b(F){return JSON.stringify(F,null,2)}async function S(F){await Jo(b(F))&&(w.value=F.id,setTimeout(()=>{w.value===F.id&&(w.value=null)},1500))}function I(){g7(d.value)}function T(F){return c(F)||F.source==="client"?"b-err":F.source==="rest"?"b-rest":F.kind==="ws:lifecycle"?"b-life":F.kind==="ws:out"?"b-out":"b-in"}function $(F){return F.source==="rest"?"REST":F.source==="client"?"APP":"WS"}return(F,R)=>(g(),C("section",oPe,[_("header",sPe,[R[11]||(R[11]=_("strong",null,"KAP debug",-1)),_("span",iPe,N(d.value.length)+"/"+N(a.value.length),1),_("div",rPe,[_("button",{type:"button",class:ze({on:x(Zf)}),onClick:R[0]||(R[0]=P=>Zf.value=!x(Zf))},N(x(Zf)?"resume":"pause"),3),_("button",{type:"button",onClick:R[1]||(R[1]=P=>x(zye)())},"clear"),_("button",{type:"button",onClick:R[2]||(R[2]=P=>I())},"export jsonl"),K(Mn,{text:"Close window"},{default:ve(()=>[_("button",{type:"button",onClick:R[3]||(R[3]=P=>n("close"))},"✕")]),_:1})])]),_("div",lPe,[Bn(_("select",{"onUpdate:modelValue":R[4]||(R[4]=P=>o.value=P),"aria-label":"Source filter"},[...R[12]||(R[12]=[_("option",{value:"all"},"rest + ws + app",-1),_("option",{value:"rest"},"rest",-1),_("option",{value:"ws"},"ws",-1),_("option",{value:"client"},"app errors",-1)])],512),[[eb,o.value]]),Bn(_("select",{"onUpdate:modelValue":R[5]||(R[5]=P=>i.value=P),"aria-label":"Session filter"},[R[13]||(R[13]=_("option",{value:""},"all sessions",-1)),(g(!0),C(Te,null,st(u.value,P=>(g(),C("option",{key:P,value:P},N(P),9,aPe))),128))],512),[[eb,i.value]]),Bn(_("input",{"onUpdate:modelValue":R[6]||(R[6]=P=>s.value=P),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[vs,s.value]]),_("label",uPe,[Bn(_("input",{"onUpdate:modelValue":R[7]||(R[7]=P=>r.value=P),type:"checkbox"},null,512),[[Bg,r.value]]),R[14]||(R[14]=qe(" errors",-1))]),_("label",cPe,[Bn(_("input",{"onUpdate:modelValue":R[8]||(R[8]=P=>m.value=P),type:"checkbox"},null,512),[[Bg,m.value]]),R[15]||(R[15]=qe(" follow",-1))]),_("div",dPe,[_("button",{type:"button",class:ze({on:l.value==="timeline"}),onClick:R[9]||(R[9]=P=>l.value="timeline")},"timeline",2),_("button",{type:"button",class:ze({on:l.value==="aggregate"}),onClick:R[10]||(R[10]=P=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(g(),C("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),C("div",fPe," No trace entries yet. REST calls and WS frames will appear here. ")):oe("",!0),(g(!0),C(Te,null,st(d.value,P=>(g(),C("div",{key:P.id,class:"kap-row-wrap"},[_("button",{type:"button",class:ze(["kap-row",{expanded:h.value===P.id}]),onClick:M=>v(P.id)},[_("span",hPe,N(y(P.ts)),1),_("span",{class:ze(["kap-badge",T(P)])},N($(P)),3),_("span",mPe,N(P.label),1)],10,pPe),h.value===P.id?(g(),C("div",gPe,[_("div",vPe,[_("button",{type:"button",onClick:M=>S(P)},N(w.value===P.id?"copied ✓":"copy json"),9,yPe)]),_("pre",null,N(b(P)),1)])):oe("",!0)]))),128))],512)):(g(),C("div",kPe,[R[20]||(R[20]=_("h4",null,"WS frames by session / type",-1)),_("table",null,[R[17]||(R[17]=_("thead",null,[_("tr",null,[_("th",null,"dir"),_("th",null,"type"),_("th",null,"session"),_("th",null,"count"),_("th",null,"last seq")])],-1)),_("tbody",null,[(g(!0),C(Te,null,st(f.value,P=>(g(),C("tr",{key:P.key},[_("td",null,N(P.dir),1),_("td",bPe,N(P.eventType),1),_("td",wPe,N(P.sessionId),1),_("td",xPe,N(P.count),1),_("td",_Pe,N(P.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),C("tr",SPe,[...R[16]||(R[16]=[_("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):oe("",!0)])]),R[21]||(R[21]=_("h4",null,"REST by endpoint",-1)),_("table",null,[R[19]||(R[19]=_("thead",null,[_("tr",null,[_("th",null,"endpoint"),_("th",null,"count"),_("th",null,"errors"),_("th",null,"avg ms")])],-1)),_("tbody",null,[(g(!0),C(Te,null,st(p.value,P=>(g(),C("tr",{key:P.key},[_("td",CPe,N(P.key),1),_("td",APe,N(P.count),1),_("td",{class:ze(["num",{err:P.errors>0}])},N(P.errors),3),_("td",MPe,N(P.avgMs),1)]))),128)),p.value.length===0?(g(),C("tr",EPe,[...R[18]||(R[18]=[_("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):oe("",!0)])])]))]))}}),IPe=ht(TPe,[["__scopeId","data-v-7bab00af"]]),$Pe=Ze({__name:"DebugPanel",setup(e){const t=V(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function r(c){const d=document.documentElement,f=c.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));r(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=zg(IPe,{onClose:()=>c.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return Sn(()=>{u()}),po(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(g(),pe(Mn,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ve(()=>[_("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),NPe=ht($Pe,[["__scopeId","data-v-992ae84c"]]);function LPe({client:e,authLogoRef:t}){const n=O(()=>e.authReady.value),o=O(()=>e.initialized.value&&!n.value),s="/login",i=V(null);let r=null;function l(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function a(c){typeof window>"u"||window.history.replaceState(window.history.state,"",c)}Ye(o,c=>{if(!(typeof window>"u")){if(c){window.location.pathname!==s&&(i.value=l(),a(s));return}window.location.pathname===s&&(a(i.value??"/"),i.value=null)}},{immediate:!0});function u(){const c=t.value;c&&(c.classList.remove("blink-now"),c.getBoundingClientRect(),c.classList.add("blink-now"),r!==null&&clearTimeout(r),r=setTimeout(()=>{r=null,c.classList.remove("blink-now")},300))}return En(()=>{r!==null&&clearTimeout(r)}),{showAuthGate:o,blinkAuthLogo:u}}function FPe({running:e,showAuthGate:t}){const{t:n}=$t(),o=V(Cl[0]);let s=0,i;function r(){i!==void 0&&clearInterval(i),i=void 0}Ye(e,a=>{r(),s=0,o.value=Cl[0],a&&(i=setInterval(()=>{s=(s+1)%Cl.length,o.value=Cl[s]??Cl[0]},Bu))},{immediate:!0}),Ld(r);const l=O(()=>{const a=e.value?`${o.value} `:"";return t.value?`${a}${n("app.authPageTitle")} - Pythinker Code Web`:`${a}Pythinker Code Web`});s5(()=>{typeof document<"u"&&(document.title=l.value)})}function OPe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),r=e.items.findLast(a=>a.kind==="turn"),l=e.items.flatMap(a=>a.kind==="turn"?RPe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===r?.turnId?t?.disposedAt:void 0}):[]);return o_(l,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function RPe(e,t,n,o){const s=[],i=BPe([e.startedAt,...e.steps.map(u=>u.startedAt),o.startedAt]),r=qm(e.endedAt)??qm(o.endedAt),l=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const u=[{type:"text",text:e.prompt}];for(const c of e.attachmentIds??[]){const d=PPe(t.get(c));d!==void 0&&u.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:u,createdAt:i,promptId:l,metadata:{origin:e.origin}})}for(const u of e.steps){const c=qm(u.startedAt)??i;for(const d of u.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:c,promptId:l,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId)}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text}],createdAt:c,promptId:l});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?DPe(d.output):void 0}],createdAt:c,promptId:l}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:qm(u.endedAt)??c,promptId:l}))}}const a=e.durationMs??zPe(i,r);if(a!==void 0){const u=s.findLastIndex(c=>c.role==="assistant");u>=0&&(s[u]={...s[u],durationMs:a})}return s}function PPe(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function DPe(e){if(e==null)return;if(typeof e=="string")return e.split(` +`);if(!Array.isArray(e))return[JSON.stringify(e)];const t=[];for(const n of e){if(typeof n=="string"){t.push(...n.split(` +`));continue}if(n===null||typeof n!="object")continue;const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` +`)):o.type==="think"&&typeof o.think=="string"&&t.push(...o.think.split(` +`))}return t.length>0?t:void 0}function qm(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function BPe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const WN=V(typeof window>"u"?0:window.innerWidth);let Km=0,U1=!1;function E2(){WN.value=window.innerWidth}function WPe(){U1||typeof window>"u"||(window.addEventListener("resize",E2),U1=!0,E2())}function HPe(){!U1||typeof window>"u"||(window.removeEventListener("resize",E2),U1=!1)}function HN(e,t,n){return Math.max(t,e-n)}function T2(e,t,n){return Math.min(n,Math.max(t,e))}function jN(){return Sn(()=>{Km+=1,WPe()}),po(()=>{Km=Math.max(0,Km-1),Km===0&&HPe()}),{viewportWidth:WN}}const jPe="pythinker-web.file-preview-width",Hc=320;function UPe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=jN(),i=O(()=>Math.max(0,s.value-t.value)),r=O(()=>HN(i.value,Hc,Hc));function l(fe){return T2(Math.round(fe),Hc,r.value)}function a(){return l(i.value/2)}const u=O(()=>a()),c=V(u.value),d=O(()=>T2(c.value,Hc,r.value)),f=V(null),p=O(()=>{const fe=f.value;if(!fe)return null;const de=e.turns.value.find(J=>J.id===fe.turnId);return de?.role==="compaction"&&de.text?de.text:null}),h=O(()=>p.value!==null);function m(fe){if(f.value?.turnId===fe.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=fe}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const w=V(null),v=O(()=>{const fe=w.value;if(!fe)return{entry:void 0,version:0};const de=e.auxiliaryTranscripts.getEntry(fe.sessionId,fe.subagentId);return{entry:de,version:de?.version.value??0}});function y(fe){const de=e.activeAppTasks.value.find(J=>J.agentId===fe||J.id===fe||J.backgroundTaskId===fe||J.parentToolCallId===fe);return de?.agentId??de?.id??fe}const b=O(()=>{const fe=w.value;if(!fe)return null;const de=e.activeAppTasks.value.find(Re=>Re.agentId===fe.subagentId||Re.id===fe.subagentId||Re.backgroundTaskId===fe.subagentId);if(de)return e4e(de);const J=v.value.entry?.channel;if(!J)return null;const ae=J.agents.find(Re=>Re.agentId===fe.subagentId),be=J.snapshot.items.findLast(Re=>Re.kind==="turn"),_e=J.snapshot.meta.activity==="turn",ce=J.loading,Se=be?.kind==="turn"&&be.state==="failed",ie=be?.kind==="turn"&&be.state==="cancelled",we=J.refreshError&&be===void 0;return{id:fe.subagentId,name:ae?.label??fe.subagentId,subagentType:ae?.type==="sub"?"subagent":ae?.type,phase:_e?"working":ie?"cancelled":Se||we?"failed":ce?"queued":"completed",status:_e||ce?"running":ie?"cancelled":Se||we?"failed":"completed"}}),S=O(()=>{const fe=w.value,de=v.value.entry?.channel;if(!fe||!de)return[];const J=de.agents.find(ae=>ae.agentId===fe.subagentId);return OPe(de.snapshot,J,{sessionId:fe.sessionId,getFileUrl:ae=>e.getFileUrl(ae)})}),I=O(()=>v.value.entry?.channel.loading??!1),T=O(()=>v.value.entry?.channel.refreshError??!1),$=O(()=>v.value.entry?.channel.loadingOlder??!1),F=O(()=>v.value.entry?.channel.loadOlderError??!1),R=O(()=>v.value.entry?.channel.snapshot.hasMoreOlder??!1),P=O(()=>v.value.entry?.channel.snapshot.meta.activity==="turn"),M=O(()=>b.value!==null);function D(fe){const de=e.activeSessionId.value;if(!fe||!de)return;const J=y(fe);if(n.value==="agent"&&w.value?.sessionId===de&&w.value.subagentId===J){B();return}const ae=w.value;ae&&ae.subagentId!==J&&e.auxiliaryTranscripts.deactivate(ae.sessionId,ae.subagentId),w.value={sessionId:de,subagentId:J},n.value="agent",e.auxiliaryTranscripts.activate(de,J)}function B(){const fe=w.value;fe&&e.auxiliaryTranscripts.deactivate(fe.sessionId,fe.subagentId),w.value=null,n.value==="agent"&&(n.value=null)}Ye(n,(fe,de)=>{if(de!=="agent"||fe==="agent")return;const J=w.value;J&&e.auxiliaryTranscripts.deactivate(J.sessionId,J.subagentId)});function z(){v.value.entry?.channel.loadOlder().catch(()=>{})}const A=V(null),L=O(()=>{const fe=A.value;if(!fe)return null;const de=HY(e.turns.value,fe);return de?{id:fe,title:Is(de.name),path:cw(de.arg),lines:de.status==="error"?null:uw(de),output:de.output}:null}),W=O(()=>L.value!==null);function j(fe){if(n.value==="toolDiff"&&A.value===fe){re();return}n.value="toolDiff",A.value=fe}function re(){A.value=null,n.value==="toolDiff"&&(n.value=null)}const Q=V("list"),Y=V(null);function G(){if(n.value==="diff"){X();return}n.value="diff",Q.value="list",Y.value=null,e.loadGitStatus(e.activeSessionId.value)}function X(){n.value==="diff"&&(n.value=null),Q.value="list",Y.value=null,e.clearFileDiff()}async function te(fe){Q.value="detail",Y.value=fe,await e.loadFileDiff(fe)}async function q(fe){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,fe):await e.openSideChat(fe),n.value="btw"}function me(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function xe(){n.value==="btw"&&(n.value=null)}const We=O(()=>e.sideChatVisible.value),he=O(()=>n.value!==null&&(n.value!=="compaction"||h.value)&&(n.value!=="agent"||M.value)&&(n.value!=="toolDiff"||W.value)&&(n.value!=="btw"||We.value)),ee=V(!1),ne=V({});function H(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return w.value?{kind:"agent",...w.value}:null;case"toolDiff":return A.value?{kind:"toolDiff",toolId:A.value}:null;case"btw":return{kind:"btw"};default:return null}}function Z(fe){if(fe)switch(fe.kind){case"compaction":f.value={turnId:fe.turnId},n.value="compaction";break;case"agent":{const de=e.activeSessionId.value;if(!de)break;const J=y(fe.subagentId);w.value={sessionId:de,subagentId:J},n.value="agent",e.auxiliaryTranscripts.activate(de,J);break}case"toolDiff":A.value=fe.toolId,n.value="toolDiff";break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function ye(){return n.value==="compaction"&&h.value?(k(),!0):n.value==="agent"&&M.value?(B(),!0):n.value==="toolDiff"&&W.value?(re(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(X(),!0):n.value==="btw"?(me(),!0):!1}return Ye(e.activeSessionId,(fe,de)=>{if(de){const J=H();J?ne.value[de]=J:delete ne.value[de]}o(),k(),B(),re(),X(),xe(),fe&&Z(ne.value[fe])}),{PREVIEW_WIDTH_KEY:jPe,PREVIEW_MIN:Hc,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:h,openCompactionPanel:m,closeCompactionPanel:k,agentPanelMember:b,agentPanelTurns:S,agentPanelLoading:I,agentPanelLoadError:T,agentPanelLoadingMore:$,agentPanelLoadMoreError:F,agentPanelHasMore:R,agentPanelRunning:P,agentPanelVisible:M,openAgentPanel:D,closeAgentPanel:B,loadOlderAgentMessages:z,toolDiffTarget:L,toolDiffVisible:W,openToolDiff:j,closeToolDiff:re,detailDiffMode:Q,detailDiffPath:Y,openDiffDetail:G,closeDiffDetail:X,selectDiffFile:te,btwVisible:We,openSideChatTab:q,closeSideChat:me,hideSideChatPanel:xe,sidePanelVisible:he,panelDragging:ee,closeOpenSidePanel:ye}}const VPe=rn.sidebarWidth,CM=rn.sidebarCollapsed,AM=270,Ok=170,qPe=480,KPe=320;function GPe(e={}){const{viewportWidth:t}=jN(),n=V(AM),o=V(!1),s=V(!1),i=O(()=>{const c=KPe+(YM(e.previewOpen)?Hc:0);return Math.min(qPe,HN(t.value,Ok,c))}),r=O(()=>T2(n.value,Ok,i.value));function l(){try{o.value=zo(CM)==="true"}catch{o.value=!1}}function a(){try{ts(CM,String(o.value))}catch{}}function u(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:VPe,SIDEBAR_DEFAULT:AM,SIDEBAR_MIN:Ok,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}async function ZPe(e){if(!e.fileId)return{url:e.url};try{const t=await St().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function YPe({client:e,detailTarget:t}){const{t:n}=$t(),o=V(null),s=V(null),i=V(!1),r=V(null),l=V(null);let a=0;const u=O(()=>{const y=l.value;return y?e.getFileDownloadUrl(y):null}),c=O(()=>o.value!==null);function d(y){return y.length>1?y.replace(/\/+$/,""):y}function f(y){const b=[];for(const S of y.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){b.pop();continue}b.push(S)}return b.join("/")}function p(y){const b=y.trim();if(!b)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(b))return{error:n("filePreview.errors.unsupportedPath")};if(b.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const S=d(e.status.value.cwd);if(b.startsWith("/")){if(!S||b!==S&&!b.startsWith(`${S}/`))return{error:n("filePreview.errors.outsideWorkspace")};const T=b===S?"":b.slice(S.length+1);if(T.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const $=f(T);return $?{path:$}:{error:n("filePreview.errors.isDirectory")}}if(b.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const I=f(b);return I?{path:I}:{error:n("filePreview.errors.emptyPath")}}async function h(y){const b=o.value;if(t.value==="file"&&b&&b.path===y.path&&b.line===y.line){k();return}const S=++a;t.value="file",s.value=null,r.value=null,i.value=!0,o.value=y,l.value=null;const I=p(y.path);if("error"in I){i.value=!1,r.value=I.error;return}l.value=I.path;try{const T=await e.readFileContent(I.path);if(S!==a)return;T?s.value={...T,path:T.path||I.path}:r.value=n("filePreview.errors.loadFailed")}catch(T){if(S!==a)return;r.value=T instanceof Error?T.message:n("filePreview.errors.loadFailed")}finally{S===a&&(i.value=!1)}}function m(){a+=1,o.value=null,l.value=null,s.value=null,r.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ye(t,(y,b)=>{b==="file"&&y!=="file"&&m()});function w(){const y=s.value?.path??o.value?.path;y&&e.openWorkspaceFile(y,o.value?.line)}function v(){const y=s.value?.path??o.value?.path;y&&e.revealWorkspaceFile(y)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:w,revealPreviewFile:v}}const JPe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},XPe={class:"server-auth-card"},QPe={class:"server-auth-body"},eDe={class:"server-auth-foot"},tDe=Ze({__name:"ServerAuthDialog",setup(e){const t=V(""),n=V(null),o=V(!1);Sn(()=>{xt(()=>n.value?.focus())});function s(){const r=t.value;!r||o.value||(o.value=!0,_7(r),window.location.reload())}function i(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(g(),C("div",JPe,[_("div",XPe,[l[1]||(l[1]=_("div",{class:"server-auth-head"},[_("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),_("p",{class:"server-auth-hint"},[qe(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),_("code",null,"PYTHINKER_CODE_PASSWORD"),qe("). ")])],-1)),_("div",QPe,[K(ms,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),_("div",eDe,[K(nn,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ve(()=>[qe(N(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),nDe=ht(tDe,[["__scopeId","data-v-82dad292"]]),oDe=["aria-label"],sDe=Ze({__name:"InternalBuildBanner",setup(e){const{t}=$t(),n=Df;return(o,s)=>x(n)?(g(),C("span",{key:0,class:"internal-build-tag",role:"note","aria-label":x(t)("app.internalBuildBanner")},[s[0]||(s[0]=_("svg",{viewBox:"0 0 16 16",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"M8 2 14 13H2L8 2Z"}),_("path",{d:"M8 6v3.5"}),_("path",{d:"M8 11.5h.01"})],-1)),_("span",null,N(x(t)("app.internalBuildBanner")),1)],8,oDe)):oe("",!0)}}),iDe=ht(sDe,[["__scopeId","data-v-6eba49b4"]]),rDe={class:"app-shell"},lDe={key:1,class:"auth-page"},aDe={class:"auth-page-inner"},uDe={class:"auth-page-copy"},cDe=["aria-label","aria-hidden"],dDe={class:"action-toast-stack"},fDe=Ze({__name:"App",setup(e){Lke();const t=V(!1);let n=null;const o=q0(),s=V([]),i=V(!1),r=V(null),l=V(null),a=V(null);let u=null;const c=O(()=>{const Xe=o.activeWorkspaceId.value;return Xe?[...o.sessionsForView.value,...s.value].filter(ge=>ge.workspaceId===Xe).toSorted((ge,Le)=>new Date(Le.updatedAt??0).getTime()-new Date(ge.updatedAt??0).getTime()).slice(0,6):[]});function d(Xe){return{id:Xe.id,title:Xe.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(Xe.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:Xe.updatedAt,workspaceId:Xe.workspaceId,archived:!0}}async function f(){try{const Xe=[];let ge;for(;;){const Le=await o.loadArchivedSessions({beforeId:ge,pageSize:100});if(Xe.push(...Le.items),!Le.hasMore||Le.items.length===0||(ge=Le.items.at(-1)?.id,ge===void 0))break}s.value=Xe.map(d)}catch(Xe){console.warn("loadDoneSessions failed",Xe)}}const p=O(()=>{const Xe=new Map(o.workspaceGroups.value.flatMap(ge=>ge.sessions.map(Le=>[Le.id,Le.updatedAt])));return o.sessionsForView.value.map(ge=>({id:ge.id,title:ge.title,workspaceId:ge.workspaceId??"",workspaceName:ge.workspaceName??"-",lastPrompt:ge.lastPrompt,updatedAt:ge.updatedAt??Xe.get(ge.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const Xe=[];let ge;for(;;){const un=await o.loadArchivedSessions({beforeId:ge,pageSize:100});if(Xe.push(...un.items),!un.hasMore||un.items.length===0||(ge=un.items.at(-1)?.id,ge===void 0))break}const Le=o.workspacesView.value;return Xe.filter(un=>!un.parentSessionId).map(un=>{const tl=Le.find(nl=>nl.id===un.workspaceId||nl.root===un.cwd);return{id:un.id,title:un.title,workspaceId:tl?.id??un.workspaceId??un.cwd,workspaceName:tl?.name??un.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:un.lastPrompt,updatedAt:un.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(Xe,ge){r.value={kind:Xe,ids:Array.isArray(ge)?ge:[ge]}}const w=O(()=>!o.dangerousBypassAuth.value&&t.value);Vn("resolveImage",o.resolveImageUrl),Vn("resolveDynamicWorkflowMembers",Xe=>o.dynamicWorkflowMembersByToolCallId.value.get(Xe)??[]);const{t:v}=$t(),{confirm:y}=Ka(),b=Nr(),S=FN(),I=V(!1),T=V(!1),$=O(()=>{const Xe=o.activeSessionId.value;return o.sessions.value.find(ge=>ge.id===Xe)?.title??s.value.find(ge=>ge.id===Xe)?.title??""}),F=O(()=>{const Xe=o.activeSessionId.value;return o.sessions.value.find(ge=>ge.id===Xe)?.lastTurnReason}),R=O(()=>{const Xe=o.activeSessionId.value;if(Xe)return dke(Xe)}),P=O(()=>s.value.some(Xe=>Xe.id===o.activeSessionId.value)),M=O(()=>o.visibleWorkspace.value?.sessionCount??0),D=O(()=>o.activity.value!=="idle"),B=V(null),{showAuthGate:z,blinkAuthLogo:A}=LPe({client:o,authLogoRef:B});FPe({running:D,showAuthGate:z});function L(Xe){const ge=o.models.value.find(nl=>nl.id===o.status.value.modelId),Le=kh(ge),un=Le.indexOf(L1(ge,Xe)),tl=Le[(un+1)%Le.length]??Le[0]??"off";return Wx(ge,tl)}const W=O(()=>{const Xe=o.models.value.find(ge=>ge.id===o.status.value.modelId);return L1(Xe,o.thinking.value)}),j=V(!o.onboarded.value);function re(){o.setOnboarded(!0),j.value=!1}function Q(){j.value=!0}let Y=0;function G(){const Xe=window.visualViewport,ge=document.documentElement.style;ge.setProperty("--app-height",`${Xe?.height??window.innerHeight}px`),ge.setProperty("--app-top",`${Xe?.offsetTop??0}px`)}function X(){Y||(Y=requestAnimationFrame(()=>{Y=0,G()}))}Sn(()=>{n=Rke(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),Pt(),G(),window.visualViewport?.addEventListener("resize",X),window.visualViewport?.addEventListener("scroll",X),window.addEventListener("resize",X),document.addEventListener("keydown",te,!0)}),En(()=>{Re(),document.removeEventListener("keydown",te,!0),window.visualViewport?.removeEventListener("resize",X),window.visualViewport?.removeEventListener("scroll",X),window.removeEventListener("resize",X),Y&&(cancelAnimationFrame(Y),Y=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function te(Xe){if(Xe.key==="Escape"&&!ln.value){if(q.value==="turnDiff")We();else if(!Cn())return;Xe.stopPropagation(),Xe.preventDefault()}}const q=V(null),me=V(null);function xe(Xe){if(q.value==="turnDiff"&&me.value?.turnId===Xe.turnId){We();return}me.value=Xe,q.value="turnDiff"}function We(){me.value=null,q.value==="turnDiff"&&(q.value=null)}const he=V(!1);Ye(o.activeSessionId,()=>{We(),he.value=!0,xt(()=>{he.value=!1})});const{previewTarget:ee,previewFile:ne,previewLoading:H,previewError:Z,previewDownloadUrl:ye,previewExternalActions:fe,openFilePreview:de,closeFilePreview:J,openPreviewInEditor:ae,revealPreviewFile:be}=YPe({client:o,detailTarget:q}),_e=V(null),ce=V(null);let Se=0,ie;async function we(Xe){if(Xe.kind!=="image"&&Xe.kind!=="video")return;const ge=++Se;ie?.(),ie=void 0,_e.value=null,ce.value=null;const Le=await ZPe(Xe);if(ge!==Se){Le.revoke?.();return}ie=Le.revoke,_e.value=Xe,ce.value=Le.url}function Re(){Se+=1,ie?.(),ie=void 0,_e.value=null,ce.value=null}const at=O(()=>q.value!==null),{SIDEBAR_WIDTH_KEY:ft,SIDEBAR_DEFAULT:Mt,SIDEBAR_MIN:Tt,sidebarMax:tn,sessionColWidth:Kt,sidebarCollapsed:Qe,sidebarDragging:nt,sideWidth:ut,loadSidebarCollapsed:Pt,toggleSidebarCollapse:Oe}=GPe({previewOpen:at}),{PREVIEW_WIDTH_KEY:Je,PREVIEW_MIN:it,previewDefaultWidth:rt,previewMax:vt,previewWidth:Nt,previewPanelWidth:on,compactionPanelText:mn,compactionPanelVisible:Zt,openCompactionPanel:jn,closeCompactionPanel:Xt,agentPanelMember:xo,agentPanelTurns:Wo,agentPanelLoading:vo,agentPanelLoadError:Un,agentPanelLoadingMore:$s,agentPanelLoadMoreError:ot,agentPanelHasMore:Ae,agentPanelRunning:wt,openAgentPanel:Lt,closeAgentPanel:Qt,loadOlderAgentMessages:_o,toolDiffTarget:Zn,openToolDiff:Xn,closeToolDiff:io,detailDiffMode:ro,detailDiffPath:ys,openDiffDetail:Ti,closeDiffDetail:Ns,selectDiffFile:Us,btwVisible:Vs,openSideChatTab:li,closeSideChat:ss,sidePanelVisible:ai,panelDragging:ui,closeOpenSidePanel:Cn}=UPe({client:o,sideWidth:ut,detailTarget:q,closeFilePreview:J}),Ls=V(null),Fn=V(!1),Io=V(!1),Ho=V(!1),Fs=V(!1),qs=V("general"),Ii=O(()=>ku.value>0||Fn.value||Io.value||Ho.value||Fs.value||I.value||T.value||_e.value!==null),cs=V(null),Po=V(null),ln=O(()=>ku.value>0||Fn.value||Io.value||Ho.value||Fs.value||j.value||I.value||T.value||_e.value!==null),Os=V(!1),ds=V(!1),jo=V(!1);async function Ks(){Os.value=!0,ds.value=!1,Fn.value=!0;try{await o.refreshAllProviders()}catch{ds.value=!0}finally{Os.value=!1}}function $i(Xe="general"){qs.value=Xe,Fs.value=!0}function ks(){$i("providers")}function Nn(){ks()}async function $o(Xe){Fn.value=!1,await Lr(Xe)}async function Lr(Xe){await o.setModel(Xe)&&Xe!==o.defaultModel.value&&o.updateConfig({defaultModel:Xe})}async function Me(Xe){await o.archiveSession(Xe),await f(),k("done",Xe)}async function Ie(Xe){await o.restoreSession(Xe)&&(s.value=s.value.filter(ge=>ge.id!==Xe),k("open",Xe))}async function Ve(Xe,ge){await o.renameSession(Xe,ge),s.value.some(Le=>Le.id===Xe)&&await f()}async function an(Xe,ge){const Le=s.value.find(un=>un.id===Xe);if(!Le){await o.setSessionEmoji(Xe,ge);return}await Ve(Xe,KE(ge,Le.title))}async function gn(Xe,ge){const Le=Xe.map(un=>un.id);for(const un of Le)ge==="archive"?await o.archiveSession(un):await o.restoreSession(un);await f(),k(ge==="archive"?"done":"open",Le)}async function Ln(){const Xe=r.value;if(Xe){r.value=null;for(const ge of Xe.ids)Xe.kind==="done"?await o.restoreSession(ge):await o.archiveSession(ge);await f()}}async function xn(Xe){const ge=Xe??o.activeSessionId.value;if(!ge)return;l.value={state:"running",sessionId:ge};const Le=await o.exportSession(ge);l.value=Le?{state:"done",sessionId:ge}:null}async function ue(Xe){const ge=o.workspacesView.value.find(Le=>Le.id===Xe)?.name??Xe;await y({title:v("sidebar.removeWorkspace"),message:v("workspace.removeWorkspaceConfirm",{name:ge}),variant:"danger",action:()=>o.deleteWorkspace(Xe)})}async function Ce(Xe){jo.value=!0;try{await o.updateConfig(Xe)&&await o.checkAuth()}finally{jo.value=!1}}async function Ne(Xe){await o.undo(1),await xt(),Ls.value?.loadComposerForEdit(Xe.text,Xe.attachments)}function Ue(Xe){if(Xe==="/compact"||Xe.startsWith("/compact ")){o.compact(Xe.slice(8).trim()||void 0);return}if(Xe==="/dynamic_workflow"||Xe.startsWith("/dynamic_workflow ")){const ge=Xe.slice(17).trim();ge==="on"?o.setDynamicWorkflowMode(!0):ge==="off"?o.setDynamicWorkflowMode(!1):ge?(o.setDynamicWorkflowMode(!0),o.sendPrompt(ge)):o.toggleDynamicWorkflowMode();return}if(Xe==="/goal"||Xe.startsWith("/goal ")){const ge=Xe.slice(5).trim();ge==="pause"||ge==="resume"||ge==="cancel"?o.controlGoal(ge):ge?o.createGoal(ge):o.toggleGoalMode();return}if(Xe==="/btw"||Xe.startsWith("/btw ")){const ge=Xe.slice(4).trim();!ge&&o.sideChatVisible.value?ss():li(ge||void 0);return}switch(Xe){case"/new":case"/clear":dn();break;case"/fork":o.forkSession();break;case"/export":xn();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/auto":o.setPermission("auto");break;case"/yolo":o.setPermission("yolo");break;case"/thinking":o.setThinking(L(o.thinking.value));break;case"/status":Ho.value=!0;break;case"/login":Nn();break;default:{const ge=Xe.indexOf(" "),Le=N_e((ge===-1?Xe:Xe.slice(0,ge)).slice(1)),un=ge===-1?void 0:Xe.slice(ge+1).trim()||void 0;if(!Le)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Le,un):o.activateSkill(Le,un);break}}}function dt(Xe){o.unqueue(Xe)}function yt(Xe){o.unqueue(Xe)}function Yt(Xe){o.reorderQueue(Xe.from,Xe.to)}async function sn(Xe){const ge=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&ge){await o.startSessionAndSendPrompt(ge,Xe.text,Xe.attachments);return}if(!o.activeSessionId.value&&!ge){cs.value=Xe,Io.value=!0;return}o.sendPrompt(Xe.text,Xe.attachments)}async function Qn(Xe){const ge=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&ge){await o.startSessionAndSendPrompt(ge,Xe,[]);return}o.activeSessionId.value&&o.sendPrompt(Xe)}async function kn(Xe){if(Po.value=null,!await o.addWorkspaceByPath(Xe)){Po.value=v("workspace.addFailed");return}Io.value=!1;const Le=cs.value;cs.value=null;const un=o.activeWorkspaceId.value;Le&&un&&await o.startSessionAndSendPrompt(un,Le.text,Le.attachments)}function Tn(){cs.value=null,Po.value=null,Io.value=!1}async function No(Xe){for(const ge of Xe)if(Po.value=null,!await o.addWorkspaceByPath(ge)){Po.value=v("workspace.addFailed"),Io.value=!0;return}}async function Dt(Xe,ge){const Le=await o.generateSessionTitle(Xe);Le===null&&(a.value=v("sidebar.genTitleUnavailable"),u!==null&&clearTimeout(u),u=setTimeout(()=>{a.value=null,u=null},5e3)),ge(Le)}function Vt(){xt(()=>{Ls.value?.focusComposer()})}function dn(){const Xe=o.activeWorkspaceId.value;Xe?o.openWorkspaceDraft(Xe):o.clearActiveSession(),Vt()}function lo(Xe){o.openWorkspaceDraft(Xe),Vt()}function Yn(Xe){Xe&&window.open(Xe,"_blank","noopener")}return(Xe,ge)=>(g(),C("div",rDe,[K(WFe),w.value?(g(),pe(nDe,{key:0})):oe("",!0),x(z)?(g(),C("section",lDe,[_("div",aDe,[(g(),C("svg",{ref_key:"authLogoRef",ref:B,class:"auth-page-logo ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Pythinker Code",onMousedown:ge[0]||(ge[0]=Ct(()=>{},["prevent"])),onClick:ge[1]||(ge[1]=(...Le)=>x(A)&&x(A)(...Le))},[...ge[111]||(ge[111]=[K2('',2)])],544)),_("div",uDe,[_("h1",null,N(x(v)("app.authPageTitle")),1),_("p",null,N(x(v)("app.authPageMessage")),1)]),K(nn,{class:"auth-page-btn",variant:"primary",onClick:Nn},{default:ve(()=>[K(Fe,{name:"log-in",size:"md"}),_("span",null,N(x(v)("app.authPageLogin")),1)]),_:1})])])):(g(),C("div",{key:2,class:ze(["app",{mobile:x(S),"sidebar-collapsed":x(Qe)&&!x(S),"macos-desktop":x(ld)}]),style:jt({"--preview-w":x(on)+"px"})},[x(S)?(g(),pe(YFe,{key:1,workspace:x(o).visibleWorkspace.value,"session-title":$.value,running:D.value,branch:x(o).status.value.branch,"session-count":M.value,onOpenSwitcher:ge[22]||(ge[22]=Le=>I.value=!0),onOpenSettings:ge[23]||(ge[23]=Le=>T.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),C(Te,{key:0},[K(GK,{collapsed:x(Qe),dragging:x(nt),"col-width":x(ut),"active-workspace":x(o).visibleWorkspace.value,"active-workspace-id":x(o).activeWorkspaceId.value,sessions:x(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":x(o).pinnedSessionIds.value,"pinned-collapsed":x(o).pinnedCollapsed.value,groups:x(o).workspaceGroups.value,"active-id":x(o).activeSessionId.value,"attention-by-session":x(o).attentionBySession.value,"pending-by-session":x(o).pendingBySession.value,"unread-by-session":x(o).unreadBySession.value,"workspace-sort-mode":x(o).workspaceSortMode.value,workspaces:x(o).workspacesView.value,"tabs-enabled":x(o).config.value?.experimental?.sidebarTabs===!0,onSelect:ge[2]||(ge[2]=Le=>x(o).selectSession(Le)),onCreate:dn,onCreateInWorkspace:ge[3]||(ge[3]=Le=>lo(Le)),onSelectWorkspace:ge[4]||(ge[4]=Le=>x(o).openWorkspace(Le)),onAddWorkspace:ge[5]||(ge[5]=Le=>Io.value=!0),onAddWorkspacePaths:No,onRename:Ve,onGenerateTitle:Dt,onArchive:ge[6]||(ge[6]=Le=>Me(Le)),onRestore:ge[7]||(ge[7]=Le=>Ie(Le)),onPin:ge[8]||(ge[8]=Le=>x(o).togglePinnedSession(Le)),onReorderPins:ge[9]||(ge[9]=Le=>x(o).reorderPinnedSessions(Le)),onTogglePinnedCollapsed:ge[10]||(ge[10]=Le=>x(o).togglePinnedCollapsed()),onSetSessionEmoji:an,onLoadDoneSessions:f,onFork:ge[11]||(ge[11]=Le=>x(o).forkSession(Le)),onExport:ge[12]||(ge[12]=Le=>xn(Le)),onRenameWorkspace:ge[13]||(ge[13]=(Le,un)=>x(o).renameWorkspace(Le,un)),onDeleteWorkspace:ge[14]||(ge[14]=Le=>ue(Le)),onReorderWorkspaces:ge[15]||(ge[15]=Le=>x(o).reorderWorkspaces(Le)),onSetWorkspaceSortMode:ge[16]||(ge[16]=Le=>x(o).setWorkspaceSortMode(Le)),onLoadMoreSessions:ge[17]||(ge[17]=Le=>void x(o).loadMoreSessions(Le)),onLoadAllSessions:ge[18]||(ge[18]=Le=>void x(o).loadAllSessions()),onOpenSettings:ge[19]||(ge[19]=Le=>$i()),onOpenSessionAdmin:m,onCollapse:x(Oe)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Bn(K(p4,{class:"side-handle","storage-key":x(ft),"default-width":x(Mt),min:x(Tt),max:x(tn),"onUpdate:width":ge[20]||(ge[20]=Le=>Kt.value=Le),"onUpdate:dragging":ge[21]||(ge[21]=Le=>nt.value=Le)},null,8,["storage-key","default-width","min","max"]),[[yi,!x(Qe)]])],64)),i.value?(g(),pe(GG,{key:2,"open-sessions":p.value,workspaces:x(o).workspacesView.value,"load-archived":h,"archive-session":Me,"restore-session":Ie,"run-batch":gn,onOpen:ge[24]||(ge[24]=Le=>{i.value=!1,x(o).selectSession(Le)}),onRename:ge[25]||(ge[25]=(Le,un)=>x(o).renameSession(Le,un)),onFork:ge[26]||(ge[26]=Le=>x(o).forkSession(Le)),onExport:ge[27]||(ge[27]=Le=>xn(Le)),onBack:ge[28]||(ge[28]=Le=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),pe(TEe,{key:3,ref_key:"conversationPaneRef",ref:Ls,mobile:x(S),turns:x(o).turns.value,"session-id":x(o).activeSessionId.value,approvals:x(o).pendingApprovals.value,changes:x(o).changes.value,"git-info":x(o).gitInfo.value,tasks:x(o).tasks.value,todos:x(o).todos.value,goal:x(o).goal.value,"activation-badges":x(o).activationBadges.value,status:x(o).status.value,thinking:x(o).thinking.value,"plan-mode":x(o).planMode.value,"plan-armed":x(o).planArmed.value,"session-plans":x(o).sessionPlans.value,"overlay-open":Ii.value,"goal-mode":x(o).goalMode.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,models:x(o).models.value,"starred-ids":x(o).starredModelIds.value,skills:x(o).skills.value,questions:x(o).questions.value,"pending-question-actions":x(o).pendingQuestionActions,"pending-approval-actions":x(o).pendingApprovalActions,running:D.value,"turn-active":x(o).turnActive.value,queued:x(o).queued.value,"search-files":x(o).searchFiles,"upload-image":x(o).uploadImage,working:x(o).working.value,starting:x(o).isStartingFirstPrompt.value,"fast-moon":x(o).fastMoon.value,"file-reload-key":x(o).activeSessionId.value,"session-loading":x(o).sessionLoading.value,compaction:x(o).compaction.value,"has-more-messages":x(o).hasMoreMessages.value,"loading-more":x(o).loadingMoreMessages.value,"loading-more-error":x(o).loadMoreMessagesError.value,"load-older-messages":x(o).loadOlderMessages,"workspace-name":x(o).visibleWorkspace.value?.name,"workspace-root":x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,"git-diff-stats":x(o).gitDiffStats.value,workspaces:x(o).workspacesView.value,"active-workspace-id":x(o).activeWorkspaceId.value,"session-title":$.value,pr:x(o).activePullRequest.value,"conversation-toc":x(o).conversationToc.value,"last-turn-reason":F.value,"turn-error-kind":R.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":R.value?.message,"session-done":P.value,pinned:x(o).pinnedSessionIds.value.includes(x(o).activeSessionId.value??""),"recent-sessions":c.value,onOpenChanges:ge[29]||(ge[29]=Le=>x(Ti)()),onSelectWorkspace:ge[30]||(ge[30]=Le=>lo(Le)),onAddWorkspace:ge[31]||(ge[31]=Le=>Io.value=!0),onOpenPr:Yn,onSubmit:ge[32]||(ge[32]=Le=>sn(Le)),onSteer:ge[33]||(ge[33]=Le=>x(o).steerPrompt(Le.text,Le.attachments)),onApproval:ge[34]||(ge[34]=(Le,un)=>x(o).respondApproval(Le,un)),onCancelTask:ge[35]||(ge[35]=Le=>x(o).cancelTask(Le)),onAnswer:ge[36]||(ge[36]=(Le,un)=>x(o).respondQuestion(Le,un)),onDismiss:ge[37]||(ge[37]=Le=>x(o).dismissQuestion(Le)),onCommand:Ue,onInterrupt:ge[38]||(ge[38]=Le=>x(o).abortCurrentPrompt()),onUnqueue:dt,onEditQueued:yt,onReorderQueue:Yt,onSetPermission:ge[39]||(ge[39]=Le=>x(o).setPermission(Le)),onSetThinking:ge[40]||(ge[40]=Le=>x(o).setThinking(Le)),onTogglePlan:ge[41]||(ge[41]=Le=>x(o).togglePlanMode()),onToggleWorkflow:ge[42]||(ge[42]=Le=>x(o).toggleDynamicWorkflowMode()),onToggleGoal:ge[43]||(ge[43]=Le=>x(o).toggleGoalMode()),onCreateGoal:ge[44]||(ge[44]=Le=>x(o).createGoal(Le)),onControlGoal:ge[45]||(ge[45]=Le=>x(o).controlGoal(Le)),onRefreshGitStatus:ge[46]||(ge[46]=Le=>x(o).activeSessionId.value&&x(o).loadGitStatus(x(o).activeSessionId.value)),onRenameSession:ge[47]||(ge[47]=(Le,un)=>x(o).renameSession(Le,un)),onForkSession:ge[48]||(ge[48]=Le=>x(o).forkSession(Le)),onArchiveSession:ge[49]||(ge[49]=Le=>Me(Le)),onRestoreSession:ge[50]||(ge[50]=Le=>Ie(Le)),onSelectSession:ge[51]||(ge[51]=Le=>x(o).selectSession(Le)),onTogglePin:ge[52]||(ge[52]=Le=>x(o).togglePinnedSession(Le)),onOpenSessionAdmin:m,onExportSession:ge[53]||(ge[53]=Le=>xn(Le)),onCompact:ge[54]||(ge[54]=Le=>x(o).compact()),onPickModel:ge[55]||(ge[55]=Le=>Ks()),onSelectModel:ge[56]||(ge[56]=Le=>Lr(Le)),onOpenFile:ge[57]||(ge[57]=Le=>x(de)(Le)),onOpenMedia:ge[58]||(ge[58]=Le=>we(Le)),onOpenCompaction:ge[59]||(ge[59]=Le=>x(jn)(Le)),onOpenAgent:ge[60]||(ge[60]=Le=>x(Lt)(Le)),onOpenToolDiff:ge[61]||(ge[61]=Le=>x(Xn)(Le)),onOpenTurnDiff:ge[62]||(ge[62]=Le=>xe(Le)),onEditMessage:Ne,onContinueTurn:Qn},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","conversation-toc","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!x(S)&&(x(ld)||x(Qe))?(g(),pe(Jt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:x(Qe)?x(v)("sidebar.expandSidebar"):x(v)("sidebar.collapseSidebar"),onClick:x(Oe)},{default:ve(()=>[K(Fe,{name:x(Qe)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):oe("",!0),!x(S)&&x(Qe)?(g(),pe(Jt,{key:5,class:"new-chat-btn",size:"sm",label:x(v)("sidebar.newChat"),onClick:dn},{default:ve(()=>[K(Fe,{name:"chat-new"})]),_:1},8,["label"])):oe("",!0),!i.value&&x(ai)&&!x(S)?(g(),pe(p4,{key:6,class:"preview-handle","storage-key":x(Je),"default-width":x(rt),min:x(it),max:x(vt),reverse:"","aria-label":x(v)("layout.resizePreviewAria"),"onUpdate:width":ge[63]||(ge[63]=Le=>Nt.value=Le),"onUpdate:dragging":ge[64]||(ge[64]=Le=>ui.value=Le)},null,8,["storage-key","default-width","min","max","aria-label"])):oe("",!0),!i.value&&(!x(S)||x(ai))?(g(),C("aside",{key:7,class:ze(["global-preview",{open:x(ai),mobile:x(S),"no-anim":x(ui)||he.value}]),role:"complementary","aria-label":x(v)("layout.detailPanelAria"),"aria-hidden":!x(ai)},[q.value==="compaction"&&x(Zt)?(g(),pe(UTe,{key:0,text:x(mn)??"",subtitle:x(v)("conversation.summaryTitle"),onClose:x(Xt)},null,8,["text","subtitle","onClose"])):q.value==="agent"&&x(xo)?(g(),pe(XTe,{key:1,member:x(xo),turns:x(Wo),running:x(wt),loading:x(vo),"load-error":x(Un),"has-more":x(Ae),"loading-more":x($s),"load-more-error":x(ot),onClose:x(Qt),onLoadOlderMessages:x(_o),onOpenFile:ge[65]||(ge[65]=Le=>x(de)(Le)),onOpenMedia:ge[66]||(ge[66]=Le=>we(Le)),onOpenAgent:ge[67]||(ge[67]=Le=>x(Lt)(Le)),onOpenTurnDiff:ge[68]||(ge[68]=Le=>xe(Le))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages"])):q.value==="btw"&&x(Vs)?(g(),pe(L9e,{key:2,turns:x(o).sideChatTurns.value,running:x(o).sideChatRunning.value,sending:x(o).sideChatSending.value,onSend:ge[69]||(ge[69]=Le=>x(o).sendSideChatPrompt(Le)),onClose:x(ss)},null,8,["turns","running","sending","onClose"])):q.value==="diff"?(g(),pe(lIe,{key:3,mode:x(ro),changes:x(o).changes.value,"git-info":x(o).gitInfo.value,"file-diff":x(o).fileDiff.value,"selected-diff-path":x(o).selectedDiffPath.value,"file-diff-loading":x(o).fileDiffLoading.value,closable:"",onOpen:x(Us),onBack:ge[70]||(ge[70]=Le=>{ro.value="list",ys.value=null,x(o).clearFileDiff()}),onClose:x(Ns)},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen","onClose"])):q.value==="toolDiff"&&x(Zn)?(g(),pe(s9e,{key:4,target:x(Zn),onClose:x(io)},null,8,["target","onClose"])):q.value==="turnDiff"&&me.value?(g(),pe(x9e,{key:5,changes:me.value.changes,cwd:x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,onOpenFile:ge[71]||(ge[71]=Le=>x(de)(Le)),onClose:We},null,8,["changes","cwd"])):q.value==="file"?(g(),pe(WTe,{key:6,file:x(ne),loading:x(H),error:x(Z),line:x(ee)?.line,"download-url":x(ye),closable:"","external-actions":x(fe),"open-file":x(de),onClose:x(J),onOpenExternal:x(ae),onReveal:x(be)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):oe("",!0)],10,cDe)):oe("",!0),K(iDe,{class:"internal-build-fab"}),_e.value&&ce.value?(g(),pe(REe,{key:8,media:_e.value,src:ce.value,onClose:Re},null,8,["media","src"])):oe("",!0),Fn.value?(g(),pe(SIe,{key:9,models:x(o).models.value,current:x(o).status.value.modelId,"starred-ids":x(o).starredModelIds.value,loading:Os.value,unavailable:ds.value,onSelect:ge[72]||(ge[72]=Le=>$o(Le)),onToggleStar:ge[73]||(ge[73]=Le=>x(o).toggleStarModel(Le)),onClose:ge[74]||(ge[74]=Le=>Fn.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):oe("",!0),Ho.value?(g(),pe(fFe,{key:10,status:x(o).status.value,thinking:W.value,"plan-mode":x(o).planMode.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,"cost-usd":x(o).sessionCost.value,onClose:ge[75]||(ge[75]=Le=>Ho.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):oe("",!0),Io.value?(g(),pe(YLe,{key:11,"browse-fs":x(o).browseFs,"get-fs-home":x(o).getFsHome,"default-path":x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,error:Po.value,onAdd:ge[76]||(ge[76]=Le=>kn(Le)),onClose:Tn},null,8,["browse-fs","get-fs-home","default-path","error"])):oe("",!0),K(Cr,{name:"gload-fade"},{default:ve(()=>[x(o).initialized.value?oe("",!0):(g(),pe(nPe,{key:0,issue:x(o).connectIssue.value},null,8,["issue"]))]),_:1}),x(o).initialized.value&&j.value&&!x(z)?(g(),pe(GRe,{key:12,onComplete:re,onSkip:re})):oe("",!0),K(SFe,{warnings:x(o).warnings.value,onDismiss:x(o).dismissWarning},null,8,["warnings","onDismiss"]),K(NFe),_("div",dDe,[r.value?(g(),pe(Fk,{key:`${r.value.kind}:${r.value.ids.join(",")}`,duration:8e3,onDismiss:ge[77]||(ge[77]=Le=>r.value=null)},{default:ve(()=>[_("span",null,N(x(v)(r.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:r.value.ids.length})),1),_("button",{type:"button",class:"session-action-undo",onClick:Ln},N(x(v)("sidebar.archiveToastUndo")),1)]),_:1})):oe("",!0),l.value?(g(),pe(Fk,{key:`${l.value.sessionId}:${l.value.state}`,duration:l.value.state==="running"?6e4:4e3,onDismiss:ge[78]||(ge[78]=Le=>l.value=null)},{default:ve(()=>[qe(N(x(v)(l.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):oe("",!0),a.value?(g(),pe(Fk,{key:a.value,duration:5e3,onDismiss:ge[79]||(ge[79]=Le=>a.value=null)},{default:ve(()=>[qe(N(a.value),1)]),_:1})):oe("",!0)]),x(b)?(g(),pe(NPe,{key:13})):oe("",!0),x(S)?(g(),pe(kOe,{key:14,modelValue:I.value,"onUpdate:modelValue":ge[80]||(ge[80]=Le=>I.value=Le),groups:x(o).workspaceGroups.value,"active-workspace-id":x(o).activeWorkspaceId.value,"active-id":x(o).activeSessionId.value,"attention-by-session":x(o).attentionBySession.value,"attention-by-workspace":x(o).attentionByWorkspace.value,onSelect:ge[81]||(ge[81]=Le=>x(o).selectSession(Le)),onCreate:dn,onCreateInWorkspace:ge[82]||(ge[82]=Le=>lo(Le)),onAddWorkspace:ge[83]||(ge[83]=Le=>Io.value=!0),onRename:ge[84]||(ge[84]=(Le,un)=>x(o).renameSession(Le,un)),onArchive:ge[85]||(ge[85]=Le=>Me(Le)),onDeleteWorkspace:ge[86]||(ge[86]=Le=>ue(Le)),onLoadMore:ge[87]||(ge[87]=Le=>void x(o).loadMoreSessions(Le))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):oe("",!0),x(S)?(g(),pe(TRe,{key:15,modelValue:T.value,"onUpdate:modelValue":ge[88]||(ge[88]=Le=>T.value=Le),status:x(o).status.value,thinking:x(o).thinking.value,models:x(o).models.value,"plan-mode":x(o).planMode.value,"goal-mode":x(o).goalMode.value,goal:x(o).goal.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,"color-scheme":x(o).colorScheme.value,"ui-font-size":x(o).uiFontSize.value,"auth-ready":x(o).authReady.value,"conversation-toc":x(o).conversationToc.value,"server-version":x(o).serverVersion.value,onPickModel:ge[89]||(ge[89]=Le=>Ks()),onSetThinking:ge[90]||(ge[90]=Le=>x(o).setThinking(Le)),onTogglePlan:ge[91]||(ge[91]=Le=>x(o).togglePlanMode()),onToggleWorkflow:ge[92]||(ge[92]=Le=>x(o).toggleDynamicWorkflowMode()),onToggleGoal:ge[93]||(ge[93]=Le=>x(o).toggleGoalMode()),onControlGoal:ge[94]||(ge[94]=Le=>x(o).controlGoal(Le)),onSetPermission:ge[95]||(ge[95]=Le=>x(o).setPermission(Le)),onSetColorScheme:ge[96]||(ge[96]=Le=>x(o).setColorScheme(Le)),onSetUiFontSize:ge[97]||(ge[97]=Le=>x(o).setUiFontSize(Le)),onSetConversationToc:ge[98]||(ge[98]=Le=>x(o).setConversationToc(Le)),onLogin:ge[99]||(ge[99]=()=>{T.value=!1,Nn()}),onLogout:x(o).logout},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","auth-ready","conversation-toc","server-version","onLogout"])):oe("",!0)],6)),Fs.value?(g(),pe(pLe,{key:3,"color-scheme":x(o).colorScheme.value,accent:x(o).accent.value,"ui-font-size":x(o).uiFontSize.value,"auth-ready":x(o).authReady.value,"account-model":x(o).defaultModel.value,notify:x(o).notifyOnComplete.value,"notify-question":x(o).notifyOnQuestion.value,"notify-approval":x(o).notifyOnApproval.value,"notify-permission":x(o).notifyPermission.value,sound:x(o).soundOnComplete.value,"conversation-toc":x(o).conversationToc.value,config:x(o).config.value,models:x(o).models.value,"config-saving":jo.value,"server-version":x(o).serverVersion.value,backend:x(o).backend.value,"initial-tab":qs.value,onSetColorScheme:ge[100]||(ge[100]=Le=>x(o).setColorScheme(Le)),onSetAccent:ge[101]||(ge[101]=Le=>x(o).setAccent(Le)),onSetUiFontSize:ge[102]||(ge[102]=Le=>x(o).setUiFontSize(Le)),onSetNotify:ge[103]||(ge[103]=Le=>x(o).setNotifyOnComplete(Le)),onSetNotifyQuestion:ge[104]||(ge[104]=Le=>x(o).setNotifyOnQuestion(Le)),onSetNotifyApproval:ge[105]||(ge[105]=Le=>x(o).setNotifyOnApproval(Le)),onSetSound:ge[106]||(ge[106]=Le=>x(o).setSoundOnComplete(Le)),onSetConversationToc:ge[107]||(ge[107]=Le=>x(o).setConversationToc(Le)),onUpdateConfig:ge[108]||(ge[108]=Le=>Ce(Le)),onLogout:x(o).logout,onOpenOnboarding:ge[109]||(ge[109]=()=>{Fs.value=!1,Q()}),onClose:ge[110]||(ge[110]=Le=>Fs.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","config","models","config-saving","server-version","backend","initial-tab","onLogout"])):oe("",!0),K(eFe)]))}}),pDe=ht(fDe,[["__scopeId","data-v-d64883cf"]]);qye();zg(pDe).use(fo).mount("#app");export{cF as $,Ap as A,eO as B,Zo as C,uBe as D,LM as E,Te as F,K2 as G,qe as H,K as I,FF as J,FDe as K,or as L,Ze as M,CR as N,DDe as O,BDe as P,HDe as Q,_g as R,id as S,Hl as T,zDe as U,Z2 as V,PDe as W,dBe as X,WDe as Y,sBe as Z,hDe as _,u5 as a,Ko as a$,es as a0,N2 as a1,wDe as a2,P2 as a3,B5 as a4,cn as a5,Fd as a6,MDe as a7,hBe as a8,IDe as a9,h5 as aA,dO as aB,vO as aC,Sn as aD,gO as aE,mO as aF,Ld as aG,hO as aH,En as aI,B2 as aJ,BF as aK,g as aL,xR as aM,CDe as aN,Vn as aO,JM as aP,SDe as aQ,Mg as aR,Ms as aS,Bk as aT,V as aU,XDe as aV,WR as aW,st as aX,An as aY,kO as aZ,ODe as a_,LDe as aa,NDe as ab,$De as ac,eBe as ad,mBe as ae,wn as af,tR as ag,s0 as ah,wa as ai,Fl as aj,Bo as ak,QDe as al,Pi as am,Ta as an,Et as ao,VDe as ap,qDe as aq,Dn as ar,xt as as,rR as at,ze as au,iF as av,jt as aw,cO as ax,pO as ay,po as az,_De as b,Bce as b$,lBe as b0,Cp as b1,Lg as b2,iBe as b3,Ea as b4,TF as b5,gDe as b6,Co as b7,qF as b8,rBe as b9,vs as bA,yi as bB,nR as bC,nBe as bD,Ye as bE,s5 as bF,EDe as bG,GF as bH,GDe as bI,ve as bJ,jDe as bK,Bn as bL,Do as bM,tBe as bN,Ct as bO,ADe as bP,Gn as bQ,Ts as bR,wBe as bS,xBe as bT,BI as bU,_Be as bV,sce as bW,DI as bX,Nb as bY,MBe as bZ,Hce as b_,mDe as ba,N as bb,Gm as bc,RDe as bd,Rn as be,yDe as bf,vDe as bg,YM as bh,JDe as bi,$F as bj,x as bk,sh as bl,pBe as bm,cBe as bn,MR as bo,TDe as bp,ZDe as bq,KF as br,fBe as bs,UDe as bt,Zm as bu,a5 as bv,Bg as bw,RR as bx,tE as by,eb as bz,oBe as c,Xw as c0,Yw as c1,Jw as c2,TBe as c3,m1 as c4,Kc as c5,p1 as c6,Oce as c7,Rce as c8,IBe as c9,ht as cA,EBe as ca,yBe as cb,$Be as cc,S0 as cd,vi as ce,Xce as cf,Jce as cg,Jue as ch,bBe as ci,Kue as cj,Gue as ck,kBe as cl,Qw as cm,Qce as cn,ZA as co,TA as cp,rce as cq,h1 as cr,f1 as cs,SBe as ct,ABe as cu,vBe as cv,CBe as cw,Fe as cx,gBe as cy,C9e as cz,YDe as d,xa as e,kDe as f,Cr as g,IR as h,bDe as i,xDe as j,ar as k,th as l,us as m,Y1 as n,Ol as o,aBe as p,O as q,zg as r,pe as s,oe as t,C as u,_ as v,WO as w,KDe as x,zO as y,HR as z}; diff --git a/apps/pythinker-code/dist-web/assets/index-GptwYVPK.js b/apps/pythinker-code/dist-web/assets/index-Cm2yfvYH.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-GptwYVPK.js rename to apps/pythinker-code/dist-web/assets/index-Cm2yfvYH.js index dc1b611bb..9242d07c2 100644 --- a/apps/pythinker-code/dist-web/assets/index-GptwYVPK.js +++ b/apps/pythinker-code/dist-web/assets/index-Cm2yfvYH.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/typst-BUadGCkm.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-BmBUJMz7.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]); -import{bR as c}from"./index-ZOXJ8Du9.js";var Dt=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Wi=Object.getOwnPropertyNames,zi=Object.prototype.hasOwnProperty,qi=(e,t)=>{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{let n={};for(var r in e)Dt(n,r,{get:e[r],enumerable:!0});return Dt(n,Symbol.toStringTag,{value:"Module"}),n},Xi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Wi(t),o=0,s=i.length,a;ot[l]).bind(null,a),enumerable:!(r=Hi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(Xi(e,t,"default"),n);const Yt=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>c(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>c(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>c(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>c(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>c(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>c(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>c(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>c(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>c(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>c(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>c(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>c(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>c(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>c(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],cr=Object.fromEntries(Yt.map(e=>[e.id,e.import])),dr=Object.fromEntries(Yt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),pr={...cr,...dr},hr=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fr=Object.fromEntries(hr.map(e=>[e.id,e.import]));var Zt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qi(){return 2147483648}function Ji(){return typeof performance<"u"?performance.now():Date.now()}const Yi=(e,t)=>e+(t-e%t)%t;async function Zi(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=Qi();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const _=Math.min(E,Yi(Math.max(h,g),65536));if(s(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let _="";for(;m>10,56320|I&1023)}}return _}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ji,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var eo=Object.defineProperty,to=(e,t,n)=>t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>to(e,typeof t!="symbol"?t+"":t,n);let D=null;function no(e){throw new Zt(e.UTF8ToString(e.getLastOnigError()))}class st{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=st._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u=55296&&p<=56319&&u+1=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const at=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new Zt("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new st(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(at,"LAST_ID",0);P(at,"_sharedPtr",0);P(at,"_sharedPtrInUse",!1);let mr=at;class ro{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new Zt("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),io(r)?r=await r.instantiator(n):oo(r)?r=await r.default(n):(so(r)&&(r=r.data),ao(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await uo(r)(n):r=await co(r)(n):lo(r)?r=await Et(r)(n):r instanceof WebAssembly.Module?r=await Et(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Et(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ue=t(),Ue}function Et(e){return t=>WebAssembly.instantiate(e,t)}function uo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function co(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gr;function po(e){gr=e}function ho(){return gr}async function _r(e){return e&&await en(e),{createScanner(t){return new ro(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new mr(t)}}}const fo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:_r,getDefaultWasmLoader:ho,loadWasm:en,setDefaultWasmLoader:po},Symbol.toStringTag,{value:"Module"}));var yr=qi({});Ki(yr,fo);var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function mo(e){return tn(e)}function tn(e){return Array.isArray(e)?go(e):e instanceof RegExp?e:typeof e=="object"?_o(e):e}function go(e){let t=[];for(let n=0,r=e.length;n{for(let r in n)e[r]=n[r]}),e}function br(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?br(e.substring(0,e.length-1)):e.substr(~t+1)}var bt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fe=class{static hasCaptures(e){return e===null?!1:(bt.lastIndex=0,bt.test(e))}static replaceCaptures(e,t,n){return e.replace(bt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function wr(e,t){return et?1:0}function vr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;ithis._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>yo(e.parent,i.parentScopes));return r?new kr(r.fontStyle,r.foreground,r.background):null}},wt=class Xe{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Xe(t,r);return t}static from(...t){let n=null;for(let r=0;r"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Eo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Eo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var kr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bo(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new wo(E,b,i,l,u,p)}}return n}var wo=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function vo(e,t){e.sort((l,u)=>{let p=wr(l.scope,u.scope);return p!==0||(p=vr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Co(t),s=new kr(n,o.getId(r),o.getId(i)),a=new ko(new Nt(0,null,-1,0,0),[]);for(let l=0,u=e.length;lt?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ko=class Vt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vt._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Vt(this._mainRule.clone(),Nt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ye(e,t){const n=[],r=So(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vn(i)){const l=[];do l.push(i),i=r.next();while(vn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function So(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Lr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Lo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ro=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Io=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Ro;for(const n of e)To(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function To(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Ke({baseGrammar:o,selfGrammar:i},r):$t(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function $t(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Ze([r],t,n)}}function Ke(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Er({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Rr(o);switch(s.kind){case 0:Ke({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ke(t,n);break;case 2:$t(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?$t(s.ruleName,l,n):Ke(l,n)}else s.kind===4?n.add(new Lo(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Po=class{kind=0},Oo=class{kind=1},xo=class{constructor(e){this.ruleName=e}kind=2},Do=class{constructor(e){this.scopeName=e}kind=3},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Rr(e){if(e==="$base")return new Po;if(e==="$self")return new Oo;const t=e.indexOf("#");if(t===-1)return new Do(e);if(t===0)return new xo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new No(n,r)}}var Vo=/\\(\d+)/,Cn=/\\(\d+)/g,$o=-1,Ir=-2;var Ne=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fe.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${br(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fe.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fe.replaceCaptures(this._contentName,e,t)}},Mo=class extends Ne{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Go=class extends Ne{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},An=class extends Ne{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mt=class extends Ne{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},et=class extends Ne{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Ir),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Tr=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Mo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Go(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Er({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new An(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new Mt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;ot.substring(i.start,i.end));return Cn.lastIndex=0,this.source.replace(Cn,(i,o)=>Cr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;on.source);this._cached=new kn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new kn(e,r,this._items.map(i=>i.ruleId))}},kn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new vt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Gt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Uo=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Cr(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Sn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Or(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Fo(e,t,n,r,i,o);i=h.stack,r=h.linePos,n=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new Sn(i,!0);f()}return new Sn(i,!1);function f(){const h=jo(e,t,n,r,i,p);if(!h){o.produce(i,l),u=!0;return}const m=h.captureIndices,E=h.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(E===$o){const g=i.getRule(e);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ce(e,t,n,i,o,g.endCaptures,m),o.produce(i,m[0].end);const _=i;if(i=i.parent,p=_.getAnchorPos(),!b&&_.getEnterPos()===r){i=_,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const _=i,w=g.getName(t.content,m),A=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(E,r,p,m[0].end===l,null,A,A),g instanceof Mt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof et){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,m))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Ce(e,t,n,i,o,g.captures,m),o.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Fo(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof et&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=zo(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Ir){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ce(e,t,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function jo(e,t,n,r,i,o){const s=Ho(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Wo(a,e,t,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p=a)&&(a=w,l=_.captureIndices,u=_.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function xr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function zo(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ce(e,t,n,r,i,o,s){if(o.length===0)return;const a=t.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;dp)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const E=f.getName(a,s),b=r.contentNameScopesList.pushAttributed(E,e),g=f.getContentName(a,s),_=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,_),A=e.createOnigString(a.substring(0,h.end));Or(e,A,n&&h.start===0,h.start,w,i,!1,0),Lr(A);continue}const m=f.getName(a,s);if(m!==null){const b=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new qo(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var qo=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Xo(e,t,n,r,i,o,s,a){return new Qo(e,t,n,r,i,o,s,a)}function Ln(e,t,n,r,i){const o=Ye(t,tt),s=Tr.getCompiledRuleId(n,r,i.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function tt(e,t){if(t.length{for(let i=n;in&&e.substr(0,n)===t&&e[n]==="."}var Qo=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Bo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Rn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ye(l,tt);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)Ln(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&Ln(t,l,a,this,a)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Rn(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Tr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Bt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=le.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ae.createRootAndLookUpScopeName(f,d,this):h=Ae.createRoot("unknown",d),t=new Bt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,a=new Yo(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Or(this,o,i,0,t,a,!0,r);return Lr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Rn(e,t){return e=mo(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ae=class K{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=wt.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new wt(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new wt(null,t),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(n,i,s);return new K(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return K.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),le.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return K._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=K._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(t.tokenAttributes,i,s);return new K(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Bt=class ie{constructor(t,n,r,i,o,s,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new ie(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:ie._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ae.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ie._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,a){return new ie(this,t,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ie(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ae.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new ie(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ae.fromExtension(r,n.contentNameScopesList))}},Jo=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ye(n,tt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ye(n,tt).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Yo=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=le.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=le.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Ut=Bt.NULL;function Ie(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ee(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Dr(e){return Array.isArray(e)?e:[e]}async function nn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Ve(e){return!e||["plaintext","txt","text","plain"].includes(e)}function rn(e){return e==="ansi"||Ve(e)}function $e(e){return e==="none"}function on(e){return $e(e)}const ts=/(\r?\n)/g;function Me(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(ts);let r=0;const i=[];for(let o=0;o!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?In.light:In.dark),n||(n=t.type==="light"?Tn.light:Tn.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(a){if(o.has(a))return o.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(a):(o.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const p={...a,settings:{...a.settings}};if(l){const d=s(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(u){const d=s(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=s(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,Pn,{enumerable:!1,writable:!1,value:!0}),t}async function Nr(e){return[...new Set((await Promise.all(e.filter(t=>!rn(t)).map(async t=>await nn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Vr(e){return(await Promise.all(e.map(async t=>on(t)?null:lt(await nn(t))))).filter(t=>!!t)}function $r(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var ns=class extends es{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=lt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Je.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=$r(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(s=>n.map(([a])=>a).includes(s)):!1).filter(i=>!n.includes(i));throw new S(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},rs=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let ve=0;function ut(e){ve+=1,e.warnings!==!1&&ve>=10&&ve%10===0&&console.warn(`[Shiki] ${ve} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new S("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(lt),i=new ns(new rs(e.engine,n),r,n,e.langAlias);let o;function s(_){return $r(_,e.langAlias)}function a(_){b();const w=i.getGrammar(typeof _=="string"?_:_.name);if(!w)throw new S(`Language \`${_}\` not found, you may need to load it first`);return w}function l(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(_);if(!w)throw new S(`Theme \`${_}\` not found, you may need to load it first`);return w}function u(_){b();const w=l(_);return o!==_&&(i.setTheme(w),o=_),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(..._){b(),i.loadLanguages(_.flat(1))}async function h(..._){return f(await Nr(_))}function m(..._){b();for(const w of _.flat(1))i.loadTheme(w)}async function E(..._){return b(),m(await Vr(_))}function b(){if(t)throw new S("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),ve-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:s,loadLanguage:h,loadLanguageSync:f,loadTheme:E,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const is=ut;async function sn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Vr(e.themes||[]),Nr(e.langs||[]),e.engine]);return ut({...e,themes:t,langs:n,engine:r})}const os=sn,Mr=new WeakMap;function ct(e,t){Mr.set(e,t)}function Te(e){return Mr.get(e)}var dt=class Gr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Gr(Object.fromEntries(Dr(n).map(r=>[r,Ut])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return ss(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ss(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function as(e,t){if(!(e instanceof dt))throw new S("Invalid grammar state");return e.getInternalStack(t)}const ls=/,/,us=/ /;function Br(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Ve(e.resolveLangAlias(n.lang||"text"))||$e(r))return Me(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Fr(t,s,i,o,n)}function Ur(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(Ve(i)||$e(o))throw new S("Plain language does not have grammar state");if(i==="ansi")throw new S("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new dt(an(n,l,s,a,r).stateStack,l.name,s.name)}function Fr(e,t,n,r,i){const o=an(e,t,n,r,i),s=new dt(o.stateStack,t.name,n.name);return ct(o.tokens,s),o.tokens}function an(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Me(e);let p=i.grammarState?as(i.grammarState,n.name)??Ut:i.grammarContextCode!=null?an(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ut,d=[];const f=[];for(let h=0,m=u.length;h0&&E.length>=s){d=[],f.push([{content:E,offset:b,color:"",fontStyle:0}]);continue}let g,_,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),_=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;Iyt.trim());break;case"object":pe=Q.scope;break;default:continue}En.push({settings:Q,selectors:pe.map(yt=>yt.split(us))})}q.explanation=[];let bn=0;for(;M+bn({scopeName:t}))}function ds(e,t){const n=[];for(let r=0,i=t.length;r=0&&i>=0;)On(e[r],n[i])&&(r-=1),i-=1;return r===-1}function hs(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(ps(s,t,n)){r.push(o);break}return r}function ln(e,t,n,r=Br){const i=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=i.map(u=>{const p=r(e,t,{...n,theme:u.theme});return{tokens:p,state:Te(p),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),s=fs(...o.map(u=>u.tokens)),a=s[0].map((u,p)=>u.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),s.forEach((m,E)=>{const{content:b,explanation:g,offset:_,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new dt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&ct(a,l),a}function fs(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;rl[r]),o=t.map(()=>[]);t.forEach((l,u)=>l.push(o[u]));const s=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u4&&n.slice(0,4)==="data"&&bs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Dn,Cs);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Dn.test(o)){let s=o.replace(Es,vs);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=un}return new i(r,t)}function vs(e){return"-"+e.toLowerCase()}function Cs(e){return e.charAt(1).toUpperCase()}const As=jr([Hr,_s,qr,Xr,Kr],"html"),Qr=jr([Hr,ys,qr,Xr,Kr],"svg"),Nn={}.hasOwnProperty;function ks(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Nn.call(i,e)){const l=String(i[e]);s=Nn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ss=/["&'<>`]/g,Ls=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Is=/[|\\{}()[\]^$+*?.]/g,Vn=new WeakMap;function Ts(e,t){if(e=e.replace(t.subset?Ps(t.subset):Ss,r),t.subset||t.escapeOnly)return e;return e.replace(Ls,n).replace(Rs,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Ps(e){let t=Vn.get(e);return t||(t=Os(e),Vn.set(e,t)),t}function Os(e){const t=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Ms=["cent","copy","divide","gt","lt","not","para","times"],Jr={}.hasOwnProperty,Wt={};let je;for(je in At)Jr.call(At,je)&&(Wt[At[je]]=je);const Gs=/[^\dA-Za-z]/;function Bs(e,t,n,r){const i=String.fromCharCode(e);if(Jr.call(Wt,i)){const o=Wt[i],s="&"+o;return n&&$s.includes(o)&&!Ms.includes(o)&&(!r||t&&t!==61&&Gs.test(String.fromCharCode(t)))?s:s+";"}return""}function Us(e,t,n){let r=Ds(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Bs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Vs(e,t,n.omitOptionalSemicolons);o.length|^->||--!>|"],Hs=["<",">"];function Ws(e,t,n,r){return r.settings.bogusComments?"":"";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Hs}))}}function zs(e,t,n,r){return""}function $n(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qs(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Xs(e){return e.join(" ").trim()}const Ks=/[ \t\n\f\r]/g;function cn(e){return typeof e=="object"?e.type==="text"?Mn(e.value):!1:Mn(e)}function Mn(e){return e.replace(Ks,"")===""}const x=Zr(1),Yr=Zr(-1),Qs=[];function Zr(e){return t;function t(n,r,i){const o=n?n.children:Qs;let s=(r||0)+e,a=o[s];if(!i)for(;a&&cn(a);)s+=e,a=o[s];return a}}const Js={}.hasOwnProperty;function ei(e){return t;function t(n,r,i){return Js.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const dn=ei({body:Zs,caption:kt,colgroup:kt,dd:ra,dt:na,head:kt,html:Ys,li:ta,optgroup:ia,option:oa,p:ea,rp:Gn,rt:Gn,tbody:aa,td:Bn,tfoot:la,th:Bn,thead:sa,tr:ua});function kt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&cn(r.value.charAt(0)))}function Ys(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function Zs(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function ea(e,t,n){const r=x(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ta(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function na(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ra(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Gn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ia(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function oa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function sa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function aa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function la(e,t,n){return!x(n,t)}function ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Bn(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ca=ei({body:ha,colgroup:fa,head:pa,html:da,tbody:ma});function da(e){const t=x(e,-1);return!t||t.type!=="comment"}function pa(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function ha(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function fa(e,t,n){const r=Yr(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ma(e,t,n){const r=Yr(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const He={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/pythinker-code/dist-web/assets/index-DI8hwIbn.css b/apps/pythinker-code/dist-web/assets/index-DI8hwIbn.css deleted file mode 100644 index 9b08f7bbc..000000000 --- a/apps/pythinker-code/dist-web/assets/index-DI8hwIbn.css +++ /dev/null @@ -1 +0,0 @@ -.pythinker-logo[data-v-4349c96d]{display:block;object-fit:contain;flex:none}.size-sm[data-v-4349c96d]{height:28px;width:auto}.size-md[data-v-4349c96d]{height:44px;width:auto}.size-lg[data-v-4349c96d]{height:64px;width:auto}.size-xl[data-v-4349c96d]{height:96px;width:auto}.pythinker-logo.interactive[data-v-4349c96d]{cursor:pointer;user-select:none;-webkit-user-select:none;transition:transform .18s ease}.pythinker-logo.interactive[data-v-4349c96d]:hover{transform:scale(1.06)}@media(prefers-reduced-motion:reduce){.pythinker-logo.interactive[data-v-4349c96d]:hover{transform:none}}.ui-icon-button[data-v-4b23513f]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:1px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-4b23513f]:hover:not(:disabled){background:color-mix(in srgb,var(--color-text) 8%,transparent);color:var(--color-text)}.ui-icon-button[data-v-4b23513f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-4b23513f]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-4b23513f]{width:26px;height:26px;border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-4b23513f]{width:32px;height:32px}.ui-icon-button--lg[data-v-4b23513f]{width:44px;height:44px}.ui-icon-button[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-4b23513f] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-dialog__overlay[data-v-e1a908d4]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111773;animation:pythinker-dialog-overlay-in-e1a908d4 var(--duration-base) var(--ease-out)}@keyframes pythinker-dialog-overlay-in-e1a908d4{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-e1a908d4]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-e1a908d4]{width:min(440px,100%)}.ui-dialog--lg[data-v-e1a908d4]{width:min(640px,100%)}.ui-dialog--xl[data-v-e1a908d4]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-e1a908d4]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--flush .ui-dialog__body[data-v-e1a908d4]{padding:0}.ui-dialog__head[data-v-e1a908d4]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-e1a908d4]{flex:1;min-width:0}.ui-dialog__title[data-v-e1a908d4]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-e1a908d4]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-e1a908d4]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-e1a908d4]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-e1a908d4]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.sd-head[data-v-0c6780a0]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.sd-search-icon[data-v-0c6780a0]{flex:none;color:var(--color-text-muted)}.sd-input[data-v-0c6780a0]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-lg);color:var(--color-text);background:none;border:none;outline:none;padding:var(--space-1) 0}.sd-input[data-v-0c6780a0]::placeholder{color:var(--color-text-muted)}.sd-list[data-v-0c6780a0]{height:420px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.sd-row[data-v-0c6780a0]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-0c6780a0]:hover,.sd-row.on[data-v-0c6780a0]{background:var(--color-surface-sunken)}.sd-row.active .sd-title[data-v-0c6780a0]{color:var(--color-accent-hover)}.sd-row-ws[data-v-0c6780a0]{flex-direction:row;align-items:center;gap:var(--space-2)}.sd-ws-name[data-v-0c6780a0]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-0c6780a0]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-section[data-v-0c6780a0]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-0c6780a0]{font-weight:var(--weight-regular)}.sd-section[data-v-0c6780a0]:first-child{padding-top:var(--space-1)}.sd-section[data-v-0c6780a0]:not(:first-child){margin-top:var(--space-1);border-top:1px solid var(--color-line)}.sd-meta[data-v-0c6780a0]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-folder[data-v-0c6780a0]{flex:none;color:var(--color-text-muted)}.sd-ws[data-v-0c6780a0]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-time[data-v-0c6780a0]{flex:none;font-family:var(--font-mono);color:var(--color-text-faint)}.sd-title[data-v-0c6780a0]{min-width:0;font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-snippet[data-v-0c6780a0]{min-width:0;font-size:var(--text-sm);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-0c6780a0] mark,.sd-snippet[data-v-0c6780a0] mark,.sd-ws-name[data-v-0c6780a0] mark,.sd-ws-path[data-v-0c6780a0] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-0c6780a0]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.sd-hint[data-v-0c6780a0]{font-size:var(--text-xs);color:var(--color-text-muted)}.ui-spinner[data-v-9ef9c2db]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--sm[data-v-9ef9c2db]{width:14px;height:14px}.ui-spinner--md[data-v-9ef9c2db]{width:18px;height:18px}.ui-spinner--lg[data-v-9ef9c2db]{width:28px;height:28px}.ui-spinner__svg[data-v-9ef9c2db]{width:100%;height:100%;animation:ui-spinner-rotate-9ef9c2db .85s linear infinite}.ui-spinner__track[data-v-9ef9c2db]{fill:none;stroke:var(--color-line);stroke-width:2.2}.ui-spinner__arc[data-v-9ef9c2db]{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes ui-spinner-rotate-9ef9c2db{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ui-spinner__svg[data-v-9ef9c2db]{animation-duration:1.8s}}.ui-badge[data-v-07bffc39]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:1px solid transparent}.ui-badge--md[data-v-07bffc39]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-07bffc39]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-07bffc39]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-07bffc39]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-07bffc39]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-07bffc39]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-07bffc39]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-07bffc39]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-07bffc39]{background:var(--color-text);color:var(--color-bg)}.ui-menu[data-v-54950237]{min-width:180px;padding:var(--space-1);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column}.ui-menu-item[data-v-826e1b9c]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:6px 10px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-826e1b9c]:hover:not(:disabled){background:var(--color-surface-sunken)}.ui-menu-item[data-v-826e1b9c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-826e1b9c]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-826e1b9c]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.ui-menu-item.is-danger[data-v-826e1b9c]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-826e1b9c]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-826e1b9c] svg{width:14px;height:14px;flex:none}.ui-menu-item--lg[data-v-826e1b9c]{min-height:44px;padding:12px 14px;font-size:var(--text-base)}.ui-menu-sep[data-v-826e1b9c]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-e9a227e9]{display:contents}.ui-tip__bubble[data-v-e9a227e9]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-e9a227e9]{opacity:1}.ui-input[data-v-609588ac]{width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-609588ac]{height:38px}.ui-input--sm[data-v-609588ac]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-609588ac]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-609588ac]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-609588ac]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-609588ac]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-609588ac]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-609588ac]{border-color:var(--color-danger)}.ui-input.has-error[data-v-609588ac]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.popover[data-v-fb2e6af0]{position:fixed;z-index:200;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow-y:auto;padding:2px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);box-shadow:0 8px 24px color-mix(in srgb,var(--ink) 18%,transparent)}.emoji-picker[data-v-b79cd42c]{width:min(320px,calc(100vw - 40px));max-height:min(440px,calc(100vh - 48px));padding:var(--space-3);overflow-y:auto;background:var(--color-surface-raised)}.emoji-actions[data-v-b79cd42c]{display:flex;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-2)}.emoji-actions button[data-v-b79cd42c]{border:0;background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);cursor:pointer}.emoji-actions button[data-v-b79cd42c]:hover{color:var(--color-text)}.emoji-group h3[data-v-b79cd42c]{margin:var(--space-3) 0 var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.emoji-grid[data-v-b79cd42c]{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:var(--space-1)}.emoji[data-v-b79cd42c]{display:grid;place-items:center;min-width:32px;min-height:32px;border:0;border-radius:var(--radius-sm);background:transparent;font-size:var(--text-lg);cursor:pointer}.emoji[data-v-b79cd42c]:hover{background:var(--color-hover)}.emoji[data-v-b79cd42c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.emoji-empty[data-v-b79cd42c]{padding:var(--space-5) 0;color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.se[data-v-f72e274b]{display:block;margin:0;padding:8px var(--space-2);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-f72e274b]:hover{background:var(--sb-hover, var(--color-surface-sunken));color:var(--color-text)}.se.on[data-v-f72e274b]{background:var(--color-selected);color:var(--color-text)}.row[data-v-f72e274b]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-f72e274b]{display:flex;align-items:center;flex:1;min-width:0}.session-emoji[data-v-f72e274b]{flex:none;margin-right:var(--space-1);font-size:var(--text-base);line-height:1}.lead[data-v-f72e274b]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-f72e274b]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-f72e274b]{color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts[data-v-f72e274b]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-f72e274b]{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:flex-end;min-width:26px}.act .kebab[data-v-f72e274b]{position:absolute;right:0;top:50%;transform:translateY(-50%);visibility:hidden}.se:hover .act .kebab[data-v-f72e274b],.act:has(.kebab.open) .kebab[data-v-f72e274b]{visibility:visible}.se:hover .act .ts[data-v-f72e274b],.act:has(.kebab.open) .ts[data-v-f72e274b]{visibility:hidden}.kebab.open[data-v-f72e274b]{color:var(--color-text);background:var(--sb-hover, var(--color-surface-sunken))}.menu[data-v-f72e274b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-time[data-v-f72e274b]{padding:6px 10px;color:var(--color-text-faint);font-family:var(--font-mono);font-size:var(--text-xs);cursor:default;user-select:text}.rename-wrap[data-v-f72e274b]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-f72e274b]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none}.rename-wrap.generating .rename-input[data-v-f72e274b]{visibility:hidden}.gen-title-btn[data-v-f72e274b]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-f72e274b]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-f72e274b]{margin:0;border-radius:var(--radius-sm);padding:8px calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px))}.sessions .se .rename-wrap[data-v-f72e274b]{border-radius:var(--radius-sm)}.sessions .se .rename-input[data-v-f72e274b]{font-family:var(--sans)}.sessions .se .kebab[data-v-f72e274b]{border-radius:var(--radius-sm)}.group.dragging[data-v-4e9d3a01]{opacity:.45}.group-sessions[data-v-4e9d3a01]{display:grid;grid-template-rows:minmax(0,1fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-4e9d3a01]{grid-template-rows:minmax(0,0fr)}.group-sessions-inner[data-v-4e9d3a01]{min-height:0;overflow:hidden}.gh[data-v-4e9d3a01]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-4e9d3a01]:active{cursor:grabbing}.gh[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.gh-top[data-v-4e9d3a01]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-4e9d3a01]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-4e9d3a01]{font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-4e9d3a01]{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;background:var(--color-sidebar-bg);opacity:0;pointer-events:none}.gh-actions[data-v-4e9d3a01]:after{content:"";position:absolute;inset:0;z-index:0;border-radius:var(--radius-sm);background:transparent}.gh:hover .gh-actions[data-v-4e9d3a01]:after{background:var(--sb-hover, var(--color-surface-sunken))}.gh-actions[data-v-4e9d3a01]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-4e9d3a01],.gh:focus-within .gh-actions[data-v-4e9d3a01],.gh-actions.open[data-v-4e9d3a01]{opacity:1;pointer-events:auto}.gh-more.open[data-v-4e9d3a01]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-4e9d3a01]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.show-more[data-v-4e9d3a01]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.show-more[data-v-4e9d3a01]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-lead[data-v-4e9d3a01]{width:var(--sb-gutter);flex:none}.show-more-label[data-v-4e9d3a01]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-4e9d3a01]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-4e9d3a01]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-4e9d3a01]{color:var(--faint)}.gh-add[data-v-4e9d3a01]:hover{color:var(--dim)}.ui-kbd[data-v-e5cfdeb4]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-e5cfdeb4]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--color-line);border-bottom-width:2px;border-radius:var(--radius-xs);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:11px;line-height:1}.pinned[data-v-c0d7fd9d]{padding-bottom:var(--space-2);border-bottom:1px solid var(--color-line)}.pinned-header[data-v-c0d7fd9d]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--sb-inset);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.pin-row.dragging[data-v-c0d7fd9d]{opacity:.45}.side[data-v-b61c245a]{background:var(--color-sidebar-bg);display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover)}.side.no-anim[data-v-b61c245a]{transition:none}.side.collapsed[data-v-b61c245a]{visibility:hidden}.col[data-v-b61c245a]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:1px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-b61c245a]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-b61c245a]{padding-left:80px;-webkit-app-region:drag}.side.macos-desktop .ch-brand[data-v-b61c245a]{display:none}.ch-logo[data-v-b61c245a]{height:28px;width:28px;object-fit:contain;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-b61c245a]:hover{transform:scale(1.08)}.ch-brand[data-v-b61c245a]{display:flex;align-items:center;gap:8px;min-width:0;flex:1;user-select:none;touch-action:none}.ch-name[data-v-b61c245a]{font-size:var(--ui-font-size);font-weight:500;line-height:22px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container sidebar-col (max-width: 250px){.ch-name[data-v-b61c245a]{display:none}}.btn-wrap[data-v-b61c245a]{display:flex;align-items:center;gap:8px;padding:0 var(--sb-inset)}.btn-new-chat[data-v-b61c245a]{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-new-chat[data-v-b61c245a]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-b61c245a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-b61c245a]{flex:none}.btn-new-chat span[data-v-b61c245a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-tabs[data-v-b61c245a]{display:flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--sb-inset) var(--space-2)}.status-tabs>button[data-v-b61c245a]:not(.status-view-switcher){min-height:28px;padding:0 var(--space-3);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-xs);cursor:pointer}.status-tabs>button.active[data-v-b61c245a]{background:var(--color-selected);color:var(--color-text)}.status-view-switcher[data-v-b61c245a]{margin-left:auto}.search-wrap[data-v-b61c245a]{padding:0 var(--sb-inset);position:relative;z-index:1;background:var(--color-sidebar-bg);border-bottom:1px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.search-wrap--scrolled[data-v-b61c245a]{border-bottom-color:var(--line);box-shadow:var(--shadow-sm)}.search[data-v-b61c245a]{display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-b61c245a]:hover{background:var(--sb-hover)}.search[data-v-b61c245a]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-b61c245a]{flex:none}.search-input[data-v-b61c245a]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-b61c245a]{flex:1;overflow-y:auto;padding:var(--space-3) var(--sb-inset);min-height:0}.sessions[data-v-b61c245a]::-webkit-scrollbar{width:4px}.sessions[data-v-b61c245a]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-b61c245a]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:var(--radius-full)}.sessions[data-v-b61c245a]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-b61c245a]{flex:none;padding:var(--space-2) var(--sb-inset);border-top:1px solid var(--line)}.btn-settings[data-v-b61c245a]{display:flex;align-items:center;gap:12px;width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-settings[data-v-b61c245a]:hover{background:var(--sb-hover)}.btn-settings[data-v-b61c245a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-settings svg[data-v-b61c245a]{flex:none}.btn-settings span[data-v-b61c245a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-label[data-v-b61c245a]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-regular);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-b61c245a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-toggle[data-v-b61c245a]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-b61c245a],.side-section-label:focus-within .side-section-toggle[data-v-b61c245a]{opacity:1}.side-section-toggle[data-v-b61c245a]:hover{color:var(--dim)}.side-section-toggle svg[data-v-b61c245a]{width:13px;height:13px}.side-section-actions[data-v-b61c245a]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-b61c245a]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-b61c245a]{box-shadow:inset 0 -2px 0 var(--color-accent)}.empty[data-v-b61c245a]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-b61c245a],.gh-menu[data-v-b61c245a],.section-menu[data-v-b61c245a]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.section-menu-check[data-v-b61c245a]{display:inline-flex;flex:none;width:14px}.section-menu-label[data-v-b61c245a]{padding:var(--space-2) var(--space-3) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ws-dir[data-v-b61c245a]{display:block;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);cursor:pointer;position:relative;user-select:none}.ws-dir[data-v-b61c245a]:hover{background:var(--sb-hover, var(--color-hover))}.ws-dir.on[data-v-b61c245a]{background:var(--color-selected)}.ws-dir+.ws-dir[data-v-b61c245a]{margin-top:var(--space-05)}.ws-dir-row[data-v-b61c245a]{display:flex;align-items:center;gap:var(--sb-gap);min-width:0;position:relative}.ws-dir-icon[data-v-b61c245a]{flex:none;color:var(--color-text-muted)}.ws-dir-name[data-v-b61c245a]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-rename[data-v-b61c245a]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-sm);padding:2px 5px;outline:none}.ws-dir-sub[data-v-b61c245a]{margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-act[data-v-b61c245a]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.ws-dir:hover .ws-dir-act[data-v-b61c245a],.ws-dir:focus-within .ws-dir-act[data-v-b61c245a],.ws-dir-act.open[data-v-b61c245a]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh[data-v-b61c245a]{display:flex;align-items:center;gap:var(--sb-gap);padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);user-select:none;position:relative;cursor:pointer}.done-gh[data-v-b61c245a]:hover{background:var(--sb-hover, var(--color-hover))}.done-gh-folder[data-v-b61c245a]{flex:none;color:var(--color-text-muted)}.done-gh-name[data-v-b61c245a]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.done-gh-count[data-v-b61c245a]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.done-gh-more[data-v-b61c245a]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh:hover .done-gh-more[data-v-b61c245a],.done-gh:focus-within .done-gh-more[data-v-b61c245a],.done-gh-more.open[data-v-b61c245a]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh:hover .done-gh-count[data-v-b61c245a],.done-gh:focus-within .done-gh-count[data-v-b61c245a]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh-sessions[data-v-b61c245a]{padding-bottom:var(--space-1)}.folder-drop-overlay[data-v-b61c245a]{position:absolute;inset:0;z-index:var(--z-dropdown);display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-b61c245a]{opacity:1;visibility:visible}.folder-drop-card[data-v-b61c245a]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:1px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-b61c245a]{flex:none}.folder-drop-card span[data-v-b61c245a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-button[data-v-738fde35]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:1px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-738fde35]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-738fde35]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-738fde35]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-738fde35]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-738fde35]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-738fde35]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-738fde35]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-738fde35] svg{flex:none}.ui-button__content[data-v-738fde35] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-738fde35]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-738fde35]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-738fde35]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-738fde35]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ui-button--ghost[data-v-738fde35]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-738fde35]:not(:disabled):hover{background:var(--color-surface-sunken);color:var(--color-text)}.ui-button--danger[data-v-738fde35]{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-738fde35]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-738fde35]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-738fde35]:not(:disabled):hover{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-738fde35]{opacity:.7}.ui-button .ui-button__spinner[data-v-738fde35]{flex:none;color:inherit}.ui-button__spinner[data-v-738fde35] .ui-spinner__track{opacity:.35}.ui-check[data-v-7344a446]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-7344a446]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-7344a446]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-7344a446]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:1.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-7344a446]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-7344a446]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-7344a446]{width:12px;height:12px}.ui-check__label[data-v-7344a446]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ui-empty[data-v-9dd6e8c0]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-9dd6e8c0]{color:var(--color-text-faint)}.ui-empty__icon[data-v-9dd6e8c0] svg{width:48px;height:48px}.ui-empty__title[data-v-9dd6e8c0]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-9dd6e8c0]{font-size:var(--text-sm);color:var(--color-text-muted)}.filter-select[data-v-6bf585f9]{position:relative;min-width:0}.filter-select__trigger[data-v-6bf585f9]{min-height:32px;display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.filter-select__trigger[data-v-6bf585f9]:hover{background:var(--color-hover)}.filter-select__trigger[data-v-6bf585f9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.filter-select__label[data-v-6bf585f9]{color:var(--color-text-muted)}.filter-select__value[data-v-6bf585f9]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filter-select__menu[data-v-6bf585f9]{position:absolute;top:calc(100% + var(--space-1));right:0;z-index:var(--z-dropdown)}.filter-select__check[data-v-6bf585f9]{width:16px;flex:none}.sa-dot[data-v-6bf585f9]{flex:none;width:8px;height:8px;border-radius:var(--radius-full)}.sa-dot--open[data-v-6bf585f9]{background:var(--color-success)}.sa-dot--done[data-v-6bf585f9]{background:var(--color-done)}.multi-select[data-v-887f9b9a]{position:relative;min-width:0}.multi-select__trigger[data-v-887f9b9a]{min-height:32px;max-width:320px;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.multi-select__trigger[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__trigger[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__placeholder[data-v-887f9b9a]{padding:0 var(--space-1);color:var(--color-text-muted)}.multi-select__tag[data-v-887f9b9a]{min-width:0;display:inline-flex;align-items:center;gap:var(--space-1);padding:2px 6px;border-radius:var(--radius-full);background:var(--color-surface-sunken)}.multi-select__tag>span[data-v-887f9b9a]:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__remove[data-v-887f9b9a]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:var(--radius-full)}.multi-select__remove[data-v-887f9b9a]{padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.multi-select__remove[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__more[data-v-887f9b9a]{color:var(--color-text-muted)}.multi-select__menu[data-v-887f9b9a]{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:var(--z-dropdown);width:min(320px,calc(100vw - var(--space-4)))}.multi-select__search[data-v-887f9b9a]{padding:var(--space-1)}.multi-select__separator[data-v-887f9b9a]{height:1px;margin:var(--space-1) 0;background:var(--color-line)}.multi-select__options[data-v-887f9b9a]{max-height:240px;overflow:auto}.multi-select__option[data-v-887f9b9a]{min-height:32px;display:flex;align-items:center;gap:var(--space-2);padding:6px 10px;border-radius:var(--radius-sm);color:var(--color-text);font-size:var(--text-base);cursor:pointer}.multi-select__option[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__option.active[data-v-887f9b9a]{background:var(--color-selected)}.multi-select__name[data-v-887f9b9a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__empty[data-v-887f9b9a]{padding:var(--space-3);color:var(--color-text-muted);text-align:center}.session-admin[data-v-264fe89e]{grid-column:3 / -1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text)}.session-admin__header[data-v-264fe89e]{min-height:var(--panel-head-h);display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-4);border-bottom:.5px solid var(--color-line)}.session-admin__header h1[data-v-264fe89e]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium)}.session-admin__header p[data-v-264fe89e]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__body[data-v-264fe89e]{width:min(100%,var(--p-table-max));min-height:0;margin:0 auto;padding:var(--space-5);overflow:auto}.session-admin__filters[data-v-264fe89e]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-4)}.session-admin__query[data-v-264fe89e]{width:min(260px,100%)}.session-admin__batch[data-v-264fe89e]{min-height:44px;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-bottom:0;border-radius:var(--radius-md) var(--radius-md) 0 0;background:var(--color-surface);font-size:var(--text-sm)}.session-admin__table-wrap[data-v-264fe89e]{min-width:0;overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.session-admin__batch+.session-admin__table-wrap[data-v-264fe89e]{border-radius:0 0 var(--radius-md) var(--radius-md)}.session-admin__table[data-v-264fe89e]{width:100%;border-collapse:collapse;font-size:var(--text-sm)}.session-admin__table th[data-v-264fe89e],.session-admin__table td[data-v-264fe89e]{padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line);text-align:left;vertical-align:middle}.session-admin__table th[data-v-264fe89e]{background:var(--color-surface);color:var(--color-text-muted);font-weight:var(--weight-medium);white-space:nowrap}.session-admin__table tbody tr[data-v-264fe89e]:hover{background:var(--color-hover)}.session-admin__table tbody tr:last-child td[data-v-264fe89e]{border-bottom:0}.session-admin__check[data-v-264fe89e]{width:32px}.session-admin__back-icon[data-v-264fe89e]{transform:rotate(180deg)}.session-admin__status[data-v-264fe89e]{display:inline-flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__status.done[data-v-264fe89e]{color:var(--color-success)}.session-admin__title[data-v-264fe89e],.session-admin__prompt[data-v-264fe89e]{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-admin__title-button[data-v-264fe89e]{max-width:100%;overflow:hidden;border:0;background:transparent;color:inherit;font:inherit;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.session-admin__title-button[data-v-264fe89e]:hover{text-decoration:underline;text-underline-offset:3px}.session-admin__title-button[data-v-264fe89e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.session-admin__rename[data-v-264fe89e]{width:100%;min-width:140px;border:1px solid var(--color-accent);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text);font:inherit}.session-admin__actions[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__updated[data-v-264fe89e]{white-space:nowrap;color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs)}.session-admin__state[data-v-264fe89e]{min-height:220px;display:grid;place-items:center}.session-admin__sr-only[data-v-264fe89e]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.session-admin__pager[data-v-264fe89e]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding-top:var(--space-3);color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__pager>div[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-2)}@media(max-width:640px){.session-admin[data-v-264fe89e]{grid-column:1}.session-admin__body[data-v-264fe89e],.session-admin__header[data-v-264fe89e]{padding:var(--space-3)}}.rh[data-v-3b8c5b6c]{width:4px;flex:none;cursor:col-resize;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-3b8c5b6c]{position:absolute;inset:0;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-3b8c5b6c],.rh.dragging .rh-bar[data-v-3b8c5b6c]{background:var(--color-accent)}.kw-dot[data-v-0c65e524]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-0c65e524]{background:var(--color-success)}.kw-dot--error[data-v-0c65e524]{background:var(--color-danger)}.kw-dot--suspended[data-v-0c65e524]{background:var(--color-warning)}.kw-dot--running[data-v-0c65e524]{background:var(--color-accent);animation:kw-dot-pulse-0c65e524 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-0c65e524{0%{box-shadow:0 0 color-mix(in srgb,var(--color-accent) 40%,transparent)}to{box-shadow:0 0 0 6px transparent}}.box[data-v-afffc498]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.box.err[data-v-afffc498]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.box.stacked[data-v-afffc498]{border:none;border-radius:0}.box.stacked .bh[data-v-afffc498]{border-radius:0}.box.stack-middle[data-v-afffc498],.box.stack-last[data-v-afffc498]{border-top:1px solid var(--color-line)}.bh[data-v-afffc498]{display:flex;align-items:center;gap:8px;min-height:30px;padding:0 11px;cursor:pointer;font:var(--text-sm) var(--font-mono);color:var(--color-text)}.box.open .bh[data-v-afffc498],.bh[data-v-afffc498]:hover{background:var(--color-surface-sunken)}.box.err .bh[data-v-afffc498]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.box.err .bh[data-v-afffc498]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.gl[data-v-afffc498]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.bh-text[data-v-afffc498]{display:flex;align-items:baseline;gap:inherit;flex:1;min-width:0}.a[data-v-afffc498]{color:var(--color-text);font-weight:var(--weight-medium);flex:none}.p[data-v-afffc498]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-afffc498]{margin-left:auto;color:var(--color-text-muted);font-size:var(--text-xs);display:flex;align-items:center;gap:6px;flex:none}.tm[data-v-afffc498]{color:var(--color-text-faint)}.chip[data-v-afffc498-s]{color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);flex:none}.status[data-v-afffc498]{display:inline-flex;align-items:center;flex:none}.status.ok[data-v-afffc498]{color:var(--color-success)}.status.error[data-v-afffc498]{color:var(--color-danger)}.bb[data-v-afffc498]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.bb.open[data-v-afffc498]{grid-template-rows:minmax(0,1fr)}.bb-pad[data-v-afffc498]{min-height:0;overflow:hidden;padding:var(--space-2) var(--space-3) var(--space-3);background:var(--color-surface-sunken);border-top:1px solid var(--color-line);color:var(--color-text);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.box.mob[data-v-afffc498]{margin:0}.at-open[data-v-648f4e11]{flex:none;background:none;border:1px solid var(--color-line);border-radius:var(--radius-xs);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);padding:1px 7px;cursor:pointer}.at-open[data-v-648f4e11]:hover{color:var(--color-text);background:var(--color-surface-sunken)}.at-type[data-v-648f4e11]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-bottom:6px}.at-task[data-v-648f4e11]{color:var(--color-text);white-space:pre-wrap;word-break:break-word}.at-task+.bb-code[data-v-648f4e11]{margin-top:10px}.bb-code[data-v-648f4e11]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md)}.chip[data-v-53896919]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.au-dismissed[data-v-53896919]{color:var(--color-text-muted);font:italic var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-list[data-v-53896919]{display:flex;flex-direction:column;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-block[data-v-53896919]{padding:4px 0}.au-block+.au-block[data-v-53896919]{margin-top:4px;padding-top:10px;border-top:1px dashed var(--color-line)}.au-q[data-v-53896919]{display:flex;align-items:baseline;gap:8px;margin-bottom:6px}.au-hdr[data-v-53896919]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:0 6px;flex:none}.au-qtext[data-v-53896919]{color:var(--color-text);font-weight:var(--weight-medium)}.au-opts[data-v-53896919]{display:flex;flex-direction:column;gap:4px}.au-opt[data-v-53896919]{display:flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid var(--color-line);border-radius:var(--radius-md);color:var(--color-text-faint)}.au-opt.sel[data-v-53896919]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.au-glyph[data-v-53896919]{font:var(--text-base) var(--font-mono);color:var(--color-text-faint);width:14px;text-align:center;flex:none}.au-opt.sel .au-glyph[data-v-53896919]{color:var(--color-accent-hover)}.au-label[data-v-53896919]{color:inherit}.au-desc[data-v-53896919]{color:var(--color-text-faint);font-size:var(--text-xs);margin-left:2px}.au-opt.sel .au-desc[data-v-53896919]{color:var(--color-text-muted)}.au-raw[data-v-53896919]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.tool-output-block[data-v-262bbea0]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised)}.tool-output-block.scroll[data-v-262bbea0]{max-height:calc(var(--tool-output-visible-lines) * 1lh);overflow-y:auto;scrollbar-gutter:stable}.bb-empty[data-v-262bbea0]{color:var(--color-text-muted);font-style:italic}.bash-command[data-v-7768b9f1]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);white-space:pre-wrap}.diff-lines[data-v-f456050c]{padding:4px 0 12px;font-size:var(--ui-font-size);line-height:1.5;-webkit-overflow-scrolling:touch;width:max-content;min-width:100%}.dl[data-v-f456050c]{display:flex;align-items:flex-start;min-height:18px;white-space:pre;width:100%}.dl-gutter[data-v-f456050c]{flex:none;width:40px;padding:0 6px;text-align:right;color:var(--faint, #aeb4bc);background:var(--panel, #fafbfc);user-select:none;border-right:1px solid var(--line2, #eef1f4);font-variant-numeric:tabular-nums}.dl-gutter.new[data-v-f456050c]{border-right:1px solid var(--line, #e7eaee)}.dl-sign[data-v-f456050c]{flex:none;width:16px;text-align:center;color:var(--muted);user-select:none}.dl-text[data-v-f456050c]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.dl-add[data-v-f456050c]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.dl-add .dl-sign[data-v-f456050c]{color:var(--color-success)}.dl-del[data-v-f456050c]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.dl-del .dl-sign[data-v-f456050c]{color:var(--color-danger)}.dl-hunk[data-v-f456050c]{background:var(--panel2, #f3f5f8)}.dl-hunk .hunk-text[data-v-f456050c]{flex:1;padding:1px 12px;color:var(--muted, #8b929b);font-style:normal}@media(max-width:640px){.diff-lines[data-v-f456050c]{overflow-x:auto;font-size:var(--ui-font-size)}}.tl-name[data-v-85689153]{color:var(--color-text);font-weight:var(--weight-medium);flex:none}.tl-file[data-v-85689153]{color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-file[data-v-85689153]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-85689153]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-85689153]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-85689153]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-add[data-v-85689153]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-del[data-v-85689153]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.diffbar[data-v-85689153]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-85689153]{background:var(--color-success)}.seg-del[data-v-85689153]{background:var(--color-danger)}.diff-wrap[data-v-85689153]{margin-top:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);overflow-x:auto}.bb-summary[data-v-26ca25c1]{color:var(--color-text);border-bottom:1px dashed var(--color-line);padding-bottom:6px;margin-bottom:6px;word-break:break-all}.chip[data-v-26ca25c1]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.file-list[data-v-6193bdd4]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-6193bdd4]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-6193bdd4]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-6193bdd4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill[data-v-967c8271]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-pill.pill-active[data-v-967c8271]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-967c8271]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-967c8271]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-budget[data-v-967c8271]{color:var(--color-text-muted)}.match-list[data-v-2e67b1f9]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-2e67b1f9]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-2e67b1f9]{cursor:pointer}.match-row.link[data-v-2e67b1f9]:hover{background:var(--color-hover)}.match-row[data-v-2e67b1f9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-2e67b1f9]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-2e67b1f9]{color:var(--color-accent)}.mtext[data-v-2e67b1f9]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-tool[data-v-25ffa7b7]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-25ffa7b7]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-25ffa7b7]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-video-button[data-v-25ffa7b7]{position:relative;display:block}.media-video-tile[data-v-25ffa7b7]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-25ffa7b7]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-image[data-v-25ffa7b7]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-audio[data-v-25ffa7b7]{max-width:100%;border-radius:var(--radius-md)}.dynamic-workflow-card[data-v-83b861be]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.dynamic-workflow-card.err[data-v-83b861be]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.head[data-v-83b861be]{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:0 11px;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.head[data-v-83b861be]:hover,.dynamic-workflow-card.open>.head[data-v-83b861be]{background:var(--color-surface-sunken);color:var(--color-text)}.dynamic-workflow-card.err>.head[data-v-83b861be]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.dynamic-workflow-card.err>.head[data-v-83b861be]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.head[data-v-83b861be]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-83b861be]{color:var(--color-text-faint);flex:none}.title[data-v-83b861be]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-83b861be]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-83b861be]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-83b861be]{margin-left:auto;display:flex;align-items:center;gap:8px;flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-83b861be]{display:inline-flex;align-items:center;flex:none}.status[data-v-83b861be]:has(>svg){color:var(--color-success)}.err .status[data-v-83b861be]:has(>svg){color:var(--color-danger)}.chip[data-v-83b861be]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-83b861be]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-83b861be]{margin-left:2px;color:var(--color-text-faint);flex:none}.body[data-v-83b861be]{border-top:1px solid var(--color-line);background:var(--color-surface-sunken)}.overview[data-v-83b861be]{padding:9px 11px 8px;border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.overview-line[data-v-83b861be]{display:flex;align-items:baseline;gap:8px}.big[data-v-83b861be]{font-family:var(--font-mono);font-weight:var(--weight-medium);color:var(--color-text);font-size:15px}.lbl[data-v-83b861be]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-83b861be]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:8px 0 4px;gap:2px}.seg>span[data-v-83b861be]{height:100%;border-radius:var(--radius-full);min-width:3px}.s-ok[data-v-83b861be]{background:var(--color-success)}.s-run[data-v-83b861be]{background:var(--color-accent)}.s-warn[data-v-83b861be]{background:var(--color-warning)}.s-fail[data-v-83b861be]{background:var(--color-danger)}.s-queue[data-v-83b861be]{background:var(--color-line)}.legend[data-v-83b861be]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-83b861be]{display:inline-flex;align-items:center;gap:5px;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.lg-dot[data-v-83b861be]{width:6px;height:6px;border-radius:var(--radius-full)}.member[data-v-83b861be]{position:relative;border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.member-saved[data-v-83b861be]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);cursor:pointer}.member-saved[data-v-83b861be]:hover{background:var(--color-hover);color:var(--color-text-muted)}.member-saved[data-v-83b861be]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-saved-car[data-v-83b861be]{color:var(--color-text-faint)}.member[data-v-83b861be]:last-child{border-bottom:none}.member-head[data-v-83b861be]{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:0 11px;border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-83b861be]:hover,.member.open .member-head[data-v-83b861be]{background:color-mix(in srgb,var(--color-surface) 55%,var(--bg))}.member-head[data-v-83b861be]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.row-dot[data-v-83b861be]{flex:none}.mname[data-v-83b861be]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-83b861be]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mphase[data-v-83b861be]{flex:none;margin-left:auto;font:var(--text-xs) var(--font-mono);color:var(--color-text-faint)}.phase-completed .mphase[data-v-83b861be]{color:var(--color-success)}.phase-failed .mphase[data-v-83b861be]{color:var(--color-danger)}.phase-working .mphase[data-v-83b861be]{color:var(--color-accent)}.phase-suspended .mphase[data-v-83b861be]{color:var(--color-warning)}.mcar[data-v-83b861be]{margin-left:4px;color:var(--color-text-faint);flex:none}.member-body[data-v-83b861be]{padding:4px 11px 10px 31px;color:var(--color-text-muted);font-size:var(--text-xs);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-83b861be]{padding:6px 11px 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-83b861be]{padding:9px 11px 10px;color:var(--color-text);font:var(--text-xs)/1.6 var(--font-mono);white-space:pre-wrap;word-break:break-word}.plan-review[data-v-2ff075e5]{color:var(--color-text-muted)}.plan-md[data-v-2ff075e5]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-path[data-v-2ff075e5]{display:grid;gap:var(--space-1);width:100%;margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text-muted);font:inherit;text-align:left;cursor:pointer}.plan-path[data-v-2ff075e5]:hover{background:var(--color-hover)}.plan-path[data-v-2ff075e5]:focus-visible{outline:var(--p-focus-ring)}.plan-path-value[data-v-2ff075e5]{color:var(--color-accent);word-break:break-all}.plan-option[data-v-2ff075e5]{display:grid;gap:var(--space-1);margin-top:var(--space-2)}.plan-option[data-v-2ff075e5]>:first-child{color:var(--color-text-muted)}.tl-name[data-v-5312d698]{color:var(--color-text);font-weight:var(--weight-medium);flex:none}.tl-file[data-v-5312d698]{color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-file[data-v-5312d698]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-5312d698]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-5312d698]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-5312d698]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.path-link[data-v-5312d698]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-5312d698]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-5312d698]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.read-line[data-v-5312d698]{display:flex;font-size:var(--text-xs)}.read-no[data-v-5312d698]{flex:none;min-width:4ch;padding-right:var(--space-2);text-align:right;color:var(--color-text-faint);font-variant-numeric:tabular-nums;user-select:none}.read-text[data-v-5312d698]{min-width:0;white-space:pre-wrap;word-break:break-word}.todo-bar[data-v-d7e35d4e]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-d7e35d4e]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-d7e35d4e]{display:grid;gap:var(--space-2)}.todo-row[data-v-d7e35d4e]{display:flex;align-items:center;gap:var(--space-2)}.todo-status[data-v-d7e35d4e]{display:inline-flex;color:var(--color-text-muted)}.todo-row[data-status=done][data-v-d7e35d4e]{color:var(--color-text-muted);text-decoration:line-through}.todo-row[data-status=done] .todo-status[data-v-d7e35d4e]{color:var(--color-success)}.todo-row[data-status=in_progress] .todo-status[data-v-d7e35d4e]{color:var(--color-accent)}.wf-glance[data-v-333157a5]{margin-bottom:var(--space-1)}.wf-main[data-v-333157a5]{color:var(--color-text);font-size:var(--text-sm);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-sub[data-v-333157a5]{color:var(--color-text-muted);font-size:var(--text-xs);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-status.success[data-v-333157a5]{color:var(--color-success)}.wf-status.danger[data-v-333157a5]{color:var(--color-danger)}.wf-status.warning[data-v-333157a5]{color:var(--color-warning)}.think[data-v-fa12650e]{margin:0}.tc-wrap[data-v-fa12650e]{display:grid;grid-template-rows:1fr 0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out);cursor:pointer}.tc-wrap.is-collapsed[data-v-fa12650e]{grid-template-rows:0fr 1fr}.tc-anim[data-v-fa12650e],.prev-anim[data-v-fa12650e]{overflow:hidden;min-height:0}.tc-wrap.is-collapsed:hover .prev[data-v-fa12650e]{color:var(--color-text)}.tc-wrap:not(.is-collapsed):hover .tc[data-v-fa12650e]{color:var(--color-text-muted)}.prev[data-v-fa12650e]{color:var(--color-text-faint);font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:425;white-space:pre-wrap;word-break:break-word;display:block}.tc[data-v-fa12650e]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:425;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;max-height:calc(var(--leading-relaxed) * 1em * 5);overflow-y:auto}.mob[data-v-fa12650e]{margin:0}.mob .tc[data-v-fa12650e]{color:var(--color-text-faint);line-height:var(--leading-normal);max-height:calc(var(--leading-normal) * 1em * 5)}.mob .prev[data-v-fa12650e]{color:var(--color-text-faint);line-height:var(--leading-normal)}.activity-run[data-v-337047d1]{display:flex;flex-direction:column;animation:pythinker-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-337047d1]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-337047d1]:hover{color:var(--color-text)}.ar-head[data-v-337047d1]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-337047d1]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-337047d1]{color:var(--color-success)}.ar-glyph.err[data-v-337047d1]{color:var(--color-danger)}.ar-glyph.run[data-v-337047d1]{color:var(--color-text-muted);animation:ar-breathe-337047d1 1.6s var(--ease-in-out) infinite}@keyframes ar-breathe-337047d1{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-337047d1]{animation:none}}.ar-sum[data-v-337047d1]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-car[data-v-337047d1]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-337047d1]{transform:rotate(90deg)}.ar-body[data-v-337047d1]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-337047d1]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-337047d1]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.ar-sep[data-v-337047d1],.ar-faint[data-v-337047d1]{color:var(--color-text-faint)}.ar-danger[data-v-337047d1]{color:var(--color-danger)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: hsl(var(--ms-muted));--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid var(--code-bg);color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-a7e90764]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-a7e90764]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-a7e90764]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-a7e90764]{animation-name:text-node-stream-update-fade-a-a7e90764}.text-node-stream-delta--b[data-v-a7e90764]{animation-name:text-node-stream-update-fade-b-a7e90764}@keyframes text-node-stream-update-fade-a-a7e90764{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-a7e90764{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-a7e90764]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-72200115]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-72200115]{transition:none}.code-editor-layer[data-v-72200115]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-72200115]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-72200115]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-72200115]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-72200115]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-72200115]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-72200115]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-72200115]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-72200115]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:transparent;color:var(--vscode-editor-foreground, inherit);backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-72200115] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-72200115]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-72200115]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-72200115]{background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-72200115]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-72200115]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-72200115]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-72200115]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-72200115],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-72200115]{animation:none}@keyframes code-skeleton-shimmer-72200115{0%{background-position:100% 0}to{background-position:0 0}}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-72200115] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-72200115] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-72200115] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-72200115] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-72200115] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-72200115] .markstream-inline-fold-proxy:hover,[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-0aff75e3]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-0aff75e3]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-0aff75e3]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-0aff75e3]{background:transparent}.mermaid-mode-btn[data-v-0aff75e3]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-0aff75e3]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-0aff75e3]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-0aff75e3]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-0aff75e3]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-0aff75e3]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-0aff75e3]:active{transform:scale(.98)}.mermaid-source-panel[data-v-0aff75e3]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-0aff75e3]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-0aff75e3]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-0aff75e3]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-0aff75e3]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-0aff75e3]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-0aff75e3] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-0aff75e3] svg{width:100%;height:auto;display:block}.fullscreen[data-v-0aff75e3]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-0aff75e3],.mermaid-dialog-leave-to[data-v-0aff75e3]{opacity:0}.mermaid-dialog-enter-active[data-v-0aff75e3],.mermaid-dialog-leave-active[data-v-0aff75e3]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-to .dialog-panel[data-v-0aff75e3]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-from .dialog-panel[data-v-0aff75e3]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-active .dialog-panel[data-v-0aff75e3]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-9fc85391]{font:400 15px/1.6 var(--font-ui);color:var(--color-text);word-break:break-word}.md[data-v-9fc85391] .markdown-renderer{font:400 15px/1.6 var(--font-ui);color:var(--color-text)}.md[data-v-9fc85391] .markstream-vue,.md[data-v-9fc85391] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-surface-sunken);--inline-code-fg: var(--color-fg);--inline-code-border: transparent}.md[data-v-9fc85391] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-9fc85391] .md-file-link:hover{color:var(--color-accent)}.md[data-v-9fc85391] .markdown-renderer p,.md[data-v-9fc85391] .markdown-renderer li,.md[data-v-9fc85391] .markdown-renderer blockquote,.md[data-v-9fc85391] .markdown-renderer td,.md[data-v-9fc85391] .markdown-renderer th{font-size:var(--content-font-size)}.md[data-v-9fc85391] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-9fc85391] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-9fc85391] h1,.md[data-v-9fc85391] h2,.md[data-v-9fc85391] h3,.md[data-v-9fc85391] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em;line-height:var(--leading-tight)}.md[data-v-9fc85391] h1{font-size:max(var(--text-xl),calc(var(--content-font-size) + 3px));border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-9fc85391] h2{font-size:max(var(--text-lg),calc(var(--content-font-size) + 2px))}.md[data-v-9fc85391] h3{font-size:max(var(--text-lg),calc(var(--content-font-size) + 1px))}.md[data-v-9fc85391] h4{font-size:max(var(--text-base),calc(var(--content-font-size) + 1px));color:var(--color-text-muted)}.md[data-v-9fc85391] p{margin:.8rem 0}.md[data-v-9fc85391] .node-slot+.node-slot{margin-top:.8rem}.md[data-v-9fc85391] ul,.md[data-v-9fc85391] ol{padding-left:1.4em;margin:.6em 0}.md[data-v-9fc85391] li{margin:.3em 0}.md[data-v-9fc85391] :not(pre)>code,.md[data-v-9fc85391] .inline-code{font:.9em var(--font-mono);background:var(--color-surface-sunken);color:var(--color-fg);padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-9fc85391] strong code,.md[data-v-9fc85391] strong .inline-code,.md[data-v-9fc85391] b code,.md[data-v-9fc85391] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-9fc85391] .code-block-container{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-9fc85391] .code-block-header{background:var(--color-surface);border-bottom:1px solid var(--color-line);padding:4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-9fc85391] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-9fc85391] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-9fc85391] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-9fc85391] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-9fc85391] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-9fc85391] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-9fc85391] .code-block-shell-content,.md[data-v-9fc85391] .markstream-pre{background:var(--color-surface-sunken)}.md[data-v-9fc85391] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-9fc85391] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-9fc85391] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-9fc85391] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-9fc85391] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-9fc85391] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-9fc85391] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-9fc85391] .markstream-pre,.md[data-v-9fc85391] .code-pre-fallback,.md[data-v-9fc85391] .code-block-shell-content pre:not(.shiki),.md[data-v-9fc85391] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-9fc85391] a{color:var(--color-accent);text-decoration:none}.md[data-v-9fc85391] a:hover{text-decoration:underline}.md[data-v-9fc85391] a.mention-pill{color:var(--color-text-muted);text-decoration:none}.md[data-v-9fc85391] a.mention-folder:hover{text-decoration:none}.md[data-v-9fc85391] .math-inline{vertical-align:baseline}.md-frontmatter[data-v-9fc85391]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-9fc85391] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-9fc85391] blockquote{margin:.5em 0;padding:4px 12px;border-left:1px solid var(--color-line);color:var(--color-text-muted)}.md[data-v-9fc85391] hr{border:none;border-top:1px solid var(--color-line);margin:.8em 0}.md[data-v-9fc85391] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-9fc85391] table:not(.table-node) th,.md[data-v-9fc85391] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-9fc85391] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-9fc85391] .table-node-wrapper{--table-cell-cap: var(--p-table-cell-max);--md-table-fade-bg: linear-gradient( to right, transparent, color-mix(in srgb, var(--color-bg) 65%, transparent) 55%, var(--color-bg) );width:100%;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative}.md[data-v-9fc85391] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-9fc85391] .table-node th,.md[data-v-9fc85391] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-9fc85391] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-9fc85391] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;background:var(--md-table-fade-bg);pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-9fc85391] .md-table-fade.md-table-toggle--show{display:block}.md[data-v-9fc85391] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-9fc85391] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-9fc85391] .md-table-toggle.md-table-toggle--show{display:inline-flex}.md[data-v-9fc85391] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-9fc85391] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-9fc85391] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-9fc85391] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-9fc85391] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-9fc85391] .md-table-toggle svg{display:block}.md[data-v-9fc85391] .table-node tbody tr:hover{background-color:transparent!important}.diff-wrap[data-v-9fc85391]{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-9fc85391]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-9fc85391]{margin-right:auto}.diff-copy[data-v-9fc85391]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-9fc85391]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-9fc85391]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-9fc85391]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-9fc85391]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-9fc85391]{display:block;width:100%;padding:0 14px}.diff-sign[data-v-9fc85391]{display:inline-block;width:14px;text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-9fc85391]{color:var(--color-text)}.diff-add[data-v-9fc85391]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-9fc85391]{color:var(--color-success)}.diff-del[data-v-9fc85391]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-9fc85391]{color:var(--color-danger)}.diff-hunk[data-v-9fc85391]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-9fc85391]{color:var(--color-text-muted)}.md[data-v-9fc85391],.md .markdown-renderer[data-v-9fc85391]{font-family:var(--sans)}.md .code-block-container[data-v-9fc85391],.md .diff-wrap[data-v-9fc85391]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-9fc85391],.md .inline-code[data-v-9fc85391]{border-radius:var(--radius-sm)}.activity-notice[data-v-5e7a6420]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.msg-time[data-v-6761370d]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;white-space:nowrap}.msg-time[data-v-6761370d]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.cn[data-v-d3807b0f]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-bubble[data-v-d3807b0f]{box-sizing:border-box;max-width:100%;padding:8px 14px;background:var(--color-accent-soft);border:1px solid var(--color-accent-bd);border-radius:var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl);box-shadow:var(--shadow-xs);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-title[data-v-d3807b0f]{font-weight:var(--weight-medium)}.cn-meta[data-v-d3807b0f]{display:flex;align-items:center;gap:6px;margin-top:4px;padding:0 4px;color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}.cn-meta-ico[data-v-d3807b0f]{flex:none;color:var(--color-text-faint)}.cn-meta-item[data-v-d3807b0f]{white-space:nowrap}.cn-status[data-v-d3807b0f]{display:inline-flex;align-items:center}.cn-status.ok[data-v-d3807b0f]{color:var(--color-success)}.cn-status.error[data-v-d3807b0f]{color:var(--color-danger)}.media-thumb[data-v-b4904b11]{position:relative;flex:none;display:inline-flex}.media-thumb-btn[data-v-b4904b11]{display:block;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:hidden;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out)}.media-thumb-btn[data-v-b4904b11]:hover{border-color:var(--color-line-strong)}.media-thumb-btn[data-v-b4904b11]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.media-thumb.is-error .media-thumb-btn[data-v-b4904b11]{border-color:var(--color-danger-bd)}.media-thumb-media[data-v-b4904b11]{display:block;width:var(--p-media-thumb-size);height:var(--p-media-thumb-size);object-fit:cover}.media-thumb-tile[data-v-b4904b11]{object-fit:none}.media-thumb-badge[data-v-b4904b11]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-thumb-badge.is-error[data-v-b4904b11]{color:var(--color-danger);border-color:var(--color-danger-bd)}.media-thumb-rm[data-v-b4904b11]{position:absolute;top:var(--space-1);right:var(--space-1);z-index:1;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:var(--color-scrim);color:var(--color-text-on-scrim);cursor:pointer}.media-thumb-rm[data-v-b4904b11]:hover{background:var(--color-text);color:var(--color-bg)}.media-thumb-rm[data-v-b4904b11]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-chip[data-v-fe5172dd]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px 5px;background:var(--color-bg);border:1px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-fe5172dd]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-fe5172dd]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-fe5172dd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-fe5172dd]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-fe5172dd] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-fe5172dd]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-fe5172dd]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-fe5172dd]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-fe5172dd]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-fe5172dd]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-fe5172dd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.turn-fold[data-v-4d4d6f2a]{display:flex;flex-direction:column}.tf-head[data-v-4d4d6f2a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-4d4d6f2a]:hover{color:var(--color-text)}.tf-head[data-v-4d4d6f2a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-4d4d6f2a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-4d4d6f2a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-4d4d6f2a]{transform:rotate(90deg)}.tf-body[data-v-4d4d6f2a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-4d4d6f2a]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-4d4d6f2a]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-4d4d6f2a],.tf-body-inner[data-v-4d4d6f2a]>.think,.tf-body-inner[data-v-4d4d6f2a]>.tool-group,.tf-body-inner[data-v-4d4d6f2a]>.agent-card,.tf-body-inner[data-v-4d4d6f2a]>.agent-group,.tf-body-inner[data-v-4d4d6f2a]>.box,.tf-body-inner[data-v-4d4d6f2a]>.dynamic-workflow-card,.tf-body-inner[data-v-4d4d6f2a]>.activity-run,.tf-body-inner[data-v-4d4d6f2a]>.media-tool{margin-top:var(--chat-block-gap)}.tf-body-inner .msg[data-v-4d4d6f2a]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-4d4d6f2a] p{margin:0}.tf-body-inner .msg[data-v-4d4d6f2a] p+p{margin-top:var(--space-2)}.ui-card[data-v-d2cab471]{background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-d2cab471]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-d2cab471]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:1px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-d2cab471]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-d2cab471]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:1px solid var(--color-line);background:var(--color-surface)}.turn-files[data-v-dbd50ff6]{margin-top:var(--chat-block-gap)}.turn-files[data-v-dbd50ff6] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-dbd50ff6] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-dbd50ff6] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-dbd50ff6]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-dbd50ff6]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-dbd50ff6]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-dbd50ff6],.tf-del[data-v-dbd50ff6]{font:var(--text-xs) var(--font-mono);flex:none}.tf-add[data-v-dbd50ff6]{color:var(--color-success)}.tf-del[data-v-dbd50ff6]{color:var(--color-danger)}.tf-list[data-v-dbd50ff6]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-dbd50ff6]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-dbd50ff6]{display:flex;align-items:baseline;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left;cursor:pointer}.tf-file[data-v-dbd50ff6]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-file[data-v-dbd50ff6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}span.tf-file[data-v-dbd50ff6]{cursor:default}span.tf-file[data-v-dbd50ff6]:hover{text-decoration:none}.tf-dir[data-v-dbd50ff6]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-dbd50ff6]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-dbd50ff6]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-dbd50ff6]:not(:disabled):active{transform:none}.tf-more-car[data-v-dbd50ff6]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-dbd50ff6]{transform:rotate(180deg)}.diffbar[data-v-dbd50ff6]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-dbd50ff6]{background:var(--color-success)}.seg-del[data-v-dbd50ff6]{background:var(--color-danger)}.working-indicator[data-v-496566b3]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.chat-empty[data-v-7bc1c6a8]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-7bc1c6a8]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-7bc1c6a8]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-7bc1c6a8]{font-size:var(--ui-font-size-sm)}.chat[data-v-7bc1c6a8]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-7bc1c6a8]{align-self:stretch}.open-unsupported[data-v-7bc1c6a8]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:1px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:2}.chat>.u-turn[data-v-7bc1c6a8],.chat>.a-msg[data-v-7bc1c6a8],.chat>.compact-divider[data-v-7bc1c6a8],.chat>.cron-notice[data-v-7bc1c6a8],.chat>.sending-placeholder[data-v-7bc1c6a8],.chat[data-v-7bc1c6a8]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-7bc1c6a8]{margin-top:10px}.chat>.u-turn[data-v-7bc1c6a8]:first-child,.chat>.a-msg[data-v-7bc1c6a8]:first-child,.chat>.compact-divider[data-v-7bc1c6a8]:first-child,.chat>.cron-notice[data-v-7bc1c6a8]:first-child,.chat>.sending-placeholder[data-v-7bc1c6a8]:first-child,.chat[data-v-7bc1c6a8]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-7bc1c6a8]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-7bc1c6a8]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-7bc1c6a8]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:2px;margin-right:4px}.u-meta .u-edit[data-v-7bc1c6a8]{min-height:22px;box-sizing:border-box}.u-text[data-v-7bc1c6a8]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-7bc1c6a8]{position:relative;display:flex;flex-direction:column}.u-text-wrap.is-clamped[data-v-7bc1c6a8]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-7bc1c6a8]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-7bc1c6a8]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font:var(--ui-font-size-sm)/1 var(--font-ui);cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-7bc1c6a8]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-7bc1c6a8]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-7bc1c6a8]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-7bc1c6a8]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-7bc1c6a8]{transform:rotate(180deg)}.u-edit[data-v-7bc1c6a8]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-7bc1c6a8]{display:block;flex:none}.u-edit[data-v-7bc1c6a8]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-copy[data-v-7bc1c6a8]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-7bc1c6a8]{display:block;flex:none}.u-copy[data-v-7bc1c6a8]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-7bc1c6a8]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-7bc1c6a8]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-7bc1c6a8]{margin-top:8px}.compact-divider[data-v-7bc1c6a8]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-7bc1c6a8]:first-child{margin-top:0}.cd-line[data-v-7bc1c6a8]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-7bc1c6a8]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-7bc1c6a8]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-7bc1c6a8]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-7bc1c6a8]{text-decoration:underline}.a-msg[data-v-7bc1c6a8]{align-self:flex-start;max-width:94%;width:94%}.turn-failed[data-v-7bc1c6a8]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--chat-turn-gap);padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-7bc1c6a8]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger);flex:none}.tf-main[data-v-7bc1c6a8]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-7bc1c6a8]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-7bc1c6a8]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.a-msg-ft[data-v-7bc1c6a8]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-duration[data-v-7bc1c6a8]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-7bc1c6a8]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-7bc1c6a8]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-7bc1c6a8]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-7bc1c6a8]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-7bc1c6a8]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-7bc1c6a8]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:500}.a-msg .msg[data-v-7bc1c6a8] p{margin:0}.a-msg .msg[data-v-7bc1c6a8] p+p{margin-top:8px}.a-msg>.msg[data-v-7bc1c6a8],.a-msg[data-v-7bc1c6a8]>.think,.a-msg[data-v-7bc1c6a8]>.tool-group,.a-msg[data-v-7bc1c6a8]>.agent-card,.a-msg[data-v-7bc1c6a8]>.agent-group,.a-msg[data-v-7bc1c6a8]>.box,.a-msg[data-v-7bc1c6a8]>.dynamic-workflow-card,.a-msg[data-v-7bc1c6a8]>.media-tool{margin-top:var(--chat-block-gap)}.a-msg[data-v-7bc1c6a8]>.turn-fold{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-7bc1c6a8]:first-child,.a-msg[data-v-7bc1c6a8]>.think:first-child,.a-msg[data-v-7bc1c6a8]>.tool-group:first-child,.a-msg[data-v-7bc1c6a8]>.agent-card:first-child,.a-msg[data-v-7bc1c6a8]>.agent-group:first-child,.a-msg[data-v-7bc1c6a8]>.box:first-child,.a-msg[data-v-7bc1c6a8]>.dynamic-workflow-card:first-child,.a-msg[data-v-7bc1c6a8]>.media-tool:first-child{margin-top:0}.a-msg[data-v-7bc1c6a8]>.turn-fold:first-child{margin-top:0}.a-msg[data-v-7bc1c6a8] code{font:.9em var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-7bc1c6a8] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-7bc1c6a8] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}.a-msg .msg[data-v-7bc1c6a8] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}}.u-atts[data-v-7bc1c6a8]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-7bc1c6a8]{align-self:flex-start;padding:10px 0}.skill-act[data-v-7bc1c6a8]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-7bc1c6a8]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-7bc1c6a8]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-7bc1c6a8]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.chat[data-v-7bc1c6a8]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-7bc1c6a8]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-7bc1c6a8]{width:100%;max-width:100%}.u-bub .u-text[data-v-7bc1c6a8],.a-msg .msg[data-v-7bc1c6a8]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-7bc1c6a8] .md,.a-msg[data-v-7bc1c6a8] .markdown-renderer,.a-msg[data-v-7bc1c6a8] .code-block-container,.a-msg[data-v-7bc1c6a8] .diff-wrap,.a-msg[data-v-7bc1c6a8] pre{max-width:100%}.a-msg[data-v-7bc1c6a8] .code-block-container pre,.a-msg[data-v-7bc1c6a8] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-7bc1c6a8] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-7bc1c6a8]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-7bc1c6a8]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-7bc1c6a8]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-7bc1c6a8],.chat-loading-text[data-v-7bc1c6a8]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-7bc1c6a8],.cd-btn[data-v-7bc1c6a8]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-7bc1c6a8]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px}.top-sentinel-loading[data-v-7bc1c6a8]{opacity:.8}.top-sentinel-btn[data-v-7bc1c6a8]{appearance:none;border:1px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-7bc1c6a8]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-7bc1c6a8]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-7bc1c6a8]{background:transparent}.chat[data-v-7bc1c6a8]{gap:0;padding:22px 20px 26px}.a-msg[data-v-7bc1c6a8]{max-width:100%;width:100%}.chat>.q-stack[data-v-7bc1c6a8]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-7bc1c6a8]:first-child{margin-top:0}.q-stack[data-v-7bc1c6a8]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-7bc1c6a8]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-7bc1c6a8]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-7bc1c6a8]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-hint[data-v-7bc1c6a8]{color:var(--color-text-faint)}.q-turn[data-v-7bc1c6a8]{position:relative}.q-bub[data-v-7bc1c6a8]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-surface-raised);border:1px dashed var(--color-accent-bd);padding:8px 8px 8px 6px;transition:border-color .12s ease,background .12s ease}.q-bub[data-v-7bc1c6a8]:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}.q-grip[data-v-7bc1c6a8]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-7bc1c6a8]:hover{opacity:1}.q-grip[data-v-7bc1c6a8]:active{cursor:grabbing}.q-body[data-v-7bc1c6a8]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-7bc1c6a8]{opacity:1}.q-body[data-v-7bc1c6a8]:disabled{cursor:default}.q-text[data-v-7bc1c6a8]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-7bc1c6a8]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-7bc1c6a8]{display:flex;gap:4px;flex:none}.q-img[data-v-7bc1c6a8]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid var(--color-line)}.q-file[data-v-7bc1c6a8]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:1px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-tag[data-v-7bc1c6a8]{flex:none;padding:1px 6px;border-radius:var(--radius-full);font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium);line-height:1.4;white-space:nowrap}.q-tag-next[data-v-7bc1c6a8]{color:var(--color-accent-hover);background:var(--color-accent-soft);border:1px solid var(--color-accent-bd)}.q-tag-idx[data-v-7bc1c6a8]{color:var(--color-text-faint);background:var(--color-surface-sunken);border:1px solid var(--color-line)}.q-rm[data-v-7bc1c6a8]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-7bc1c6a8],.q-bub:focus-within .q-rm[data-v-7bc1c6a8],.q-rm[data-v-7bc1c6a8]:focus-visible{opacity:1}.q-rm[data-v-7bc1c6a8]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-7bc1c6a8]{opacity:.45}.q-turn.drop-before[data-v-7bc1c6a8]:before,.q-turn.drop-after[data-v-7bc1c6a8]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-7bc1c6a8]:before{top:-5px}.q-turn.drop-after[data-v-7bc1c6a8]:after{bottom:-5px}.chat-header[data-v-a0c7719c]{flex:none;display:flex;align-items:center;gap:14px;height:48px;padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0}.chat-header.macos-desktop[data-v-a0c7719c]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-a0c7719c],.chat-header.macos-desktop input[data-v-a0c7719c]{-webkit-app-region:no-drag}.ch-id[data-v-a0c7719c]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-a0c7719c]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-a0c7719c]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-a0c7719c]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-a0c7719c]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.ch-git[data-v-a0c7719c]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-a0c7719c]{color:var(--color-text)}.ch-branch[data-v-a0c7719c]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-a0c7719c]{color:var(--muted);font-style:italic}.ch-pill[data-v-a0c7719c]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-a0c7719c]{border-color:var(--line)}.ch-diff-pill[data-v-a0c7719c]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line))}.ch-ahead[data-v-a0c7719c]{color:var(--color-warning);flex:none}.ch-behind[data-v-a0c7719c]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-a0c7719c]{color:var(--color-success);flex:none}.ch-del[data-v-a0c7719c]{color:var(--color-danger);flex:none}.ch-spacer[data-v-a0c7719c]{flex:1;min-width:0}.ch-act-more.open[data-v-a0c7719c]{background:var(--color-surface-sunken);color:var(--color-text)}.ch-pr[data-v-a0c7719c]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-a0c7719c]{flex:none}.ch-pr.pr-open[data-v-a0c7719c]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-a0c7719c]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-a0c7719c]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-a0c7719c],.ch-pr.pr-unknown[data-v-a0c7719c]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ch-pr[data-v-a0c7719c]:hover{border-color:var(--color-line-strong)}.ch-done-pill[data-v-a0c7719c]{cursor:default}.ch-done-pill[data-v-a0c7719c]:hover{border-color:var(--color-done-bd)}.ch-menu[data-v-a0c7719c]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}@media(max-width:980px){.ch-act-label[data-v-a0c7719c]{display:none}}@media(max-width:640px){.chat-header[data-v-a0c7719c]{display:none}}.slash-menu[data-menu-frame][data-v-d671dff5]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-scroll[data-v-d671dff5]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-d671dff5]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-d671dff5]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-d671dff5]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-d671dff5]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-d671dff5]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row)}.slash-item+.slash-item[data-v-d671dff5]{margin-top:var(--menu-rows-seam)}.slash-item[data-v-d671dff5]:hover{background:var(--color-hover)}.slash-item.active[data-v-d671dff5]{background:var(--color-selected)}.slash-name[data-v-d671dff5]{flex:none;max-width:60%;color:var(--color-text);font-weight:var(--weight-medium);min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-d671dff5]{font-weight:var(--weight-semibold)}.slash-desc[data-v-d671dff5]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-d671dff5]{font-weight:var(--weight-semibold)}.slash-empty[data-v-d671dff5]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-d671dff5]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}@media(max-width:520px){.slash-item[data-v-d671dff5]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-d671dff5]{max-width:none}}.mention-menu[data-menu-frame][data-v-1db50d1d]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-scroll[data-v-1db50d1d]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-1db50d1d]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-1db50d1d]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-1db50d1d]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-1db50d1d]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-1db50d1d]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-1db50d1d]{color:var(--color-text-muted)}.mention-spin[data-v-1db50d1d]{position:absolute;top:var(--space-2);right:var(--space-3);color:var(--color-text-muted);z-index:var(--z-raised)}.mention-item[data-v-1db50d1d]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);border-radius:var(--radius-menu-row);transition:opacity var(--duration-slow) var(--ease-out)}.mention-item+.mention-item[data-v-1db50d1d]{margin-top:var(--menu-rows-seam)}.mention-item[data-v-1db50d1d]:hover{background:var(--color-hover)}.mention-item.active[data-v-1db50d1d]{background:var(--color-selected)}.mention-item:hover .mention-icon[data-v-1db50d1d],.mention-item.active .mention-icon[data-v-1db50d1d],.mention-item:hover .mention-name[data-v-1db50d1d],.mention-item.active .mention-name[data-v-1db50d1d]{color:var(--color-text-strong)}.mention-item.stale[data-v-1db50d1d]{opacity:var(--opacity-stale)}@media(hover:none){.mention-item[data-v-1db50d1d]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-icon[data-v-1db50d1d]{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-faint);flex-shrink:0}.mention-icon[data-v-1db50d1d] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-name[data-v-1db50d1d]{color:var(--color-text);font-weight:var(--weight-medium);flex-shrink:0}.mention-name .mention-hit[data-v-1db50d1d]{color:var(--color-text-strong);font-weight:var(--weight-semibold)}.mention-meta[data-v-1db50d1d]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mention-meta .mention-hit[data-v-1db50d1d]{color:var(--color-text)}.ctx-ring[data-v-97f3cf66]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-97f3cf66]{stroke:var(--line)}.ctx-ring-fill[data-v-97f3cf66]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-seg[data-v-bffb3dae]{display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__item[data-v-bffb3dae]{border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg--md .ui-seg__item[data-v-bffb3dae]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-bffb3dae]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-bffb3dae]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-bffb3dae]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-bffb3dae]{background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-xs)}.ui-seg__item[data-v-bffb3dae]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.activity-spin[data-v-c12d8332]{--spinner-frame: 1.15em;display:inline-block;position:relative;width:var(--spinner-frame);height:var(--spinner-frame);font-size:var(--ui-font-size);line-height:1;user-select:none;vertical-align:-.1em}.activity-frame[data-v-c12d8332]{position:absolute;inset:0;display:block;text-align:center;opacity:0;animation-name:activity-frame-c12d8332;animation-duration:.64s;animation-timing-function:steps(1,end);animation-iteration-count:infinite;animation-delay:var(--spinner-frame-delay)}.activity-spin--fast .activity-frame[data-v-c12d8332]{animation-duration:.32s;animation-delay:var(--spinner-frame-fast-delay)}@keyframes activity-frame-c12d8332{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.activity-frame[data-v-c12d8332]{animation:none}.activity-frame[data-v-c12d8332]:first-child{opacity:1}}.menu-row[data-v-261bf74a]{width:100%;height:calc(var(--ui-font-size) + 13px);display:flex;align-items:center;gap:8px;box-sizing:border-box;padding:0 8px;border:0;border-radius:var(--r-md);background:none;color:var(--ink);font-family:inherit;font-size:calc(var(--ui-font-size) - 1px);font-weight:400;line-height:1;text-align:left;cursor:pointer}.menu-row[data-v-261bf74a]:hover{background:var(--hover)}.menu-row.active[data-v-261bf74a],.menu-row.selected[data-v-261bf74a]{background:color-mix(in srgb,var(--soft) 45%,var(--panel))}.menu-row[data-v-261bf74a]:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.menu-row.disabled[data-v-261bf74a],.menu-row[data-v-261bf74a]:disabled{opacity:.5;pointer-events:none}.leading[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 14px;width:14px;height:14px}.leading[data-v-261bf74a] svg{display:block;width:14px;height:14px}.label[data-v-261bf74a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.count[data-v-261bf74a]{flex:none;color:var(--muted)}.trailing[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:none;margin-left:auto}.switch-toggle[data-v-169237c7]{position:relative;width:28px;height:16px;padding:0;border:0;border-radius:999px;background:none;cursor:pointer}.track[data-v-169237c7],.thumb[data-v-169237c7]{position:absolute;display:block}.track[data-v-169237c7]{inset:0;border-radius:999px;background:var(--line);transition:background-color .15s ease}.switch-toggle[aria-checked=true] .track[data-v-169237c7]{background:var(--blue)}.thumb[data-v-169237c7]{top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--panel);transition:transform .15s ease}.switch-toggle[aria-checked=true] .thumb[data-v-169237c7]{transform:translate(12px)}.switch-toggle[data-v-169237c7]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.switch-toggle[data-v-169237c7]:disabled{opacity:.5;cursor:not-allowed}.capability-control[data-v-ff3a96c4]{display:flex;align-items:center;flex:none;min-width:0}.capability-trigger[data-v-ff3a96c4]{display:inline-flex;align-items:center;gap:5px;flex:none;min-width:30px;height:30px;padding:2px 7px;border:0;border-radius:var(--r-sm);background:none;color:var(--muted);font:inherit;font-size:var(--ui-font-size);line-height:1;cursor:pointer;white-space:nowrap}.capability-trigger[data-v-ff3a96c4]:hover,.capability-trigger.open[data-v-ff3a96c4]{background:var(--soft);color:var(--ink)}.capability-trigger svg[data-v-ff3a96c4]{width:16px;height:16px;flex:none}.capability-panel[data-v-ff3a96c4]{width:280px;max-height:288px;overflow:hidden}.capability-viewport[data-v-ff3a96c4]{max-height:288px;overflow:hidden}.capability-track[data-v-ff3a96c4]{display:flex;align-items:flex-start;width:200%;transform:translate(0);transition:transform .15s ease}.capability-track.is-drilled[data-v-ff3a96c4]{transform:translate(-50%)}.capability-view[data-v-ff3a96c4]{flex:0 0 50%;min-width:0;max-height:288px;overflow-y:auto}.capability-group-title[data-v-ff3a96c4]{padding:6px 8px 2px;color:var(--ink);font-size:var(--ui-font-size-xs);font-weight:600}.capability-caption[data-v-ff3a96c4]{margin:0;padding:2px 8px 6px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.35}.capability-loading[data-v-ff3a96c4]{display:flex;align-items:center;min-height:27px;padding:0 8px 6px;color:var(--muted)}.capability-loading[data-v-ff3a96c4] .activity-spin{font-size:var(--ui-font-size-sm)}.chevron[data-v-ff3a96c4],.back-chevron[data-v-ff3a96c4]{display:block;width:14px;height:14px;color:var(--muted)}.capability-back[data-v-ff3a96c4]{margin-bottom:2px}@media(max-width:640px){.capability-trigger-label[data-v-ff3a96c4]{display:none}.capability-trigger[data-v-ff3a96c4]{padding:2px 6px}}.composer[data-v-6d6e98cb]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer.drag-over[data-v-6d6e98cb]{background:var(--color-accent-soft)}.drop-overlay[data-v-6d6e98cb]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-6d6e98cb]{opacity:1;visibility:visible}.drop-card[data-v-6d6e98cb]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-6d6e98cb]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-6d6e98cb]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-6d6e98cb]:focus-within:after{opacity:1}.att-strip[data-v-6d6e98cb]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-6d6e98cb]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-6d6e98cb]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-6d6e98cb]{padding-bottom:var(--space-6)}.att-more[data-v-6d6e98cb]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-6d6e98cb]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-6d6e98cb]{gap:var(--space-2)}.att-scroll-content .att-chip[data-v-6d6e98cb]{corner-shape:superellipse(1.5)}.att-scroll-content .att-tile[data-v-6d6e98cb]{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-6d6e98cb]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-6d6e98cb]{display:none}.cin-wrap[data-v-6d6e98cb]{position:relative;padding:14px 16px 8px}.input-row[data-v-6d6e98cb]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-6d6e98cb]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-6d6e98cb]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-6d6e98cb]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-6d6e98cb]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-6d6e98cb]::-webkit-scrollbar{display:none}.ph[data-v-6d6e98cb]::placeholder{color:var(--muted)}.ph[data-v-6d6e98cb]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-6d6e98cb]{min-height:70vh;max-height:70vh}.compact-chip[data-v-6d6e98cb]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-6d6e98cb]:hover{background:var(--color-hover)}.composer-attach[data-v-6d6e98cb]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-6d6e98cb]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-6d6e98cb]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-6d6e98cb]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-6d6e98cb]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-6d6e98cb]{background:var(--color-menu-scrollbar-hover)}.am-row[data-v-6d6e98cb]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:none;border-radius:var(--radius-menu-row);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-6d6e98cb]:hover{background:var(--color-hover)}.am-row[data-v-6d6e98cb]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-6d6e98cb]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-6d6e98cb],.am-row:focus-visible .am-icon[data-v-6d6e98cb]{color:var(--color-text)}.am-icon[data-v-6d6e98cb]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-6d6e98cb]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-6d6e98cb]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-6d6e98cb]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-6d6e98cb]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-6d6e98cb]:active{transform:scale(.92)}.send[data-v-6d6e98cb]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-6d6e98cb]:disabled:active{transform:none}.send.is-starting[data-v-6d6e98cb]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting .ui-spinner[data-v-6d6e98cb]{color:var(--color-send-icon)}.send.is-starting .ui-spinner__track[data-v-6d6e98cb]{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-6d6e98cb]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-6d6e98cb]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-6d6e98cb]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-6d6e98cb]:active{transform:scale(.92)}.stop svg[data-v-6d6e98cb]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.toolbar[data-v-6d6e98cb]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-6d6e98cb]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-6d6e98cb],.toolbar-right[data-v-6d6e98cb]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-6d6e98cb]{flex:0 1 auto;overflow:hidden}.toolbar-right[data-v-6d6e98cb]{flex:1 1 0;justify-content:flex-end}.perm-pill[data-v-6d6e98cb],.workflow-chip[data-v-6d6e98cb],.model-pill[data-v-6d6e98cb]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-6d6e98cb]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-6d6e98cb]:after,.workflow-chip[data-v-6d6e98cb]:after,.model-pill[data-v-6d6e98cb]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-6d6e98cb]:hover:after,.workflow-chip[data-v-6d6e98cb]:hover:after,.model-pill[data-v-6d6e98cb]:hover:after{opacity:1}.perm-pill.open[data-v-6d6e98cb],.model-pill.open[data-v-6d6e98cb]{background:var(--color-accent-soft)}.workflow-chip[data-v-6d6e98cb]{cursor:default}.perm-pill.perm-manual[data-v-6d6e98cb]{color:var(--dim)}.perm-pill.perm-yolo[data-v-6d6e98cb]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-6d6e98cb]{color:var(--color-danger)}.perm-pill-icon[data-v-6d6e98cb]{flex:none}@container (max-width: 620px){.perm-pill[data-v-6d6e98cb]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.perm-pill-label[data-v-6d6e98cb]{display:none}.workflow-chip[data-v-6d6e98cb]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center}.workflow-label[data-v-6d6e98cb]{display:none}}.ctx-group[data-v-6d6e98cb]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-6d6e98cb]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-6d6e98cb]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-6d6e98cb]:active{transform:scale(.97)}.model-pill[data-v-6d6e98cb]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-6d6e98cb]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.model-pill .think-suffix[data-v-6d6e98cb]{color:var(--color-accent);font-weight:var(--weight-medium);flex-shrink:0}.model-pill .cv[data-v-6d6e98cb]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-6d6e98cb],.model-pill.open .cv[data-v-6d6e98cb]{color:var(--dim)}.model-pill.open .cv[data-v-6d6e98cb]{transform:rotate(180deg)}.model-dropdown[data-v-6d6e98cb]{position:absolute;bottom:calc(100% + 4px);right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right}.composer-menu-pop-enter-active[data-v-6d6e98cb]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-6d6e98cb]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-6d6e98cb],.composer-menu-pop-leave-to[data-v-6d6e98cb]{opacity:0;transform:scale(.97) translateY(2px)}.md-list[data-v-6d6e98cb]{display:flex;flex-direction:column;gap:1px;max-height:min(320px,40vh);overflow-y:auto;overscroll-behavior:contain}.md-section[data-v-6d6e98cb]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-6d6e98cb]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-6d6e98cb]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-6d6e98cb]{color:var(--color-text-strong)}.md-row[data-v-6d6e98cb]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-6d6e98cb]:disabled{cursor:default;opacity:.58}.md-row[data-v-6d6e98cb]:disabled:hover{background:none}.md-row.is-current[data-v-6d6e98cb]{background:var(--color-selected)}.md-note[data-v-6d6e98cb]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-6d6e98cb]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-6d6e98cb]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-6d6e98cb]{color:var(--dim)}.md-check[data-v-6d6e98cb]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-6d6e98cb]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-6d6e98cb]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-6d6e98cb]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-6d6e98cb]{height:1px;background:var(--line);margin:3px 0}.md-thinking[data-v-6d6e98cb]{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:var(--radius-sm)}.md-thinking .md-name[data-v-6d6e98cb]{font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);flex:none}.md-thinking .md-note[data-v-6d6e98cb],.md-thinking .ui-seg[data-v-6d6e98cb]{margin-left:auto}.md-cache-note[data-v-6d6e98cb]{width:0;min-width:100%;padding:2px 7px 4px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.perm-dropdown[data-v-6d6e98cb]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-6d6e98cb]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-6d6e98cb]:hover,.pd-row.is-current[data-v-6d6e98cb]{background:var(--color-hover)}.pd-icon[data-v-6d6e98cb]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-6d6e98cb]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-6d6e98cb]{display:contents}.pd-name[data-v-6d6e98cb]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-6d6e98cb]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-6d6e98cb]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-6d6e98cb]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-6d6e98cb]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-6d6e98cb]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-6d6e98cb]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-6d6e98cb]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-6d6e98cb]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-6d6e98cb]{gap:6px;min-width:0}.send[data-v-6d6e98cb]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-6d6e98cb]{display:none}.send[data-v-6d6e98cb]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-6d6e98cb]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop svg[data-v-6d6e98cb]{display:none}.stop[data-v-6d6e98cb]:after{content:"■";font-size:17px;line-height:1}.perm-pill[data-v-6d6e98cb],.wm-pill[data-v-6d6e98cb]{display:none}.model-dropdown[data-v-6d6e98cb]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.ph[data-v-6d6e98cb]{font-size:16px}.model-pill[data-v-6d6e98cb],.attach-btn[data-v-6d6e98cb]{font-size:var(--ui-font-size)}.toolbar[data-v-6d6e98cb]{gap:6px;min-width:0}.toolbar-left[data-v-6d6e98cb],.toolbar-right[data-v-6d6e98cb]{min-width:0}.model-pill[data-v-6d6e98cb]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-6d6e98cb]{max-width:min(40vw,170px)}.md-row[data-v-6d6e98cb],.md-section[data-v-6d6e98cb]{font-size:var(--ui-font-size)}.md-thinking[data-v-6d6e98cb]{flex-wrap:wrap;row-gap:6px}.md-thinking .ui-seg[data-v-6d6e98cb]{margin-left:0}.pd-name[data-v-6d6e98cb]{font-size:var(--ui-font-size)}.pd-desc[data-v-6d6e98cb]{font-size:var(--text-xs)}}.att-lightbox[data-v-6d6e98cb]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;align-items:center;justify-content:center;padding:24px;background:#14171c9e}.att-lightbox-card[data-v-6d6e98cb]{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:min(960px,calc(100vw - 48px));max-height:calc(100vh - 48px)}.att-lightbox-media[data-v-6d6e98cb]{max-width:100%;max-height:calc(100vh - 96px);border-radius:6px;background:var(--bg);box-shadow:var(--shadow-xl);object-fit:contain}.att-lightbox-name[data-v-6d6e98cb]{max-width:100%;color:var(--surface-light);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att-lightbox-close[data-v-6d6e98cb]{position:absolute;top:-14px;right:-14px;width:28px;height:28px;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:#14171cd1;color:var(--surface-light);cursor:pointer}.appr[data-v-1c39b16f]{margin:var(--space-2) 0}.appr.ui-card[data-v-1c39b16f]{border-color:var(--color-warning-bd)}.appr[data-v-1c39b16f] .ui-card__head{background:var(--color-warning-soft);border-bottom-color:var(--color-warning-bd)}.appr.minimized[data-v-1c39b16f] .ui-card__body{display:none}.appr.minimized[data-v-1c39b16f] .ui-card__head{border-bottom:none}.ah[data-v-1c39b16f]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui);flex-wrap:nowrap}.ah-ic[data-v-1c39b16f]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-warning);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.akind[data-v-1c39b16f]{color:var(--color-warning);font-size:var(--text-base);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apath[data-v-1c39b16f]{color:var(--color-text);font:var(--text-sm) var(--font-mono);flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ah-path[data-v-1c39b16f]{margin-bottom:var(--space-2);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aw[data-v-1c39b16f],.minimized .amin[data-v-1c39b16f]{margin-left:auto}.diff[data-v-1c39b16f]{border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);overflow:hidden;font:var(--text-sm)/1.85 var(--font-mono);max-height:240px;overflow-y:auto}.diff.expanded[data-v-1c39b16f]{max-height:none}.dl[data-v-1c39b16f]{display:flex;padding:0 var(--space-3)}.dg[data-v-1c39b16f]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none}.dc[data-v-1c39b16f]{white-space:pre;font:inherit}.del[data-v-1c39b16f]{background:var(--color-danger-soft)}.del .dc[data-v-1c39b16f]{color:var(--color-danger)}.add[data-v-1c39b16f]{background:var(--color-success-soft)}.add .dc[data-v-1c39b16f]{color:var(--color-success)}.shell-cmd[data-v-1c39b16f]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-1c39b16f]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-1c39b16f]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-1c39b16f]{margin-top:var(--space-2);padding:var(--space-1) var(--space-3);border:1px solid var(--color-danger-bd);border-radius:var(--radius-sm);color:var(--color-danger);font:var(--text-sm) var(--font-ui);background:var(--color-danger-soft)}.body-file[data-v-1c39b16f]{border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.file-bar[data-v-1c39b16f]{padding:var(--space-1) var(--space-3);background:var(--color-surface);border-bottom:1px solid var(--color-line);font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.file-lang[data-v-1c39b16f]{letter-spacing:.04em}.file-content[data-v-1c39b16f]{padding:var(--space-2) 0;font:var(--text-sm)/1.7 var(--font-mono);background:var(--color-surface-sunken);max-height:240px;overflow-y:auto}.body-file.expanded .file-content[data-v-1c39b16f]{max-height:none}.file-line[data-v-1c39b16f]{display:flex;padding:0 var(--space-3)}.file-ln[data-v-1c39b16f]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none;flex:none}.file-text[data-v-1c39b16f]{white-space:pre;font:inherit}.body-chip[data-v-1c39b16f]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-1c39b16f]{background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-1c39b16f]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-1c39b16f]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-1c39b16f]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-1c39b16f]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-1c39b16f]{color:var(--color-text)}.todo-done[data-v-1c39b16f]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-1c39b16f]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan[data-v-1c39b16f]{max-height:50vh;overflow-y:auto}.body-plan.expanded[data-v-1c39b16f]{max-height:none}.feedback-wrap[data-v-1c39b16f]{margin-top:var(--space-3)}.feedback-ta[data-v-1c39b16f]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-sm);resize:none;outline:none;color:var(--color-text);background:var(--color-surface-raised)}.feedback-ta[data-v-1c39b16f]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-1c39b16f]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.abtn[data-v-1c39b16f],.plan-actions[data-v-1c39b16f]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}.plan-actions[data-v-1c39b16f]{flex-wrap:wrap}.k[data-v-1c39b16f]{opacity:.75}@media(max-width:640px){.diff[data-v-1c39b16f],.file-content[data-v-1c39b16f]{overflow-x:auto;-webkit-overflow-scrolling:touch}.file-content[data-v-1c39b16f]{max-height:50vh}.abtn[data-v-1c39b16f],.plan-actions[data-v-1c39b16f]{flex-direction:column}.kbtn[data-v-1c39b16f]{width:100%;min-height:46px}}.goal-panel[data-v-81a928ba]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-81a928ba]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-81a928ba]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-bc8a415c]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-bc8a415c]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-bc8a415c],.plan-review-feedback[data-v-bc8a415c]{color:var(--color-text-muted)}.plan-review-label[data-v-bc8a415c]{flex:none}.plan-path-only[data-v-bc8a415c]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-bc8a415c]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-bc8a415c]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-bc8a415c]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-bc8a415c]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-29d475ec]{margin:var(--space-2) 0}.qcard.ui-card[data-v-29d475ec]{border-color:var(--color-accent-bd)}.qcard[data-v-29d475ec] .ui-card__head{background:var(--color-accent-soft);border-bottom-color:var(--color-accent-bd)}.qcard.minimized[data-v-29d475ec] .ui-card__body{display:none}.qcard.minimized[data-v-29d475ec] .ui-card__head{border-bottom:none}.qh[data-v-29d475ec]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.qh-ic[data-v-29d475ec]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-accent);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.qtitle[data-v-29d475ec]{color:var(--color-accent-hover);font-size:var(--text-base);font-weight:var(--weight-semibold)}.qstep[data-v-29d475ec]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);margin-left:var(--space-1)}.qmin[data-v-29d475ec]{margin-left:auto}.qmin-peek[data-v-29d475ec]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.qbody[data-v-29d475ec]{color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qsteps[data-v-29d475ec]{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font-family:var(--font-ui)}.qstep-dot[data-v-29d475ec]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:var(--radius-full);border:1px solid var(--color-line);background:var(--color-surface);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);cursor:pointer;padding:0;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.qstep-dot[data-v-29d475ec]:hover:not(.active){background:var(--color-surface-sunken)}.qstep-dot.active[data-v-29d475ec]{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-text-on-accent);font-weight:var(--weight-medium)}.qstep-dot.answered[data-v-29d475ec]:not(.active){border-color:var(--color-accent);color:var(--color-accent)}.qheader-chip[data-v-29d475ec]{margin-bottom:var(--space-2)}.qtext[data-v-29d475ec]{font-size:var(--text-base);color:var(--color-text);font-weight:var(--weight-medium);margin-bottom:var(--space-2);line-height:var(--leading-normal)}.qmdbody[data-v-29d475ec]{margin-bottom:var(--space-2)}.qopts[data-v-29d475ec]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2)}.qopt[data-v-29d475ec]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-29d475ec]:hover{background:var(--color-surface-sunken)}.qopt.selected[data-v-29d475ec]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.qopt-key[data-v-29d475ec]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);font-weight:var(--weight-medium);width:12px;flex:none;text-align:center}.qopt-glyph[data-v-29d475ec]{color:var(--color-accent-hover);font-size:var(--text-base);flex:none}.qopt-text[data-v-29d475ec]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-label[data-v-29d475ec]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-29d475ec]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui);font-weight:var(--weight-medium)}.chk[data-v-29d475ec],.rad[data-v-29d475ec]{font:var(--text-base) var(--font-mono)}.other-input[data-v-29d475ec]{flex:1;font:var(--text-base) var(--font-ui);border:none;border-bottom:1px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-29d475ec]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-29d475ec]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}@media(max-width:640px){.qh[data-v-29d475ec]{flex-wrap:wrap;row-gap:var(--space-1)}.qtext[data-v-29d475ec]{font-size:var(--text-lg)}.qstep-dot[data-v-29d475ec]{width:28px;height:28px;font:var(--text-xs) var(--font-ui)}.qopt[data-v-29d475ec]{min-height:44px;padding:var(--space-3);font-size:var(--text-base);border-radius:var(--radius-md)}.qopt-desc[data-v-29d475ec]{font-size:var(--text-xs)}.other-input[data-v-29d475ec]{flex-basis:100%;min-height:28px}.qfoot[data-v-29d475ec]{flex-direction:column}.qfoot-btn[data-v-29d475ec]{width:100%;min-height:46px}.qfoot-main[data-v-29d475ec]{order:-1}}.status-glyph[data-v-f870866a]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f870866a]{color:var(--color-accent)}.status-glyph.s-done[data-v-f870866a]{color:var(--color-success)}.status-glyph.s-fail[data-v-f870866a]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f870866a]{color:var(--color-text-faint)}.sg-empty[data-v-b4cfb2fc]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-b4cfb2fc]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-b4cfb2fc]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-b4cfb2fc]{cursor:pointer}.sg-card.openable[data-v-b4cfb2fc]:hover{background:var(--color-selected-hover)}.sg-card[data-v-b4cfb2fc]:not(.openable){cursor:not-allowed}.sg-open[data-v-b4cfb2fc]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-b4cfb2fc]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-b4cfb2fc]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-b4cfb2fc]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-b4cfb2fc]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-b4cfb2fc]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-b4cfb2fc]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-b4cfb2fc]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-b4cfb2fc]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-b4cfb2fc]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-b4cfb2fc]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-b4cfb2fc]{display:flex;align-items:center}.sg-state[data-v-b4cfb2fc]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-b4cfb2fc]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-b4cfb2fc]{color:var(--color-danger)}.sg-time[data-v-b4cfb2fc]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-b4cfb2fc]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-b4cfb2fc],.sg-cancel[data-v-b4cfb2fc]:focus-visible{opacity:1}.sg-cancel[data-v-b4cfb2fc]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-b4cfb2fc]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.taskspane[data-v-ac309aaa]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-ac309aaa]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-ac309aaa]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-ac309aaa]{color:var(--color-danger)}.tp-main[data-v-ac309aaa]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-ac309aaa]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-ac309aaa]:hover{background:var(--color-hover)}.tp-row[data-v-ac309aaa]:not(.expandable){cursor:not-allowed}.tp-open[data-v-ac309aaa]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-ac309aaa]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-ac309aaa]{flex:none;color:var(--muted)}.tp-name[data-v-ac309aaa]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-ac309aaa]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-ac309aaa]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-ac309aaa]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-ac309aaa]{color:var(--color-text-muted)}.tp-fail[data-v-ac309aaa]{color:var(--color-danger)}.tp-time[data-v-ac309aaa]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-ac309aaa]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-ac309aaa]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-ac309aaa]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-ac309aaa]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-ac309aaa]{min-height:var(--touch-target-min)}}.tp-empty[data-v-ac309aaa]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-ac309aaa]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-ac309aaa]{font-size:var(--ui-font-size-sm)}}.todo-card[data-v-4e4d0054]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-4e4d0054]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-4e4d0054]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-4e4d0054]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-4e4d0054]{color:var(--color-text-muted)}.tc-glyph[data-v-4e4d0054]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-4e4d0054]{color:var(--color-success)}.tc-glyph.g-pending[data-v-4e4d0054]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-4e4d0054]{color:var(--color-text)}.tc-empty[data-v-4e4d0054]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-4e4d0054]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-4e4d0054]{font-size:var(--text-lg)}.tc-row[data-v-4e4d0054]{padding:var(--space-2) var(--space-3)}}.ui-pill[data-v-0fb1a50d]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-0fb1a50d]{cursor:pointer}button.ui-pill[data-v-0fb1a50d]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-0fb1a50d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-0fb1a50d]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-0fb1a50d]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-0fb1a50d] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.filter-control[data-v-658870b5]{display:inline-flex;min-width:0}.fc-chevron[data-v-658870b5]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-658870b5]{transform:rotate(180deg)}.fc-menu[data-v-658870b5]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-658870b5] .ui-menu{min-width:0}.fc-label[data-v-658870b5]{flex:1;white-space:nowrap}.filter-control[data-v-658870b5] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu[data-v-658870b5] .ui-icon[data-icon=circle-check]{transform:scale(.91)}.fc-check[data-v-658870b5]{color:var(--color-accent)}.wp-head-tab[data-v-408c4b07]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-408c4b07] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-408c4b07]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-408c4b07]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-408c4b07]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .fc-trigger{min-height:var(--touch-target-min)}}.chat-dock[data-v-5ab582a5]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-5ab582a5]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-5ab582a5]{margin-left:auto;margin-right:auto}.chat-dock.align-mobile[data-v-5ab582a5]{max-width:none}.chat-dock[data-v-5ab582a5]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-5ab582a5]>*{position:relative;z-index:1}.dock-work-panel[data-v-5ab582a5]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-goal .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-subagent .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-bash .dock-work-head[data-v-5ab582a5]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-goal .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-subagent .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-bash .dock-work-body[data-v-5ab582a5]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-goal .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-plan .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-subagent .dock-work-head[data-v-5ab582a5],.dock-work-panel.panel-bash .dock-work-head[data-v-5ab582a5]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-goal .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-plan .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-subagent .dock-work-body[data-v-5ab582a5],.dock-work-panel.panel-bash .dock-work-body[data-v-5ab582a5]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-5ab582a5],.dock-work-panel.panel-bash[data-v-5ab582a5]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-head[data-v-5ab582a5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-5ab582a5]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-5ab582a5]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-5ab582a5]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body .taskspane[data-v-5ab582a5]{border:none;background:transparent;padding:0}.dock-workbar[data-v-5ab582a5]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar .ui-pill[data-v-5ab582a5]{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar .ui-pill svg[data-v-5ab582a5]{width:1.5em;height:1.5em;color:inherit}.dock-workbar .ui-pill[data-v-5ab582a5]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar .ui-pill[data-v-5ab582a5]:hover:not(:disabled):after,.dock-workbar .ui-pill.is-active[data-v-5ab582a5]:after{opacity:1}.chat-dock.pills-compact .dock-workbar .ui-pill[data-v-5ab582a5]{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar .ui-pill>span[data-v-5ab582a5]{display:none}.dock-workbar .dw-count[data-v-5ab582a5]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-5ab582a5]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-5ab582a5]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-5ab582a5]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-5ab582a5]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-5ab582a5]{color:var(--color-danger)}.dock-approval[data-v-5ab582a5]{margin-top:8px}.chat-dock.has-approval[data-v-5ab582a5]{display:flex;flex-direction:column;max-height:calc(var(--app-height, 100dvh) - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-5ab582a5]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-5ab582a5]{min-height:0}@media(max-width:640px){.chat-dock[data-v-5ab582a5]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-5ab582a5]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}}.chat-dock:not(.align-mobile) .composer[data-v-5ab582a5]{padding-bottom:14px}.dock-panel-enter-active[data-v-5ab582a5]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-5ab582a5]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-5ab582a5],.dock-panel-leave-to[data-v-5ab582a5]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-f846d889]{position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);--toc-content-max: min( var(--p-content-max), calc(100cqi - var(--space-5) - var(--space-5)) );left:calc(50% + (var(--toc-content-max) / 2) + 14px);display:flex;flex-direction:column;justify-content:center;opacity:.5;transition:opacity var(--duration-base) var(--ease-out)}.conversation-toc[data-v-f846d889]:before{content:"";position:absolute;inset:0 -48px 0 -14px;z-index:0}.conversation-toc[data-v-f846d889]:hover,.conversation-toc[data-v-f846d889]:focus-within{opacity:1}.toc-scroll[data-v-f846d889]{position:relative;z-index:1;display:flex;flex-direction:column;gap:7px;padding:8px 0;max-height:calc(100vh - 200px);overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-f846d889]::-webkit-scrollbar{display:none}.toc-row[data-v-f846d889]{display:flex;align-items:center;gap:10px;height:18px;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;white-space:nowrap}.toc-row[data-v-f846d889]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.toc-bar[data-v-f846d889]{flex:none;width:3px;height:14px;border-radius:var(--radius-full);background:var(--color-accent);opacity:.3;transition:opacity var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.toc-label[data-v-f846d889]{display:block;max-width:0;overflow:hidden;opacity:0;text-overflow:ellipsis;transition:max-width .22s var(--ease-out),opacity var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.conversation-toc:hover .toc-bar[data-v-f846d889],.conversation-toc:focus-within .toc-bar[data-v-f846d889]{height:18px;opacity:.5}.conversation-toc:hover .toc-label[data-v-f846d889],.conversation-toc:focus-within .toc-label[data-v-f846d889]{max-width:220px;opacity:1}.toc-row.active .toc-bar[data-v-f846d889]{opacity:1;height:18px}.toc-row.active .toc-label[data-v-f846d889]{color:var(--color-accent);font-weight:var(--weight-medium)}.toc-row:hover .toc-bar[data-v-f846d889]{opacity:1}.toc-row:hover .toc-label[data-v-f846d889]{color:var(--color-text)}.conversation-toc.toc-clipped[data-v-f846d889]{visibility:hidden;pointer-events:none}.tsearch[data-v-d7187e08]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-d7187e08]{top:var(--space-3)}.tsearch[data-v-d7187e08]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-d7187e08]:focus-within:after{opacity:1}.tsearch-main[data-v-d7187e08]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-d7187e08]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-d7187e08]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-d7187e08]:focus-visible{outline:none}.tsearch-input[data-v-d7187e08]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-d7187e08]{display:inline-flex;flex:none}.tsearch-sep[data-v-d7187e08]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-d7187e08]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-d7187e08]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-d7187e08]{grid-template-rows:1fr}.tsearch-foot[data-v-d7187e08]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-d7187e08]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-d7187e08]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-d7187e08]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-d7187e08]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.recent[data-v-cd5a729d]{flex:none;display:flex;flex-direction:column;margin:var(--space-4) var(--dock-inline-right, 16px) 0 var(--dock-inline-left, 16px)}.recent-caption[data-v-cd5a729d]{margin:0;padding:0 var(--space-2) var(--space-1);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;user-select:none}.recent-row[data-v-cd5a729d]{display:flex;width:100%;min-width:0;align-items:center;gap:var(--space-2);padding:6px var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.recent-row[data-v-cd5a729d]:hover{background:var(--color-hover)}.recent-row[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-ico[data-v-cd5a729d]{display:inline-flex;flex:none}.recent-ico--open[data-v-cd5a729d]{color:var(--color-success)}.recent-ico--done[data-v-cd5a729d]{color:var(--color-done)}.recent-title[data-v-cd5a729d]{flex:1;min-width:0;overflow:hidden;color:var(--color-text);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);text-overflow:ellipsis;white-space:nowrap}.recent-time[data-v-cd5a729d]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.recent-foot[data-v-cd5a729d]{display:flex;justify-content:center;margin-top:var(--space-2)}.recent-more[data-v-cd5a729d]{display:inline-flex;height:26px;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.recent-more[data-v-cd5a729d]:hover{background:var(--color-hover);color:var(--color-text)}.recent-more[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-more svg[data-v-cd5a729d]{color:var(--color-text-faint)}.con[data-v-69c16115]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.panes[data-v-69c16115]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes.is-following[data-v-69c16115],.panes.history-prepending[data-v-69c16115]{overflow-anchor:none}.chat-layout[data-v-69c16115]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-69c16115]{flex:1;min-height:0;position:relative}.content-wrap[data-v-69c16115]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-69c16115]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-69c16115]{margin-left:0;margin-right:auto}.content-wrap.align-mobile[data-v-69c16115]{max-width:none}@media(max-width:640px){.con.mobile[data-v-69c16115]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-69c16115]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-69c16115]{width:100%;min-width:0}}.empty-spacer[data-v-69c16115]{flex:1}.empty-hint[data-v-69c16115]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui)}.empty-hint-title[data-v-69c16115]{display:inline-flex;align-items:center;gap:12px;font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-69c16115]{gap:9px;color:var(--dim);font-weight:400}.empty-hint-text[data-v-69c16115]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-add-workspace[data-v-69c16115]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--dim);font-family:var(--mono);font-size:var(--ui-font-size-sm);cursor:pointer}.empty-add-workspace[data-v-69c16115]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.empty-add-workspace[data-v-69c16115]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.empty-add-workspace svg[data-v-69c16115]{flex:none}.ws-pick[data-v-69c16115]{position:relative;font-family:var(--font-ui)}.ws-pick-btn[data-v-69c16115]{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:min(100%,calc(100vw - var(--space-8)));padding:5px 10px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--dim);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer}.ws-pick-btn[data-v-69c16115]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.ws-pick-name[data-v-69c16115]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-chev[data-v-69c16115]{flex:none;color:var(--muted);transition:transform .15s}.ws-pick-chev.open[data-v-69c16115]{transform:rotate(180deg)}.ws-pick-backdrop[data-v-69c16115]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-pick-menu[data-v-69c16115]{position:absolute;display:grid;grid-template-columns:minmax(0,1fr);left:50%;transform:translate(-50%);top:calc(100% + 6px);z-index:var(--z-dropdown);width:max-content;min-width:min(180px,calc(100cqw - var(--space-8)));max-width:calc(100cqw - var(--space-8));max-height:50vh;overflow:hidden auto;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:4px}.ws-pick-item[data-v-69c16115]{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-family:var(--font-ui)}.ws-pick-item[data-v-69c16115]:hover{background:var(--panel2)}.ws-pick-item.on[data-v-69c16115]{background:var(--color-accent-soft)}.ws-pick-item-name[data-v-69c16115]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ws-pick-item.on .ws-pick-item-name[data-v-69c16115]{color:var(--color-accent-hover)}.ws-pick-item-path[data-v-69c16115]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:475;color:var(--muted)}.ws-pick-item.ws-pick-more[data-v-69c16115]{flex-direction:row;align-items:center;justify-content:flex-start;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-item.ws-pick-more[data-v-69c16115]:hover{color:var(--color-text)}.ws-pick-item.ws-pick-more span[data-v-69c16115],.ws-pick-action span[data-v-69c16115]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-divider[data-v-69c16115]{height:1px;margin:4px 6px;background:var(--line)}.ws-pick-action[data-v-69c16115]{display:flex;align-items:center;gap:7px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:7px 10px;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-action[data-v-69c16115]:hover{background:var(--panel2);color:var(--color-text)}.ws-pick-action svg[data-v-69c16115]{flex:none}.chat-scroll[data-v-69c16115]{display:flex;flex-direction:column}.mobile .panes[data-v-69c16115]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-69c16115]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--ui-font-size-sm);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-base)}.newmsg-pill[data-v-69c16115]:hover{background:var(--panel2)}.pill-chevron[data-v-69c16115]{width:12px;height:12px}.pill-enter-active[data-v-69c16115],.pill-leave-active[data-v-69c16115]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-69c16115],.pill-leave-to[data-v-69c16115]{opacity:0;transform:translate(-50%) translateY(8px)}.abort-toast[data-v-69c16115]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.abort-toast-text[data-v-69c16115]{display:flex;align-items:center;gap:8px}.abort-toast-enter-active[data-v-69c16115],.abort-toast-leave-active[data-v-69c16115]{transition:opacity .15s ease,transform .15s ease}.abort-toast-enter-from[data-v-69c16115],.abort-toast-leave-to[data-v-69c16115]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-69c16115]{background:var(--bg)}.newmsg-pill[data-v-69c16115]{font-family:var(--sans)}.media-lightbox[data-v-a5036dce]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-a5036dce]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-a5036dce]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl);touch-action:none}.media-lightbox-media[data-v-a5036dce]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain;transform-origin:center;user-select:none}.media-lightbox-close[data-v-a5036dce]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-a5036dce]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-a5036dce]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-preview-caption[data-v-a5036dce]{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.ui-panel-header[data-v-a01b4e04]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 6px 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface)}.ui-panel-header__title[data-v-a01b4e04]{flex:none;font:var(--weight-semibold) var(--text-xs) var(--font-mono);letter-spacing:.04em;color:var(--color-text)}.ui-panel-header__sub[data-v-a01b4e04]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-a01b4e04]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-a01b4e04]{flex-wrap:wrap;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px;gap:4px 6px}.ui-panel-header.wrap .ui-panel-header__close[data-v-a01b4e04]{margin-left:0}.file-preview[data-v-f6cbb2b4]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-f6cbb2b4],.fp-loading[data-v-f6cbb2b4]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-f6cbb2b4]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-f6cbb2b4]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-f6cbb2b4]{display:none}}.fp-lines[data-v-f6cbb2b4],.fp-size[data-v-f6cbb2b4]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-f6cbb2b4]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-f6cbb2b4]{flex:1;min-width:0;height:26px;border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-f6cbb2b4]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-download[data-v-f6cbb2b4]{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-sm);color:var(--color-text-muted)}.fp-download[data-v-f6cbb2b4]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.fp-download[data-v-f6cbb2b4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.fp-download svg[data-v-f6cbb2b4]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.fp-check[data-v-f6cbb2b4]{color:var(--color-success)}.fp-body[data-v-f6cbb2b4]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));--fp-token-keyword: color-mix(in srgb, var(--color-accent) 68%, var(--color-danger));--fp-token-string: var(--color-success);--fp-token-literal: var(--color-accent-hover);--fp-token-tag: var(--color-warning);flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-f6cbb2b4]{padding:16px 20px}.fp-code[data-v-f6cbb2b4]{background:var(--bg)}.fp-line-table[data-v-f6cbb2b4]{display:table;width:100%;border-collapse:collapse;font-size:var(--ui-font-size);line-height:1.6}.fp-line-row[data-v-f6cbb2b4]{display:table-row}.fp-line-row.hit .fp-line-text[data-v-f6cbb2b4],.fp-table tr.hit td[data-v-f6cbb2b4]{background:var(--fp-search-hit-bg)}.fp-line-row.active .fp-line-text[data-v-f6cbb2b4],.fp-table tr.active td[data-v-f6cbb2b4]{background:var(--fp-search-active-bg)}.fp-line-row.target .fp-gutter[data-v-f6cbb2b4],.fp-line-row.target .fp-line-text[data-v-f6cbb2b4],.fp-table tr.target th[data-v-f6cbb2b4],.fp-table tr.target td[data-v-f6cbb2b4]{background:var(--color-accent-soft)}.fp-gutter[data-v-f6cbb2b4]{display:table-cell;width:44px;padding:0 10px 0 12px;text-align:right;color:var(--faint);user-select:none;font-size:var(--text-base);white-space:nowrap;border-right:1px solid var(--line2);vertical-align:top}.fp-line-text[data-v-f6cbb2b4]{display:table-cell;padding:0 12px;color:var(--color-text);white-space:pre;vertical-align:top}.fp-line-text[data-v-f6cbb2b4] .tok-key,.fp-line-text[data-v-f6cbb2b4] .tok-keyword{color:var(--fp-token-keyword);font-weight:500}.fp-line-text[data-v-f6cbb2b4] .tok-string{color:var(--fp-token-string)}.fp-line-text[data-v-f6cbb2b4] .tok-number,.fp-line-text[data-v-f6cbb2b4] .tok-literal{color:var(--fp-token-literal)}.fp-line-text[data-v-f6cbb2b4] .tok-comment{color:var(--muted);font-style:italic}.fp-line-text[data-v-f6cbb2b4] .tok-tag{color:var(--fp-token-tag);font-weight:500}.fp-line-text[data-v-f6cbb2b4] .tok-attr{color:var(--fp-token-literal)}.fp-html-frame[data-v-f6cbb2b4],.fp-pdf-frame[data-v-f6cbb2b4]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-f6cbb2b4]{background:var(--panel2)}.fp-table-wrap[data-v-f6cbb2b4]{background:var(--bg)}.fp-table[data-v-f6cbb2b4]{border-collapse:collapse;min-width:100%;font:12px/1.5 var(--mono)}.fp-table th[data-v-f6cbb2b4]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:1px solid var(--line2);user-select:none}.fp-table td[data-v-f6cbb2b4]{padding:2px 10px;border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-f6cbb2b4]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-f6cbb2b4]{max-width:100%;max-height:100%;object-fit:contain;border:1px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-f6cbb2b4]{max-width:none;max-height:none}.fp-binary-wrap[data-v-f6cbb2b4]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-f6cbb2b4]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-f6cbb2b4]{color:var(--faint);flex:none}.fp-error[data-v-f6cbb2b4]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-f6cbb2b4{to{transform:rotate(360deg)}}.spinner[data-v-f6cbb2b4]{display:inline-block;width:14px;height:14px;border:1.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-f6cbb2b4 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-f6cbb2b4]{display:none}.fp-markdown[data-v-f6cbb2b4]{padding:14px 16px}.fp-body.fp-code[data-v-f6cbb2b4]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-f6cbb2b4],.fp-loading[data-v-f6cbb2b4]{font-family:var(--sans)}.fp-binary-card[data-v-f6cbb2b4]{border:1px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-f6cbb2b4]{font-family:var(--sans)}.fp-image[data-v-f6cbb2b4]{border-radius:var(--radius-md)}.seg-btn[data-v-f6cbb2b4]{font-family:var(--sans)}.tp[data-v-e1ad626c]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-e1ad626c]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:425;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-b44fe40c]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-transcript[data-v-b44fe40c]{flex:1;min-height:0;overflow-y:auto}.agent-transcript[data-v-b44fe40c] .think-body,.agent-transcript[data-v-b44fe40c] .ar-body,.agent-transcript[data-v-b44fe40c] .tf-body,.agent-transcript[data-v-b44fe40c] .bb,.agent-transcript[data-v-b44fe40c] .tl-body{transition:none}.agent-error[data-v-b44fe40c]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-b44fe40c]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.fallback-lines[data-v-b44fe40c]{margin:0;color:var(--color-text-muted);font:var(--text-sm)/var(--leading-relaxed) var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere}.copy-menu[data-v-b44fe40c]{position:fixed;z-index:var(--z-dropdown)}.tdp[data-v-8b9af3ab]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.tdp-body[data-v-8b9af3ab]{flex:1;min-height:0;overflow:auto;font-family:var(--mono)}.tdp-output[data-v-8b9af3ab]{padding:8px 12px;color:var(--dim);font-size:var(--text-base);line-height:1.7;white-space:pre-wrap;word-break:break-word}.tdp-empty[data-v-8b9af3ab]{padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center}.hl-code[data-v-4878c39c]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-4878c39c]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-body[data-v-4878c39c]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-4878c39c]{padding-left:var(--space-3)}.hl-row[data-v-4878c39c]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-4878c39c]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-4878c39c]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-4878c39c]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-gutter+.hl-text[data-v-4878c39c]{padding-left:var(--space-2)}.row-add[data-v-4878c39c]{background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-4878c39c]{color:var(--color-success)}.row-del[data-v-4878c39c]{background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-4878c39c]{color:var(--color-danger)}.row-hunk[data-v-4878c39c]{background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-4878c39c]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-4878c39c]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-4878c39c]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.turn-diff-panel[data-v-67a3cc7e]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-surface)}.tdp-body[data-v-67a3cc7e]{min-height:0;overflow:auto;padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-3)}.tdp-file[data-v-67a3cc7e]{min-width:0;border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;background:var(--color-surface-raised)}.tdp-file-head[data-v-67a3cc7e]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line)}.tdp-path[data-v-67a3cc7e]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.tdp-diff[data-v-67a3cc7e]{overflow:auto;background:var(--color-surface)}.tdp-unavailable[data-v-67a3cc7e]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.tdp-unavailable p[data-v-67a3cc7e]{margin:0}.ui-thinking-indicator[data-v-ed8aef9e]{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:1;color:var(--color-accent);font-family:var(--font-mono);user-select:none;position:relative}.ui-thinking-indicator--sm[data-v-ed8aef9e]{width:14px;height:14px;font-size:14px}.ui-thinking-indicator--md[data-v-ed8aef9e]{width:18px;height:18px;font-size:18px}.ui-thinking-indicator--lg[data-v-ed8aef9e]{width:24px;height:24px;font-size:24px}.ui-thinking-indicator__frame[data-v-ed8aef9e]{position:absolute;inset:0;display:grid;place-items:center;opacity:0;animation:ui-thinking-indicator-frame-ed8aef9e .64s steps(1,end) infinite;animation-delay:var(--thinking-frame-delay)}.ui-thinking-indicator--fast .ui-thinking-indicator__frame[data-v-ed8aef9e]{animation-duration:.32s;animation-delay:var(--thinking-frame-fast-delay)}@keyframes ui-thinking-indicator-frame-ed8aef9e{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.ui-thinking-indicator__frame[data-v-ed8aef9e]{animation:none}.ui-thinking-indicator__frame[data-v-ed8aef9e]:first-child{opacity:1}}.sc[data-v-4572766b]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-4572766b]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-4572766b]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-4572766b]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:1px solid var(--line);background:var(--panel)}.sc-input[data-v-4572766b]{flex:1;min-width:0;resize:none;border:1px solid var(--line);border-radius:var(--r-sm, 8px);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-4572766b]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-4572766b]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm, 8px);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-4572766b]:disabled{opacity:.4;cursor:default}.sc-send[data-v-4572766b]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-4572766b]{flex:none;padding:8px 12px 12px}.sc-body[data-v-4572766b] .sending-placeholder,.sc-body[data-v-4572766b] .sending-line{display:none}.changes-pane[data-v-67ba251c]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-67ba251c],.dv-change-count[data-v-67ba251c]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-67ba251c]{flex:1}.ch-head[data-v-67ba251c]{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden}.br-label[data-v-67ba251c]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px))}.br-name[data-v-67ba251c]{color:var(--color-accent);font-weight:500;font-size:var(--ui-font-size)}.sync-info[data-v-67ba251c]{display:flex;align-items:center;gap:4px}.ahead[data-v-67ba251c]{color:var(--color-accent);font-size:var(--text-base)}.behind[data-v-67ba251c]{color:var(--color-warning);font-size:var(--text-base)}.empty-head[data-v-67ba251c]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-67ba251c]{flex:1;overflow-y:auto;padding:4px 0}.ch-row[data-v-67ba251c]{display:flex;align-items:center;gap:10px;padding:6px 16px;cursor:pointer;font-size:var(--ui-font-size);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:inherit;color:inherit}.ch-row[data-v-67ba251c]:hover{background:var(--panel2, #f5f6f8)}.ch-row[data-v-67ba251c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-67ba251c]{padding:4px 0}.tree-list[data-v-67ba251c]{list-style:none;margin:0;padding:0}.tree-row[data-v-67ba251c]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 16px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--ui-font-size);color:inherit;cursor:pointer}.tree-row[data-v-67ba251c]:hover{background:var(--panel2, #f5f6f8)}.tree-row[data-v-67ba251c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-67ba251c]{color:var(--color-text);font-weight:500}.tree-file[data-v-67ba251c]{color:var(--color-text)}.tree-icon[data-v-67ba251c]{flex:none;color:var(--muted)}.tree-name[data-v-67ba251c]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-67ba251c]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-67ba251c]{background:color-mix(in srgb,var(--color-accent) 12%,var(--bg));color:var(--color-accent)}.badge.added[data-v-67ba251c]{background:color-mix(in srgb,var(--color-success) 10%,var(--bg));color:var(--color-success)}.badge.deleted[data-v-67ba251c]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger)}.badge.renamed[data-v-67ba251c]{background:color-mix(in srgb,var(--color-warning) 12%,var(--bg));color:var(--color-warning)}.badge.untracked[data-v-67ba251c]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.badge.conflicted[data-v-67ba251c]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-67ba251c]{background:var(--color-surface-sunken);color:var(--faint, #c0c5cc)}.badge.clean[data-v-67ba251c]{background:transparent;color:var(--faint, #c0c5cc)}.badge.unknown[data-v-67ba251c]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.fpath[data-v-67ba251c]{color:var(--color-text);font-size:var(--ui-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.empty-state[data-v-67ba251c]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center;user-select:none}.diff-loading[data-v-67ba251c]{flex-direction:row;gap:var(--space-2)}.diff-head[data-v-67ba251c]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-67ba251c]{flex:1;min-height:0;overflow:auto}.diff-content-enter-active[data-v-67ba251c],.diff-content-leave-active[data-v-67ba251c]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-67ba251c],.diff-content-leave-to[data-v-67ba251c]{opacity:0}@media(max-width:640px){.ch-head[data-v-67ba251c]{padding:10px 14px}.ch-list[data-v-67ba251c]{padding:2px 0 12px}.ch-row[data-v-67ba251c]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--ui-font-size-sm)}.ch-row[data-v-67ba251c]:active{background:var(--panel2, #f5f6f8)}.badge[data-v-67ba251c]{width:18px;height:18px}.fpath[data-v-67ba251c]{font-size:var(--ui-font-size-sm)}.tree-row[data-v-67ba251c]{min-height:40px;padding:8px 14px}.diff-head[data-v-67ba251c]{padding:8px 12px;gap:10px}.diff-path[data-v-67ba251c]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-67ba251c],.br-label[data-v-67ba251c],.empty-head[data-v-67ba251c]{font-family:var(--sans)}.ch-row[data-v-67ba251c],.ct-row[data-v-67ba251c]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-67ba251c],.changed-tree .badge[data-v-67ba251c]{border-radius:var(--radius-sm)}.change-count[data-v-67ba251c]{font-family:var(--sans);border-radius:999px}.mp[data-v-92ec064d]{display:flex;flex-direction:column;gap:var(--space-2)}.search-wrap[data-v-92ec064d]{padding-bottom:var(--space-1)}.tab-strip[data-v-92ec064d]{display:flex;gap:var(--space-1);overflow-x:auto}.model-list[data-v-92ec064d]{display:flex;flex-direction:column;padding:var(--space-1) 0}.model-row[data-v-92ec064d]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-2);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.model-row[data-v-92ec064d]:hover,.model-row.is-selected[data-v-92ec064d]{background:var(--color-surface-sunken)}.model-row.is-current[data-v-92ec064d]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.check[data-v-92ec064d]{width:14px;height:14px;color:var(--color-accent);flex:none;display:flex;align-items:center;justify-content:center}.model-main[data-v-92ec064d]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-92ec064d]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-id[data-v-92ec064d]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-provider[data-v-92ec064d]{flex:none;max-width:110px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-ctx[data-v-92ec064d]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.caps[data-v-92ec064d]{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}.state-row[data-v-92ec064d]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-92ec064d]{color:var(--color-warning)}.empty[data-v-92ec064d]{padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-92ec064d]{padding-top:var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:1px solid var(--color-line)}@media(max-width:640px){.model-provider[data-v-92ec064d],.caps[data-v-92ec064d]{display:none}}.ui-switch[data-v-d7337ade]{position:relative;width:36px;height:20px;flex:none;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-d7337ade]{background:var(--color-accent)}.ui-switch[data-v-d7337ade]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-d7337ade]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-d7337ade]{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--surface-light);box-shadow:var(--shadow-xs);transition:transform var(--duration-base) var(--ease-out)}.ui-switch.is-on .ui-switch__thumb[data-v-d7337ade]{background:var(--color-text-on-accent);transform:translate(16px)}.ui-select[data-v-77d887db]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background-color:var(--color-surface-raised);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right var(--space-3) center;background-size:16px 16px;box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);padding-right:calc(var(--space-3) + 16px + var(--space-2));cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-select--md[data-v-77d887db]{height:38px}.ui-select--sm[data-v-77d887db]{height:32px;font-size:var(--text-sm)}.ui-select[data-v-77d887db]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-select[data-v-77d887db]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select[data-v-77d887db]:disabled{opacity:.5;cursor:not-allowed}.ui-select.has-error[data-v-77d887db]{border-color:var(--color-danger)}.ui-select.has-error[data-v-77d887db]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}html[data-color-scheme=dark] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}@media(prefers-color-scheme:dark){html[data-color-scheme=system] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}}.ui-field[data-v-bd93f701]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-bd93f701]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-danger)}.provider-form[data-v-e7c6ed44]{display:flex;flex-direction:column;gap:var(--space-4)}.provider-form__managed[data-v-e7c6ed44]{color:var(--color-text-muted);font-size:var(--text-sm)}.provider-form__fields[data-v-e7c6ed44]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}.provider-form__key[data-v-e7c6ed44]{position:relative}.provider-form__key[data-v-e7c6ed44] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.provider-form__eye[data-v-e7c6ed44]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.provider-form__models-head[data-v-e7c6ed44]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}.provider-form__models[data-v-e7c6ed44]{overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.provider-form__model[data-v-e7c6ed44]{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(120px,.7fr) minmax(160px,1fr) 32px;gap:var(--space-2);align-items:center;padding:var(--space-2);border-top:1px solid var(--color-line)}.provider-form__model--head[data-v-e7c6ed44]{border-top:0;background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.provider-form__error[data-v-e7c6ed44]{color:var(--color-danger);font-size:var(--text-sm)}.provider-form__actions[data-v-e7c6ed44]{display:flex;justify-content:flex-end;gap:var(--space-2)}@media(max-width:640px){.provider-form__fields[data-v-e7c6ed44]{grid-template-columns:1fr}}.add-provider-flow[data-v-f7a8fd45]{display:flex;flex-direction:column;gap:var(--space-4)}.add-provider-flow__section[data-v-f7a8fd45],.add-provider-flow__form[data-v-f7a8fd45]{display:flex;flex-direction:column;gap:var(--space-3)}.add-provider-flow__state[data-v-f7a8fd45]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-muted)}.add-provider-flow__catalog[data-v-f7a8fd45]{max-height:320px;overflow-y:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.add-provider-flow__entry[data-v-f7a8fd45]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:36px;padding:var(--space-2) var(--space-3);border:0;border-top:1px solid var(--color-line);background:transparent;color:var(--color-text);text-align:left;cursor:pointer}.add-provider-flow__entry[data-v-f7a8fd45]:first-child{border-top:0}.add-provider-flow__entry[data-v-f7a8fd45]:hover:not(:disabled){background:var(--color-hover)}.add-provider-flow__entry[data-v-f7a8fd45]:disabled{opacity:.55;cursor:not-allowed}.add-provider-flow__entry>span[data-v-f7a8fd45]:last-child{color:var(--color-text-faint);font-size:var(--text-xs)}.add-provider-flow__name[data-v-f7a8fd45]{font-weight:var(--weight-medium)}.add-provider-flow__grow[data-v-f7a8fd45]{flex:1}.add-provider-flow__empty[data-v-f7a8fd45]{padding:var(--space-4);color:var(--color-text-muted);text-align:center}.add-provider-flow__back[data-v-f7a8fd45]{align-self:flex-start;display:inline-flex;align-items:center;gap:var(--space-1);padding:0;border:0;background:transparent;color:var(--color-text-muted);cursor:pointer}.add-provider-flow__back-icon[data-v-f7a8fd45]{transform:rotate(180deg)}.add-provider-flow__key[data-v-f7a8fd45]{position:relative}.add-provider-flow__key[data-v-f7a8fd45] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.add-provider-flow__eye[data-v-f7a8fd45]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.add-provider-flow__note[data-v-f7a8fd45]{margin:0;color:var(--color-text-muted);font-size:var(--text-sm)}.add-provider-flow__warning[data-v-f7a8fd45]{color:var(--color-warning);font-size:var(--text-sm)}.add-provider-flow__error[data-v-f7a8fd45]{color:var(--color-danger);font-size:var(--text-sm)}.add-provider-flow__actions[data-v-f7a8fd45]{display:flex;justify-content:flex-end;gap:var(--space-2)}.providers-panel[data-v-b143e58f]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) 0}.providers-panel__heading h3[data-v-b143e58f]{margin:0;color:var(--color-text);font-size:var(--text-xl);font-weight:var(--weight-medium)}.providers-panel__heading p[data-v-b143e58f]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.providers-panel__state[data-v-b143e58f]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-5) 0;color:var(--color-text-muted)}.providers-panel__state--warning[data-v-b143e58f]{color:var(--color-warning)}.providers-panel__card[data-v-b143e58f]{overflow:hidden;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-bg)}.providers-panel__add[data-v-b143e58f]{border-style:dashed}.providers-panel__summary[data-v-b143e58f]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:54px;padding:var(--space-3) var(--space-4);border:0;background:transparent;color:var(--color-text);text-align:left;cursor:pointer}.providers-panel__summary[data-v-b143e58f]:hover{background:var(--color-hover)}.providers-panel__summary[data-v-b143e58f]:focus-visible{outline:none;box-shadow:inset var(--p-focus-ring)}.providers-panel__add-icon[data-v-b143e58f]{display:grid;place-items:center;width:24px;height:24px;border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent)}.providers-panel__grow[data-v-b143e58f]{flex:1}.providers-panel__identity[data-v-b143e58f]{display:flex;min-width:0;flex-direction:column;gap:var(--space-1)}.providers-panel__identity strong[data-v-b143e58f],.providers-panel__identity span[data-v-b143e58f]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.providers-panel__identity span[data-v-b143e58f],.providers-panel__count[data-v-b143e58f]{color:var(--color-text-muted);font-size:var(--text-xs)}.providers-panel__status[data-v-b143e58f]{display:block;width:8px;height:8px;border:1px solid var(--color-text-faint);border-radius:var(--radius-full)}.providers-panel__status.is-connected[data-v-b143e58f]{border-color:var(--color-success);background:var(--color-success)}.providers-panel__status.is-error[data-v-b143e58f]{border-color:var(--color-danger);background:var(--color-danger)}.providers-panel__summary[data-v-b143e58f] .ui-icon.is-rotated{transform:rotate(90deg)}.providers-panel__details[data-v-b143e58f]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-4);border-top:1px solid var(--color-line);background:var(--color-surface-sunken)}.providers-panel__model-list[data-v-b143e58f]{display:flex;flex-wrap:wrap;gap:var(--space-2)}.providers-panel__model-list code[data-v-b143e58f]{padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs)}.providers-panel__delete[data-v-b143e58f]{display:flex;justify-content:flex-start;padding-top:var(--space-3);border-top:1px solid var(--color-line)}@media(max-width:640px){.providers-panel__count[data-v-b143e58f]{display:none}.providers-panel__summary[data-v-b143e58f]{gap:var(--space-2);padding:var(--space-3)}}.sm-picker[data-v-57066bcd]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-57066bcd]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.sm-picker__trigger[data-v-57066bcd]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-57066bcd]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__trigger[data-v-57066bcd]:disabled{cursor:not-allowed;opacity:.6}.sm-picker__value[data-v-57066bcd]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value>span[data-v-57066bcd]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-57066bcd]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-57066bcd]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-fast) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-57066bcd]{transform:rotate(180deg)}.sm-picker__menu[data-v-57066bcd]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-57066bcd]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-57066bcd]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-57066bcd]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-57066bcd]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-57066bcd]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__option[data-v-57066bcd]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option[data-v-57066bcd]:hover,.sm-picker__option.is-active[data-v-57066bcd]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-57066bcd]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-57066bcd]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-57066bcd]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-57066bcd]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-57066bcd]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-8ba6a8d4]{display:flex;flex-direction:row;min-height:0;height:100%}.settings-tabs[data-v-8ba6a8d4]{display:flex;flex-direction:column;flex:none;width:148px;padding:var(--space-2);gap:2px;overflow-y:auto}.tab[data-v-8ba6a8d4]{text-align:left;display:flex;align-items:center;gap:var(--space-2);padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab .ui-icon[data-v-8ba6a8d4]{flex:none;color:var(--color-text-faint)}.tab.on .ui-icon[data-v-8ba6a8d4]{color:var(--color-accent)}.tab[data-v-8ba6a8d4]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.tab.on[data-v-8ba6a8d4]{background:var(--color-accent-soft);color:var(--color-accent);font-weight:var(--weight-medium)}.tab[data-v-8ba6a8d4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-8ba6a8d4]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) var(--space-5) var(--space-5) var(--space-6);flex:1;min-width:0}.panel[data-v-8ba6a8d4]{display:block}.sec[data-v-8ba6a8d4]{padding:var(--space-4) 0;border-bottom:1px solid var(--color-line)}.sec[data-v-8ba6a8d4]:last-child{border-bottom:none}.sec-head[data-v-8ba6a8d4]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-8ba6a8d4]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted)}.sec-head .sec-title[data-v-8ba6a8d4]{margin-bottom:0}.saving[data-v-8ba6a8d4]{flex:none;font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.row[data-v-8ba6a8d4]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.rlabel[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);display:flex;flex-direction:column;gap:var(--space-1)}.rvalue[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-8ba6a8d4]{font-family:var(--font-mono);font-size:var(--text-xs)}.value-wrap[data-v-8ba6a8d4]{display:flex;align-items:center;gap:var(--space-1);max-width:60%;min-width:0;flex:none}.value-wrap .rvalue[data-v-8ba6a8d4]{max-width:100%}.hint[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.select-wrap[data-v-8ba6a8d4]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text-muted);padding:var(--space-1) 0}.actions[data-v-8ba6a8d4]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}@media(max-width:640px){.sd[data-v-8ba6a8d4]{flex-direction:column}.settings-tabs[data-v-8ba6a8d4]{flex-direction:row;width:auto;padding:var(--space-2) var(--space-3);gap:var(--space-1);overflow-x:auto}.tab[data-v-8ba6a8d4]{white-space:nowrap;flex:none}.row[data-v-8ba6a8d4]{align-items:flex-start;flex-direction:column}.select-wrap[data-v-8ba6a8d4]{width:100%;max-width:none}}.setting-card[data-v-8ba6a8d4]{border:1px solid var(--color-line);border-radius:var(--radius-xl);overflow:hidden;background:var(--color-bg)}.panel-head[data-v-8ba6a8d4]{margin-bottom:var(--space-4)}.panel-kicker[data-v-8ba6a8d4]{font-size:var(--text-xs);letter-spacing:.05em;text-transform:uppercase;color:var(--color-text-faint);margin-bottom:var(--space-1)}.panel-title[data-v-8ba6a8d4]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-2xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;color:var(--color-text)}.panel-desc[data-v-8ba6a8d4]{margin:0;font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-8ba6a8d4]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-8ba6a8d4]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:1px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-sm);background:var(--color-surface-raised);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-8ba6a8d4]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-8ba6a8d4]{width:15px;height:15px;flex:none}.archive-search input[data-v-8ba6a8d4]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-8ba6a8d4]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-8ba6a8d4]{margin-bottom:0}.archive-workspace[data-v-8ba6a8d4]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-8ba6a8d4]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-8ba6a8d4]{font-family:var(--font-mono);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-8ba6a8d4]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-regular);font-size:var(--text-xs);flex:none}.archive-row[data-v-8ba6a8d4]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:1px solid var(--color-line)}.archive-row[data-v-8ba6a8d4]:first-child{border-top:none}.archive-row[data-v-8ba6a8d4]:hover{background:var(--color-surface-sunken)}.archive-meta[data-v-8ba6a8d4]{min-width:0}.archive-name[data-v-8ba6a8d4]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-8ba6a8d4]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-mono)}.archive-draining[data-v-8ba6a8d4]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-sm)}.archive-empty[data-v-8ba6a8d4]{padding:var(--space-6) var(--space-4);border:1px solid var(--color-line);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-sm);text-align:center;background:var(--color-bg)}@media(max-width:640px){.archive-toolbar[data-v-8ba6a8d4]{flex-direction:column;align-items:stretch}.archive-search[data-v-8ba6a8d4]{min-width:0}}[data-v-8ba6a8d4] .ui-dialog{width:min(980px,96vw)}[data-v-8ba6a8d4] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.aw[data-v-09b74e91]{margin-left:calc(-1 * var(--space-5));margin-right:calc(-1 * var(--space-5));margin-bottom:calc(-1 * var(--space-4))}.crumbbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.crumbs[data-v-09b74e91]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-09b74e91]{color:var(--color-text-muted)}.crumb[data-v-09b74e91]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-09b74e91]:hover{color:var(--color-accent);background:var(--color-surface-sunken)}.crumb.last[data-v-09b74e91]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.filter-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-09b74e91]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-09b74e91]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-09b74e91]{color:var(--color-text)}.filterbar.has-error[data-v-09b74e91]{border-bottom-color:var(--color-danger)}.filterbar.has-error .filter-icon[data-v-09b74e91]{color:var(--color-danger)}.folder-list[data-v-09b74e91]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-09b74e91],.fl-empty[data-v-09b74e91]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.fl-note[data-v-09b74e91]{padding:var(--space-2) var(--space-4);font-size:var(--text-sm);color:var(--color-text-muted)}.fl-error[data-v-09b74e91]{color:var(--color-danger)}.folder-row[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-1) var(--space-4);border-radius:var(--radius-md)}.folder-row[data-v-09b74e91]:hover{background:var(--color-surface-sunken)}.dir-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-row:hover .dir-icon[data-v-09b74e91]{color:var(--color-accent)}.folder-name[data-v-09b74e91]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.degraded-hint[data-v-09b74e91]{padding:var(--space-6) var(--space-5);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.add-error[data-v-09b74e91]{margin:0 14px 8px;padding:6px 10px;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:#b3261e;background:#b3261e14;border:1px solid rgba(179,38,30,.25);border-radius:3px}.actions[data-v-09b74e91]{display:flex;justify-content:flex-end;gap:var(--space-3);padding:var(--space-4) var(--space-5)}.footer-hint[data-v-09b74e91]{padding:var(--space-2) var(--space-5);font-size:var(--text-xs);color:var(--color-text-muted);border-top:1px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-09b74e91]{min-height:44px}.crumbbar[data-v-09b74e91]{align-items:flex-start}.actions[data-v-09b74e91]{flex-wrap:wrap}}.confirm-dialog__message[data-v-074405fe]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-7992546c]{margin:0;padding:0}.row[data-v-7992546c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-7992546c]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-7992546c]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-7992546c],.row dd.workflow-on[data-v-7992546c]{color:var(--color-accent)}.ctx-text[data-v-7992546c]{flex:none}.bar[data-v-7992546c]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-7992546c]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-7992546c]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-7992546c]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-7992546c]{width:auto}.row dd[data-v-7992546c]{max-width:100%;flex-wrap:wrap}}.ui-toast[data-v-44bc260b]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-44bc260b]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-44bc260b]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-44bc260b]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-44bc260b]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-44bc260b]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-44bc260b]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-44bc260b]{flex:1;min-width:0}.ui-toast__title[data-v-44bc260b]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-44bc260b]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-44bc260b]{color:var(--color-danger)}.ui-toast__close[data-v-44bc260b]{flex:none;margin:-3px -4px 0 0}.toasts[data-v-6d8f28b8]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-6d8f28b8],.toast-leave-active[data-v-6d8f28b8]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-6d8f28b8],.toast-leave-to[data-v-6d8f28b8]{opacity:0;transform:translate(16px)}.toast-move[data-v-6d8f28b8]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-6d8f28b8]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-6d8f28b8]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-6d8f28b8]:hover{text-decoration:underline}.details[data-v-6d8f28b8]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:1px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-6d8f28b8]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-6d8f28b8]{color:var(--color-text-muted)}.detail-row dd[data-v-6d8f28b8]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-6d8f28b8]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-6d8f28b8]{grid-template-columns:1fr;gap:2px}}.update-toast[data-v-f7646e4e]{position:fixed;right:16px;bottom:152px;z-index:61;width:min(360px,calc(100vw - 32px));display:flex;flex-direction:column;gap:10px;padding:12px 13px;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 6px 22px #0000001f;font-size:var(--ui-font-size);line-height:1.45}.title[data-v-f7646e4e]{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.msg[data-v-f7646e4e]{margin-top:2px;color:var(--muted)}.acts[data-v-f7646e4e]{display:flex;justify-content:flex-end;gap:8px}.skip[data-v-f7646e4e],.go[data-v-f7646e4e]{padding:5px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--muted);font:inherit;font-size:var(--ui-font-size-xs);cursor:pointer}.skip[data-v-f7646e4e]:hover{color:var(--ink)}.go[data-v-f7646e4e]{border-color:transparent;background:var(--blue);color:#fff;font-weight:600}.go[data-v-f7646e4e]:disabled{opacity:.6;cursor:default}@media(max-width:640px){.update-toast[data-v-f7646e4e]{left:12px;right:12px;bottom:calc(150px + env(safe-area-inset-bottom));width:auto}}.ui-action-toast-host[data-v-9efa207b]{pointer-events:none}.ui-action-toast[data-v-9efa207b]{display:flex;align-items:center;gap:var(--space-3);min-width:260px;max-width:min(420px,calc(100vw - 32px));padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);box-shadow:var(--shadow-lg);color:var(--color-text);pointer-events:auto}.ui-action-toast__body[data-v-9efa207b]{flex:1;min-width:0;font-size:var(--text-sm)}.ui-action-toast__close[data-v-9efa207b]{flex:none}@media(max-width:640px){.ui-action-toast[data-v-9efa207b]{max-width:none;width:100%}}.window-controls[data-v-041ca08b]{position:fixed;top:12px;right:14px;z-index:60;display:flex;gap:8px;-webkit-app-region:no-drag}.wc[data-v-041ca08b]{width:14px;height:14px;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:transparent}.wc-close[data-v-041ca08b]{background:#ff5f57}.wc-min[data-v-041ca08b]{background:#febc2e}.wc-max[data-v-041ca08b]{background:#28c840}.window-controls:hover .wc[data-v-041ca08b]{color:#0000008c}.wc[data-v-041ca08b]:focus-visible{outline:2px solid var(--blue);outline-offset:2px;color:#0000008c}.topbar[data-v-27a83eb2]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:1px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-27a83eb2]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-27a83eb2]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-27a83eb2]{color:var(--color-text)}.tb-path .sl[data-v-27a83eb2]{color:var(--color-text-faint)}.tb-path .se[data-v-27a83eb2]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-27a83eb2]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-27a83eb2]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-27a83eb2]{background:var(--color-success)}.topbar .tb-path[data-v-27a83eb2]{font-family:var(--sans)}.sheet-root[data-v-92ecd88c]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-92ecd88c]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-92ecd88c]{position:relative;background:var(--color-surface-raised);border:1px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-92ecd88c]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-92ecd88c]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-92ecd88c]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-92ecd88c]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-92ecd88c]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-92ecd88c],.sheet-leave-active[data-v-92ecd88c]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-92ecd88c],.sheet-leave-active .sheet-panel[data-v-92ecd88c]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-92ecd88c],.sheet-leave-to[data-v-92ecd88c]{opacity:0}.sheet-enter-from .sheet-panel[data-v-92ecd88c],.sheet-leave-to .sheet-panel[data-v-92ecd88c]{transform:translateY(102%)}.newrow[data-v-4c7bceaf]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-4c7bceaf]:hover,.newrow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-4c7bceaf]:hover{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-4c7bceaf]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-4c7bceaf]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-4c7bceaf]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-4c7bceaf]{padding-top:2px}.mgh[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-4c7bceaf]:hover,.mgh[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-4c7bceaf]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-4c7bceaf]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-4c7bceaf]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-4c7bceaf]{margin:-10px -12px -10px 0}.mgh-add[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.mgh-more[data-v-4c7bceaf]{margin:-10px -8px}.mgh-more[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.srow[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-4c7bceaf]:hover,.srow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-4c7bceaf]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-4c7bceaf]{flex:1;min-width:0}.srow .m .t[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-4c7bceaf]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-4c7bceaf]{position:relative}.srow .m .t.run[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-4c7bceaf 1.4s ease-in-out infinite}@keyframes mRunPulse-4c7bceaf{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-4c7bceaf]{position:relative}.srow .m .t.aborted[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-4c7bceaf]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--surface-light);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.kmenu[data-v-4c7bceaf]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-4c7bceaf]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more[data-v-4c7bceaf]{display:flex;align-items:center;width:100%;min-height:44px;padding:var(--space-1) var(--m-pad) var(--space-1) var(--m-indent);background:none;border:none;color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-4c7bceaf]:active{color:var(--color-accent-hover);background:var(--color-surface-sunken)}.newrow[data-v-4c7bceaf]{font-family:var(--sans)}.mlist .srow[data-v-4c7bceaf]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-4c7bceaf]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-3afd1467]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-3afd1467]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-3afd1467]:hover:not(.read-only){background:var(--color-surface-sunken)}.srow[data-v-3afd1467]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-3afd1467]{cursor:default}.srow-main[data-v-3afd1467]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-3afd1467]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-3afd1467]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-3afd1467]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-3afd1467]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-3afd1467]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-3afd1467]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-3afd1467]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-3afd1467]{background:var(--color-accent)}.toggle[data-v-3afd1467]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:1px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-3afd1467]:after{left:21px}.srow.pref[data-v-3afd1467]{cursor:default}.goal-actions[data-v-3afd1467]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1)}.srow.acct.in .srow-label[data-v-3afd1467]{color:var(--color-accent-hover);font-weight:500}.srow.acct.out .srow-label[data-v-3afd1467]{color:var(--color-danger)}.ctx-meter[data-v-3afd1467]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-3afd1467]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-3afd1467]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-3afd1467],.cache-note[data-v-3afd1467]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-3afd1467]{flex:1 1 auto}.srow-sub[data-v-3afd1467]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-3afd1467]{flex-wrap:wrap}.srow.pref .srow-main[data-v-3afd1467]{flex:1 0 100%}.srow-val[data-v-3afd1467],.chev[data-v-3afd1467],.toggle[data-v-3afd1467],.ctx-meter[data-v-3afd1467],.goal-actions[data-v-3afd1467]{margin-top:2px}}.srow[data-v-3afd1467],.srow-sub[data-v-3afd1467],.srow-val[data-v-3afd1467],.cache-note[data-v-3afd1467]{font-family:var(--sans)}.arch-subhead[data-v-3afd1467]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-3afd1467]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-3afd1467]{font-size:20px}.arch-count[data-v-3afd1467]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-3afd1467]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-3afd1467]{flex:1;min-width:160px}.arch-row[data-v-3afd1467]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:1px solid var(--color-line)}.arch-row[data-v-3afd1467]:first-of-type{border-top:none}.arch-meta[data-v-3afd1467]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-3afd1467]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-3afd1467]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-3afd1467]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.wizard[data-v-043d59e7]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;flex-direction:column;overflow-y:auto;background:var(--color-bg);color:var(--color-text);font-family:var(--font-ui)}.wiz-body[data-v-043d59e7]{display:flex;flex:1;flex-direction:column;width:min(560px,100%);margin:0 auto;padding:max(var(--space-8),12vh) var(--space-5) var(--space-6)}.wiz-step[data-v-043d59e7]{display:flex;flex:1;min-height:0;width:100%;flex-direction:column;align-items:center}.wiz-step-fill[data-v-043d59e7]{display:flex;flex:1;min-height:0;width:100%;flex-direction:column;justify-content:center}.wiz-title[data-v-043d59e7]{margin:var(--space-4) 0 0;color:var(--color-text);font-size:var(--text-2xl);font-weight:var(--weight-semibold);line-height:var(--leading-tight);text-align:center}.wiz-sub[data-v-043d59e7]{max-width:460px;margin:var(--space-2) 0 var(--space-6);color:var(--color-text-muted);font-size:var(--text-base);line-height:var(--leading-normal);text-align:center}.pref-group[data-v-043d59e7]{width:100%;margin-bottom:var(--space-5)}.pref-label[data-v-043d59e7]{margin-bottom:var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);font-weight:var(--weight-medium)}.theme-cards[data-v-043d59e7]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);width:100%}.accent-cards[data-v-043d59e7]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-3);width:100%}.opt-card[data-v-043d59e7]{display:flex;align-items:center;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-043d59e7]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-043d59e7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-043d59e7]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-043d59e7]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.theme-card[data-v-043d59e7]{flex-direction:column;gap:var(--space-3);padding:var(--space-3)}.theme-preview[data-v-043d59e7]{display:flex;width:100%;aspect-ratio:16 / 10;overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md)}.theme-preview--light[data-v-043d59e7]{background:var(--surface-light)}.theme-preview--dark[data-v-043d59e7]{background:var(--surface-dark)}.theme-half[data-v-043d59e7]{display:flex;flex:1;min-width:0}.theme-half--light[data-v-043d59e7]{background:var(--surface-light)}.theme-half--dark[data-v-043d59e7]{background:var(--surface-dark)}.theme-side[data-v-043d59e7]{width:30%;flex:none;background:color-mix(in srgb,currentColor 7%,transparent)}.theme-preview--dark .theme-side[data-v-043d59e7],.theme-half--dark .theme-side[data-v-043d59e7]{background:color-mix(in srgb,var(--surface-light) 8%,transparent)}.theme-lines[data-v-043d59e7]{display:flex;flex:1;flex-direction:column;gap:6px;padding:14% 12%}.theme-lines span[data-v-043d59e7]{height:6px;border-radius:var(--radius-full);background:color-mix(in srgb,currentColor 16%,transparent)}.theme-preview--dark .theme-lines span[data-v-043d59e7],.theme-half--dark .theme-lines span[data-v-043d59e7]{background:color-mix(in srgb,var(--surface-light) 22%,transparent)}.theme-lines span[data-v-043d59e7]:nth-child(1){width:62%}.theme-lines span[data-v-043d59e7]:nth-child(2){width:88%}.theme-lines span[data-v-043d59e7]:nth-child(3){width:44%}.accent-card[data-v-043d59e7]{gap:var(--space-3);padding:var(--space-4)}.opt-radio[data-v-043d59e7]{display:inline-flex;width:18px;height:18px;flex:none;align-items:center;justify-content:center;border:var(--p-hairline) solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-surface-raised)}.opt-radio[data-v-043d59e7]:after{width:8px;height:8px;border-radius:var(--radius-full);background:transparent;content:""}.opt-radio.on[data-v-043d59e7]{border-color:var(--color-accent)}.opt-radio.on[data-v-043d59e7]:after{background:var(--color-accent)}.accent-swatch[data-v-043d59e7]{width:14px;height:14px;border-radius:var(--radius-full)}.accent-swatch--blue[data-v-043d59e7]{background:var(--accent-primary)}.accent-swatch--mono[data-v-043d59e7]{background:var(--color-text)}.wiz-foot[data-v-043d59e7]{display:flex;width:100%;margin-top:auto;padding:var(--space-8) 0 max(var(--space-8),8vh);flex-direction:column;align-items:center;gap:var(--space-2)}.wiz-primary[data-v-043d59e7]{min-width:140px}@media(max-width:640px){.theme-cards[data-v-043d59e7],.accent-cards[data-v-043d59e7]{grid-template-columns:1fr}}.gload[data-v-2468172e]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-2468172e]{width:120px;height:120px;object-fit:contain;animation:gload-pop-2468172e .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-xl);color:var(--muted);letter-spacing:.04em}.gload-issue[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(480px,80vw);font-family:var(--sans);font-size:var(--text-base);color:var(--muted);text-align:center}.gload-issue-detail[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);opacity:.8;word-break:break-word}@keyframes gload-pop-2468172e{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-2468172e]{animation:none}}.gload-text[data-v-2468172e]{font-family:var(--sans)}.kap-root[data-v-7bab00af]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-7bab00af]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--panel)}.kap-count[data-v-7bab00af]{color:var(--muted)}.kap-head-actions[data-v-7bab00af]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-7bab00af],.kap-view-toggle button[data-v-7bab00af]{padding:3px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-7bab00af]:hover,.kap-view-toggle button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-7bab00af],.kap-view-toggle button.on[data-v-7bab00af]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-7bab00af]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:1px solid var(--line)}.kap-filters select[data-v-7bab00af],.kap-filters input[type=text][data-v-7bab00af]{padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-7bab00af]{flex:1;min-width:120px}.kap-check[data-v-7bab00af]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-7bab00af]{display:flex;gap:0}.kap-view-toggle button[data-v-7bab00af]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-7bab00af]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-7bab00af]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-7bab00af]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:1px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-7bab00af]:hover{background:var(--panel2)}.kap-row.expanded[data-v-7bab00af]{background:var(--color-accent-soft)}.kap-ts[data-v-7bab00af]{flex:none;color:var(--muted)}.kap-badge[data-v-7bab00af]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-7bab00af]{background:var(--panel2);color:var(--muted)}.b-err[data-v-7bab00af]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-7bab00af]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-7bab00af]{border-bottom:1px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-7bab00af]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-7bab00af]{padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-detail pre[data-v-7bab00af]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-7bab00af]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-7bab00af]{width:100%;border-collapse:collapse}.kap-agg th[data-v-7bab00af],.kap-agg td[data-v-7bab00af]{padding:3px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-7bab00af]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-7bab00af]{text-align:right}.kap-agg .err[data-v-7bab00af]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-7bab00af]{word-break:break-all}.kap-fab[data-v-992ae84c]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-992ae84c]:hover{opacity:1;color:var(--color-accent)}.server-auth-overlay[data-v-82dad292]{position:fixed;inset:0;z-index:var(--z-max);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 70%,transparent)}.server-auth-card[data-v-82dad292]{width:480px;max-width:calc(100vw - 48px);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);overflow:hidden;color:var(--color-text);font-family:var(--font-ui)}.server-auth-head[data-v-82dad292]{display:flex;flex-direction:column;padding:20px 22px 14px}.server-auth-title[data-v-82dad292]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium);letter-spacing:-.01em;color:var(--color-text)}.server-auth-hint[data-v-82dad292]{margin:4px 0 0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-82dad292]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.server-auth-body[data-v-82dad292]{padding:4px 22px 18px}.server-auth-foot[data-v-82dad292]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.internal-build-tag[data-v-6eba49b4]{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:#f5a623;color:#3a2a00;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.4;white-space:nowrap;user-select:none}.gload-fade-leave-active[data-v-adf9e9df]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-adf9e9df]{opacity:0}.app-shell[data-v-adf9e9df]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.auth-page[data-v-adf9e9df]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg);color:var(--color-text);box-sizing:border-box}.auth-page-inner[data-v-adf9e9df]{width:min(420px,100%);display:flex;flex-direction:column;align-items:flex-start;gap:18px}.auth-page-logo[data-v-adf9e9df]{width:64px;height:44px;flex:none;cursor:pointer;user-select:none;-webkit-user-select:none;transition:transform .18s ease}.auth-page-logo[data-v-adf9e9df]:hover{transform:scale(1.06)}.auth-page-copy[data-v-adf9e9df]{display:flex;flex-direction:column;gap:8px}.auth-page-copy h1[data-v-adf9e9df]{margin:0;font-family:var(--sans);font-size:30px;line-height:1.15;font-weight:500;letter-spacing:0;color:var(--color-text)}.auth-page-copy p[data-v-adf9e9df]{margin:0;font-family:var(--sans);font-size:var(--ui-font-size-lg);line-height:1.55;color:var(--dim)}.app[data-v-adf9e9df]{--preview-w: 460px;flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) 0 auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-adf9e9df]>*{min-height:0;min-width:0}.app>.side[data-v-adf9e9df]{grid-column:1}.side-handle[data-v-adf9e9df]{grid-column:2}.app:not(.mobile)>.con[data-v-adf9e9df]{grid-column:3}.preview-handle[data-v-adf9e9df]{grid-column:4}.sidebar-toggle-btn[data-v-adf9e9df]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-adf9e9df .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-adf9e9df]{left:72px;animation:none}@keyframes sidebar-toggle-btn-in-adf9e9df{0%{opacity:0}}.new-chat-btn[data-v-adf9e9df]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-adf9e9df .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-adf9e9df]{left:98px}.internal-build-fab[data-v-adf9e9df]{position:absolute;right:var(--space-3);bottom:var(--space-3);z-index:var(--z-sticky);pointer-events:none}.app.mobile[data-v-adf9e9df]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-adf9e9df]{grid-column:5;min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1)}.global-preview.open[data-v-adf9e9df]{width:var(--preview-w)}.global-preview.no-anim[data-v-adf9e9df]{transition:none}.global-preview[data-v-adf9e9df]:not(.mobile)>*{width:var(--preview-w);height:100%;box-sizing:border-box;border-left:1px solid var(--line)}.global-preview.mobile[data-v-adf9e9df]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:2px solid var(--color-text)}.action-toast-stack[data-v-adf9e9df]{position:fixed;right:var(--space-4);bottom:var(--space-4);z-index:var(--z-toast);display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-2);pointer-events:none}.session-action-undo[data-v-adf9e9df]{margin-top:var(--space-2);padding:0;border:0;background:transparent;color:var(--color-accent);font:inherit;font-size:var(--text-sm);cursor:pointer}.session-action-undo[data-v-adf9e9df]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(max-width:640px){.action-toast-stack[data-v-adf9e9df]{right:var(--space-3);bottom:max(var(--space-3),var(--safe-bottom));left:var(--space-3);align-items:stretch}.auth-page[data-v-adf9e9df]{align-items:flex-start;padding:max(48px,var(--safe-top)) max(20px,var(--safe-right)) max(24px,var(--safe-bottom)) max(20px,var(--safe-left))}.auth-page-copy h1[data-v-adf9e9df]{font-size:26px}.auth-page-btn[data-v-adf9e9df]{width:100%}}:root{--panel-head-h: 48px}.app.sidebar-collapsed .chat-header{padding-left:52px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:108px}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2) }.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:146px}.app.sidebar-collapsed .session-admin .sa-head{padding-left:78px}.app.sidebar-collapsed.windows-desktop .session-admin .sa-head{padding-left:var(--space-6)}.app.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:146px}.app.fullscreen.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:78px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .global-preview .ui-panel-header{-webkit-app-region:no-drag}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);--ink: var(--color-text);--fg: var(--color-text);--color-fg: var(--color-text);--border: var(--color-line);--surface-light: #ffffff;--surface-dark: #0d1117;--accent-primary: #1783ff;color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient(var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #f9fbfc;--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: var(--radius-sm);--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: var(--space-05);--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-lg) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-tooltip: .15s;--duration-spin: .7s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--p-scroll-seam-h: 18px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 296px;--p-media-thumb-size: 64px;--p-mention-tip-w: 320px;--p-mention-tip-vmargin: var(--space-3);--p-mention-tip-spinner-lift: -.1em;--opacity-stale: .55;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px }:root,html[data-font-scale=medium]{--base-font: 14px }html[data-font-scale=small]{--base-font: 12px }html[data-font-scale=large]{--base-font: 16px }html[data-font-scale=xlarge]{--base-font: 18px }.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }}:root{--color-sidebar-tint: rgba(255, 255, 255, .4) }html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25) }}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531 }html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }}::highlight(pythinker-transcript-search){background-color:var(--color-search-match)}::highlight(pythinker-transcript-search-current){background-color:var(--color-search-match-current)}.mention-pill{display:inline-flex;align-items:baseline;gap:var(--space-05);color:var(--color-text-muted);font-weight:var(--weight-ui-strong);white-space:nowrap;text-decoration:none;vertical-align:baseline;padding-inline:var(--space-05);transition:color var(--duration-fast) var(--ease-out)}.mention-pill:hover{color:var(--color-text)}.mention-pill:hover .mention-pill-icon{color:inherit}.mention-pill.mention-file,.mention-pill.mention-skill{cursor:pointer}.mention-pill.mention-file:hover,.mention-pill.mention-skill:hover{text-decoration:underline}.mention-pill:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-sm)}.ProseMirror .mention-pill,.ProseMirror .mention-pill:hover{cursor:text;text-decoration:none}a.mention-folder{cursor:default}.mention-pill.mention-skill.mention-inert,.mention-pill.mention-skill.mention-inert:hover{cursor:default;text-decoration:none}.mention-pill-name{max-width:24em;min-width:0;overflow:hidden;text-overflow:ellipsis}.mention-pill-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--muted);align-self:center;flex-shrink:0}.mention-pill-icon svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block;stroke:currentColor;stroke-width:var(--p-hairline)}.mention-pill.pill-in-selection{background:var(--p-selection);border-radius:var(--radius-sm)}.mention-tip{position:fixed;z-index:var(--z-tooltip);max-width:min(var(--p-mention-tip-w),calc(100vw - 2 * var(--p-mention-tip-vmargin)));padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:round(calc(var(--text-xs) * 1.5),1px);overflow-wrap:anywhere;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.mention-tip:not(.positioned){pointer-events:none}.mention-tip.positioned{opacity:1}.mention-tip-path{display:flex;align-items:flex-start;gap:var(--space-2)}.mention-tip-path-text{min-width:0}.mention-tip-sep{color:color-mix(in srgb,currentColor 45%,transparent)}.mention-tip-base{font-weight:var(--weight-semibold)}.mention-tip-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2)}.mention-tip-name{font-weight:var(--weight-semibold);overflow-wrap:anywhere}.mention-tip-open,.mention-tip-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-05);border:none;border-radius:var(--radius-xs);background:transparent;color:color-mix(in srgb,currentColor 65%,transparent);cursor:pointer;transition:color var(--duration-fast) var(--ease-out),background-color var(--duration-fast) var(--ease-out)}.mention-tip-open:hover,.mention-tip-copy:hover{color:var(--color-bg);background:color-mix(in srgb,var(--color-bg) 14%,transparent)}.mention-tip-open:focus-visible,.mention-tip-copy:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mention-tip-open svg,.mention-tip-copy svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-tip-copy{margin-top:calc(0px - var(--space-05));margin-right:calc(var(--space-05) - var(--space-2))}.mention-tip-desc{margin-top:var(--space-05);color:color-mix(in srgb,currentColor 78%,transparent);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.mention-tip-spinner{display:inline-block;width:calc(var(--space-2) + var(--space-05));height:calc(var(--space-2) + var(--space-05));margin-left:var(--space-1);vertical-align:var(--p-mention-tip-spinner-lift);border-radius:50%;border:var(--p-ring-stroke) solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;animation:mention-tip-spin var(--duration-spin) linear infinite}@keyframes mention-tip-spin{to{transform:rotate(360deg)}}.mention-pill.mention-missing,.mention-pill.mention-missing:hover{color:color-mix(in srgb,var(--color-text-muted) 55%,transparent);text-decoration:line-through}.mention-pill.mention-missing .mention-pill-icon{color:inherit}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px) }.ui-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:pythinker-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes pythinker-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes pythinker-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes pythinker-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:pythinker-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:pythinker-eye-blink 11s ease-in-out infinite}@keyframes pythinker-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes pythinker-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:pythinker-eye-blink-once .24s ease-in-out}@keyframes pythinker-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s }#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/pythinker-code/dist-web/assets/index-DmRZ1qa6.js b/apps/pythinker-code/dist-web/assets/index-PS4nWdvH.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-DmRZ1qa6.js rename to apps/pythinker-code/dist-web/assets/index-PS4nWdvH.js index b050e3622..1d04952cb 100644 --- a/apps/pythinker-code/dist-web/assets/index-DmRZ1qa6.js +++ b/apps/pythinker-code/dist-web/assets/index-PS4nWdvH.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-3azJfNuh.js","assets/index-GptwYVPK.js","assets/index-ZOXJ8Du9.js","assets/index-DI8hwIbn.css"])))=>i.map(i=>d[i]); -import{bR as Q}from"./index-ZOXJ8Du9.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-3azJfNuh.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-6eeNofm6.js","assets/index-Cm2yfvYH.js","assets/index-BMmTKsPq.js","assets/index-wWN4iTUD.css"])))=>i.map(i=>d[i]); +import{bR as Q}from"./index-BMmTKsPq.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-6eeNofm6.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` `),n=i.split(` `);let r=0;for(;r` ${a}`),...t.slice(r,t.length-o).map(a=>`- ${a}`),...n.slice(r,n.length-o).map(a=>`+ ${a}`),...t.slice(t.length-o).map(a=>` ${a}`)].join(` `)}function he(e){return new G(e)}function ue(e={}){let i,t,n,r,o,a="text",d="",p="",h,c=0,g="system",S=U(e),T=q(e);const L={disableLineNumbers:e.lineNumbers===!1,overflow:e.wordWrap==="on"?"wrap":"scroll",enableLineSelection:e.enableLineSelection},M=()=>({...L,theme:S,themeType:g});async function H(s,l,u){k();const w=c;if(N(s,e),h=s,a=R(u),_(l))return V(s,l,a);if(e.stream===!1)return O(s,l,a);const f=new K({...M(),...F(e),fileName:`code.${a}`,language:a,maxHeight:e.MAX_HEIGHT,autoScroll:e.autoScrollOnUpdate===!1?"never":"near-bottom",autoScrollThresholdPx:e.autoScrollThresholdPx,workerManager:e.workerManager});if(i=f,f.append(l),await f.mount(s),w!==c||i!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>f.getText(),s,()=>f.getFinalizedSurface(),m=>f.onDidRender(m)),r}async function I(s,l,u,w){k();const f=c;N(s,e),h=s,a=R(w),d=l,p=u;let m,v;if(e.stream===!1){if(m=x({kind:"diff",oldFile:y(l),newFile:y(u),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),...F(e)}}),n=m,await m.mount(s),f!==c||n!==m||h!==s)throw m.dispose(),new Error("Editor creation was cancelled");e.onController?.(m)}else{if(v=new G({...M(),...F(e),fileName:`code.${a}`,language:a,diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),maxHeight:e.MAX_HEIGHT,wrap:e.wordWrap==="on",workerManager:e.workerManager}),t=v,await v.mount(s,l,u),f!==c||t!==v||h!==s)throw v.dispose(),new Error("Editor creation was cancelled");e.onController?.(v)}return o=oe(()=>d,()=>p,s,()=>m??v?.getFinalizedSurface()),o}async function X(s,l=a){const u=R(l);if(_(s)){n?.getInput().kind==="merge-conflict"?(a=u,await n.updateMergeConflict(y(s),e.lineAnnotations)):h&&await V(h,s,u);return}if(e.stream===!1){n?.getInput().kind==="file"?(a=u,await n.updateFile(y(s),e.lineAnnotations)):h&&await O(h,s,u);return}if(!i){h&&await H(h,s,u);return}if(i.getState()==="finalized"){s!==i.getText()&&await i.reset(s);return}if(u!==a){a=u,await i.setLanguage(u),s!==i.getText()&&await i.reset(s);return}const w=i.getText();s.startsWith(w)?i.append(s.slice(w.length)):await i.reset(s)}async function P(s,l,u=a){if(d=s,p=l,a=R(u),t){await t.update(s,l);return}if(!n){h&&await I(h,s,l,u);return}await n.updateDiff(y(s),y(l))}function k(){c++,i?.dispose(),t?.dispose(),t||n?.dispose(),i=void 0,t=void 0,n=void 0,r=void 0,o=void 0,h=void 0}async function O(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"file",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}async function V(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"merge-conflict",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}function _(s){return e.mergeConflict===!1?!1:/^<<<<<<< .+$/m.test(s)&&/^=======$/m.test(s)&&/^>>>>>>> .+$/m.test(s)}async function J(s){if(s){if(typeof s=="string"){const l=e.themes;if(l?.[0]===s){await W(),g="dark",i?.setThemeType("dark"),t?.setThemeType("dark"),n?.setThemeType("dark");return}if(l?.[1]===s){await W(),g="light",i?.setThemeType("light"),t?.setThemeType("light"),n?.setThemeType("light");return}}T=void 0,S=s,await j(s)}}async function W(){const s=q(e);!s||s===T||(T=s,S=U(e),await j(S))}async function j(s){await i?.setTheme(s),await t?.setTheme(s),await n?.setTheme(s)}function y(s){return E(`code.${a||"txt"}`,s,a)}return{runtimeKind:"stream-diffs",createEditor:H,createDiffEditor:I,updateCode:X,appendCode(s){i?.append(s)},async finalizeCode(){if(!i||i.getState()==="finalized")return i?.getFinalizedSurface();const s=F(e);return delete s.lineAnnotations,await i.finalize({view:"file",...s,theme:S,themeType:g,annotations:e.lineAnnotations,workerManager:e.workerManager}),i.getFinalizedSurface()},async finalizeDiff(){return t&&(n=await t.finalize(e.lineAnnotations)),n},updateDiff:P,updateOriginal(s,l=a){return P(s,p,l)},updateModified(s,l=a){return P(d,s,l)},appendOriginal(s,l=a){return P(d+s,p,l)},appendModified(s,l=a){return P(d,p+s,l)},cleanupEditor:k,safeClean:k,setTheme:J,async setLanguage(s){if(a=R(s),await i?.setLanguage(a),await t?.setLanguage(a),n&&!t){const l=n.getInput();l.kind==="file"||l.kind==="merge-conflict"?await n.update({...l,file:{...l.file,lang:a}}):l.kind==="diff"&&"oldFile"in l&&await n.update({...l,oldFile:{...l.oldFile,lang:a},newFile:{...l.newFile,lang:a}})}},getCurrentTheme:()=>S,getEditor:()=>le,getEditorView:()=>r??null,getDiffEditorView:()=>o??null,getDiffModels:()=>({original:D(()=>d),modified:D(()=>n?.getResolvedFile()?.contents??t?.getModified()??p)}),getCode:()=>{const s=n?.getInput();return s?.kind==="diff"||s?.kind==="patch"?{original:d,modified:n?.getResolvedFile()?.contents??p}:s?.kind==="file"||s?.kind==="merge-conflict"?s.file.contents:t?{original:t.getOriginal(),modified:t.getModified()}:i?.getText()??null},refreshDiffPresentation:()=>n?.update(n.getInput()),whenVisualReady:async()=>{const s=h,l=c,u=n??i?.getFinalizedSurface()??t?.getFinalizedSurface();return!u||!await u.whenVisualReady()?!1:ne(s,()=>l===c&&s===h&&u===(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()),()=>se(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()))}}}async function ne(e,i,t){if(!e||typeof window>"u")return!1;let n="",r,o=0;for(let a=0;a<120;a+=1){if(!i())return!1;const d=e.querySelector(".stream-diffs-shell"),p=d?.querySelector("diffs-container")?.shadowRoot?.querySelector("pre"),h=d?.getBoundingClientRect(),c=p?.textContent??"";if(h&&h.width>0&&h.height>0&&p&&t()){const g=`${Math.round(h.width)}:${Math.round(h.height)}:${p.scrollWidth}:${p.scrollHeight}:${c.length}`;if(o=p===r&&g===n?o+1:1,r=p,n=g,o>=2)return!0}else n="",r=void 0,o=0;await ae()}return!1}function se(e){if(!e)return!0;const i=e.getNativeInstance(),t=i?.fileRenderer??i?.hunksRenderer;if(!t)return!0;const n=t.renderCache;if(!n?.result)return!1;if(n.highlighted===!0)return!0;const r=e.getInput();if(R(r.kind==="file"||r.kind==="merge-conflict"?r.file.lang:"oldFile"in r?r.oldFile.lang??r.newFile.lang:e.getDiff()?.lang)==="text")return!0;const o=Number(t.getTokenizeMaxLength?.()??1e5);if(r.kind==="file"||r.kind==="merge-conflict")return re(r.file.contents)>o;const a=e.getDiff();return!!a&&Math.max(a.additionLines.length,a.deletionLines.length)>o}function R(e){return!e||/^(?:text|txt|plain|plaintext)$/i.test(e)?"text":e}function re(e){if(!e)return 0;let i=1;for(let t=0;t{let i=!1;const t=()=>{i||(i=!0,window.clearTimeout(r),window.cancelAnimationFrame(n),e())},n=window.requestAnimationFrame(t),r=window.setTimeout(t,50)})}function U(e){return e.themes?.length&&typeof e.themes[0]=="string"&&typeof e.themes[1]=="string"?{dark:e.themes[0],light:e.themes[1]}:e.theme??void 0}function q(e){if(!(typeof e.themes?.[0]!="string"||typeof e.themes?.[1]!="string"))return`${e.themes[0]} diff --git a/apps/pythinker-code/dist-web/assets/index-ZOXJ8Du9.js b/apps/pythinker-code/dist-web/assets/index-ZOXJ8Du9.js deleted file mode 100644 index d40a5c571..000000000 --- a/apps/pythinker-code/dist-web/assets/index-ZOXJ8Du9.js +++ /dev/null @@ -1,429 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-EXdIwnCI.js","assets/DesignSystemView-Bux62PsO.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/CodeBlockNode-D0mkXbsY.js","assets/safeRaf-DGuzXxDK.js","assets/index5-CCjgec83.js","assets/index11-CYg1-jUl.js"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** -* @vue/shared v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function U1(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Tn={},Qc=[],ir=()=>{},E8=()=>!1,Qp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),V1=e=>e.startsWith("onUpdate:"),no=Object.assign,I2=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ZL=Object.prototype.hasOwnProperty,Hn=(e,t)=>ZL.call(e,t),Ht=Array.isArray,ed=e=>Nd(e)==="[object Map]",Ju=e=>Nd(e)==="[object Set]",LS=e=>Nd(e)==="[object Date]",YL=e=>Nd(e)==="[object RegExp]",dn=e=>typeof e=="function",ro=e=>typeof e=="string",zi=e=>typeof e=="symbol",Un=e=>e!==null&&typeof e=="object",$2=e=>(Un(e)||dn(e))&&dn(e.then)&&dn(e.catch),T8=Object.prototype.toString,Nd=e=>T8.call(e),JL=e=>Nd(e).slice(8,-1),q1=e=>Nd(e)==="[object Object]",K1=e=>ro(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$u=U1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),G1=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},XL=/-\w/g,ds=G1(e=>e.replace(XL,t=>t.slice(1).toUpperCase())),QL=/\B([A-Z])/g,bi=G1(e=>e.replace(QL,"-$1").toLowerCase()),Z1=G1(e=>e.charAt(0).toUpperCase()+e.slice(1)),Km=G1(e=>e?`on${Z1(e)}`:""),As=(e,t)=>!Object.is(e,t),td=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Y1=e=>{const t=parseFloat(e);return isNaN(t)?e:t},wg=e=>{const t=ro(e)?Number(e):NaN;return isNaN(t)?e:t};let FS;const J1=()=>FS||(FS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),eF="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",tF=U1(eF);function Ut(e){if(Ht(e)){const t={};for(let n=0;n{if(n){const o=n.split(oF);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Be(e){let t="";if(ro(e))t=e;else if(Ht(e))for(let n=0;nIl(n,t))}const N8=e=>!!(e&&e.__v_isRef===!0),N=e=>ro(e)?e:e==null?"":Ht(e)||Un(e)&&(e.toString===T8||!dn(e.toString))?N8(e)?N(e.value):JSON.stringify(e,L8,2):String(e),L8=(e,t)=>N8(t)?L8(e,t.value):ed(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[Wv(o,i)+" =>"]=s,n),{})}:Ju(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Wv(n))}:zi(t)?Wv(t):Un(t)&&!Ht(t)&&!q1(t)?String(t):t,Wv=(e,t="")=>{var n;return zi(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function cF(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** -* @vue/reactivity v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ls;class F8{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ls&&(ls.active?(this.parent=ls,this.index=(ls.scopes||(ls.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(ls===this)ls=this.prevScope;else{let t=ls;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(Qf){let t=Qf;for(Qf=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Xf;){let t=Xf;for(Xf=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function P8(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function D8(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),O2(o),fF(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function Ok(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(B8(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function B8(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wp)||(e.globalVersion=wp,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ok(e))))return;e.flags|=2;const t=e.dep,n=fo,o=_r;fo=e,_r=!0;try{P8(e);const s=e.fn(e._value);(t.version===0||As(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{fo=n,_r=o,D8(e),e.flags&=-3}}function O2(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)O2(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fF(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function iDe(e,t){e.effect instanceof xg&&(e=e.effect.fn);const n=new xg(e);t&&no(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function rDe(e){e.effect.stop()}let _r=!0;const z8=[];function $l(){z8.push(_r),_r=!1}function Nl(){const e=z8.pop();_r=e===void 0?!0:e}function OS(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=fo;fo=void 0;try{t()}finally{fo=n}}}let wp=0;class pF{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Q1{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!fo||!_r||fo===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==fo)n=this.activeLink=new pF(fo,this),fo.deps?(n.prevDep=fo.depsTail,fo.depsTail.nextDep=n,fo.depsTail=n):fo.deps=fo.depsTail=n,W8(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=fo.depsTail,n.nextDep=void 0,fo.depsTail.nextDep=n,fo.depsTail=n,fo.deps===n&&(fo.deps=o)}return n}trigger(t){this.version++,wp++,this.notify(t)}notify(t){L2();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{F2()}}}function W8(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)W8(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _g=new WeakMap,Nu=Symbol(""),Rk=Symbol(""),xp=Symbol("");function Ds(e,t,n){if(_r&&fo){let o=_g.get(e);o||_g.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new Q1),s.map=o,s.key=n),s.track()}}function wl(e,t,n,o,s,i){const r=_g.get(e);if(!r){wp++;return}const l=a=>{a&&a.trigger()};if(L2(),t==="clear")r.forEach(l);else{const a=Ht(e),u=a&&K1(n);if(a&&n==="length"){const c=Number(o);r.forEach((d,f)=>{(f==="length"||f===xp||!zi(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(xp)),t){case"add":a?u&&l(r.get("length")):(l(r.get(Nu)),ed(e)&&l(r.get(Rk)));break;case"delete":a||(l(r.get(Nu)),ed(e)&&l(r.get(Rk)));break;case"set":ed(e)&&l(r.get(Nu));break}}F2()}function hF(e,t){const n=_g.get(e);return n&&n.get(t)}function wc(e){const t=Nn(e);return t===e?t:(Ds(t,"iterate",xp),Fi(e)?t:t.map(Mr))}function e0(e){return Ds(e=Nn(e),"iterate",xp),e}function Kr(e,t){return Ll(e)?yd(ba(e)?Mr(t):t):Mr(t)}const mF={__proto__:null,[Symbol.iterator](){return jv(this,Symbol.iterator,e=>Kr(this,e))},concat(...e){return wc(this).concat(...e.map(t=>Ht(t)?wc(t):t))},entries(){return jv(this,"entries",e=>(e[1]=Kr(this,e[1]),e))},every(e,t){return ul(this,"every",e,t,void 0,arguments)},filter(e,t){return ul(this,"filter",e,t,n=>n.map(o=>Kr(this,o)),arguments)},find(e,t){return ul(this,"find",e,t,n=>Kr(this,n),arguments)},findIndex(e,t){return ul(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ul(this,"findLast",e,t,n=>Kr(this,n),arguments)},findLastIndex(e,t){return ul(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ul(this,"forEach",e,t,void 0,arguments)},includes(...e){return Uv(this,"includes",e)},indexOf(...e){return Uv(this,"indexOf",e)},join(e){return wc(this).join(e)},lastIndexOf(...e){return Uv(this,"lastIndexOf",e)},map(e,t){return ul(this,"map",e,t,void 0,arguments)},pop(){return pf(this,"pop")},push(...e){return pf(this,"push",e)},reduce(e,...t){return RS(this,"reduce",e,t)},reduceRight(e,...t){return RS(this,"reduceRight",e,t)},shift(){return pf(this,"shift")},some(e,t){return ul(this,"some",e,t,void 0,arguments)},splice(...e){return pf(this,"splice",e)},toReversed(){return wc(this).toReversed()},toSorted(e){return wc(this).toSorted(e)},toSpliced(...e){return wc(this).toSpliced(...e)},unshift(...e){return pf(this,"unshift",e)},values(){return jv(this,"values",e=>Kr(this,e))}};function jv(e,t,n){const o=e0(e),s=o[t]();return o!==e&&!Fi(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const gF=Array.prototype;function ul(e,t,n,o,s,i){const r=e0(e),l=r!==e&&!Fi(e),a=r[t];if(a!==gF[t]){const d=a.apply(e,i);return l?Mr(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,Kr(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(r,u,o);return l&&s?s(c):c}function RS(e,t,n,o){const s=e0(e),i=s!==e&&!Fi(e);let r=n,l=!1;s!==e&&(i?(l=o.length===0,r=function(u,c,d){return l&&(l=!1,u=Kr(e,u)),n.call(this,u,Kr(e,c),d,e)}):n.length>3&&(r=function(u,c,d){return n.call(this,u,c,d,e)}));const a=s[t](r,...o);return l?Kr(e,a):a}function Uv(e,t,n){const o=Nn(e);Ds(o,"iterate",xp);const s=o[t](...n);return(s===-1||s===!1)&&o0(n[0])?(n[0]=Nn(n[0]),o[t](...n)):s}function pf(e,t,n=[]){$l(),L2();const o=Nn(e)[t].apply(e,n);return F2(),Nl(),o}const vF=U1("__proto__,__v_isRef,__isVue"),H8=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(zi));function yF(e){zi(e)||(e=String(e));const t=Nn(this);return Ds(t,"has",e),t.hasOwnProperty(e)}class j8{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?Z8:G8:i?K8:q8).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=Ht(t);if(!s){let a;if(r&&(a=mF[n]))return a;if(n==="hasOwnProperty")return yF}const l=Reflect.get(t,n,Do(t)?t:o);if((zi(n)?H8.has(n):vF(n))||(s||Ds(t,"get",n),i))return l;if(Do(l)){const a=r&&K1(n)?l:l.value;return s&&Un(a)?Dk(a):a}return Un(l)?s?Dk(l):Es(l):l}}class U8 extends j8{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const r=Ht(t)&&K1(n);if(!this._isShallow){const u=Ll(i);if(!Fi(o)&&!Ll(o)&&(i=Nn(i),o=Nn(o)),!r&&Do(i)&&!Do(o))return u||(i.value=o),!0}const l=r?Number(n)e,Zh=e=>Reflect.getPrototypeOf(e);function _F(e,t,n){return function(...o){const s=this.__v_raw,i=Nn(s),r=ed(i),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...o),c=n?Pk:t?yd:Mr;return!t&&Ds(i,"iterate",a?Rk:Nu),no(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function Yh(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function SF(e,t){const n={get(s){const i=this.__v_raw,r=Nn(i),l=Nn(s);e||(As(s,l)&&Ds(r,"get",s),Ds(r,"get",l));const{has:a}=Zh(r),u=t?Pk:e?yd:Mr;if(a.call(r,s))return u(i.get(s));if(a.call(r,l))return u(i.get(l));i!==r&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Ds(Nn(s),"iterate",Nu),s.size},has(s){const i=this.__v_raw,r=Nn(i),l=Nn(s);return e||(As(s,l)&&Ds(r,"has",s),Ds(r,"has",l)),s===l?i.has(s):i.has(s)||i.has(l)},forEach(s,i){const r=this,l=r.__v_raw,a=Nn(l),u=t?Pk:e?yd:Mr;return!e&&Ds(a,"iterate",Nu),l.forEach((c,d)=>s.call(i,u(c),u(d),r))}};return no(n,e?{add:Yh("add"),set:Yh("set"),delete:Yh("delete"),clear:Yh("clear")}:{add(s){const i=Nn(this),r=Zh(i),l=Nn(s),a=!t&&!Fi(s)&&!Ll(s)?l:s;return r.has.call(i,a)||As(s,a)&&r.has.call(i,s)||As(l,a)&&r.has.call(i,l)||(i.add(a),wl(i,"add",a,a)),this},set(s,i){!t&&!Fi(i)&&!Ll(i)&&(i=Nn(i));const r=Nn(this),{has:l,get:a}=Zh(r);let u=l.call(r,s);u||(s=Nn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,i),u?As(i,c)&&wl(r,"set",s,i):wl(r,"add",s,i),this},delete(s){const i=Nn(this),{has:r,get:l}=Zh(i);let a=r.call(i,s);a||(s=Nn(s),a=r.call(i,s)),l&&l.call(i,s);const u=i.delete(s);return a&&wl(i,"delete",s,void 0),u},clear(){const s=Nn(this),i=s.size!==0,r=s.clear();return i&&wl(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=_F(s,e,t)}),n}function t0(e,t){const n=SF(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(Hn(n,s)&&s in o?n:o,s,i)}const CF={get:t0(!1,!1)},AF={get:t0(!1,!0)},MF={get:t0(!0,!1)},EF={get:t0(!0,!0)},q8=new WeakMap,K8=new WeakMap,G8=new WeakMap,Z8=new WeakMap;function TF(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Es(e){return Ll(e)?e:n0(e,!1,kF,CF,q8)}function IF(e){return n0(e,!1,wF,AF,K8)}function Dk(e){return n0(e,!0,bF,MF,G8)}function lDe(e){return n0(e,!0,xF,EF,Z8)}function n0(e,t,n,o,s){if(!Un(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const r=TF(JL(e));if(r===0)return e;const l=new Proxy(e,r===2?o:n);return s.set(e,l),l}function ba(e){return Ll(e)?ba(e.__v_raw):!!(e&&e.__v_isReactive)}function Ll(e){return!!(e&&e.__v_isReadonly)}function Fi(e){return!!(e&&e.__v_isShallow)}function o0(e){return e?!!e.__v_raw:!1}function Nn(e){const t=e&&e.__v_raw;return t?Nn(t):e}function At(e){return!Hn(e,"__v_skip")&&Object.isExtensible(e)&&I8(e,"__v_skip",!0),e}const Mr=e=>Un(e)?Es(e):e,yd=e=>Un(e)?Dk(e):e;function Do(e){return e?e.__v_isRef===!0:!1}function q(e){return Y8(e,!1)}function _o(e){return Y8(e,!0)}function Y8(e,t){return Do(e)?e:new $F(e,t)}class $F{constructor(t,n){this.dep=new Q1,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Nn(t),this._value=n?t:Mr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Fi(t)||Ll(t);t=o?t:Nn(t),As(t,n)&&(this._rawValue=t,this._value=o?t:Mr(t),this.dep.trigger())}}function NF(e){e.dep&&e.dep.trigger()}function x(e){return Do(e)?e.value:e}function J8(e){return dn(e)?e():x(e)}const LF={get:(e,t,n)=>t==="__v_raw"?e:x(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return Do(s)&&!Do(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function X8(e){return ba(e)?e:new Proxy(e,LF)}class FF{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Q1,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function OF(e){return new FF(e)}function aDe(e){const t=Ht(e)?new Array(e.length):{};for(const n in e)t[n]=Q8(e,n);return t}class RF{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=zi(n)?n:String(n),this._raw=Nn(t);let s=!0,i=t;if(!Ht(t)||zi(this._key)||!K1(this._key))do s=!o0(i)||Fi(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=x(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Do(this._raw[this._key])){const n=this._object[this._key];if(Do(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return hF(this._raw,this._key)}}class PF{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function uDe(e,t,n){return Do(e)?e:dn(e)?new PF(e):Un(e)&&arguments.length>1?Q8(e,t,n):q(e)}function Q8(e,t,n){return new RF(e,t,n)}class DF{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Q1(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wp-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&fo!==this)return R8(this,!0),!0}get value(){const t=this.dep.track();return B8(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function BF(e,t,n=!1){let o,s;return dn(e)?o=e:(o=e.get,s=e.set),new DF(o,s,n)}const cDe={GET:"get",HAS:"has",ITERATE:"iterate"},dDe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Jh={},Sg=new WeakMap;let ua;function fDe(){return ua}function zF(e,t=!1,n=ua){if(n){let o=Sg.get(n);o||Sg.set(n,o=[]),o.push(e)}}function WF(e,t,n=Tn){const{immediate:o,deep:s,once:i,scheduler:r,augmentJob:l,call:a}=n,u=b=>s?b:Fi(b)||s===!1||s===0?xl(b,1):xl(b);let c,d,f,p,h=!1,m=!1;if(Do(e)?(d=()=>e.value,h=Fi(e)):ba(e)?(d=()=>u(e),h=!0):Ht(e)?(m=!0,h=e.some(b=>ba(b)||Fi(b)),d=()=>e.map(b=>{if(Do(b))return b.value;if(ba(b))return u(b);if(dn(b))return a?a(b,2):b()})):dn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){$l();try{f()}finally{Nl()}}const b=ua;ua=c;try{return a?a(e,3,[p]):e(p)}finally{ua=b}}:d=ir,t&&s){const b=d,S=s===!0?1/0:s;d=()=>xl(b(),S)}const k=N2(),w=()=>{c.stop(),k&&k.active&&I2(k.effects,c)};if(i&&t){const b=t;t=(...S)=>{b(...S),w()}}let v=m?new Array(e.length).fill(Jh):Jh;const y=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const S=c.run();if(s||h||(m?S.some((I,T)=>As(I,v[T])):As(S,v))){f&&f();const I=ua;ua=c;try{const T=[S,v===Jh?void 0:m&&v[0]===Jh?[]:v,p];v=S,a?a(t,3,T):t(...T)}finally{ua=I}}}else c.run()};return l&&l(y),c=new xg(d),c.scheduler=r?()=>r(y,!1):y,p=b=>zF(b,!1,c),f=c.onStop=()=>{const b=Sg.get(c);if(b){if(a)a(b,4);else for(const S of b)S();Sg.delete(c)}},t?o?y(!0):v=c.run():r?r(y.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function xl(e,t=1/0,n){if(t<=0||!Un(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Do(e))xl(e.value,t,n);else if(Ht(e))for(let o=0;o{xl(o,t,n)});else if(q1(e)){for(const o in e)xl(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&xl(e[o],t,n)}return e}/** -* @vue/runtime-core v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const eE=[];function HF(e){eE.push(e)}function jF(){eE.pop()}function pDe(e,t){}const hDe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},UF={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function eh(e,t,n,o){try{return o?e(...o):e()}catch(s){Fd(s,t,n)}}function lr(e,t,n,o){if(dn(e)){const s=eh(e,t,n,o);return s&&$2(s)&&s.catch(i=>{Fd(i,t,n)}),s}if(Ht(e)){const s=[];for(let i=0;i>>1,s=Js[o],i=_p(s);i=_p(n)?Js.push(e):Js.splice(qF(t),0,e),e.flags|=1,nE()}}function nE(){Cg||(Cg=tE.then(oE))}function Ag(e){Ht(e)?nd.push(...e):ca&&e.id===-1?ca.splice(Fc+1,0,e):e.flags&1||(nd.push(e),e.flags|=1),nE()}function PS(e,t,n=Ur+1){for(;n_p(n)-_p(o));if(nd.length=0,ca){ca.push(...t);return}for(ca=t,Fc=0;Fce.id==null?e.flags&2?-1:1/0:e.id;function oE(e){try{for(Ur=0;UrOc.emit(s,...i)),Xh=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{sE(i,t)}),setTimeout(()=>{Oc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Xh=[])},3e3)):Xh=[]}let Ts=null,s0=null;function Sp(e){const t=Ts;return Ts=e,s0=e&&e.type.__scopeId||null,t}function mDe(e){s0=e}function gDe(){s0=null}const vDe=e=>ve;function ve(e,t=Ts,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Ng(-1);const i=Sp(t);let r;try{r=e(...s)}finally{Sp(i),o._d&&Ng(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Fn(e,t){if(Ts===null)return e;const n=sh(Ts),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&dn(t)?t.call(o&&o.proxy):t}}function yDe(){return!!(Xo()||Lu)}const KF=Symbol.for("v-scx"),GF=()=>yn(KF);function iE(e,t){return th(e,null,t)}function kDe(e,t){return th(e,null,{flush:"post"})}function ZF(e,t){return th(e,null,{flush:"sync"})}function Ze(e,t,n){return th(e,t,n)}function th(e,t,n=Tn){const{immediate:o,deep:s,flush:i,once:r}=n,l=no({},n),a=t&&o||!t&&i!=="post";let u;if(Wu){if(i==="sync"){const p=GF();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=ir,p.resume=ir,p.pause=ir,p}}const c=Ms;l.call=(p,h,m)=>lr(p,c,h,m);let d=!1;i==="post"?l.scheduler=p=>{Uo(p,c&&c.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(p,h)=>{h?p():R2(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=WF(e,t,l);return Wu&&(u?u.push(f):a&&f()),f}function YF(e,t,n){const o=this.proxy,s=ro(e)?e.includes(".")?rE(o,e):()=>o[e]:e.bind(o,o);let i;dn(t)?i=t:(i=t.handler,n=t);const r=Od(this),l=th(s,i.bind(o),n);return r(),l}function rE(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,yu=e=>e&&(e.disabled||e.disabled===""),JF=e=>e&&(e.defer||e.defer===""),DS=e=>typeof SVGElement<"u"&&e instanceof SVGElement,BS=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Bk=(e,t)=>{const n=e&&e.to;return ro(n)?t?t(n):null:n},XF={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:w}}=u,v=yu(t.props);let{dynamicChildren:y}=t;const b=(T,$,L)=>{T.shapeFlag&16&&c(T.children,$,L,s,i,r,l,a)},S=(T=t)=>{const $=yu(T.props),L=T.target=Bk(T.props,h),P=zk(L,T,m,p);L&&(r!=="svg"&&DS(L)?r="svg":r!=="mathml"&&BS(L)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(L),$||(b(T,L,P),Ff(T,!1)))},I=T=>{const $=()=>{if(ia.get(T)===$){if(ia.delete(T),yu(T.props)){const L=w(T.el)||n;b(T,L,T.anchor),Ff(T,!0)}S(T)}};ia.set(T,$),Uo($,i)};if(e==null){const T=t.el=m(""),$=t.anchor=m("");if(p(T,n,o),p($,n,o),JF(t.props)||i&&i.pendingBranch){I(t);return}v&&(b(t,n,$),Ff(t,!0)),S()}else{t.el=e.el;const T=t.anchor=e.anchor,$=ia.get(e);if($){$.flags|=8,ia.delete(e),I(t);return}t.targetStart=e.targetStart;const L=t.target=e.target,P=t.targetAnchor=e.targetAnchor,R=yu(e.props),M=R?n:L,D=R?T:P;if(r==="svg"||DS(L)?r="svg":(r==="mathml"||BS(L))&&(r="mathml"),y?(f(e.dynamicChildren,y,M,s,i,r,l),q2(e,t,!0)):a||d(e,t,M,D,s,i,r,l,!1),v)R?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Qh(t,n,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const z=t.target=Bk(t.props,h);z&&Qh(t,z,null,u,0)}else R&&Qh(t,L,P,u,1);Ff(t,v)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:f}=e,p=i||!yu(f),h=ia.get(e);if(h&&(h.flags|=8,ia.delete(e)),d&&(s(u),s(c)),i&&s(a),!h&&r&16)for(let m=0;m{e.isMounted=!0}),uo(()=>{e.isUnmounting=!0}),e}const Gi=[Function,Array],cE={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gi,onEnter:Gi,onAfterEnter:Gi,onEnterCancelled:Gi,onBeforeLeave:Gi,onLeave:Gi,onAfterLeave:Gi,onLeaveCancelled:Gi,onBeforeAppear:Gi,onAppear:Gi,onAfterAppear:Gi,onAppearCancelled:Gi},dE=e=>{const t=e.subTree;return t.component?dE(t.component):t},eO={name:"BaseTransition",props:cE,setup(e,{slots:t}){const n=Xo(),o=uE();return()=>{const s=t.default&&P2(t.default(),!0),i=s&&s.length?fE(s):n.subTree?ie():void 0;if(!i)return;const r=Nn(e),{mode:l}=r;if(o.isLeaving)return Vv(i);const a=zS(i);if(!a)return Vv(i);let u=Cp(a,r,o,n,d=>u=d);a.type!==Ko&&Ma(a,u);let c=n.subTree&&zS(n.subTree);if(c&&c.type!==Ko&&!kr(c,a)&&dE(n).type!==Ko){let d=Cp(c,r,o,n);if(Ma(c,d),l==="out-in"&&a.type!==Ko)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Vv(i);l==="in-out"&&a.type!==Ko?d.delayLeave=(f,p,h)=>{const m=pE(o,c);m[String(c.key)]=c,f[Qi]=()=>{p(),f[Qi]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{h(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function fE(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ko){t=n;break}}return t}const tO=eO;function pE(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Cp(e,t,n,o,s){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:w,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),S=pE(n,e),I=(L,P)=>{L&&lr(L,o,9,P)},T=(L,P)=>{const R=P[1];I(L,P),Ht(L)?L.every(M=>M.length<=1)&&R():L.length<=1&&R()},$={mode:r,persisted:l,beforeEnter(L){let P=a;if(!n.isMounted)if(i)P=k||a;else return;L[Qi]&&L[Qi](!0);const R=S[b];R&&kr(e,R)&&R.el[Qi]&&R.el[Qi](),I(P,[L])},enter(L){if(S[b]===e)return;let P=u,R=c,M=d;if(!n.isMounted)if(i)P=w||u,R=v||c,M=y||d;else return;let D=!1;L[hf]=B=>{D||(D=!0,B?I(M,[L]):I(R,[L]),$.delayedLeave&&$.delayedLeave(),L[hf]=void 0)};const z=L[hf].bind(null,!1);P?T(P,[L,z]):z()},leave(L,P){const R=String(e.key);if(L[hf]&&L[hf](!0),n.isUnmounting)return P();I(f,[L]);let M=!1;L[Qi]=z=>{M||(M=!0,P(),z?I(m,[L]):I(h,[L]),L[Qi]=void 0,S[R]===e&&delete S[R])};const D=L[Qi].bind(null,!1);S[R]=e,p?T(p,[L,D]):D()},clone(L){const P=Cp(L,t,n,o,s);return s&&s(P),P}};return $}function Vv(e){if(nh(e))return e=Fl(e),e.children=null,e}function zS(e){if(!nh(e))return aE(e.type)&&e.children?fE(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&dn(n.default))return n.default()}}function Ma(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ma(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function P2(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function WS(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Eg=new WeakMap;function od(e,t,n,o,s=!1){if(Ht(e)){e.forEach((m,k)=>od(m,t&&(Ht(t)?t[k]:t),n,o,s));return}if(Tl(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&od(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?sh(o.component):o.el,r=s?null:i,{i:l,r:a}=e,u=t&&t.r,c=l.refs===Tn?l.refs={}:l.refs,d=l.setupState,f=Nn(d),p=d===Tn?E8:m=>WS(c,m)?!1:Hn(f,m),h=(m,k)=>!(k&&WS(c,k));if(u!=null&&u!==a){if(HS(t),ro(u))c[u]=null,p(u)&&(d[u]=null);else if(Do(u)){const m=t;h(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(dn(a))eh(a,l,12,[r,c]);else{const m=ro(a),k=Do(a);if(m||k){const w=()=>{if(e.f){const v=m?p(a)?d[a]:c[a]:h()||!e.k?a.value:c[e.k];if(s)Ht(v)&&I2(v,i);else if(Ht(v))v.includes(i)||v.push(i);else if(m)c[a]=[i],p(a)&&(d[a]=c[a]);else{const y=[i];h(a,e.k)&&(a.value=y),e.k&&(c[e.k]=y)}}else m?(c[a]=r,p(a)&&(d[a]=r)):k&&(h(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const v=()=>{w(),Eg.delete(e)};v.id=-1,Eg.set(e,v),Uo(v,n)}else HS(e),w()}}}function HS(e){const t=Eg.get(e);t&&(t.flags|=8,Eg.delete(e))}let jS=!1;const xc=()=>{jS||(console.error("Hydration completed but contains mismatches."),jS=!0)},nO=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",oO=e=>e.namespaceURI.includes("MathML"),em=e=>{if(e.nodeType===1){if(nO(e))return"svg";if(oO(e))return"mathml"}},jc=e=>e.nodeType===8;function sO(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(y,b)=>{if(!b.hasChildNodes()){n(null,y,b),Mg(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Mg(),b._vnode=y},d=(y,b,S,I,T,$=!1)=>{$=$||!!b.dynamicChildren;const L=jc(y)&&y.data==="[",P=()=>m(y,b,S,I,T,L),{type:R,ref:M,shapeFlag:D,patchFlag:z}=b;let B=y.nodeType;b.el=y,z===-2&&($=!1,b.dynamicChildren=null);let A=null;switch(R){case wa:B!==3?b.children===""?(a(b.el=s(""),r(y),y),A=y):A=P():(y.data!==b.children&&(xc(),y.data=b.children),A=i(y));break;case Ko:v(y)?(A=i(y),w(b.el=y.content.firstChild,y,S)):B!==8||L?A=P():A=i(y);break;case id:if(L&&(y=i(y),B=y.nodeType),B===1||B===3){A=y;const F=!b.children.length;for(let W=0;W{$=$||!!b.dynamicChildren;const{type:L,props:P,patchFlag:R,shapeFlag:M,dirs:D,transition:z}=b,B=L==="input"||L==="option";if(B||R!==-1){D&&Vr(b,null,S,"created");let A=!1;if(v(y)){A=NE(null,z)&&S&&S.vnode.props&&S.vnode.props.appear;const W=y.content.firstChild;if(A){const j=W.getAttribute("class");j&&(W.$cls=j),z.beforeEnter(W)}w(W,y,S),b.el=y=W}if(M&16&&!(P&&(P.innerHTML||P.textContent))){let W=p(y.firstChild,b,y,S,I,T,$);for(W&&!tm(y,1)&&xc();W;){const j=W;W=W.nextSibling,l(j)}}else if(M&8){let W=b.children;W[0]===` -`&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(W=W.slice(1));const{textContent:j}=y;j!==W&&j!==W.replace(/\r\n|\r/g,` -`)&&(tm(y,0)||xc(),y.textContent=b.children)}if(P){if(B||!$||R&48){const W=y.tagName.includes("-");for(const j in P)(B&&(j.endsWith("value")||j==="indeterminate")||Qp(j)&&!$u(j)||j[0]==="."||W&&!$u(j))&&o(y,j,null,P[j],void 0,S)}else if(P.onClick)o(y,"onClick",null,P.onClick,void 0,S);else if(R&4&&ba(P.style))for(const W in P.style)P.style[W]}let F;(F=P&&P.onVnodeBeforeMount)&&pi(F,S,b),D&&Vr(b,null,S,"beforeMount"),((F=P&&P.onVnodeMounted)||D||A)&&RE(()=>{F&&pi(F,S,b),A&&z.enter(y),D&&Vr(b,null,S,"mounted")},I)}return y.nextSibling},p=(y,b,S,I,T,$,L)=>{L=L||!!b.dynamicChildren;const P=b.children,R=P.length;let M=!1;for(let D=0;D{const{slotScopeIds:L}=b;L&&(T=T?T.concat(L):L);const P=r(y),R=p(i(y),b,P,S,I,T,$);return R&&jc(R)&&R.data==="]"?i(b.anchor=R):(xc(),a(b.anchor=u("]"),P,R),R)},m=(y,b,S,I,T,$)=>{if(tm(y.parentElement,1)||xc(),b.el=null,$){const R=k(y);for(;;){const M=i(y);if(M&&M!==R)l(M);else break}}const L=i(y),P=r(y);return l(y),n(null,b,P,L,S,I,em(P),T),S&&(S.vnode.el=b.el,l0(S,b.el)),L},k=(y,b="[",S="]")=>{let I=0;for(;y;)if(y=i(y),y&&jc(y)&&(y.data===b&&I++,y.data===S)){if(I===0)return i(y);I--}return y},w=(y,b,S)=>{const I=b.parentNode;I&&I.replaceChild(y,b);let T=S;for(;T;)T.vnode.el===b&&(T.vnode.el=T.subTree.el=y),T=T.parent},v=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[c,d]}const US="data-allow-mismatch",iO={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function tm(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(US);)e=e.parentElement;const n=e&&e.getAttribute(US);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(iO[t])}}const rO=J1().requestIdleCallback||(e=>setTimeout(e,1)),lO=J1().cancelIdleCallback||(e=>clearTimeout(e)),wDe=(e=1e4)=>t=>{const n=rO(t,{timeout:e});return()=>lO(n)};function aO(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:r}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(aO(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},_De=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},SDe=(e=[])=>(t,n)=>{ro(e)&&(e=[e]);let o=!1;const s=r=>{o||(o=!0,i(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},i=()=>{n(r=>{for(const l of e)r.removeEventListener(l,s)})};return n(r=>{for(const l of e)r.addEventListener(l,s,{once:!0})}),i};function uO(e,t){if(jc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(jc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Tl=e=>!!e.type.__asyncLoader;function nr(e){dn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:r,suspensible:l=!0,onError:a}=e;let u=null,c,d=0;const f=()=>(d++,u=null,p()),p=()=>{let h;return u||(h=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,w)=>{a(m,()=>k(f()),()=>w(m),d+1)});throw m}).then(m=>h!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return Ge({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const v=()=>{w||k()},y=i?()=>{const b=i(v,S=>uO(h,S));b&&(m.bum||(m.bum=[])).push(b)}:v;c?y():p().then(()=>!m.isUnmounted&&y())},get __asyncResolved(){return c},setup(){const h=Ms;if(D2(h),c)return()=>nm(c,h);const m=y=>{u=null,Fd(y,h,13,!o)};if(l&&h.suspense||Wu)return p().then(y=>()=>nm(y,h)).catch(y=>(m(y),()=>o?Z(o,{error:y}):null));const k=q(!1),w=q(),v=q(!!s);return s&&setTimeout(()=>{v.value=!1},s),r!=null&&setTimeout(()=>{if(!k.value&&!w.value){const y=new Error(`Async component timed out after ${r}ms.`);m(y),w.value=y}},r),p().then(()=>{k.value=!0,h.parent&&nh(h.parent.vnode)&&h.parent.update()}).catch(y=>{m(y),w.value=y}),()=>{if(k.value&&c)return nm(c,h);if(w.value&&o)return Z(o,{error:w.value});if(n&&!v.value)return nm(n,h)}}})}function nm(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,r=Z(e,o,s);return r.ref=n,r.ce=i,delete t.vnode.ce,r}const nh=e=>e.type.__isKeepAlive,cO={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Xo(),o=n.ctx;if(!o.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const s=new Map,i=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=o,f=d("div");o.activate=(v,y,b,S,I)=>{const T=v.component;u(v,y,b,0,l),a(T.vnode,v,y,b,T,l,S,v.slotScopeIds,I),Uo(()=>{T.isDeactivated=!1,T.a&&td(T.a);const $=v.props&&v.props.onVnodeMounted;$&&pi($,T.parent,v)},l)},o.deactivate=v=>{const y=v.component;Ig(y.m),Ig(y.a),u(v,f,null,1,l),Uo(()=>{y.da&&td(y.da);const b=v.props&&v.props.onVnodeUnmounted;b&&pi(b,y.parent,v),y.isDeactivated=!0},l)};function p(v){qv(v),c(v,n,l,!0)}function h(v){s.forEach((y,b)=>{const S=Zk(Tl(y)?y.type.__asyncResolved||{}:y.type);S&&!v(S)&&m(b)})}function m(v){const y=s.get(v);y&&(!r||!kr(y,r))?p(y):r&&qv(r),s.delete(v),i.delete(v)}Ze(()=>[e.include,e.exclude],([v,y])=>{v&&h(b=>Of(v,b)),y&&h(b=>!Of(y,b))},{flush:"post",deep:!0});let k=null;const w=()=>{k!=null&&($g(n.subTree.type)?Uo(()=>{s.set(k,om(n.subTree))},n.subTree.suspense):s.set(k,om(n.subTree)))};return bn(w),B2(w),uo(()=>{s.forEach(v=>{const{subTree:y,suspense:b}=n,S=om(y);if(v.type===S.type&&v.key===S.key){qv(S);const I=S.component.da;I&&Uo(I,b);return}p(v)})}),()=>{if(k=null,!t.default)return r=null;const v=t.default(),y=v[0];if(v.length>1)return r=null,v;if(!Ea(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return r=null,y;let b=om(y);if(b.type===Ko)return r=null,b;const S=b.type,I=Zk(Tl(b)?b.type.__asyncResolved||{}:S),{include:T,exclude:$,max:L}=e;if(T&&(!I||!Of(T,I))||$&&I&&Of($,I))return b.shapeFlag&=-257,r=b,y;const P=b.key==null?S:b.key,R=s.get(P);return b.el&&(b=Fl(b),y.shapeFlag&128&&(y.ssContent=b)),k=P,R?(b.el=R.el,b.component=R.component,b.transition&&Ma(b,b.transition),b.shapeFlag|=512,i.delete(P),i.add(P)):(i.add(P),L&&i.size>parseInt(L,10)&&m(i.values().next().value)),b.shapeFlag|=256,r=b,$g(y.type)?y:b}}},CDe=cO;function Of(e,t){return Ht(e)?e.some(n=>Of(n,t)):ro(e)?e.split(",").includes(t):YL(e)?(e.lastIndex=0,e.test(t)):!1}function dO(e,t){hE(e,"a",t)}function fO(e,t){hE(e,"da",t)}function hE(e,t,n=Ms){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(i0(t,o,n),n){let s=n.parent;for(;s&&s.parent;)nh(s.parent.vnode)&&pO(o,t,n,s),s=s.parent}}function pO(e,t,n,o){const s=i0(t,e,o,!0);Mn(()=>{I2(o[t],s)},n)}function qv(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function om(e){return e.shapeFlag&128?e.ssContent:e}function i0(e,t,n=Ms,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{$l();const l=Od(n),a=lr(t,n,e,r);return l(),Nl(),a});return o?s.unshift(i):s.push(i),i}}const Hl=e=>(t,n=Ms)=>{(!Wu||e==="sp")&&i0(e,(...o)=>t(...o),n)},hO=Hl("bm"),bn=Hl("m"),mE=Hl("bu"),B2=Hl("u"),uo=Hl("bum"),Mn=Hl("um"),mO=Hl("sp"),gO=Hl("rtg"),vO=Hl("rtc");function yO(e,t=Ms){i0("ec",e,t)}const z2="components",kO="directives";function bO(e,t){return W2(z2,e,!0,t)||e}const gE=Symbol.for("v-ndc");function as(e){return ro(e)?W2(z2,e,!1)||e:e||gE}function ADe(e){return W2(kO,e)}function W2(e,t,n=!0,o=!1){const s=Ts||Ms;if(s){const i=s.type;if(e===z2){const l=Zk(i,!1);if(l&&(l===t||l===ds(t)||l===Z1(ds(t))))return i}const r=VS(s[e]||i[e],t)||VS(s.appContext[e],t);return!r&&o?i:r}}function VS(e,t){return e&&(e[t]||e[ds(t)]||e[Z1(ds(t))])}function ot(e,t,n,o){let s;const i=n&&n[o],r=Ht(e);if(r||ro(e)){const l=r&&ba(e);let a=!1,u=!1;l&&(a=!Fi(e),u=Ll(e),e=e0(e)),s=new Array(e.length);for(let c=0,d=e.length;ct(l,a,void 0,i&&i[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,u=l.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function xn(e,t,n={},o,s){if(Ts.ce||Ts.parent&&Tl(Ts.parent)&&Ts.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),he(Ie,null,[Z("slot",n,o&&o())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const r=i&&H2(i(n)),l=n.key||r&&r.key,a=he(Ie,{key:(l&&!zi(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||(o?o():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function H2(e){return e.some(t=>Ea(t)?!(t.type===Ko||t.type===Ie&&!H2(t.children)):!0)?e:null}function MDe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:Km(o)]=e[o];return n}const Wk=e=>e?HE(e)?sh(e):Wk(e.parent):null,ep=no(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Wk(e.parent),$root:e=>Wk(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>j2(e),$forceUpdate:e=>e.f||(e.f=()=>{R2(e.update)}),$nextTick:e=>e.n||(e.n=bt.bind(e.proxy)),$watch:e=>YF.bind(e)}),Kv=(e,t)=>e!==Tn&&!e.__isScriptSetup&&Hn(e,t),Hk={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Kv(o,t))return r[t]=1,o[t];if(s!==Tn&&Hn(s,t))return r[t]=2,s[t];if(Hn(i,t))return r[t]=3,i[t];if(n!==Tn&&Hn(n,t))return r[t]=4,n[t];jk&&(r[t]=0)}}const u=ep[t];let c,d;if(u)return t==="$attrs"&&Ds(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==Tn&&Hn(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,Hn(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return Kv(s,t)?(s[t]=n,!0):o!==Tn&&Hn(o,t)?(o[t]=n,!0):Hn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:r}},l){let a;return!!(n[l]||e!==Tn&&l[0]!=="$"&&Hn(e,l)||Kv(t,l)||Hn(i,l)||Hn(o,l)||Hn(ep,l)||Hn(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Hn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},wO=no({},Hk,{get(e,t){if(t!==Symbol.unscopables)return Hk.get(e,t,e)},has(e,t){return t[0]!=="_"&&!tF(t)}});function EDe(){return null}function TDe(){return null}function IDe(e){}function $De(e){}function NDe(){return null}function LDe(){}function FDe(e,t){return null}function ODe(){return vE().slots}function oh(){return vE().attrs}function vE(e){const t=Xo();return t.setupContext||(t.setupContext=VE(t))}function Mp(e){return Ht(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function RDe(e,t){const n=Mp(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?Ht(s)||dn(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function PDe(e,t){return!e||!t?e||t:Ht(e)&&Ht(t)?e.concat(t):no({},Mp(e),Mp(t))}function DDe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function BDe(e){const t=Xo(),n=Wu;let o=e();Tp(),n&&rd(!1);const s=()=>{Od(t),n&&rd(!0)},i=()=>{Xo()!==t&&t.scope.off(),Tp(),n&&rd(!1)};return $2(o)&&(o=o.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),r})),[o,()=>{s(),Promise.resolve().then(i)}]}let jk=!0;function xO(e){const t=j2(e),n=e.proxy,o=e.ctx;jk=!1,t.beforeCreate&&qS(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:w,beforeUnmount:v,destroyed:y,unmounted:b,render:S,renderTracked:I,renderTriggered:T,errorCaptured:$,serverPrefetch:L,expose:P,inheritAttrs:R,components:M,directives:D,filters:z}=t;if(u&&_O(u,o,null),r)for(const F in r){const W=r[F];dn(W)&&(o[F]=W.bind(n))}if(s){const F=s.call(n,n);Un(F)&&(e.data=Es(F))}if(jk=!0,i)for(const F in i){const W=i[F],j=dn(W)?W.bind(n,n):dn(W.get)?W.get.bind(n,n):ir,le=!dn(W)&&dn(W.set)?W.set.bind(n):ir,J=O({get:j,set:le});Object.defineProperty(o,F,{enumerable:!0,configurable:!0,get:()=>J.value,set:X=>J.value=X})}if(l)for(const F in l)yE(l[F],o,n,F);if(a){const F=dn(a)?a.call(n):a;Reflect.ownKeys(F).forEach(W=>{Wn(W,F[W])})}c&&qS(c,e,"c");function A(F,W){Ht(W)?W.forEach(j=>F(j.bind(n))):W&&F(W.bind(n))}if(A(hO,d),A(bn,f),A(mE,p),A(B2,h),A(dO,m),A(fO,k),A(yO,$),A(vO,I),A(gO,T),A(uo,v),A(Mn,b),A(mO,L),Ht(P))if(P.length){const F=e.exposed||(e.exposed={});P.forEach(W=>{Object.defineProperty(F,W,{get:()=>n[W],set:j=>n[W]=j,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===ir&&(e.render=S),R!=null&&(e.inheritAttrs=R),M&&(e.components=M),D&&(e.directives=D),L&&D2(e)}function _O(e,t,n=ir){Ht(e)&&(e=Uk(e));for(const o in e){const s=e[o];let i;Un(s)?"default"in s?i=yn(s.from||o,s.default,!0):i=yn(s.from||o):i=yn(s),Do(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function qS(e,t,n){lr(Ht(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function yE(e,t,n,o){let s=o.includes(".")?rE(n,o):()=>n[o];if(ro(e)){const i=t[e];dn(i)&&Ze(s,i)}else if(dn(e))Ze(s,e.bind(n));else if(Un(e))if(Ht(e))e.forEach(i=>yE(i,t,n,o));else{const i=dn(e.handler)?e.handler.bind(n):t[e.handler];dn(i)&&Ze(s,i,e)}}function j2(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let a;return l?a=l:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(u=>Tg(a,u,r,!0)),Tg(a,t,r)),Un(t)&&i.set(t,a),a}function Tg(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&Tg(e,i,n,!0),s&&s.forEach(r=>Tg(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=SO[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const SO={data:KS,props:GS,emits:GS,methods:Rf,computed:Rf,beforeCreate:qs,created:qs,beforeMount:qs,mounted:qs,beforeUpdate:qs,updated:qs,beforeDestroy:qs,beforeUnmount:qs,destroyed:qs,unmounted:qs,activated:qs,deactivated:qs,errorCaptured:qs,serverPrefetch:qs,components:Rf,directives:Rf,watch:AO,provide:KS,inject:CO};function KS(e,t){return t?e?function(){return no(dn(e)?e.call(this,this):e,dn(t)?t.call(this,this):t)}:t:e}function CO(e,t){return Rf(Uk(e),Uk(t))}function Uk(e){if(Ht(e)){const t={};for(let n=0;n{let c,d=Tn,f;return ZF(()=>{const p=e[s];As(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const h=n.set?n.set(p):p;if(!As(h,c)&&!(d!==Tn&&As(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(c=p,u()),o.emit(`update:${t}`,h),As(p,h)&&As(p,d)&&!As(h,f)&&u(),d=p,f=h}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||Tn:l,done:!1}:{done:!0}}}},l}const bE=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ds(t)}Modifiers`]||e[`${bi(t)}Modifiers`];function TO(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Tn;let s=n;const i=t.startsWith("update:"),r=i&&bE(o,t.slice(7));r&&(r.trim&&(s=n.map(c=>ro(c)?c.trim():c)),r.number&&(s=n.map(Y1)));let l,a=o[l=Km(t)]||o[l=Km(ds(t))];!a&&i&&(a=o[l=Km(bi(t))]),a&&lr(a,e,6,s);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,lr(u,e,6,s)}}const IO=new WeakMap;function wE(e,t,n=!1){const o=n?IO:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let r={},l=!1;if(!dn(e)){const a=u=>{const c=wE(u,t,!0);c&&(l=!0,no(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(Un(e)&&o.set(e,null),null):(Ht(i)?i.forEach(a=>r[a]=null):no(r,i),Un(e)&&o.set(e,r),r)}function r0(e,t){return!e||!Qp(t)?!1:(t=t.slice(2).replace(/Once$/,""),Hn(e,t[0].toLowerCase()+t.slice(1))||Hn(e,bi(t))||Hn(e,t))}function Zm(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=Sp(e);let w,v;try{if(n.shapeFlag&4){const b=s||o,S=b;w=ki(u.call(S,b,c,d,p,f,h)),v=l}else{const b=t;w=ki(b.length>1?b(d,{attrs:l,slots:r,emit:a}):b(d,null)),v=t.props?l:NO(l)}}catch(b){tp.length=0,Fd(b,e,1),w=Z(Ko)}let y=w;if(v&&m!==!1){const b=Object.keys(v),{shapeFlag:S}=y;b.length&&S&7&&(i&&b.some(V1)&&(v=LO(v,i)),y=Fl(y,v,!1,!0))}return n.dirs&&(y=Fl(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&Ma(y,n.transition),w=y,Sp(k),w}function $O(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||Qp(n))&&((t||(t={}))[n]=e[n]);return t},LO=(e,t)=>{const n={};for(const o in e)(!V1(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function FO(e,t,n){const{props:o,children:s,component:i}=e,{props:r,children:l,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?ZS(o,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;dObject.create(_E),CE=e=>Object.getPrototypeOf(e)===_E;function OO(e,t,n,o=!1){const s={},i=SE();e.propsDefaults=Object.create(null),AE(e,t,s,i);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=o?s:IF(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function RO(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:r}}=e,l=Nn(s),[a]=e.propsOptions;let u=!1;if((o||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=ME(d,t,!0);no(r,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!a)return Un(e)&&o.set(e,Qc),Qc;if(Ht(i))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",V2=e=>Ht(e)?e.map(ki):[ki(e)],DO=(e,t,n)=>{if(t._n)return t;const o=ve((...s)=>V2(t(...s)),n);return o._c=!1,o},EE=(e,t,n)=>{const o=e._ctx;for(const s in e){if(U2(s))continue;const i=e[s];if(dn(i))t[s]=DO(s,i,o);else if(i!=null){const r=V2(i);t[s]=()=>r}}},TE=(e,t)=>{const n=V2(t);e.slots.default=()=>n},IE=(e,t,n)=>{for(const o in t)(n||!U2(o))&&(e[o]=t[o])},BO=(e,t,n)=>{const o=e.slots=SE();if(e.vnode.shapeFlag&32){const s=t._;s?(IE(o,t,n),n&&I8(o,"_",s,!0)):EE(t,o)}else t&&TE(e,t)},zO=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,r=Tn;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:IE(s,t,n):(i=!t.$stable,EE(t,s)),r=t}else t&&(TE(e,t),r={default:1});if(i)for(const l in s)!U2(l)&&r[l]==null&&delete s[l]},Uo=RE;function WO(e){return $E(e)}function HO(e){return $E(e,sO)}function $E(e,t){const n=J1();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=ir,insertStaticContent:h}=e,m=(H,Y,ke,Se=null,ye=null,ne=null,ce=void 0,xe=null,fe=!!Y.dynamicChildren)=>{if(H===Y)return;H&&!kr(H,Y)&&(Se=ge(H),X(H,ye,ne,!0),H=null),Y.patchFlag===-2&&(fe=!1,Y.dynamicChildren=null);const{type:ue,ref:we,shapeFlag:se}=Y;switch(ue){case wa:k(H,Y,ke,Se);break;case Ko:w(H,Y,ke,Se);break;case id:H==null&&v(Y,ke,Se,ce);break;case Ie:M(H,Y,ke,Se,ye,ne,ce,xe,fe);break;default:se&1?S(H,Y,ke,Se,ye,ne,ce,xe,fe):se&6?D(H,Y,ke,Se,ye,ne,ce,xe,fe):(se&64||se&128)&&ue.process(H,Y,ke,Se,ye,ne,ce,xe,fe,me)}we!=null&&ye?od(we,H&&H.ref,ne,Y||H,!Y):we==null&&H&&H.ref!=null&&od(H.ref,null,ne,H,!0)},k=(H,Y,ke,Se)=>{if(H==null)o(Y.el=l(Y.children),ke,Se);else{const ye=Y.el=H.el;Y.children!==H.children&&u(ye,Y.children)}},w=(H,Y,ke,Se)=>{H==null?o(Y.el=a(Y.children||""),ke,Se):Y.el=H.el},v=(H,Y,ke,Se)=>{[H.el,H.anchor]=h(H.children,Y,ke,Se,H.el,H.anchor)},y=({el:H,anchor:Y},ke,Se)=>{let ye;for(;H&&H!==Y;)ye=f(H),o(H,ke,Se),H=ye;o(Y,ke,Se)},b=({el:H,anchor:Y})=>{let ke;for(;H&&H!==Y;)ke=f(H),s(H),H=ke;s(Y)},S=(H,Y,ke,Se,ye,ne,ce,xe,fe)=>{if(Y.type==="svg"?ce="svg":Y.type==="math"&&(ce="mathml"),H==null)I(Y,ke,Se,ye,ne,ce,xe,fe);else{const ue=H.el&&H.el._isVueCE?H.el:null;try{ue&&ue._beginPatch(),L(H,Y,ye,ne,ce,xe,fe)}finally{ue&&ue._endPatch()}}},I=(H,Y,ke,Se,ye,ne,ce,xe)=>{let fe,ue;const{props:we,shapeFlag:se,transition:_e,dirs:Re}=H;if(fe=H.el=r(H.type,ne,we&&we.is,we),se&8?c(fe,H.children):se&16&&$(H.children,fe,null,Se,ye,Gv(H,ne),ce,xe),Re&&Vr(H,null,Se,"created"),T(fe,H,H.scopeId,ce,Se),we){for(const ct in we)ct!=="value"&&!$u(ct)&&i(fe,ct,null,we[ct],ne,Se);"value"in we&&i(fe,"value",null,we.value,ne),(ue=we.onVnodeBeforeMount)&&pi(ue,Se,H)}Re&&Vr(H,null,Se,"beforeMount");const lt=NE(ye,_e);lt&&_e.beforeEnter(fe),o(fe,Y,ke),((ue=we&&we.onVnodeMounted)||lt||Re)&&Uo(()=>{try{ue&&pi(ue,Se,H),lt&&_e.enter(fe),Re&&Vr(H,null,Se,"mounted")}finally{}},ye)},T=(H,Y,ke,Se,ye)=>{if(ke&&p(H,ke),Se)for(let ne=0;ne{for(let ue=fe;ue{const xe=Y.el=H.el;let{patchFlag:fe,dynamicChildren:ue,dirs:we}=Y;fe|=H.patchFlag&16;const se=H.props||Tn,_e=Y.props||Tn;let Re;if(ke&&iu(ke,!1),(Re=_e.onVnodeBeforeUpdate)&&pi(Re,ke,Y,H),we&&Vr(Y,H,ke,"beforeUpdate"),ke&&iu(ke,!0),(se.innerHTML&&_e.innerHTML==null||se.textContent&&_e.textContent==null)&&c(xe,""),ue?P(H.dynamicChildren,ue,xe,ke,Se,Gv(Y,ye),ne):ce||W(H,Y,xe,null,ke,Se,Gv(Y,ye),ne,!1),fe>0){if(fe&16)R(xe,se,_e,ke,ye);else if(fe&2&&se.class!==_e.class&&i(xe,"class",null,_e.class,ye),fe&4&&i(xe,"style",se.style,_e.style,ye),fe&8){const lt=Y.dynamicProps;for(let ct=0;ct{Re&&pi(Re,ke,Y,H),we&&Vr(Y,H,ke,"updated")},Se)},P=(H,Y,ke,Se,ye,ne,ce)=>{for(let xe=0;xe{if(Y!==ke){if(Y!==Tn)for(const ne in Y)!$u(ne)&&!(ne in ke)&&i(H,ne,Y[ne],null,ye,Se);for(const ne in ke){if($u(ne))continue;const ce=ke[ne],xe=Y[ne];ce!==xe&&ne!=="value"&&i(H,ne,xe,ce,ye,Se)}"value"in ke&&i(H,"value",Y.value,ke.value,ye)}},M=(H,Y,ke,Se,ye,ne,ce,xe,fe)=>{const ue=Y.el=H?H.el:l(""),we=Y.anchor=H?H.anchor:l("");let{patchFlag:se,dynamicChildren:_e,slotScopeIds:Re}=Y;Re&&(xe=xe?xe.concat(Re):Re),H==null?(o(ue,ke,Se),o(we,ke,Se),$(Y.children||[],ke,we,ye,ne,ce,xe,fe)):se>0&&se&64&&_e&&H.dynamicChildren&&H.dynamicChildren.length===_e.length?(P(H.dynamicChildren,_e,ke,ye,ne,ce,xe),(Y.key!=null||ye&&Y===ye.subTree)&&q2(H,Y,!0)):W(H,Y,ke,we,ye,ne,ce,xe,fe)},D=(H,Y,ke,Se,ye,ne,ce,xe,fe)=>{Y.slotScopeIds=xe,H==null?Y.shapeFlag&512?ye.ctx.activate(Y,ke,Se,ce,fe):z(Y,ke,Se,ye,ne,ce,fe):B(H,Y,fe)},z=(H,Y,ke,Se,ye,ne,ce)=>{const xe=H.component=WE(H,Se,ye);if(nh(H)&&(xe.ctx.renderer=me),jE(xe,!1,ce),xe.asyncDep){if(ye&&ye.registerDep(xe,A,ce),!H.el){const fe=xe.subTree=Z(Ko);w(null,fe,Y,ke),H.placeholder=fe.el}}else A(xe,H,Y,ke,ye,ne,ce)},B=(H,Y,ke)=>{const Se=Y.component=H.component;if(FO(H,Y,ke))if(Se.asyncDep&&!Se.asyncResolved){F(Se,Y,ke);return}else Se.next=Y,Se.update();else Y.el=H.el,Se.vnode=Y},A=(H,Y,ke,Se,ye,ne,ce)=>{const xe=()=>{if(H.isMounted){let{next:se,bu:_e,u:Re,parent:lt,vnode:ct}=H;{const Je=LE(H);if(Je){se&&(se.el=ct.el,F(H,se,ce)),Je.asyncDep.then(()=>{Uo(()=>{H.isUnmounted||ue()},ye)});return}}let Ct=se,Mt;iu(H,!1),se?(se.el=ct.el,F(H,se,ce)):se=ct,_e&&td(_e),(Mt=se.props&&se.props.onVnodeBeforeUpdate)&&pi(Mt,lt,se,ct),iu(H,!0);const Bt=Zm(H),Vt=H.subTree;H.subTree=Bt,m(Vt,Bt,d(Vt.el),ge(Vt),H,ye,ne),se.el=Bt.el,Ct===null&&l0(H,Bt.el),Re&&Uo(Re,ye),(Mt=se.props&&se.props.onVnodeUpdated)&&Uo(()=>pi(Mt,lt,se,ct),ye)}else{let se;const{el:_e,props:Re}=Y,{bm:lt,m:ct,parent:Ct,root:Mt,type:Bt}=H,Vt=Tl(Y);if(iu(H,!1),lt&&td(lt),!Vt&&(se=Re&&Re.onVnodeBeforeMount)&&pi(se,Ct,Y),iu(H,!0),_e&&oe){const Je=()=>{H.subTree=Zm(H),oe(_e,H.subTree,H,ye,null)};Vt&&Bt.__asyncHydrate?Bt.__asyncHydrate(_e,H,Je):Je()}else{Mt.ce&&Mt.ce._hasShadowRoot()&&Mt.ce._injectChildStyle(Bt,H.parent?H.parent.type:void 0);const Je=H.subTree=Zm(H);m(null,Je,ke,Se,H,ye,ne),Y.el=Je.el}if(ct&&Uo(ct,ye),!Vt&&(se=Re&&Re.onVnodeMounted)){const Je=Y;Uo(()=>pi(se,Ct,Je),ye)}(Y.shapeFlag&256||Ct&&Tl(Ct.vnode)&&Ct.vnode.shapeFlag&256)&&H.a&&Uo(H.a,ye),H.isMounted=!0,Y=ke=Se=null}};H.scope.on();const fe=H.effect=new xg(xe);H.scope.off();const ue=H.update=fe.run.bind(fe),we=H.job=fe.runIfDirty.bind(fe);we.i=H,we.id=H.uid,fe.scheduler=()=>R2(we),iu(H,!0),ue()},F=(H,Y,ke)=>{Y.component=H;const Se=H.vnode.props;H.vnode=Y,H.next=null,RO(H,Y.props,Se,ke),zO(H,Y.children,ke),$l(),PS(H),Nl()},W=(H,Y,ke,Se,ye,ne,ce,xe,fe=!1)=>{const ue=H&&H.children,we=H?H.shapeFlag:0,se=Y.children,{patchFlag:_e,shapeFlag:Re}=Y;if(_e>0){if(_e&128){le(ue,se,ke,Se,ye,ne,ce,xe,fe);return}else if(_e&256){j(ue,se,ke,Se,ye,ne,ce,xe,fe);return}}Re&8?(we&16&&K(ue,ye,ne),se!==ue&&c(ke,se)):we&16?Re&16?le(ue,se,ke,Se,ye,ne,ce,xe,fe):K(ue,ye,ne,!0):(we&8&&c(ke,""),Re&16&&$(se,ke,Se,ye,ne,ce,xe,fe))},j=(H,Y,ke,Se,ye,ne,ce,xe,fe)=>{H=H||Qc,Y=Y||Qc;const ue=H.length,we=Y.length,se=Math.min(ue,we);let _e;for(_e=0;_ewe?K(H,ye,ne,!0,!1,se):$(Y,ke,Se,ye,ne,ce,xe,fe,se)},le=(H,Y,ke,Se,ye,ne,ce,xe,fe)=>{let ue=0;const we=Y.length;let se=H.length-1,_e=we-1;for(;ue<=se&&ue<=_e;){const Re=H[ue],lt=Y[ue]=fe?kl(Y[ue]):ki(Y[ue]);if(kr(Re,lt))m(Re,lt,ke,null,ye,ne,ce,xe,fe);else break;ue++}for(;ue<=se&&ue<=_e;){const Re=H[se],lt=Y[_e]=fe?kl(Y[_e]):ki(Y[_e]);if(kr(Re,lt))m(Re,lt,ke,null,ye,ne,ce,xe,fe);else break;se--,_e--}if(ue>se){if(ue<=_e){const Re=_e+1,lt=Re_e)for(;ue<=se;)X(H[ue],ye,ne,!0),ue++;else{const Re=ue,lt=ue,ct=new Map;for(ue=lt;ue<=_e;ue++){const Rt=Y[ue]=fe?kl(Y[ue]):ki(Y[ue]);Rt.key!=null&&ct.set(Rt.key,ue)}let Ct,Mt=0;const Bt=_e-lt+1;let Vt=!1,Je=0;const tt=new Array(Bt);for(ue=0;ue=Bt){X(Rt,ye,ne,!0);continue}let Fe;if(Rt.key!=null)Fe=ct.get(Rt.key);else for(Ct=lt;Ct<=_e;Ct++)if(tt[Ct-lt]===0&&kr(Rt,Y[Ct])){Fe=Ct;break}Fe===void 0?X(Rt,ye,ne,!0):(tt[Fe-lt]=ue+1,Fe>=Je?Je=Fe:Vt=!0,m(Rt,Y[Fe],ke,null,ye,ne,ce,xe,fe),Mt++)}const dt=Vt?jO(tt):Qc;for(Ct=dt.length-1,ue=Bt-1;ue>=0;ue--){const Rt=lt+ue,Fe=Y[Rt],Ye=Y[Rt+1],it=Rt+1{const{el:ne,type:ce,transition:xe,children:fe,shapeFlag:ue}=H;if(ue&6){J(H.component.subTree,Y,ke,Se);return}if(ue&128){H.suspense.move(Y,ke,Se);return}if(ue&64){ce.move(H,Y,ke,me);return}if(ce===Ie){o(ne,Y,ke);for(let se=0;sexe.enter(ne),ye));else{const{leave:se,delayLeave:_e,afterLeave:Re}=xe,lt=()=>{H.ctx.isUnmounted?s(ne):o(ne,Y,ke)},ct=()=>{const Ct=ne._isLeaving||!!ne[Qi];ne._isLeaving&&ne[Qi](!0),xe.persisted&&!Ct?lt():se(ne,()=>{lt(),Re&&Re()})};_e?_e(ne,lt,ct):ct()}else o(ne,Y,ke)},X=(H,Y,ke,Se=!1,ye=!1)=>{const{type:ne,props:ce,ref:xe,children:fe,dynamicChildren:ue,shapeFlag:we,patchFlag:se,dirs:_e,cacheIndex:Re,memo:lt}=H;if(se===-2&&(ye=!1),xe!=null&&($l(),od(xe,null,ke,H,!0),Nl()),Re!=null&&(Y.renderCache[Re]=void 0),we&256){Y.ctx.deactivate(H);return}const ct=we&1&&_e,Ct=!Tl(H);let Mt;if(Ct&&(Mt=ce&&ce.onVnodeBeforeUnmount)&&pi(Mt,Y,H),we&6)ee(H.component,ke,Se);else{if(we&128){H.suspense.unmount(ke,Se);return}ct&&Vr(H,null,Y,"beforeUnmount"),we&64?H.type.remove(H,Y,ke,me,Se):ue&&!ue.hasOnce&&(ne!==Ie||se>0&&se&64)?K(ue,Y,ke,!1,!0):(ne===Ie&&se&384||!ye&&we&16)&&K(fe,Y,ke),Se&&G(H)}const Bt=lt!=null&&Re==null;(Ct&&(Mt=ce&&ce.onVnodeUnmounted)||ct||Bt)&&Uo(()=>{Mt&&pi(Mt,Y,H),ct&&Vr(H,null,Y,"unmounted"),Bt&&(H.el=null)},ke)},G=H=>{const{type:Y,el:ke,anchor:Se,transition:ye}=H;if(Y===Ie){Q(ke,Se);return}if(Y===id){b(H);return}const ne=()=>{s(ke),ye&&!ye.persisted&&ye.afterLeave&&ye.afterLeave()};if(H.shapeFlag&1&&ye&&!ye.persisted){const{leave:ce,delayLeave:xe}=ye,fe=()=>ce(ke,ne);xe?xe(H.el,ne,fe):fe()}else ne()},Q=(H,Y)=>{let ke;for(;H!==Y;)ke=f(H),s(H),H=ke;s(Y)},ee=(H,Y,ke)=>{const{bum:Se,scope:ye,job:ne,subTree:ce,um:xe,m:fe,a:ue}=H;Ig(fe),Ig(ue),Se&&td(Se),ye.stop(),ne&&(ne.flags|=8,X(ce,H,Y,ke)),xe&&Uo(xe,Y),Uo(()=>{H.isUnmounted=!0},Y)},K=(H,Y,ke,Se=!1,ye=!1,ne=0)=>{for(let ce=ne;ce{if(H.shapeFlag&6)return ge(H.component.subTree);if(H.shapeFlag&128)return H.suspense.next();const Y=f(H.anchor||H.el),ke=Y&&Y[lE];return ke?f(ke):Y};let Ce=!1;const ze=(H,Y,ke)=>{let Se;H==null?Y._vnode&&(X(Y._vnode,null,null,!0),Se=Y._vnode.component):m(Y._vnode||null,H,Y,null,null,null,ke),Y._vnode=H,Ce||(Ce=!0,PS(Se),Mg(),Ce=!1)},me={p:m,um:X,m:J,r:G,mt:z,mc:$,pc:W,pbc:P,n:ge,o:e};let te,oe;return t&&([te,oe]=t(me)),{render:ze,hydrate:te,createApp:EO(ze,te)}}function Gv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function iu({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function NE(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function q2(e,t,n=!1){const o=e.children,s=t.children;if(Ht(o)&&Ht(s))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function LE(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:LE(t)}function Ig(e){if(e)for(let t=0;te.__isSuspense;let qk=0;const UO={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,r,l,a,u){if(e==null)VO(t,n,o,s,i,r,l,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}qO(e,t,n,o,s,r,l,a,u)}},hydrate:KO,normalize:GO},WDe=UO;function Ep(e,t){const n=e.props&&e.props[t];dn(n)&&n()}function VO(e,t,n,o,s,i,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=OE(e,s,o,t,d,n,i,r,l,a);u(null,f.pendingBranch=e.ssContent,d,null,o,f,i,r),f.deps>0?(Ep(e,"onPending"),Ep(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,i,r),sd(f,e.ssFallback)):f.resolve(!1,!0)}function qO(e,t,n,o,s,i,r,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:w}=d;if(m)d.pendingBranch=f,kr(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():k&&(w||(a(h,p,n,o,s,null,i,r,l),sd(d,p)))):(d.pendingId=qk++,w?(d.isHydrating=!1,d.activeBranch=m):u(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,r,l),sd(d,p))):h&&kr(h,f)?(a(h,f,n,o,s,d,i,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0&&d.resolve()));else if(h&&kr(h,f))a(h,f,n,o,s,d,i,r,l),sd(d,f);else if(Ep(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=qk++,a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0)d.resolve();else{const{timeout:v,pendingId:y}=d;v>0?setTimeout(()=>{d.pendingId===y&&d.fallback(p)},v):v===0&&d.fallback(p)}}function OE(e,t,n,o,s,i,r,l,a,u,c=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=u;let w;const v=ZO(e);v&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const y=e.props?wg(e.props.timeout):void 0,b=i,S={vnode:e,parent:t,parentComponent:n,namespace:r,container:o,hiddenContainer:s,deps:0,pendingId:qk++,timeout:typeof y=="number"?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(I=!1,T=!1){const{vnode:$,activeBranch:L,pendingBranch:P,pendingId:R,effects:M,parentComponent:D,container:z,isInFallback:B}=S;let A=!1;if(S.isHydrating)S.isHydrating=!1;else if(!I){A=L&&P.transition&&P.transition.mode==="out-in";let j=!1;A&&(L.transition.afterLeave=()=>{R===S.pendingId&&(f(P,z,i===b&&!j?h(L):i,0),Ag(M),B&&$.ssFallback&&($.ssFallback.el=null))}),L&&!S.isFallbackMountPending&&(m(L.el)===z&&(i=h(L),j=!0),p(L,D,S,!0),!A&&B&&$.ssFallback&&Uo(()=>$.ssFallback.el=null,S)),A||f(P,z,i,0)}S.isFallbackMountPending=!1,sd(S,P),S.pendingBranch=null,S.isInFallback=!1;let F=S.parent,W=!1;for(;F;){if(F.pendingBranch){F.effects.push(...M),W=!0;break}F=F.parent}!W&&!A&&Ag(M),S.effects=[],v&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!T&&t.resolve()),Ep($,"onResolve")},fallback(I){if(!S.pendingBranch)return;const{vnode:T,activeBranch:$,parentComponent:L,container:P,namespace:R}=S;Ep(T,"onFallback");const M=h($),D=()=>{S.isFallbackMountPending=!1,S.isInFallback&&(d(null,I,P,M,L,null,R,l,a),sd(S,I))},z=I.transition&&I.transition.mode==="out-in";z&&(S.isFallbackMountPending=!0,$.transition.afterLeave=D),S.isInFallback=!0,p($,L,null,!0),z||D()},move(I,T,$){S.activeBranch&&f(S.activeBranch,I,T,$),S.container=I},next(){return S.activeBranch&&h(S.activeBranch)},registerDep(I,T,$){const L=!!S.pendingBranch;L&&S.deps++;const P=I.vnode.el;I.asyncDep.catch(R=>{Fd(R,I,0)}).then(R=>{if(I.isUnmounted||S.isUnmounted||S.pendingId!==I.suspenseId)return;Tp(),I.asyncResolved=!0;const{vnode:M}=I;Kk(I,R,!1),P&&(M.el=P);const D=!P&&I.subTree.el;T(I,M,m(P||I.subTree.el),P?null:h(I.subTree),S,r,$),D&&(M.placeholder=null,k(D)),l0(I,M.el),L&&--S.deps===0&&S.resolve()})},unmount(I,T){S.isUnmounted=!0,S.activeBranch&&p(S.activeBranch,n,I,T),S.pendingBranch&&p(S.pendingBranch,n,I,T)}};return S}function KO(e,t,n,o,s,i,r,l,a){const u=t.suspense=OE(t,o,n,e.parentNode,document.createElement("div"),null,s,i,r,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,r);return u.deps===0&&u.resolve(!1,!0),c}function GO(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=JS(o?n.default:n),e.ssFallback=o?JS(n.fallback):Z(Ko)}function JS(e){let t;if(dn(e)){const n=zu&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=zs,PE())}return Ht(e)&&(e=$O(e)),e=ki(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function RE(e,t){t&&t.pendingBranch?Ht(e)?t.effects.push(...e):t.effects.push(e):Ag(e)}function sd(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,l0(o,s))}function ZO(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ie=Symbol.for("v-fgt"),wa=Symbol.for("v-txt"),Ko=Symbol.for("v-cmt"),id=Symbol.for("v-stc"),tp=[];let zs=null;function g(e=!1){tp.push(zs=e?null:[])}function PE(){tp.pop(),zs=tp[tp.length-1]||null}let zu=1;function Ng(e,t=!1){zu+=e,e<0&&zs&&t&&(zs.hasOnce=!0)}function DE(e){return e.dynamicChildren=zu>0?zs||Qc:null,PE(),zu>0&&zs&&zs.push(e),e}function C(e,t,n,o,s,i){return DE(_(e,t,n,o,s,i,!0))}function he(e,t,n,o,s){return DE(Z(e,t,n,o,s,!0))}function Ea(e){return e?e.__v_isVNode===!0:!1}function kr(e,t){return e.type===t.type&&e.key===t.key}function HDe(e){}const BE=({key:e})=>e??null,Ym=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ro(e)||Do(e)||dn(e)?{i:Ts,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,o=0,s=null,i=e===Ie?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&BE(t),ref:t&&Ym(t),scopeId:s0,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ts};return l?(G2(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=ro(n)?8:16),zu>0&&!r&&zs&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&zs.push(a),a}const Z=YO;function YO(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===gE)&&(e=Ko),Ea(e)){const l=Fl(e,t,!0);return n&&G2(l,n),zu>0&&!i&&zs&&(l.shapeFlag&6?zs[zs.indexOf(e)]=l:zs.push(l)),l.patchFlag=-2,l}if(tR(e)&&(e=e.__vccOpts),t){t=zE(t);let{class:l,style:a}=t;l&&!ro(l)&&(t.class=Be(l)),Un(a)&&(o0(a)&&!Ht(a)&&(a=no({},a)),t.style=Ut(a))}const r=ro(e)?1:$g(e)?128:aE(e)?64:Un(e)?4:dn(e)?2:0;return _(e,t,n,o,s,r,i,!0)}function zE(e){return e?o0(e)||CE(e)?no({},e):e:null}function Fl(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:r,children:l,transition:a}=e,u=t?jn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&BE(u),ref:t&&t.ref?n&&i?Ht(i)?i.concat(Ym(t)):[i,Ym(t)]:Ym(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Fl(e.ssContent),ssFallback:e.ssFallback&&Fl(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ma(c,a.clone(c)),c}function Ve(e=" ",t=0){return Z(wa,null,e,t)}function K2(e,t){const n=Z(id,null,e);return n.staticCount=t,n}function ie(e="",t=!1){return t?(g(),he(Ko,null,e)):Z(Ko,null,e)}function ki(e){return e==null||typeof e=="boolean"?Z(Ko):Ht(e)?Z(Ie,null,e.slice()):Ea(e)?kl(e):Z(wa,null,String(e))}function kl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Fl(e)}function G2(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Ht(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),G2(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!CE(t)?t._ctx=Ts:s===3&&Ts&&(Ts.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else dn(t)?(t={default:t,_ctx:Ts},n=32):(t=String(t),o&64?(n=16,t=[Ve(t)]):n=8);e.children=t,e.shapeFlag|=n}function jn(...e){const t={};for(let n=0;nMs||Ts;let Lg,rd;{const e=J1(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(r=>r(i)):s[0](i)}};Lg=t("__VUE_INSTANCE_SETTERS__",n=>Ms=n),rd=t("__VUE_SSR_SETTERS__",n=>Wu=n)}const Od=e=>{const t=Ms;return Lg(e),e.scope.on(),()=>{e.scope.off(),Lg(t)}},Tp=()=>{Ms&&Ms.scope.off(),Lg(null)};function HE(e){return e.vnode.shapeFlag&4}let Wu=!1;function jE(e,t=!1,n=!1){t&&rd(t);const{props:o,children:s}=e.vnode,i=HE(e);OO(e,o,i,t),BO(e,s,n||t);const r=i?QO(e,t):void 0;return t&&rd(!1),r}function QO(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Hk);const{setup:o}=n;if(o){$l();const s=e.setupContext=o.length>1?VE(e):null,i=Od(e),r=eh(o,e,0,[e.props,s]),l=$2(r);if(Nl(),i(),(l||e.sp)&&!Tl(e)&&D2(e),l){if(r.then(Tp,Tp),t)return r.then(a=>{Kk(e,a,t)}).catch(a=>{Fd(a,e,0)});e.asyncDep=r}else Kk(e,r,t)}else UE(e,t)}function Kk(e,t,n){dn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Un(t)&&(e.setupState=X8(t)),UE(e,n)}let Fg,Gk;function jDe(e){Fg=e,Gk=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,wO))}}const UDe=()=>!Fg;function UE(e,t,n){const o=e.type;if(!e.render){if(!t&&Fg&&!o.render){const s=o.template||j2(e).template;if(s){const{isCustomElement:i,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,u=no(no({isCustomElement:i,delimiters:l},r),a);o.render=Fg(s,u)}}e.render=o.render||ir,Gk&&Gk(e)}{const s=Od(e);$l();try{xO(e)}finally{Nl(),s()}}}const eR={get(e,t){return Ds(e,"get",""),e[t]}};function VE(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,eR),slots:e.slots,emit:e.emit,expose:t}}function sh(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(X8(At(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ep)return ep[n](e)},has(t,n){return n in t||n in ep}})):e.proxy}function Zk(e,t=!0){return dn(e)?e.displayName||e.name:e.name||t&&e.__name}function tR(e){return dn(e)&&"__vccOpts"in e}const O=(e,t)=>BF(e,t,Wu);function an(e,t,n){try{Ng(-1);const o=arguments.length;return o===2?Un(t)&&!Ht(t)?Ea(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Ea(n)&&(n=[n]),Z(e,t,n))}finally{Ng(1)}}function VDe(){}function qDe(e,t,n,o){const s=n[o];if(s&&nR(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function nR(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&zs&&zs.push(e),!0}const oR="3.5.35",KDe=ir,GDe=UF,ZDe=Oc,YDe=sE,sR={createComponentInstance:WE,setupComponent:jE,renderComponentRoot:Zm,setCurrentRenderingInstance:Sp,isVNode:Ea,normalizeVNode:ki,getComponentPublicInstance:sh,ensureValidVNode:H2,pushWarningContext:HF,popWarningContext:jF},JDe=sR,XDe=null,QDe=null,eBe=null;/** -* @vue/runtime-dom v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Yk;const XS=typeof window<"u"&&window.trustedTypes;if(XS)try{Yk=XS.createPolicy("vue",{createHTML:e=>e})}catch{}const qE=Yk?e=>Yk.createHTML(e):e=>e,iR="http://www.w3.org/2000/svg",rR="http://www.w3.org/1998/Math/MathML",hl=typeof document<"u"?document:null,QS=hl&&hl.createElement("template"),lR={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?hl.createElementNS(iR,e):t==="mathml"?hl.createElementNS(rR,e):n?hl.createElement(e,{is:n}):hl.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>hl.createTextNode(e),createComment:e=>hl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const r=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{QS.innerHTML=qE(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=QS.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Yl="transition",mf="animation",kd=Symbol("_vtc"),KE={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},GE=no({},cE,KE),aR=e=>(e.displayName="Transition",e.props=GE,e),Sr=aR((e,{slots:t})=>an(tO,ZE(e),t)),ru=(e,t=[])=>{Ht(e)?e.forEach(n=>n(...t)):e&&e(...t)},eC=e=>e?Ht(e)?e.some(t=>t.length>1):e.length>1:!1;function ZE(e){const t={};for(const M in e)M in KE||(t[M]=e[M]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=r,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=uR(s),m=h&&h[0],k=h&&h[1],{onBeforeEnter:w,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:S,onBeforeAppear:I=w,onAppear:T=v,onAppearCancelled:$=y}=t,L=(M,D,z,B)=>{M._enterCancelled=B,ra(M,D?c:l),ra(M,D?u:r),z&&z()},P=(M,D)=>{M._isLeaving=!1,ra(M,d),ra(M,p),ra(M,f),D&&D()},R=M=>(D,z)=>{const B=M?T:v,A=()=>L(D,M,z);ru(B,[D,A]),tC(()=>{ra(D,M?a:i),jr(D,M?c:l),eC(B)||nC(D,o,m,A)})};return no(t,{onBeforeEnter(M){ru(w,[M]),jr(M,i),jr(M,r)},onBeforeAppear(M){ru(I,[M]),jr(M,a),jr(M,u)},onEnter:R(!1),onAppear:R(!0),onLeave(M,D){M._isLeaving=!0;const z=()=>P(M,D);jr(M,d),M._enterCancelled?(jr(M,f),Jk(M)):(Jk(M),jr(M,f)),tC(()=>{M._isLeaving&&(ra(M,d),jr(M,p),eC(b)||nC(M,o,k,z))}),ru(b,[M,z])},onEnterCancelled(M){L(M,!1,void 0,!0),ru(y,[M])},onAppearCancelled(M){L(M,!0,void 0,!0),ru($,[M])},onLeaveCancelled(M){P(M),ru(S,[M])}})}function uR(e){if(e==null)return null;if(Un(e))return[Zv(e.enter),Zv(e.leave)];{const t=Zv(e);return[t,t]}}function Zv(e){return wg(e)}function jr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[kd]||(e[kd]=new Set)).add(t)}function ra(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[kd];n&&(n.delete(t),n.size||(e[kd]=void 0))}function tC(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let cR=0;function nC(e,t,n,o){const s=e._endId=++cR,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:a}=YE(e,t);if(!r)return o();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c(n[h]||"").split(", "),s=o(`${Yl}Delay`),i=o(`${Yl}Duration`),r=oC(s,i),l=o(`${mf}Delay`),a=o(`${mf}Duration`),u=oC(l,a);let c=null,d=0,f=0;t===Yl?r>0&&(c=Yl,d=r,f=i.length):t===mf?u>0&&(c=mf,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?Yl:mf:null,f=c?c===Yl?i.length:a.length:0);const p=c===Yl&&/\b(?:transform|all)(?:,|$)/.test(o(`${Yl}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function oC(e,t){for(;e.lengthsC(n)+sC(e[o])))}function sC(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Jk(e){return(e?e.ownerDocument:document).body.offsetHeight}function dR(e,t,n){const o=e[kd];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Og=Symbol("_vod"),JE=Symbol("_vsh"),vi={name:"show",beforeMount(e,{value:t},{transition:n}){e[Og]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):gf(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),gf(e,!0),o.enter(e)):o.leave(e,()=>{gf(e,!1)}):gf(e,t))},beforeUnmount(e,{value:t}){gf(e,t)}};function gf(e,t){e.style.display=t?e[Og]:"none",e[JE]=!t}function fR(){vi.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const XE=Symbol("");function tBe(e){const t=Xo();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Rg(i,s))},o=()=>{const s=e(t.proxy);t.ce?Rg(t.ce,s):Xk(t.subTree,s),n(s)};mE(()=>{Ag(o)}),bn(()=>{Ze(o,ir,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),Mn(()=>s.disconnect())})}function Xk(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Xk(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Rg(e.el,t);else if(e.type===Ie)e.children.forEach(n=>Xk(n,t));else if(e.type===id){let{el:n,anchor:o}=e;for(;n&&(Rg(n,t),n!==o);)n=n.nextSibling}}function Rg(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=cF(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[XE]=o}}const pR=/(?:^|;)\s*display\s*:/;function hR(e,t,n){const o=e.style,s=ro(n);let i=!1;if(n&&!s){if(t)if(ro(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Pf(o,l,"")}else for(const r in t)n[r]==null&&Pf(o,r,"");for(const r in n){r==="display"&&(i=!0);const l=n[r];l!=null?gR(e,r,!ro(t)&&t?t[r]:void 0,l)||Pf(o,r,l):Pf(o,r,"")}}else if(s){if(t!==n){const r=o[XE];r&&(n+=";"+r),o.cssText=n,i=pR.test(n)}}else t&&e.removeAttribute("style");Og in e&&(e[Og]=i?o.display:"",e[JE]&&(o.display="none"))}const iC=/\s*!important$/;function Pf(e,t,n){if(Ht(n))n.forEach(o=>Pf(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=mR(e,t);iC.test(n)?e.setProperty(bi(o),n.replace(iC,""),"important"):e[o]=n}}const rC=["Webkit","Moz","ms"],Yv={};function mR(e,t){const n=Yv[t];if(n)return n;let o=ds(t);if(o!=="filter"&&o in e)return Yv[t]=o;o=Z1(o);for(let s=0;sJv||(bR.then(()=>Jv=0),Jv=Date.now());function xR(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(Ht(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const r=s.slice(),l=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_R=(e,t,n,o,s,i)=>{const r=s==="svg";t==="class"?dR(e,o,r):t==="style"?hR(e,n,o):Qp(t)?V1(t)||yR(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):SR(e,t,o,r))?(uC(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&aC(e,t,o,r,i,t!=="value")):e._isVueCE&&(CR(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ro(o)))?uC(e,ds(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),aC(e,t,o,r))};function SR(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&fC(t)&&dn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return fC(t)&&ro(n)?!1:t in e}function CR(e,t){const n=e._def.props;if(!n)return!1;const o=ds(t);return Array.isArray(n)?n.some(s=>ds(s)===o):Object.keys(n).some(s=>ds(s)===o)}const pC={};function AR(e,t,n){let o=Ge(e,t);q1(o)&&(o=no({},o,t));class s extends Z2{constructor(r){super(o,r,n)}}return s.def=o,s}const nBe=((e,t)=>AR(e,t,jR)),MR=typeof HTMLElement<"u"?HTMLElement:class{};class Z2 extends MR{constructor(t,n={},o=Bg){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==Bg?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(no({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Z2){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,bt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:r}=o;let l;if(i&&!Ht(i))for(const a in i){const u=i[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=wg(this._props[a])),(l||(l=Object.create(null)))[ds(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(r),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)Hn(this,o)||Object.defineProperty(this,o,{get:()=>x(n[o])})}_resolveProps(t){const{props:n}=t,o=Ht(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(ds))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):pC;const s=ds(t);n&&this._numberProps&&this._numberProps[s]&&(o=wg(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===pC?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(bi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(bi(t),n+""):n||this.removeAttribute(bi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),HR(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Z(this._def,no(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,r)=>{this.dispatchEvent(new CustomEvent(i,q1(r[0])?no({detail:r},r[0]):{detail:r}))};o.emit=(i,...r)=>{s(i,r),bi(i)!==i&&s(bi(i),r)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,r=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let l=null;for(let a=t.length-1;a>=0;a--){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=t[a],i.insertBefore(u,l||r),l=u,a===0&&(o||this._styleAnchors.set(this._def,u),n&&this._styleAnchors.set(n,u))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),IR=TR({name:"TransitionGroup",props:no({},GE,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Xo(),o=uE();let s,i;return B2(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!OR(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(NR),s.forEach(LR);const l=s.filter(FR);Jk(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;jr(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Pg]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Pg]=null,ra(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Nn(e),l=ZE(r);let a=r.tag||Ie;if(s=[],i)for(let u=0;u{l.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:r}=YE(o);return i.removeChild(o),r}const Ta=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ht(t)?n=>td(t,n):t};function RR(e){e.target.composing=!0}function mC(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const rr=Symbol("_assign");function gC(e,t,n){return t&&(e=e.trim()),n&&(e=Y1(e)),e}const ks={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[rr]=Ta(s);const i=o||s.props&&s.props.type==="number";_l(e,t?"change":"input",r=>{r.target.composing||e[rr](gC(e.value,n,i))}),(n||i)&&_l(e,"change",()=>{e.value=gC(e.value,n,i)}),t||(_l(e,"compositionstart",RR),_l(e,"compositionend",mC),_l(e,"change",mC))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},r){if(e[rr]=Ta(r),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Y1(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},Dg={deep:!0,created(e,t,n){e[rr]=Ta(n),_l(e,"change",()=>{const o=e._modelValue,s=bd(e),i=e.checked,r=e[rr];if(Ht(o)){const l=X1(o,s),a=l!==-1;if(i&&!a)r(o.concat(s));else if(!i&&a){const u=[...o];u.splice(l,1),r(u)}}else if(Ju(o)){const l=new Set(o);i?l.add(s):l.delete(s),r(l)}else r(oT(e,i))})},mounted:vC,beforeUpdate(e,t,n){e[rr]=Ta(n),vC(e,t,n)}};function vC(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(Ht(t))s=X1(t,o.props.value)>-1;else if(Ju(t))s=t.has(o.props.value);else{if(t===n)return;s=Il(t,oT(e,!0))}e.checked!==s&&(e.checked=s)}const nT={created(e,{value:t},n){e.checked=Il(t,n.props.value),e[rr]=Ta(n),_l(e,"change",()=>{e[rr](bd(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[rr]=Ta(o),t!==n&&(e.checked=Il(t,o.props.value))}},Qk={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=Ju(t);_l(e,"change",()=>{const i=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?Y1(bd(r)):bd(r));e[rr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,bt(()=>{e._assigning=!1})}),e[rr]=Ta(o)},mounted(e,{value:t}){yC(e,t)},beforeUpdate(e,t,n){e[rr]=Ta(n)},updated(e,{value:t}){e._assigning||yC(e,t)}};function yC(e,t){const n=e.multiple,o=Ht(t);if(!(n&&!o&&!Ju(t))){for(let s=0,i=e.options.length;sString(u)===String(l)):r.selected=X1(t,l)>-1}else r.selected=t.has(l);else if(Il(bd(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bd(e){return"_value"in e?e._value:e.value}function oT(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const PR={created(e,t,n){sm(e,t,n,null,"created")},mounted(e,t,n){sm(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){sm(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){sm(e,t,n,o,"updated")}};function sT(e,t){switch(e){case"SELECT":return Qk;case"TEXTAREA":return ks;default:switch(t){case"checkbox":return Dg;case"radio":return nT;default:return ks}}}function sm(e,t,n,o,s){const r=sT(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,o)}function DR(){ks.getSSRProps=({value:e})=>({value:e}),nT.getSSRProps=({value:e},t)=>{if(t.props&&Il(t.props.value,e))return{checked:!0}},Dg.getSSRProps=({value:e},t)=>{if(Ht(e)){if(t.props&&X1(e,t.props.value)>-1)return{checked:!0}}else if(Ju(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},PR.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=sT(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const BR=["ctrl","shift","alt","meta"],zR={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>BR.some(n=>e[`${n}Key`]&&!t.includes(n))},St=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=bi(s.key);if(t.some(r=>r===i||WR[r]===i))return e(s)}))},iT=no({patchProp:_R},lR);let np,kC=!1;function rT(){return np||(np=WO(iT))}function lT(){return np=kC?np:HO(iT),kC=!0,np}const HR=((...e)=>{rT().render(...e)}),iBe=((...e)=>{lT().hydrate(...e)}),Bg=((...e)=>{const t=rT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=uT(o);if(!s)return;const i=t._component;!dn(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,aT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),jR=((...e)=>{const t=lT().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=uT(o);if(s)return n(s,!0,aT(s))},t});function aT(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function uT(e){return ro(e)?document.querySelector(e):e}let bC=!1;const rBe=()=>{bC||(bC=!0,DR(),fR())};/*! - * shared v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const zg=typeof window<"u",Pa=(e,t=!1)=>t?Symbol.for(e):Symbol(e),UR=(e,t,n)=>VR({l:e,k:t,s:n}),VR=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Go=e=>typeof e=="number"&&isFinite(e),cT=e=>J2(e)==="[object Date]",wd=e=>J2(e)==="[object RegExp]",Y2=e=>eo(e)&&Object.keys(e).length===0,Yo=Object.assign,qR=Object.create,io=(e=null)=>qR(e);let wC;const Cu=()=>wC||(wC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:io()),KR=Object.prototype.hasOwnProperty;function or(e,t){return KR.call(e,t)}const No=Array.isArray,go=e=>typeof e=="function",Dt=e=>typeof e=="string",Rn=e=>typeof e=="boolean",Pn=e=>e!==null&&typeof e=="object",GR=e=>Pn(e)&&go(e.then)&&go(e.catch),dT=Object.prototype.toString,J2=e=>dT.call(e),eo=e=>J2(e)==="[object Object]",ZR=e=>e==null?"":No(e)||eo(e)&&e.toString===dT?JSON.stringify(e,null,2):String(e);function X2(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function YR(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function xC(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function JR(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const XR=/^javascript:/i,QR=/^(?:href|src|action|formaction)$/i,eP=/&#(?:x([0-9a-f]+)|(\d+));?/gi,tP=/&(?:Tab|NewLine);/g,nP=/:?/gi,oP=/[\u0000-\u0020\u007f-\u009f]/g,sP=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,iP=/(^|[\s"'<>/])on(\w+\s*=)/gi,rP=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function lP(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function Q2(e){const t=e.replace(eP,lP).replace(tP,"").replace(nP,":").replace(oP,"");return XR.test(t)}function aP(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,r=t.lastIndex-1;let l=r+1,a=1,u=null;for(;l`${n}="${_C(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${_C(n,o)}'`),sP.test(e)&&(e=e.replace(iP,"$1on$2")),e=e.replace(rP,(t,n,o,s)=>Q2(s)?`${n}${o}about:blank`:t),e}const im=e=>!Pn(e)||No(e);function Jm(e,t){if(im(e)||im(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(Pn(o[i])&&!Pn(s[i])&&(s[i]=Array.isArray(o[i])?[]:io()),im(s[i])||im(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! - * message-compiler v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function cP(e,t,n){return{line:e,column:t,offset:n}}function eb(e,t,n){return{start:e,end:t}}const Kn={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},dP=17;function a0(e,t,n={}){const{domain:o,messages:s,args:i}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=o,l}function fP(e){throw e}const Dr=" ",pP="\r",Rs=` -`,hP="\u2028",mP="\u2029";function gP(e){const t=e;let n=0,o=1,s=1,i=0;const r=T=>t[T]===pP&&t[T+1]===Rs,l=T=>t[T]===Rs,a=T=>t[T]===mP,u=T=>t[T]===hP,c=T=>r(T)||l(T)||a(T)||u(T),d=()=>n,f=()=>o,p=()=>s,h=()=>i,m=T=>r(T)||a(T)||u(T)?Rs:t[T],k=()=>m(n),w=()=>m(n+i);function v(){return i=0,c(n)&&(o++,s=0),r(n)&&n++,n++,s++,t[n]}function y(){return r(n+i)&&i++,i++,t[n+i]}function b(){n=0,o=1,s=1,i=0}function S(T=0){i=T}function I(){const T=n+i;for(;T!==n;)v();i=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:k,currentPeek:w,next:v,peek:y,reset:b,resetPeek:S,skipToPeek:I}}const cl=void 0,vP=".",SC="'",yP="tokenizer";function kP(e,t={}){const n=t.location!==!1,o=gP(e),s=()=>o.index(),i=()=>cP(o.line(),o.column(),o.index()),r=i(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=t;function d(ne,ce,xe,...fe){const ue=u();if(ce.column+=xe,ce.offset+=xe,c){const we=n?eb(ue.startLoc,ce):null,se=a0(ne,we,{domain:yP,args:fe});c(se)}}function f(ne,ce,xe){ne.endLoc=i(),ne.currentType=ce;const fe={type:ce};return n&&(fe.loc=eb(ne.startLoc,ne.endLoc)),xe!=null&&(fe.value=xe),fe}const p=ne=>f(ne,13);function h(ne,ce){return ne.currentChar()===ce?(ne.next(),ce):(d(Kn.EXPECTED_TOKEN,i(),0,ce),"")}function m(ne){let ce="";for(;ne.currentPeek()===Dr||ne.currentPeek()===Rs;)ce+=ne.currentPeek(),ne.peek();return ce}function k(ne){const ce=m(ne);return ne.skipToPeek(),ce}function w(ne){if(ne===cl)return!1;const ce=ne.charCodeAt(0);return ce>=97&&ce<=122||ce>=65&&ce<=90||ce===95}function v(ne){if(ne===cl)return!1;const ce=ne.charCodeAt(0);return ce>=48&&ce<=57}function y(ne,ce){const{currentType:xe}=ce;if(xe!==2)return!1;m(ne);const fe=w(ne.currentPeek());return ne.resetPeek(),fe}function b(ne,ce){const{currentType:xe}=ce;if(xe!==2)return!1;m(ne);const fe=ne.currentPeek()==="-"?ne.peek():ne.currentPeek(),ue=v(fe);return ne.resetPeek(),ue}function S(ne,ce){const{currentType:xe}=ce;if(xe!==2)return!1;m(ne);const fe=ne.currentPeek()===SC;return ne.resetPeek(),fe}function I(ne,ce){const{currentType:xe}=ce;if(xe!==7)return!1;m(ne);const fe=ne.currentPeek()===".";return ne.resetPeek(),fe}function T(ne,ce){const{currentType:xe}=ce;if(xe!==8)return!1;m(ne);const fe=w(ne.currentPeek());return ne.resetPeek(),fe}function $(ne,ce){const{currentType:xe}=ce;if(!(xe===7||xe===11))return!1;m(ne);const fe=ne.currentPeek()===":";return ne.resetPeek(),fe}function L(ne,ce){const{currentType:xe}=ce;if(xe!==9)return!1;const fe=()=>{const we=ne.currentPeek();return we==="{"?w(ne.peek()):we==="@"||we==="|"||we===":"||we==="."||we===Dr||!we?!1:we===Rs?(ne.peek(),fe()):R(ne,!1)},ue=fe();return ne.resetPeek(),ue}function P(ne){m(ne);const ce=ne.currentPeek()==="|";return ne.resetPeek(),ce}function R(ne,ce=!0){const xe=(ue=!1,we="")=>{const se=ne.currentPeek();return se==="{"||se==="@"||!se?ue:se==="|"?!(we===Dr||we===Rs):se===Dr?(ne.peek(),xe(!0,Dr)):se===Rs?(ne.peek(),xe(!0,Rs)):!0},fe=xe();return ce&&ne.resetPeek(),fe}function M(ne,ce){const xe=ne.currentChar();return xe===cl?cl:ce(xe)?(ne.next(),xe):null}function D(ne){const ce=ne.charCodeAt(0);return ce>=97&&ce<=122||ce>=65&&ce<=90||ce>=48&&ce<=57||ce===95||ce===36}function z(ne){return M(ne,D)}function B(ne){const ce=ne.charCodeAt(0);return ce>=97&&ce<=122||ce>=65&&ce<=90||ce>=48&&ce<=57||ce===95||ce===36||ce===45}function A(ne){return M(ne,B)}function F(ne){const ce=ne.charCodeAt(0);return ce>=48&&ce<=57}function W(ne){return M(ne,F)}function j(ne){const ce=ne.charCodeAt(0);return ce>=48&&ce<=57||ce>=65&&ce<=70||ce>=97&&ce<=102}function le(ne){return M(ne,j)}function J(ne){let ce="",xe="";for(;ce=W(ne);)xe+=ce;return xe}function X(ne){let ce="";for(;;){const xe=ne.currentChar();if(xe==="\\"){const fe=ne.peek();fe==="{"||fe==="}"||fe==="@"||fe==="|"||fe==="\\"?(ce+=xe+fe,ne.next(),ne.next()):(ne.resetPeek(),ce+=xe,ne.next())}else{if(xe==="{"||xe==="}"||xe==="@"||xe==="|"||!xe)break;if(xe===Dr||xe===Rs)if(R(ne))ce+=xe,ne.next();else{if(P(ne))break;ce+=xe,ne.next()}else ce+=xe,ne.next()}}return ce}function G(ne){k(ne);let ce="",xe="";for(;ce=A(ne);)xe+=ce;const fe=ne.currentChar();if(fe&&fe!=="}"&&fe!==cl&&fe!==Dr&&fe!==Rs&&fe!==" "){const ue=me(ne);return d(Kn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,xe+ue),xe+ue}return ne.currentChar()===cl&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),xe}function Q(ne){k(ne);let ce="";return ne.currentChar()==="-"?(ne.next(),ce+=`-${J(ne)}`):ce+=J(ne),ne.currentChar()===cl&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),ce}function ee(ne){return ne!==SC&&ne!==Rs}function K(ne){k(ne),h(ne,"'");let ce="",xe="";for(;ce=M(ne,ee);)ce==="\\"?xe+=ge(ne):xe+=ce;const fe=ne.currentChar();return fe===Rs||fe===cl?(d(Kn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),fe===Rs&&(ne.next(),h(ne,"'")),xe):(h(ne,"'"),xe)}function ge(ne){const ce=ne.currentChar();switch(ce){case"\\":case"'":return ne.next(),`\\${ce}`;case"u":return Ce(ne,ce,4);case"U":return Ce(ne,ce,6);default:return d(Kn.UNKNOWN_ESCAPE_SEQUENCE,i(),0,ce),""}}function Ce(ne,ce,xe){h(ne,ce);let fe="";for(let ue=0;ue{const fe=ne.currentChar();return fe==="{"||fe==="@"||fe==="|"||fe==="("||fe===")"||!fe||fe===Dr?xe:(xe+=fe,ne.next(),ce(xe))};return ce("")}function H(ne){k(ne);const ce=h(ne,"|");return k(ne),ce}function Y(ne,ce){let xe=null;switch(ne.currentChar()){case"{":return ce.braceNest>=1&&d(Kn.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),ne.next(),xe=f(ce,2,"{"),k(ne),ce.braceNest++,xe;case"}":return ce.braceNest>0&&ce.currentType===2&&d(Kn.EMPTY_PLACEHOLDER,i(),0),ne.next(),xe=f(ce,3,"}"),ce.braceNest--,ce.braceNest>0&&k(ne),ce.inLinked&&ce.braceNest===0&&(ce.inLinked=!1),xe;case"@":return ce.braceNest>0&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),xe=ke(ne,ce)||p(ce),ce.braceNest=0,xe;default:{let ue=!0,we=!0,se=!0;if(P(ne))return ce.braceNest>0&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),xe=f(ce,1,H(ne)),ce.braceNest=0,ce.inLinked=!1,xe;if(ce.braceNest>0&&(ce.currentType===4||ce.currentType===5||ce.currentType===6))return d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),ce.braceNest=0,Se(ne,ce);if(ue=y(ne,ce))return xe=f(ce,4,G(ne)),k(ne),xe;if(we=b(ne,ce))return xe=f(ce,5,Q(ne)),k(ne),xe;if(se=S(ne,ce))return xe=f(ce,6,K(ne)),k(ne),xe;if(!ue&&!we&&!se)return xe=f(ce,12,me(ne)),d(Kn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,xe.value),k(ne),xe;break}}return xe}function ke(ne,ce){const{currentType:xe}=ce;let fe=null;const ue=ne.currentChar();switch((xe===7||xe===8||xe===11||xe===9)&&(ue===Rs||ue===Dr)&&d(Kn.INVALID_LINKED_FORMAT,i(),0),ue){case"@":return ne.next(),fe=f(ce,7,"@"),ce.inLinked=!0,fe;case".":return k(ne),ne.next(),f(ce,8,".");case":":return k(ne),ne.next(),f(ce,9,":");default:return P(ne)?(fe=f(ce,1,H(ne)),ce.braceNest=0,ce.inLinked=!1,fe):I(ne,ce)||$(ne,ce)?(k(ne),ke(ne,ce)):T(ne,ce)?(k(ne),f(ce,11,te(ne))):L(ne,ce)?(k(ne),ue==="{"?Y(ne,ce)||fe:f(ce,10,oe(ne))):(xe===7&&d(Kn.INVALID_LINKED_FORMAT,i(),0),ce.braceNest=0,ce.inLinked=!1,Se(ne,ce))}}function Se(ne,ce){let xe={type:13};if(ce.braceNest>0)return Y(ne,ce)||p(ce);if(ce.inLinked)return ke(ne,ce)||p(ce);switch(ne.currentChar()){case"{":return Y(ne,ce)||p(ce);case"}":return d(Kn.UNBALANCED_CLOSING_BRACE,i(),0),ne.next(),f(ce,3,"}");case"@":return ke(ne,ce)||p(ce);default:{if(P(ne))return xe=f(ce,1,H(ne)),ce.braceNest=0,ce.inLinked=!1,xe;if(R(ne))return f(ce,0,X(ne));break}}return xe}function ye(){const{currentType:ne,offset:ce,startLoc:xe,endLoc:fe}=a;return a.lastType=ne,a.lastOffset=ce,a.lastStartLoc=xe,a.lastEndLoc=fe,a.offset=s(),a.startLoc=i(),o.currentChar()===cl?f(a,13):Se(o,a)}return{nextToken:ye,currentOffset:s,currentPosition:i,context:u}}const bP="parser",wP=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,xP=/\\([\\@{}|])/g;function _P(e,t){return t}function SP(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function CP(e={}){const t=e.location!==!1,{onError:n}=e;function o(w,v,y,b,...S){const I=w.currentPosition();if(I.offset+=b,I.column+=b,n){const T=t?eb(y,I):null,$=a0(v,T,{domain:bP,args:S});n($)}}function s(w,v,y){const b={type:w};return t&&(b.start=v,b.end=v,b.loc={start:y,end:y}),b}function i(w,v,y,b){t&&(w.end=v,w.loc&&(w.loc.end=y))}function r(w,v){const y=w.context(),b=s(3,y.offset,y.startLoc);return b.value=v.replace(xP,_P),i(b,w.currentOffset(),w.currentPosition()),b}function l(w,v){const y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(5,b,S);return I.index=parseInt(v,10),w.nextToken(),i(I,w.currentOffset(),w.currentPosition()),I}function a(w,v){const y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(4,b,S);return I.key=v,w.nextToken(),i(I,w.currentOffset(),w.currentPosition()),I}function u(w,v){const y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(9,b,S);return I.value=v.replace(wP,SP),w.nextToken(),i(I,w.currentOffset(),w.currentPosition()),I}function c(w){const v=w.nextToken(),y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(8,b,S);return v.type!==11?(o(w,Kn.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.lastStartLoc,0),I.value="",i(I,b,S),{nextConsumeToken:v,node:I}):(v.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Br(v)),I.value=v.value||"",i(I,w.currentOffset(),w.currentPosition()),{node:I})}function d(w,v){const y=w.context(),b=s(7,y.offset,y.startLoc);return b.value=v,i(b,w.currentOffset(),w.currentPosition()),b}function f(w){const v=w.context(),y=s(6,v.offset,v.startLoc);let b=w.nextToken();if(b.type===8){const S=c(w);y.modifier=S.node,b=S.nextConsumeToken||w.nextToken()}switch(b.type!==9&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),b=w.nextToken(),b.type===2&&(b=w.nextToken()),b.type){case 10:b.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=d(w,b.value||"");break;case 4:b.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=a(w,b.value||"");break;case 5:b.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=l(w,b.value||"");break;case 6:b.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=u(w,b.value||"");break;default:{o(w,Kn.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const S=w.context(),I=s(7,S.offset,S.startLoc);return I.value="",i(I,S.offset,S.startLoc),y.key=I,i(y,S.offset,S.startLoc),{nextConsumeToken:b,node:y}}}return i(y,w.currentOffset(),w.currentPosition()),{node:y}}function p(w){const v=w.context(),y=v.currentType===1?w.currentOffset():v.offset,b=v.currentType===1?v.endLoc:v.startLoc,S=s(2,y,b);S.items=[];let I=null;do{const L=I||w.nextToken();switch(I=null,L.type){case 0:L.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(L)),S.items.push(r(w,L.value||""));break;case 5:L.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(L)),S.items.push(l(w,L.value||""));break;case 4:L.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(L)),S.items.push(a(w,L.value||""));break;case 6:L.value==null&&o(w,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(L)),S.items.push(u(w,L.value||""));break;case 7:{const P=f(w);S.items.push(P.node),I=P.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const T=v.currentType===1?v.lastOffset:w.currentOffset(),$=v.currentType===1?v.lastEndLoc:w.currentPosition();return i(S,T,$),S}function h(w,v,y,b){const S=w.context();let I=b.items.length===0;const T=s(1,v,y);T.cases=[],T.cases.push(b);do{const $=p(w);I||(I=$.items.length===0),T.cases.push($)}while(S.currentType!==13);return I&&o(w,Kn.MUST_HAVE_MESSAGES_IN_PLURAL,y,0),i(T,w.currentOffset(),w.currentPosition()),T}function m(w){const v=w.context(),{offset:y,startLoc:b}=v,S=p(w);return v.currentType===13?S:h(w,y,b,S)}function k(w){const v=kP(w,Yo({},e)),y=v.context(),b=s(0,y.offset,y.startLoc);return t&&b.loc&&(b.loc.source=w),b.body=m(v),e.onCacheKey&&(b.cacheKey=e.onCacheKey(w)),y.currentType!==13&&o(v,Kn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,w[y.offset]||""),i(b,v.currentOffset(),v.currentPosition()),b}return{parse:k}}function Br(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function AP(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function CC(e,t){for(let n=0;nAC(n)),e}function AC(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nr;function a(m,k){r.code+=m}function u(m,k=!0){const w=k?o:"";a(s?w+" ".repeat(m):w)}function c(m=!0){const k=++r.indentLevel;m&&u(k)}function d(m=!0){const k=--r.indentLevel;m&&u(k)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>r.needIndent}}function IP(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),xd(e,t.key),t.modifier?(e.push(", "),xd(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function $P(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=Dt(t.mode)?t.mode:"normal",o=Dt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,i=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=TP(e,{filename:o,breakLineCode:s,needIndent:i});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(i),r.length>0&&(l.push(`const { ${X2(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),xd(l,e),l.deindent(i),l.push("}"),delete e.helpers;const{code:a,map:u}=l.context();return{ast:e,code:a,map:u?u.toJSON():void 0}};function OP(e,t={}){const n=Yo({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,l=CP(n).parse(e);return o?(i&&EP(l),s&&Rc(l),{ast:l,code:""}):(MP(l,n),FP(l,n))}/*! - * core-base v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function RP(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Cu().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Cu().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Xr(e){return Pn(e)&&tw(e)===0&&(or(e,"b")||or(e,"body"))}const fT=["b","body"];function PP(e){return Da(e,fT)}const pT=["c","cases"];function DP(e){return Da(e,pT,[])}const hT=["s","static"];function BP(e){return Da(e,hT)}const mT=["i","items"];function zP(e){return Da(e,mT,[])}const gT=["t","type"];function tw(e){return Da(e,gT)}const vT=["v","value"];function rm(e,t){const n=Da(e,vT);if(n!=null)return n;throw Ip(t)}const yT=["m","modifier"];function WP(e){return Da(e,yT)}const kT=["k","key"];function HP(e){const t=Da(e,kT);if(t)return t;throw Ip(6)}function Da(e,t,n){for(let o=0;ojP(n,e)}function jP(e,t){const n=PP(t);if(n==null)throw Ip(0);if(tw(n)===1){const i=DP(n);return e.plural(i.reduce((r,l)=>[...r,MC(e,l)],[]))}else return MC(e,n)}function MC(e,t){const n=BP(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=zP(t).reduce((s,i)=>[...s,tb(e,i)],[]);return e.normalize(o)}}function tb(e,t){const n=tw(t);switch(n){case 3:return rm(t,n);case 9:return rm(t,n);case 4:{const o=t;if(or(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(or(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw Ip(n)}case 5:{const o=t;if(or(o,"i")&&Go(o.i))return e.interpolate(e.list(o.i));if(or(o,"index")&&Go(o.index))return e.interpolate(e.list(o.index));throw Ip(n)}case 6:{const o=t,s=WP(o),i=HP(o);return e.linked(tb(e,i),s?tb(e,s):void 0,e.type)}case 7:return rm(t,n);case 8:return rm(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const UP=e=>e;let lm=io();function VP(e,t={}){let n=!1;const o=t.onError||fP;return t.onError=s=>{n=!0,o(s)},{...OP(e,t),detectError:n}}function qP(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Dt(e)){Rn(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||UP)(e),s=lm[o];if(s)return s;const{ast:i,detectError:r}=VP(e,{...t,location:!1,jit:!0}),l=Xv(i);return r?l:lm[o]=l}else{const n=e.cacheKey;if(n){const o=lm[n];return o||(lm[n]=Xv(e))}else return Xv(e)}}let $p=null;function KP(e){$p=e}function GP(e,t,n){$p&&$p.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ZP=YP("function:translate");function YP(e){return t=>$p&&$p.emit(e,t)}const Al={INVALID_ARGUMENT:dP,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},JP=24;function Ml(e){return a0(e,null,void 0)}function nw(e,t){return t.locale!=null?EC(t.locale):EC(e.locale)}let Qv;function EC(e){if(Dt(e))return e;if(go(e)){if(e.resolvedOnce&&Qv!=null)return Qv;if(e.constructor.name==="Function"){const t=e();if(GR(t))throw Ml(Al.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Qv=t}else throw Ml(Al.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ml(Al.NOT_SUPPORT_LOCALE_TYPE)}function XP(e,t,n){return[...new Set([n,...No(t)?t:Pn(t)?Object.keys(t):Dt(t)?[t]:[n]])]}function nb(e,t,n){const o=Dt(n)?n:Np,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let r=[n];for(;No(r);)r=TC(i,r,t);const l=No(t)||!eo(t)?t:t.default?t.default:null;r=Dt(l)?[l]:l,No(r)&&TC(i,r,!1),s.__localeChainCache.set(o,i)}return i}function TC(e,t,n){let o=!0;for(let s=0;s{r===void 0?r=l:r+=l},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,r===void 0||(r=iD(r),r===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,l="\\"+h,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(a=sD(i),d=Ba[o],u=d[a]||d.l||8,u===8||(o=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=i,c()===!1))))return;if(o===7)return t}}const IC=new Map;function lD(e,t){return Pn(e)?e[t]:null}function aD(e,t){if(!Pn(e))return null;let n=IC.get(t);if(n||(n=rD(t),n&&IC.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function cD(){return{upper:(e,t)=>t==="text"&&Dt(e)?e.toUpperCase():t==="vnode"&&Pn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Dt(e)?e.toLowerCase():t==="vnode"&&Pn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Dt(e)?$C(e):t==="vnode"&&Pn(e)&&"__v_isVNode"in e?$C(e.children):e}}let wT;function dD(e){wT=e}let xT;function fD(e){xT=e}let _T;function pD(e){_T=e}let ST=null;const hD=e=>{ST=e},mD=()=>ST;let CT=null;const NC=e=>{CT=e},gD=()=>CT;let LC=0;function vD(e={}){const t=go(e.onWarn)?e.onWarn:YR,n=Dt(e.version)?e.version:uD,o=Dt(e.locale)||go(e.locale)?e.locale:Np,s=go(o)?Np:o,i=No(e.fallbackLocale)||eo(e.fallbackLocale)||Dt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=eo(e.messages)?e.messages:ey(s),l=eo(e.datetimeFormats)?e.datetimeFormats:ey(s),a=eo(e.numberFormats)?e.numberFormats:ey(s),u=Yo(io(),e.modifiers,cD()),c=e.pluralRules||io(),d=go(e.missing)?e.missing:null,f=Rn(e.missingWarn)||wd(e.missingWarn)?e.missingWarn:!0,p=Rn(e.fallbackWarn)||wd(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,k=go(e.postTranslation)?e.postTranslation:null,w=eo(e.processor)?e.processor:null,v=Rn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=go(e.messageCompiler)?e.messageCompiler:wT,S=go(e.messageResolver)?e.messageResolver:xT||lD,I=go(e.localeFallbacker)?e.localeFallbacker:_T||XP,T=Pn(e.fallbackContext)?e.fallbackContext:void 0,$=e,L=Pn($.__datetimeFormatters)?$.__datetimeFormatters:new Map,P=Pn($.__numberFormatters)?$.__numberFormatters:new Map,R=Pn($.__meta)?$.__meta:{};LC++;const M={version:n,cid:LC,locale:o,fallbackLocale:i,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:k,processor:w,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:S,localeFallbacker:I,fallbackContext:T,onWarn:t,__meta:R};return M.datetimeFormats=l,M.numberFormats=a,M.__datetimeFormatters=L,M.__numberFormatters=P,__INTLIFY_PROD_DEVTOOLS__&&GP(M,n,R),M}const ey=e=>({[e]:io()});function AT(e,t,n,o,s){const{missing:i,onWarn:r}=e;if(i!==null){const l=i(e,n,t,s);return Dt(l)?l:t}else return t}function vf(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function yD(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function kD(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?l[a]=s[a]:t[a]=s[a]}),Dt(i)?t.locale=i:eo(i)&&(l=i),eo(r)&&(l=r),l}function FC(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:i}=e;if(!Dt(t[0])&&!cT(t[0])&&!Go(t[0]))return Wg;const[r,l,a,u]=ob(...t),c=Rn(a.missingWarn)?a.missingWarn:e.missingWarn,d=Rn(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=nw(e,a);if(!Dt(r)||r===""){const v=new Intl.DateTimeFormat(p.replace(/!/g,""),u);return f?v.formatToParts(l):v.format(l)}const h=MT(e,r,p,n,c,d,"datetime format");if(!Dt(h))return o?u0:r;const m=n[h][r],k=ET(h,r,u);let w=i.get(k);return w||(w=new Intl.DateTimeFormat(h,Yo({},m,u)),i.set(k,w)),f?w.formatToParts(l):w.format(l)}const $T=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function ob(...e){const[t]=e,n=io(),o=io();let s;if(Dt(t)){const r=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!r)throw Ml(Al.INVALID_ISO_DATE_ARGUMENT);const l=r[3]?r[3].trim().startsWith("T")?`${r[1].trim()}${r[3].trim()}`:`${r[1].trim()}T${r[3].trim()}`:r[1].trim();s=new Date(l);try{s.toISOString()}catch{throw Ml(Al.INVALID_ISO_DATE_ARGUMENT)}}else if(cT(t)){if(isNaN(t.getTime()))throw Ml(Al.INVALID_DATE_ARGUMENT);s=t}else if(Go(t))s=t;else throw Ml(Al.INVALID_ARGUMENT);const i=IT(e,n,o,$T);return[n.key||"",s,n,i]}function OC(e,t,n){TT(e.__datetimeFormatters,t,n)}function RC(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:i}=e;if(!Go(t[0]))return Wg;const[r,l,a,u]=sb(...t),c=Rn(a.missingWarn)?a.missingWarn:e.missingWarn,d=Rn(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=nw(e,a);if(!Dt(r)||r===""){const v=new Intl.NumberFormat(p.replace(/!/g,""),u);return f?v.formatToParts(l):v.format(l)}const h=MT(e,r,p,n,c,d,"number format");if(!Dt(h))return o?u0:r;const m=n[h][r],k=ET(h,r,u);let w=i.get(k);return w||(w=new Intl.NumberFormat(h,Yo({},m,u)),i.set(k,w)),f?w.formatToParts(l):w.format(l)}const NT=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function sb(...e){const[t]=e,n=io(),o=io();if(!Go(t))throw Ml(Al.INVALID_ARGUMENT);const s=t,i=IT(e,n,o,NT);return[n.key||"",s,n,i]}function PC(e,t,n){TT(e.__numberFormatters,t,n)}const bD=e=>e,wD=e=>"",xD="text",_D=e=>e.length===0?"":X2(e),SD=ZR;function ty(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function CD(e){const t=Go(e.pluralIndex)?e.pluralIndex:-1;return Go(e.named?.count)?e.named.count:Go(e.named?.n)?e.named.n:t}function AD(e={}){const t=e.locale,n=CD(e),o=Dt(t)&&go(e.pluralRules?.[t])?e.pluralRules[t]:ty,s=o===ty?void 0:ty,i=w=>w[o(n,w.length,s)],r=e.list||[],l=w=>r[w],a=e.named||io();Go(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=w=>a[w];function c(w,v){const y=go(e.messages)?e.messages(w,!!v):Pn(e.messages)?e.messages[w]:!1;return y||(e.parent?e.parent.message(w):wD)}const d=w=>e.modifiers?e.modifiers[w]:bD,f=go(e.processor?.normalize)?e.processor.normalize:_D,p=go(e.processor?.interpolate)?e.processor.interpolate:SD,h=Dt(e.processor?.type)?e.processor.type:xD,k={list:l,named:u,plural:i,linked:(w,...v)=>{const[y,b]=v;let S="text",I="";v.length===1?Pn(y)?(I=y.modifier||I,S=y.type||S):Dt(y)&&(I=y||I):v.length===2&&(Dt(y)&&(I=y||I),Dt(b)&&(S=b||S));const T=c(w,!0)(k),$=T===""||T===void 0?w:T,L=S==="vnode"&&No($)&&I?$[0]:$;return I?d(I)(L,S):L},message:c,type:h,interpolate:p,normalize:f,values:Yo(io(),r,a)};return k}const DC=()=>"",er=e=>go(e);function BC(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:r,messages:l}=e,[a,u]=ib(...t),c=Rn(u.missingWarn)?u.missingWarn:e.missingWarn,d=Rn(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=Rn(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,h=Dt(u.default)||Rn(u.default)?Rn(u.default)?i?a:()=>a:u.default:n?i?a:()=>a:null,m=n||h!=null&&(Dt(h)||go(h)),k=nw(e,u);f&&MD(u);let[w,v,y]=p?[a,k,l[k]||io()]:LT(e,a,k,r,d,c),b=w,S=a;if(!p&&!(Dt(b)||Xr(b)||er(b))&&m&&(b=h,S=b),!p&&(!(Dt(b)||Xr(b)||er(b))||!Dt(v)))return s?u0:a;let I=!1;const T=()=>{I=!0},$=er(b)?b:FT(e,a,v,b,S,T);if(I)return b;const L=ID(e,v,y,u),P=AD(L),R=ED(e,$,P);let M=o?o(R,a):R;if(f&&Dt(M)&&(M=uP(M)),__INTLIFY_PROD_DEVTOOLS__){const D={timestamp:Date.now(),key:Dt(a)?a:er(b)?b.key:"",locale:v||(er(b)?b.locale:""),format:Dt(b)?b:er(b)?b.source:"",message:M};D.meta=Yo({},e.__meta,mD()||{}),ZP(D)}return M}function MD(e){No(e.list)?e.list=e.list.map(t=>Dt(t)?xC(t):t):Pn(e.named)&&Object.keys(e.named).forEach(t=>{Dt(e.named[t])&&(e.named[t]=xC(e.named[t]))})}function LT(e,t,n,o,s,i){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:u}=e,c=u(e,o,n);let d=io(),f,p=null;const h="translate";for(let m=0;mo);return u.locale=n,u.key=t,u}const a=r(o,TD(e,n,s,o,l,i));return a.locale=n,a.key=t,a.source=o,a}function ED(e,t,n){return t(n)}function ib(...e){const[t,n,o]=e,s=io();if(!Dt(t)&&!Go(t)&&!er(t)&&!Xr(t))throw Ml(Al.INVALID_ARGUMENT);const i=Go(t)?String(t):(er(t),t);return Go(n)?s.plural=n:Dt(n)?s.default=n:eo(n)&&!Y2(n)?s.named=n:No(n)&&(s.list=n),Go(o)?s.plural=o:Dt(o)?s.default=o:eo(o)&&Yo(s,o),[i,s]}function TD(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw i&&i(r),r},onCacheKey:r=>UR(t,n,r)}}function ID(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(p,h)=>{let m=r(n,p);if(m==null&&(c||h)){const[k,,w]=LT(c||e,p,t,l,a,u);m=k??r(w,p)}if(Dt(m)||Xr(m)){let k=!1;const v=FT(e,p,t,m,p,()=>{k=!0});return k?DC:v}else return er(m)?m:DC}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Go(o.plural)&&(f.pluralIndex=o.plural),f}RP();/*! - * vue-i18n v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const $D="11.4.8";function ND(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Cu().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Cu().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Cu().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Cu().__INTLIFY_PROD_DEVTOOLS__=!1)}const Qs={UNEXPECTED_RETURN_TYPE:JP,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function wi(e,...t){return a0(e,null,void 0)}const rb=Pa("__translateVNode"),lb=Pa("__datetimeParts"),ab=Pa("__numberParts"),OT=Pa("__setPluralRules"),RT=Pa("__injectWithOption"),Uc=Pa("__dispose");function Lp(e){if(!Pn(e)||Xr(e))return e;for(const t in e)if(or(e,t))if(!t.includes("."))Pn(e[t])&&Lp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,i=!1;for(let r=0;r{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(r[a]=r[a]||io(),Jm(u,r[a])):Jm(u,r)}else Dt(l)&&Jm(JSON.parse(l),r)}),s==null&&i)for(const l in r)or(r,l)&&Lp(r[l]);return r}function PT(e){return e.type}function DT(e,t,n){let o=Pn(t.messages)?t.messages:io();"__i18nGlobal"in n&&(o=ow(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(Pn(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(Pn(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function zC(e){return Z(wa,null,e,0)}function Fp(){return Xo()}const WC="__INTLIFY_META__",HC=()=>[],LD=()=>!1;let jC=0;function UC(e){return((t,n,o,s)=>e(n,o,Fp()||void 0,s))}const FD=()=>{const e=Fp();let t=null;return e&&(t=PT(e)[WC])?{[WC]:t}:null};function Hg(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=zg?q:_o;let r=Rn(e.inheritLocale)?e.inheritLocale:!0;const l=i(t&&r?t.locale.value:Dt(e.locale)?e.locale:Np),a=i(t&&r?t.fallbackLocale.value:Dt(e.fallbackLocale)||No(e.fallbackLocale)||eo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=i(ow(l.value,e)),c=i(eo(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=i(eo(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:Rn(e.missingWarn)||wd(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:Rn(e.fallbackWarn)||wd(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:Rn(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,k=go(e.missing)?e.missing:null,w=go(e.missing)?UC(e.missing):null,v=go(e.postTranslation)?e.postTranslation:null,y=t?t.warnHtmlMessage:Rn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter;const S=t?t.modifiers:eo(e.modifiers)?e.modifiers:{};let I=e.pluralRules||t&&t.pluralRules,T;T=(()=>{o&&NC(null);const se={version:$D,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:S,pluralRules:I,missing:w===null?void 0:w,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:y,escapeParameter:b,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};se.datetimeFormats=c.value,se.numberFormats=d.value,se.__datetimeFormatters=eo(T)?T.__datetimeFormatters:void 0,se.__numberFormatters=eo(T)?T.__numberFormatters:void 0;const _e=vD(se);return o&&NC(_e),_e})(),vf(T,l.value,a.value);function L(){return[l.value,a.value,u.value,c.value,d.value]}const P=O({get:()=>l.value,set:se=>{T.locale=se,l.value=se}}),R=O({get:()=>a.value,set:se=>{T.fallbackLocale=se,a.value=se,vf(T,l.value,se)}}),M=O(()=>u.value),D=O(()=>c.value),z=O(()=>d.value);function B(){return go(v)?v:null}function A(se){v=se,T.postTranslation=se}function F(){return k}function W(se){se!==null&&(w=UC(se)),k=se,T.missing=w}const j=(se,_e,Re,lt,ct,Ct)=>{L();let Mt;try{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=t?gD():void 0),Mt=se(T)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=void 0)}if(Re!=="translate exists"&&Go(Mt)&&Mt===u0||Re==="translate exists"&&!Mt){const[Bt,Vt]=_e();return t&&h?lt(t):ct(Bt)}else{if(Ct(Mt))return Mt;throw wi(Qs.UNEXPECTED_RETURN_TYPE)}};function le(...se){return j(_e=>Reflect.apply(BC,null,[_e,...se]),()=>ib(...se),"translate",_e=>Reflect.apply(_e.t,_e,[...se]),_e=>_e,_e=>Dt(_e))}function J(...se){const[_e,Re,lt]=se;if(lt&&!Pn(lt))throw wi(Qs.INVALID_ARGUMENT);return le(_e,Re,Yo({resolvedMessage:!0},lt||{}))}function X(...se){return j(_e=>Reflect.apply(FC,null,[_e,...se]),()=>ob(...se),"datetime format",_e=>Reflect.apply(_e.d,_e,[...se]),()=>Wg,_e=>Dt(_e)||No(_e))}function G(...se){return j(_e=>Reflect.apply(RC,null,[_e,...se]),()=>sb(...se),"number format",_e=>Reflect.apply(_e.n,_e,[...se]),()=>Wg,_e=>Dt(_e)||No(_e))}function Q(se){return se.map(_e=>Dt(_e)||Go(_e)||Rn(_e)?zC(String(_e)):_e)}const K={normalize:Q,interpolate:se=>se,type:"vnode"};function ge(...se){return j(_e=>{let Re;const lt=_e;try{lt.processor=K,Re=Reflect.apply(BC,null,[lt,...se])}finally{lt.processor=null}return Re},()=>ib(...se),"translate",_e=>_e[rb](...se),_e=>[zC(_e)],_e=>No(_e))}function Ce(...se){return j(_e=>Reflect.apply(RC,null,[_e,...se]),()=>sb(...se),"number format",_e=>_e[ab](...se),HC,_e=>Dt(_e)||No(_e))}function ze(...se){return j(_e=>Reflect.apply(FC,null,[_e,...se]),()=>ob(...se),"datetime format",_e=>_e[lb](...se),HC,_e=>Dt(_e)||No(_e))}function me(se){I=se,T.pluralRules=I}function te(se,_e){return j(()=>{if(!se)return!1;const Re=Dt(_e)?_e:l.value,lt=Dt(_e)?[Re]:nb(T,a.value,Re);for(let ct=0;ct[se],"translate exists",Re=>Reflect.apply(Re.te,Re,[se,_e]),LD,Re=>Rn(Re))}function oe(se){let _e=null;const Re=nb(T,a.value,l.value);for(let lt=0;lt{r&&(l.value=se,T.locale=se,vf(T,l.value,a.value))}),Ze(t.fallbackLocale,se=>{r&&(a.value=se,T.fallbackLocale=se,vf(T,l.value,a.value))}));const we={id:jC,locale:P,fallbackLocale:R,get inheritLocale(){return r},set inheritLocale(se){r=se,se&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,vf(T,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:M,get modifiers(){return S},get pluralRules(){return I||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(se){f=se,T.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(se){p=se,T.fallbackWarn=p},get fallbackRoot(){return h},set fallbackRoot(se){h=se},get fallbackFormat(){return m},set fallbackFormat(se){m=se,T.fallbackFormat=m},get warnHtmlMessage(){return y},set warnHtmlMessage(se){y=se,T.warnHtmlMessage=se},get escapeParameter(){return b},set escapeParameter(se){b=se,T.escapeParameter=se},t:le,getLocaleMessage:Y,setLocaleMessage:ke,mergeLocaleMessage:Se,getPostTranslationHandler:B,setPostTranslationHandler:A,getMissingHandler:F,setMissingHandler:W,[OT]:me};return we.datetimeFormats=D,we.numberFormats=z,we.rt=J,we.te=te,we.tm=H,we.d=X,we.n=G,we.getDateTimeFormat=ye,we.setDateTimeFormat=ne,we.mergeDateTimeFormat=ce,we.getNumberFormat=xe,we.setNumberFormat=fe,we.mergeNumberFormat=ue,we[RT]=n,we[rb]=ge,we[lb]=ze,we[ab]=Ce,we}function OD(e){const t=Dt(e.locale)?e.locale:Np,n=Dt(e.fallbackLocale)||No(e.fallbackLocale)||eo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=go(e.missing)?e.missing:void 0,s=Rn(e.silentTranslationWarn)||wd(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=Rn(e.silentFallbackWarn)||wd(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Rn(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=eo(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=go(e.postTranslation)?e.postTranslation:void 0,d=Dt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=Rn(e.sync)?e.sync:!0;let h=e.messages;if(eo(e.sharedMessages)){const S=e.sharedMessages;h=Object.keys(S).reduce((T,$)=>{const L=T[$]||(T[$]={});return Yo(L,S[$]),T},h||{})}const{__i18n:m,__root:k,__injectWithOption:w}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:h,flatJson:b,datetimeFormats:v,numberFormats:y,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:k,__injectWithOption:w}}function ub(e={}){const t=Hg(OD(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Rn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Rn(s)?!s:s},get silentFallbackWarn(){return Rn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Rn(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,i){return t.te(s,i)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,i){t.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){t.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,i){t.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){t.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,i){t.setNumberFormat(s,i)},mergeNumberFormat(s,i){t.mergeNumberFormat(s,i)}};return o.__extender=n,o}function RD(e,t,n){return{beforeCreate(){const o=Fp();if(!o)throw wi(Qs.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const i=s.i18n;if(s.__i18n&&(i.__i18n=s.__i18n),i.__root=t,this===this.$root)this.$i18n=VC(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=ub(i);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=VC(e,s);else{this.$i18n=ub({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&DT(t,s,s),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,r)=>this.$i18n.te(i,r),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=Fp();if(!o)throw wi(Qs.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function VC(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[OT](t.pluralizationRules||e.pluralizationRules);const n=ow(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sw={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function PD({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Ie?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},io())}function BT(){return Ie}const DD=Ge({name:"i18n-t",props:Yo({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Go(e)||!isNaN(e)}},sw),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||It({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),u=io();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Dt(e.plural)?+e.plural:e.plural);const c=PD(t,a);return s[rb](e.keypath,c,u)},r=Yo(io(),o),l=Dt(e.tag)||Pn(e.tag)?e.tag:BT();return Pn(l)?an(l,r,{default:i}):an(l,r,i())}}}),qC=DD;function BD(e){return No(e)&&!Dt(e[0])}function zT(e,t,n,o){const{slots:s,attrs:i}=t;return()=>{const r=()=>{const u={part:!0};let c=io();e.locale&&(u.locale=e.locale),Dt(e.format)?u.key=e.format:Pn(e.format)&&(Dt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((p,h)=>n.includes(h)?Yo(io(),p,{[h]:e.format[h]}):p,io()));const d=o(e.value,u,c);let f=[u.key];return No(d)?f=d.map((p,h)=>{const m=s[p.type],k=m?m({[p.type]:p.value,index:h,parts:d}):[p.value];return BD(k)&&(k[0].key=`${p.type}-${h}`),k}):Dt(d)&&(f=[d]),f},l=Yo(io(),i),a=Dt(e.tag)||Pn(e.tag)?e.tag:BT();return Pn(a)?an(a,l,{default:r}):an(a,l,r())}}const zD=Ge({name:"i18n-n",props:Yo({value:{type:Number,required:!0},format:{type:[String,Object]}},sw),setup(e,t){const n=e.i18n||It({useScope:e.scope,__useComponent:!0});return zT(e,t,NT,(...o)=>n[ab](...o))}}),KC=zD;function WD(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function HD(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw wi(Qs.UNEXPECTED_ERROR);const u=WD(e,l.$),c=GC(a);return[Reflect.apply(u.t,u,[...ZC(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);zg&&(r.__i18nWatcher=Ze(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{zg&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const a=r.__composer,u=GC(l);r.textContent=Reflect.apply(a.t,a,[...ZC(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function GC(e){if(Dt(e))return{path:e};if(eo(e)){if(!("path"in e))throw wi(Qs.REQUIRED_VALUE,"path");return e}else throw wi(Qs.INVALID_VALUE)}function ZC(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,r={},l=o||{};return Dt(n)&&(r.locale=n),Go(s)&&(r.plural=s),Go(i)&&(r.plural=i),[t,l,r]}function jD(e,t,...n){const o=eo(n[0])?n[0]:{};(Rn(o.globalInstall)?o.globalInstall:!0)&&([qC.name,"I18nT"].forEach(i=>e.component(i,qC)),[KC.name,"I18nN"].forEach(i=>e.component(i,KC)),[XC.name,"I18nD"].forEach(i=>e.component(i,XC))),e.directive("t",HD(t))}const UD=Pa("global-vue-i18n");function VD(e={}){const t=__VUE_I18N_LEGACY_API__&&Rn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Rn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=qD(e,t),r=Pa("");function l(d){return o.get(d)||null}function a(d,f){o.set(d,f)}function u(d){o.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,c),eo(f[0])){const m=f[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=QD(d,c.global)),__VUE_I18N_FULL_INSTALL__&&jD(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(RD(i,i.__composer,c));const h=d.unmount;d.unmount=()=>{p&&p(),c.dispose(),h()}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function It(e={}){const t=Fp();if(t==null)throw wi(Qs.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw wi(Qs.NOT_INSTALLED);const n=KD(t),o=ZD(n),s=PT(t),i=GD(e,s);if(i==="global")return DT(o,e,s),o;if(i==="parent"){let a=YC(n,t,e.__useComponent);return a==null&&(a=o),a}if(i==="isolated"){if(n.mode!=="composition")throw wi(Qs.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=Yo({},e),c=YC(n,t);u.__root=c||o;const d=Hg(u);return a.__composerExtend&&(d[Uc]=a.__composerExtend(d)),N2()&&Ld(()=>{const p=d[Uc];p&&(p(),delete d[Uc])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=Yo({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),l=Hg(a),r.__composerExtend&&(l[Uc]=r.__composerExtend(l)),JD(r,t,l),r.__setInstance(t,l)}return l}function qD(e,t){const n=dF(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>ub(e)):n.run(()=>Hg(e));if(o==null)throw wi(Qs.UNEXPECTED_ERROR);return[n,o]}function KD(e){const t=yn(e.isCE?UD:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw wi(e.isCE?Qs.NOT_INSTALLED_WITH_PROVIDE:Qs.UNEXPECTED_ERROR);return t}function GD(e,t){return Y2(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function ZD(e){return e.mode==="composition"?e.global:e.global.__composer}function YC(e,t,n=!1){let o=null;const s=t.root;let i=YD(t,n);for(;i!=null;){const r=e;if(e.mode==="composition")o=r.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(i);l!=null&&(o=l.__composer,n&&o&&!o[RT]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function YD(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function JD(e,t,n){bn(()=>{},t),Mn(()=>{const o=n;e.__deleteInstance(t);const s=o[Uc];s&&(s(),delete o[Uc])},t)}const XD=["locale","fallbackLocale","availableLocales"],JC=["t","rt","d","n","tm","te"];function QD(e,t){const n=Object.create(null);return XD.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw wi(Qs.UNEXPECTED_ERROR);const r=Do(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,JC.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw wi(Qs.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,JC.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const eB=Ge({name:"i18n-d",props:Yo({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},sw),setup(e,t){const n=e.i18n||It({useScope:e.scope,__useComponent:!0});return zT(e,t,$T,(...o)=>n[lb](...o))}}),XC=eB;ND();dD(qP);fD(aD);pD(nb);if(__INTLIFY_PROD_DEVTOOLS__){const e=Cu();e.__INTLIFY__=!0,KP(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const tB="modulepreload",nB=function(e){return"/"+e},QC={},Is=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let r=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");s=r(n.map(u=>{if(u=nB(u),u in QC)return;QC[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":tB,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return s.then(r=>{for(const l of r||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};async function Zo(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return sB(e)}function oB(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||Zo(e)}function sB(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const ln={permission:"pythinker-web.permission",activeWorkspace:"pythinker-active-workspace",planMode:"pythinker-web.plan-mode",planArmed:"pythinker-web.plan-armed",dynamicWorkflowMode:"pythinker-web.dynamic-workflow-mode",goalMode:"pythinker-web.goal-mode",uiFontSize:"pythinker-web.ui-font-size",starredModels:"pythinker-web.starred-models",unread:"pythinker-web.unread",onboarded:"pythinker-web.onboarded",accent:"pythinker-web.accent",colorScheme:"pythinker-web.color-scheme",hiddenWorkspaces:"pythinker-web.hidden-workspaces",collapsedWorkspaces:"pythinker-web.collapsed-workspaces",workspaceOrder:"pythinker-web.workspace-order",workspaceNameOverrides:"pythinker-web.workspace-name-overrides",workspaceSort:"pythinker-web.workspace-sort",pinnedSessions:"pythinker-web.pinned-sessions",pinnedCollapsed:"pythinker-web.pinned-collapsed",recentEmojis:"pythinker-web.recent-emojis",conversationToc:"pythinker-web.beta-toc",notifyOnComplete:"pythinker-web.notify-on-complete",notifyOnQuestion:"pythinker-web.notify-on-question",notifyOnApproval:"pythinker-web.notify-on-approval",soundOnComplete:"pythinker-web.sound-on-complete",inputHistory:"pythinker-web.input-history",clientId:"pythinker-web.client-id",debug:"pythinker-web.debug",openInLastTarget:"pythinker-web.open-in.last-target",sidebarCollapsed:"pythinker-web.sidebar-collapsed",sidebarWidth:"pythinker-web.sidebar-width",codeFont:"pythinker-web.code-font",contentAlign:"pythinker-web.content-align",theme:"pythinker-web.theme",thinking:"pythinker-web.thinking"};function e4(e){return`pythinker-web.draft.${e&&e.length>0?e:"__new__"}`}function zo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Qo(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Hu(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Rd(e){const t=zo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function za(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function iw(){const e=zo(ln.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[o,s]of Object.entries(t))s===!0&&(n[o]=!0);return n}catch{return{}}}function rw(e){const n={...iw()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];Qo(ln.unread,JSON.stringify(n))}function iB(){const e=Rd(ln.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function ny(e){za(ln.collapsedWorkspaces,Array.from(e))}function rB(){const e=Rd(ln.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function WT(e){za(ln.workspaceOrder,Array.from(e))}function am(){const e=Rd(ln.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}function t4(e){za(ln.workspaceNameOverrides,e)}function lB(){return zo(ln.workspaceSort)}function HT(e){Qo(ln.workspaceSort,e)}function aB(e,t){if(e.length===0)return null;const n=new Set(e),o=t.filter(i=>n.has(i)),s=e.filter(i=>!t.includes(i));return s.length===0&&o.length===t.length?null:[...s,...o]}function uB(e,t){const n=new Map(t.map((o,s)=>[o,s]));return e.toSorted((o,s)=>(n.get(o.id)??-1)-(n.get(s.id)??-1))}function cB(e,t,n,o="before"){const s=e.indexOf(t),i=e.indexOf(n);if(s===-1||i===-1||s===i)return e;const r=[...e];r.splice(s,1);const l=s(t.get(o.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function fB(e,t=2e4){const n=q(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return Mn(()=>clearInterval(s)),n}const pB=["src","alt","role"],hB=Ge({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=fB("/brand/mascot-waving.png"),o=e,s=t;function i(){o.interactive&&s("click")}return(r,l)=>(g(),C("img",{src:e.animated?x(n):"/brand/icon.svg",class:Be(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:i},null,10,pB))}}),ht=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},lw=ht(hB,[["__scopeId","data-v-4349c96d"]]),mB={"&":"&","<":"<",">":">",'"':""","'":"'"};function n4(e){return e.replace(/[&<>"']/g,t=>mB[t]??t)}function gB(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vB(e,t,n=40){const o=e.replace(/\s+/g," ").trim();if(o.length===0)return"";const s=t.trim();if(s.length===0)return o4(o,n*2);const i=o.toLowerCase().indexOf(s.toLowerCase());if(i<0)return o4(o,n*2);const r=Math.max(0,i-n),l=Math.min(o.length,i+s.length+n),a=r>0,u=l`${i}`)}const ku=q(0),yB=["type","disabled","aria-label"],kB=Ge({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},type:{default:"button"}},setup(e,{expose:t}){const n=q();return t({el:n}),(o,s)=>(g(),C("button",{ref_key:"el",ref:n,class:Be(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[xn(o.$slots,"default",{},void 0,!0)],10,yB))}}),Jt=ht(kB,[["__scopeId","data-v-4b23513f"]]),bB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wB(e,t){return g(),C("svg",bB,[...t[0]||(t[0]=[_("path",{d:"M11.1 12.9001V15.0909C11.1 15.593 11.5029 16 12 16C12.4971 16 12.9 15.593 12.9 15.0909V12.9001H15.0909C15.593 12.9001 16 12.4972 16 12.0001C16 11.5031 15.593 11.1001 15.0909 11.1001H12.9V8.90909C12.9 8.40701 12.4971 8 12 8C11.5029 8 11.1 8.40701 11.1 8.90909V11.1001H8.90909C8.40701 11.1001 8 11.5031 8 12.0001C8 12.4972 8.40701 12.9001 8.90909 12.9001H11.1Z",fill:"currentColor"},null,-1),_("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9996 2.1001C6.53199 2.1001 2.09961 6.53248 2.09961 12.0001C2.09961 13.9226 2.64847 15.7192 3.59804 17.2391L2.517 19.8207C2.10313 20.8091 2.82908 21.9001 3.90059 21.9001H11.9996C17.4672 21.9001 21.8996 17.4677 21.8996 12.0001C21.8996 6.53248 17.4672 2.1001 11.9996 2.1001ZM3.89961 12.0001C3.89961 7.52659 7.5261 3.9001 11.9996 3.9001C16.4731 3.9001 20.0996 7.52659 20.0996 12.0001C20.0996 16.4736 16.4724 20.1001 11.9989 20.1001H4.35146L5.63494 17.0351L5.35165 16.6291C4.43632 15.3172 3.89961 13.7227 3.89961 12.0001Z",fill:"currentColor"},null,-1)])])}const xB=At({name:"pythinker-add-conversation",render:wB}),_B={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SB(e,t){return g(),C("svg",_B,[...t[0]||(t[0]=[_("path",{d:"M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z",fill:"currentColor"},null,-1)])])}const CB=At({name:"pythinker-folder",render:SB}),AB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},MB=["clip-path"],EB=["id"];function TB(e,t){return g(),C("svg",AB,[_("g",{"clip-path":"url(#"+e.idMap.clip0_4626_2033+")"},[...t[0]||(t[0]=[_("path",{d:"M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z",fill:"currentColor"},null,-1)])],8,MB),_("defs",null,[_("clipPath",{id:e.idMap.clip0_4626_2033},[...t[1]||(t[1]=[_("rect",{width:"24",height:"24",fill:"white"},null,-1)])],8,EB)])])}const IB=At({name:"pythinker-folder-open",render:TB,setup(){return{idMap:{clip0_4626_2033:"uicons-"+Math.random().toString(36).substr(2,10)}}}}),$B={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function NB(e,t){return g(),C("svg",$B,[...t[0]||(t[0]=[_("path",{d:"M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z",fill:"currentColor"},null,-1),_("path",{d:"M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z",fill:"currentColor"},null,-1),_("path",{d:"M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z",fill:"currentColor"},null,-1)])])}const LB=At({name:"pythinker-more",render:NB}),FB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function OB(e,t){return g(),C("svg",FB,[...t[0]||(t[0]=[_("path",{d:"M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z",fill:"currentColor"},null,-1)])])}const RB=At({name:"pythinker-search",render:OB}),PB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function DB(e,t){return g(),C("svg",PB,[...t[0]||(t[0]=[_("path",{d:"M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z",fill:"currentColor"},null,-1),_("path",{d:"M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z",fill:"currentColor"},null,-1)])])}const BB=At({name:"pythinker-setting",render:DB}),zB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function WB(e,t){return g(),C("svg",zB,[...t[0]||(t[0]=[_("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[_("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"}),_("path",{d:"m9 12l2 2l4-4"})],-1)])])}const HB=At({name:"tabler-circle-check",render:WB}),jB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function UB(e,t){return g(),C("svg",jB,[...t[0]||(t[0]=[_("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.56 3.69a9 9 0 0 0-2.92 1.95M3.69 8.56A9 9 0 0 0 3 12m.69 3.44a9 9 0 0 0 1.95 2.92m2.92 1.95A9 9 0 0 0 12 21m3.44-.69a9 9 0 0 0 2.92-1.95m1.95-2.92A9 9 0 0 0 21 12m-.69-3.44a9 9 0 0 0-1.95-2.92m-2.92-1.95A9 9 0 0 0 12 3"},null,-1)])])}const VB=At({name:"tabler-circle-dashed",render:UB}),qB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function KB(e,t){return g(),C("svg",qB,[...t[0]||(t[0]=[_("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[_("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm5-2v16"}),_("path",{d:"m15 10l-2 2l2 2"})],-1)])])}const GB=At({name:"tabler-layout-sidebar-left-collapse",render:KB}),ZB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function YB(e,t){return g(),C("svg",ZB,[...t[0]||(t[0]=[_("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[_("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm5-2v16"}),_("path",{d:"m14 10l2 2l-2 2"})],-1)])])}const JB=At({name:"tabler-layout-sidebar-left-expand",render:YB}),XB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function QB(e,t){return g(),C("svg",XB,[...t[0]||(t[0]=[_("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"},null,-1)])])}const ez=At({name:"tabler-paperclip",render:QB}),tz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nz(e,t){return g(),C("svg",tz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])}const oz=At({name:"ri-add-line",render:nz}),sz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function iz(e,t){return g(),C("svg",sz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m19.713 9.128l-.246.566a.506.506 0 0 1-.934 0l-.246-.566a4.36 4.36 0 0 0-2.22-2.25l-.759-.339a.53.53 0 0 1 0-.963l.717-.319a4.37 4.37 0 0 0 2.251-2.326l.253-.611a.506.506 0 0 1 .942 0l.253.61a4.37 4.37 0 0 0 2.25 2.327l.718.32a.53.53 0 0 1 0 .962l-.76.338a4.36 4.36 0 0 0-2.219 2.251M6 5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5h2v5a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V7a4 4 0 0 1 4-4h7v2z"},null,-1)])])}const rz=At({name:"ri-ai-generate",render:iz}),lz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function az(e,t){return g(),C("svg",lz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z"},null,-1)])])}const uz=At({name:"ri-alert-line",render:az}),cz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function dz(e,t){return g(),C("svg",cz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 10H2V4.003C2 3.449 2.455 3 2.992 3h18.016A.99.99 0 0 1 22 4.003V10h-1v10.002a.996.996 0 0 1-.993.998H3.993A.996.996 0 0 1 3 20.002zm16 0H5v9h14zM4 5v3h16V5zm5 7h6v2H9z"},null,-1)])])}const fz=At({name:"ri-archive-line",render:dz}),pz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function hz(e,t){return g(),C("svg",pz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13 16.172l5.364-5.364l1.414 1.414L12 20l-7.778-7.778l1.414-1.414L11 16.172V4h2z"},null,-1)])])}const mz=At({name:"ri-arrow-down-line",render:hz}),gz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function vz(e,t){return g(),C("svg",gz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z"},null,-1)])])}const yz=At({name:"ri-arrow-down-s-line",render:vz}),kz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bz(e,t){return g(),C("svg",kz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m5.828 7l2.536 2.535L6.95 10.95L2 6l4.95-4.95l1.414 1.415L5.828 5H13a8 8 0 1 1 0 16H4v-2h9a6 6 0 0 0 0-12z"},null,-1)])])}const wz=At({name:"ri-arrow-go-back-line",render:bz}),xz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function _z(e,t){return g(),C("svg",xz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m16.172 11l-5.364-5.364l1.414-1.414L20 12l-7.778 7.778l-1.414-1.414L16.172 13H4v-2z"},null,-1)])])}const Sz=At({name:"ri-arrow-right-line",render:_z}),Cz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Az(e,t){return g(),C("svg",Cz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z"},null,-1)])])}const Mz=At({name:"ri-arrow-right-s-line",render:Az}),Ez={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Tz(e,t){return g(),C("svg",Ez,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M13 7.828V20h-2V7.828l-5.364 5.364l-1.414-1.414L12 4l7.778 7.778l-1.414 1.414z"},null,-1)])])}const s4=At({name:"ri-arrow-up-line",render:Tz}),Iz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function $z(e,t){return g(),C("svg",Iz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 10.828l-4.95 4.95l-1.414-1.414L12 8l6.364 6.364l-1.414 1.414z"},null,-1)])])}const Nz=At({name:"ri-arrow-up-s-line",render:$z}),Lz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fz(e,t){return g(),C("svg",Lz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 4a2 2 0 0 1 2 2v6.827c-.894-.69-2.034-1.097-3.336-1.313l-.328 1.972c1.38.23 2.261.667 2.804 1.255c.53.574.86 1.426.86 2.759a2.5 2.5 0 0 1-5 0v-.35c.43.143.876.26 1.336.336l.328-1.972c-.743-.124-1.489-.4-2.235-.754A2.5 2.5 0 0 1 4 12.5c0-.835.208-1.492.559-1.974c.345-.476.883-.856 1.684-1.056L7 9.28V6a2 2 0 0 1 2-2m3-.646A4 4 0 0 0 5 6v1.774c-.851.342-1.549.874-2.059 1.575C2.292 10.242 2 11.335 2 12.5a4.49 4.49 0 0 0 2 3.742V17.5a4.5 4.5 0 0 0 8 2.829a4.5 4.5 0 0 0 8-2.829v-1.258a4.49 4.49 0 0 0 2-3.742c0-1.165-.292-2.258-.941-3.15c-.51-.702-1.208-1.234-2.059-1.576V6a4 4 0 0 0-7-2.646m6 13.795v.351a2.5 2.5 0 0 1-5 0c0-1.333.33-2.185.86-2.76c.543-.587 1.424-1.024 2.804-1.254l-.328-1.972c-1.302.216-2.442.623-3.336 1.313V6a2 2 0 1 1 4 0v3.28l.758.19c.8.2 1.338.58 1.683 1.056c.351.482.559 1.14.559 1.974c0 .999-.582 1.857-1.43 2.26c-.745.354-1.492.63-2.234.754l.328 1.972A9 9 0 0 0 18 17.149"},null,-1)])])}const Oz=At({name:"ri-brain-line",render:Fz}),Rz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Pz(e,t){return g(),C("svg",Rz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"},null,-1)])])}const Dz=At({name:"ri-braces-line",render:Pz}),Bz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function zz(e,t){return g(),C("svg",Bz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"},null,-1)])])}const Wz=At({name:"ri-calendar-close-line",render:zz}),Hz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function jz(e,t){return g(),C("svg",Hz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"},null,-1)])])}const Uz=At({name:"ri-calendar-schedule-line",render:jz}),Vz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qz(e,t){return g(),C("svg",Vz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"},null,-1)])])}const Kz=At({name:"ri-calendar-todo-line",render:qz}),Gz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Zz(e,t){return g(),C("svg",Gz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z"},null,-1)])])}const Yz=At({name:"ri-check-line",render:Zz}),Jz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Xz(e,t){return g(),C("svg",Jz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"},null,-1)])])}const Qz=At({name:"ri-close-line",render:Xz}),eW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tW(e,t){return g(),C("svg",eW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1)])])}const nW=At({name:"ri-code-line",render:tW}),oW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sW(e,t){return g(),C("svg",oW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M15 4h-2v7h7V9h-3.586l4.293-4.293l-1.414-1.414L15 7.586zM4 15h3.586l-4.293 4.293l1.414 1.414L9 16.414V20h2v-7H4z"},null,-1)])])}const iW=At({name:"ri-collapse-diagonal-line",render:sW}),rW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lW(e,t){return g(),C("svg",rW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1zm1 2H6v12h12zm-9 3h2v6H9zm4 0h2v6h-2zM9 4v2h6V4z"},null,-1)])])}const aW=At({name:"ri-delete-bin-line",render:lW}),uW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cW(e,t){return g(),C("svg",uW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 19h18v2H3zm10-5.828L19.071 7.1l1.414 1.414L12 17L3.515 8.515L4.929 7.1L11 13.173V2h2z"},null,-1)])])}const dW=At({name:"ri-download-line",render:cW}),fW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pW(e,t){return g(),C("svg",fW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M8.5 7a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m0 6.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M15.5 7a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1.5 8a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3"},null,-1)])])}const hW=At({name:"ri-draggable",render:pW}),mW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gW(e,t){return g(),C("svg",mW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6.17 18a3.001 3.001 0 0 1 5.66 0H22v2H11.83a3.001 3.001 0 0 1-5.66 0H2v-2zm6-7a3.001 3.001 0 0 1 5.66 0H22v2h-4.17a3.001 3.001 0 0 1-5.66 0H2v-2zm-6-7a3.001 3.001 0 0 1 5.66 0H22v2H11.83a3.001 3.001 0 0 1-5.66 0H2V4zM9 6a1 1 0 1 0 0-2a1 1 0 0 0 0 2m6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const vW=At({name:"ri-equalizer-line",render:gW}),yW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kW(e,t){return g(),C("svg",yW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17.586 5H14V3h7v7h-2V6.414l-4.293 4.293l-1.414-1.414zM3 14h2v3.586l4.293-4.293l1.414 1.414L6.414 19H10v2H3z"},null,-1)])])}const bW=At({name:"ri-expand-diagonal-line",render:kW}),wW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xW(e,t){return g(),C("svg",wW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"},null,-1)])])}const _W=At({name:"ri-external-link-line",render:xW}),SW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function CW(e,t){return g(),C("svg",SW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"},null,-1)])])}const AW=At({name:"ri-eye-line",render:CW}),MW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function EW(e,t){return g(),C("svg",MW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"},null,-1)])])}const TW=At({name:"ri-eye-off-line",render:EW}),IW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function $W(e,t){return g(),C("svg",IW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const NW=At({name:"ri-file-add-line",render:$W}),LW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function FW(e,t){return g(),C("svg",LW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z"},null,-1)])])}const OW=At({name:"ri-file-copy-line",render:FW}),RW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function PW(e,t){return g(),C("svg",RW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m21 6.757l-2 2V4h-9v5H5v11h14v-2.757l2-2v5.765a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8l6.003-6h10.995C20.55 2 21 2.455 21 2.992zm.778 2.05l1.414 1.415L15.414 18l-1.416-.002l.002-1.412z"},null,-1)])])}const DW=At({name:"ri-file-edit-line",render:PW}),BW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function zW(e,t){return g(),C("svg",BW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z"},null,-1)])])}const i4=At({name:"ri-file-line",render:zW}),WW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function HW(e,t){return g(),C("svg",WW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M21 8v12.993A1 1 0 0 1 20.007 22H3.993A.993.993 0 0 1 3 21.008V2.992C3 2.455 3.449 2 4.002 2h10.995zm-2 1h-5V4H5v16h14zM8 7h3v2H8zm0 4h8v2H8zm0 4h8v2H8z"},null,-1)])])}const jW=At({name:"ri-file-text-line",render:HW}),UW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function VW(e,t){return g(),C("svg",UW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M16 2v2h-1v3.243a8 8 0 0 0 .736 3.352l4.281 9.276A1.5 1.5 0 0 1 18.655 22H5.344a1.5 1.5 0 0 1-1.362-2.129l4.281-9.276A8 8 0 0 0 9 7.243V4H8V2zm-2.613 8.001h-2.776q-.156.545-.374 1.071l-.158.362L6.124 20h11.75l-3.954-8.566A10 10 0 0 1 13.387 10M11 7.243q0 .38-.028.758h2.057a10 10 0 0 1-.02-.364L13 7.243V4h-2z"},null,-1)])])}const qW=At({name:"ri-flask-line",render:VW}),KW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function GW(e,t){return g(),C("svg",KW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const ZW=At({name:"ri-flashlight-line",render:GW}),YW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function JW(e,t){return g(),C("svg",YW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414zM4 5v14h16V7h-8.414l-2-2zm7 7V9h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const XW=At({name:"ri-folder-add-line",render:JW}),QW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eH(e,t){return g(),C("svg",QW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])}const tH=At({name:"ri-folder-fill",render:eH}),nH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function oH(e,t){return g(),C("svg",nH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"},null,-1)])])}const sH=At({name:"ri-git-fork-line",render:oH}),iH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rH(e,t){return g(),C("svg",iH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const lH=At({name:"ri-git-pull-request-line",render:rH}),aH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uH(e,t){return g(),C("svg",aH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.01 8.01 0 0 0 5.648 6.667M10.03 13c.151 2.439.848 4.73 1.97 6.752A15.9 15.9 0 0 0 13.97 13zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.01 8.01 0 0 0 19.938 13M4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333A8.01 8.01 0 0 0 4.062 11m5.969 0h3.938A15.9 15.9 0 0 0 12 4.248A15.9 15.9 0 0 0 10.03 11m4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.01 8.01 0 0 0-5.648-6.667"},null,-1)])])}const cH=At({name:"ri-global-line",render:uH}),dH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fH(e,t){return g(),C("svg",dH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12.5 2a.5.5 0 0 0-.5.5V12h-2V4.5a.5.5 0 0 0-1 0V14H7c-.38-1.62-1.358-2.56-2.405-2.678A89 89 0 0 0 6.166 15.1c.86 1.962 1.725 3.422 2.838 4.399C10.078 20.442 11.459 21 13.5 21a5.5 5.5 0 0 0 5.5-5.5V7a.5.5 0 0 0-1 0v5h-2V4a.5.5 0 0 0-1 0v8h-2V2.5a.5.5 0 0 0-.5-.5M21 15.5a7.5 7.5 0 0 1-7.5 7.5c-2.458 0-4.328-.692-5.816-1.998c-1.45-1.274-2.459-3.064-3.35-5.1c-.93-2.127-1.444-3.422-1.724-4.178c-.357-.964.136-2.312 1.476-2.406a4.02 4.02 0 0 1 2.914.94V4.5a2.5 2.5 0 0 1 3.04-2.442a2.5 2.5 0 0 1 4.79-.467A2.502 2.502 0 0 1 18 4v.55q.243-.05.5-.05A2.5 2.5 0 0 1 21 7z"},null,-1)])])}const pH=At({name:"ri-hand",render:fH}),hH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function mH(e,t){return g(),C("svg",hH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993zM20 15V5H4v14L14 9zm0 2.828l-6-6L6.828 19H20zM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4"},null,-1)])])}const r4=At({name:"ri-image-line",render:mH}),gH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function vH(e,t){return g(),C("svg",gH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16M11 7h2v2h-2zm0 4h2v6h-2z"},null,-1)])])}const yH=At({name:"ri-information-line",render:vH}),kH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bH(e,t){return g(),C("svg",kH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.06 8.111l1.415 1.414a7 7 0 0 1 0 9.9l-.354.353a7 7 0 1 1-9.9-9.9l1.415 1.415a5 5 0 1 0 7.071 7.071l.354-.354a5 5 0 0 0 0-7.07l-1.415-1.415zm6.718 6.01l-1.414-1.414a5 5 0 0 0-7.071-7.07l-.354.353a5 5 0 0 0 0 7.07l1.415 1.415l-1.415 1.414l-1.414-1.414a7 7 0 0 1 0-9.9l.354-.353a7 7 0 1 1 9.9 9.9"},null,-1)])])}const wH=At({name:"ri-links-line",render:bH}),xH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function _H(e,t){return g(),C("svg",xH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"},null,-1)])])}const SH=At({name:"ri-list-check",render:_H}),CH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function AH(e,t){return g(),C("svg",CH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"},null,-1)])])}const MH=At({name:"ri-list-unordered",render:AH}),EH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function TH(e,t){return g(),C("svg",EH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M4 15h2v5h12V4H6v5H4V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm6-4V8l5 4l-5 4v-3H2v-2z"},null,-1)])])}const IH=At({name:"ri-login-box-line",render:TH}),$H={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function NH(e,t){return g(),C("svg",$H,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m17 4.238l-7.928 7.1L4 7.216V19h16zM4.511 5l7.55 6.662L19.502 5z"},null,-1)])])}const LH=At({name:"ri-mail-line",render:NH}),FH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function OH(e,t){return g(),C("svg",FH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1zm-.692-2H20V5H4v13.385zM8 10h8v2H8z"},null,-1)])])}const RH=At({name:"ri-message-line",render:OH}),PH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function DH(e,t){return g(),C("svg",PH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.196 2.268l3.25 5.63a1 1 0 0 1-.366 1.365l-1.3.75l1.001 1.732l-1.732 1l-1-1.733l-1.299.751a1 1 0 0 1-1.366-.366L8.546 8.215a5 5 0 0 0-3.222 6.56A4.97 4.97 0 0 1 8 14c1.684 0 3.174.833 4.08 2.109l7.688-4.439l1 1.733l-7.878 4.548a5 5 0 0 1 .01 2.05L21 20v2l-17 .001A4.98 4.98 0 0 1 3 19c0-1.007.298-1.945.81-2.73a7.003 7.003 0 0 1 3.717-9.82l-.393-.682a2 2 0 0 1 .732-2.732l2.598-1.5a2 2 0 0 1 2.732.732M8 16a3 3 0 0 0-2.83 4h5.66A3 3 0 0 0 8 16m3.464-12.732l-2.598 1.5l2.75 4.763l2.598-1.5z"},null,-1)])])}const BH=At({name:"ri-microscope-line",render:DH}),zH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function WH(e,t){return g(),C("svg",zH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6 5h2v14H6zm10 0h2v14h-2z"},null,-1)])])}const HH=At({name:"ri-pause-fill",render:WH}),jH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function UH(e,t){return g(),C("svg",jH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m15.728 9.576l-1.414-1.414L5 17.476v1.414h1.414zm1.414-1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zm-9.9 12.728H3v-4.243L16.435 3.212a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414z"},null,-1)])])}const VH=At({name:"ri-pencil-line",render:UH}),qH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function KH(e,t){return g(),C("svg",qH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M19.376 12.416L8.777 19.482A.5.5 0 0 1 8 19.066V4.934a.5.5 0 0 1 .777-.416l10.599 7.066a.5.5 0 0 1 0 .832"},null,-1)])])}const GH=At({name:"ri-play-fill",render:KH}),ZH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function YH(e,t){return g(),C("svg",ZH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m22.313 10.175l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707l1.414-1.414z"},null,-1)])])}const JH=At({name:"ri-pushpin-fill",render:YH}),XH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function QH(e,t){return g(),C("svg",XH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"},null,-1)])])}const ej=At({name:"ri-pushpin-line",render:QH}),tj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nj(e,t){return g(),C("svg",tj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-1-5h2v2h-2zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1a1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.501 3.501 0 1 1 13 13.355"},null,-1)])])}const oj=At({name:"ri-question-line",render:nj}),sj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ij(e,t){return g(),C("svg",sj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M13 4.055A9 9 0 0 1 21 13v9H3v-9a9 9 0 0 1 8-8.945V1h2zM19 20v-7a7 7 0 1 0-14 0v7zm-7-2a5 5 0 1 1 0-10a5 5 0 0 1 0 10m0-2a3 3 0 1 0 0-6a3 3 0 0 0 0 6m0-2a1 1 0 1 1 0-2a1 1 0 0 1 0 2"},null,-1)])])}const rj=At({name:"ri-robot-line",render:ij}),lj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function aj(e,t){return g(),C("svg",lj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05zM13 10h3l-5 7v-5H8l5-7z"},null,-1)])])}const uj=At({name:"ri-shield-flash-line",render:aj}),cj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function dj(e,t){return g(),C("svg",cj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05z"},null,-1)])])}const fj=At({name:"ri-shield-line",render:dj}),pj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function hj(e,t){return g(),C("svg",pj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m6.265 3.807l1.147 1.639a8 8 0 1 0 9.176 0l1.147-1.639A9.99 9.99 0 0 1 22 12c0 5.523-4.477 10-10 10S2 17.523 2 12a9.99 9.99 0 0 1 4.265-8.193M11 12V2h2v10z"},null,-1)])])}const mj=At({name:"ri-shut-down-line",render:hj}),gj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function vj(e,t){return g(),C("svg",gj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const yj=At({name:"ri-sort-desc",render:vj}),kj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bj(e,t){return g(),C("svg",kj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M14 4.438A2.437 2.437 0 0 0 16.438 2h1.125A2.437 2.437 0 0 0 20 4.438v1.125A2.437 2.437 0 0 0 17.563 8h-1.125A2.437 2.437 0 0 0 14 5.563zM1 11a6 6 0 0 0 6-6h2a6 6 0 0 0 6 6v2a6 6 0 0 0-6 6H7a6 6 0 0 0-6-6zm3.876 1A8.04 8.04 0 0 1 8 15.124A8.04 8.04 0 0 1 11.124 12A8.04 8.04 0 0 1 8 8.876A8.04 8.04 0 0 1 4.876 12m12.374 2A3.25 3.25 0 0 1 14 17.25v1.5A3.25 3.25 0 0 1 17.25 22h1.5A3.25 3.25 0 0 1 22 18.75v-1.5A3.25 3.25 0 0 1 18.75 14z"},null,-1)])])}const wj=At({name:"ri-sparkling-line",render:bj}),xj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function _j(e,t){return g(),C("svg",xj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"},null,-1)])])}const Sj=At({name:"ri-star-fill",render:_j}),Cj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Aj(e,t){return g(),C("svg",Cj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"},null,-1)])])}const Mj=At({name:"ri-star-line",render:Aj}),Ej={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Tj(e,t){return g(),C("svg",Ej,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6 5h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1"},null,-1)])])}const Ij=At({name:"ri-stop-fill",render:Tj}),$j={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Nj(e,t){return g(),C("svg",$j,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M5 11v2h14v-2z"},null,-1)])])}const Lj=At({name:"ri-subtract-line",render:Nj}),Fj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Oj(e,t){return g(),C("svg",Fj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 2a1 1 0 1 1 0 2a8 8 0 1 0 8 8a1 1 0 1 1 2 0c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2m0 4a1 1 0 1 1 0 2a4 4 0 1 0 4 4a1 1 0 1 1 2 0a6 6 0 1 1-6-6m5.656-3.9a1.001 1.001 0 0 1 1.415 1.415l-.708.706h.001a1 1 0 1 0 1.414 1.415l.707-.707A1 1 0 0 1 21.9 6.343l-2.12 2.122a1 1 0 0 1-.708.292h-2.414l-3.95 3.95a1 1 0 0 1-1.414-1.414l3.95-3.95V4.93a1 1 0 0 1 .292-.707z"},null,-1)])])}const Rj=At({name:"ri-target-line",render:Oj}),Pj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Dj(e,t){return g(),C("svg",Pj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m1 2v14h16V5zm8 10h6v2h-6zm-3.333-3L5.838 9.172l1.415-1.415L11.495 12l-4.242 4.243l-1.415-1.415z"},null,-1)])])}const Bj=At({name:"ri-terminal-box-line",render:Dj}),zj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Wj(e,t){return g(),C("svg",zj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"},null,-1)])])}const Hj=At({name:"ri-time-line",render:Wj}),jj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uj(e,t){return g(),C("svg",jj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"},null,-1)])])}const Vj=At({name:"ri-tools-line",render:Uj}),qj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Kj(e,t){return g(),C("svg",qj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4"},null,-1)])])}const Gj=At({name:"ri-user-line",render:Kj}),Zj=` - - - -`,Yj=` - - -`,Jj=` - - - - - - - - - -`,Xj=` - - - - -`,Qj=` - - -`,eU=` - - - -`,tU='',nU='',oU='',sU='',iU='',rU='',lU='',aU='',uU='',cU='',dU='',fU='',pU='',hU='',l4='',mU='',gU='',vU='',yU='',kU='',bU='',wU='',xU='',_U='',SU='',CU='',AU='',MU='',EU='',TU='',IU='',$U='',NU='',LU='',FU='',OU='',a4='',RU='',PU='',DU='',BU='',zU='',WU='',HU='',jU='',UU='',u4='',VU='',qU='',KU='',GU='',ZU='',YU='',JU='',XU='',QU='',eV='',tV='',nV='',oV='',sV='',iV='',rV='',lV='',aV='',uV='',cV='',dV='',fV='',pV='',hV='',mV='',gV='',vV='',yV='',kV='',jT={sm:14,md:16,lg:20};function Et(e,t){return{component:e,svg:t}}const UT={plus:Et(oz,rU),"chat-new":Et(xB,Zj),"calendar-close":Et(Wz,yU),"calendar-schedule":Et(Uz,kU),"calendar-todo":Et(Kz,bU),close:Et(Qz,xU),check:Et(Yz,wU),archive:Et(fz,uU),search:Et(RB,Qj),copy:Et(OW,FU),link:Et(wH,qU),"external-link":Et(_W,IU),download:Et(dW,AU),undo:Et(wz,fU),send:Et(s4,l4),image:Et(r4,u4),settings:Et(BB,eU),sliders:Et(vW,EU),robot:Et(rj,iV),microscope:Et(BH,XU),flask:Et(qW,PU),eye:Et(AW,$U),"eye-off":Et(TW,NU),"log-in":Et(IH,ZU),"chevron-down":Et(yz,dU),"chevron-right":Et(Mz,hU),"chevron-up":Et(Nz,mU),"arrow-up":Et(s4,l4),"arrow-down":Et(mz,cU),"arrow-right":Et(Sz,pU),minus:Et(Lj,hV),"panel-collapse":Et(GB,oU),"panel-expand":Et(JB,sU),expand:Et(bW,TU),collapse:Et(iW,SU),list:Et(MH,GU),sort:Et(yj,uV),grip:Et(hW,MU),folder:Et(IB,Jj),"folder-closed":Et(CB,Yj),"folder-plus":Et(XW,BU),"folder-solid":Et(tH,zU),file:Et(i4,a4),"file-text":Et(jW,RU),"file-edit":Et(DW,OU),"file-plus":Et(NW,LU),"file-off":Et(i4,a4),attachment:Et(ez,iU),"image-off":Et(r4,u4),code:Et(nW,_U),terminal:Et(Bj,gV),pencil:Et(VH,eV),tool:Et(Vj,yV),glob:Et(Dz,vU),globe:Et(cH,jU),"check-list":Et(SH,KU),bolt:Et(ZW,DU),"git-fork":Et(sH,WU),"git-pull-request":Et(lH,HU),message:Et(RH,JU),mail:Et(LH,YU),user:Et(Gj,kV),info:Et(yH,VU),"help-circle":Et(oj,sV),"alert-triangle":Et(uz,aU),hand:Et(pH,UU),"shield-question":Et(fj,lV),"full-access":Et(uj,rV),trash:Et(aW,CU),clock:Et(Hj,vV),sparkles:Et(wj,cV),thinking:Et(Oz,gU),target:Et(Rj,mV),pause:Et(HH,QU),play:Et(GH,tV),power:Et(mj,aV),stop:Et(Ij,pV),star:Et(Sj,dV),"star-outline":Et(Mj,fV),"dots-horizontal":Et(LB,Xj),"circle-check":Et(HB,tU),"circle-dashed":Et(VB,nU),"pushpin-line":Et(ej,oV),"pushpin-fill":Et(JH,nV),"gen-title":Et(rz,lU)};function bV(e){return UT[e]}function wV(e,t){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,"").replace(/^
([\s\S]*?)<\/summary>/,FJ=/([\s\S]*?)<\/resume_hint>/,iy=/]*)>|<\/subagent>/g,OJ="",v4=/(completed|failed|aborted):\s*(\d+)/g,y4=/([a-z_]+)="([^"]*)"/g;function RJ(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function PJ(e){const t={};y4.lastIndex=0;let n;for(;(n=y4.exec(e))!==null;)t[n[1]]=RJ(n[2]);return t}function DJ(e){const t={completed:0,failed:0,aborted:0};v4.lastIndex=0;let n;for(;(n=v4.exec(e))!==null;){const o=n[1];t[o]=Number(n[2])}return t}function BJ(e,t){const n=PJ(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function zJ(e){const t=[],n=[];iy.lastIndex=0;let o;for(;(o=iy.exec(e))!==null;)if(o[0]===OJ){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(BJ(s.attrs,e.slice(s.bodyStart,o.index)))}else n.length===0?n.push({attrs:o[1]??"",bodyStart:iy.lastIndex}):n.push(null);return t}function WJ(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` -`):e;if(!t.includes(""))return null;const n=LJ.exec(t)?.[1]?.trim()??"",{completed:o,failed:s,aborted:i}=DJ(n),r=FJ.exec(t)?.[1]?.trim(),l=zJ(t),a=o+s+i;return{summary:n,completed:o,failed:s,aborted:i,total:a>0?a:l.length,subagents:l,resumeHint:r}}function k4(e){return e?e.split(` -`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function HJ(e){return e.suspendedReason||k4(e.text)||k4(e.outputLines?.join(` -`))||e.summary||""}function jJ(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` -`):e.summary??""}function UJ(e){return e==="completed"?"completed":e==="failed"?"failed":e==="aborted"||e==="cancelled"?"cancelled":"working"}function b4(e,t){return{id:e.agentId??e.item??`result-${t}`,name:e.item??`subagent ${t+1}`,activity:e.body.split(` -`)[0]??"",phase:UJ(e.outcome),body:e.body,live:!1,agentId:e.agentId}}function VJ(e,t){return!!(t.agentId&&e.id===t.agentId||t.item&&e.name.includes(t.item))}function qJ(e,t){const n=e.map(s=>({id:s.id,name:s.name,activity:HJ(s),phase:s.phase,body:jJ(s),live:!0}));if(!t)return n;const o=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(i=>VJ(i,s))).map((s,i)=>b4(s,i));return n.length>0?[...n,...o]:t.subagents.map((s,i)=>b4(s,i))}const KJ=["aria-expanded"],GJ={class:"title"},ZJ={key:0,class:"meta"},YJ={key:1,class:"sum-txt"},JJ={class:"rt"},XJ={class:"status"},QJ={key:0,class:"chip"},eX={key:1,class:"tm"},tX={class:"body"},nX={class:"overview"},oX={class:"overview-line"},sX={class:"big"},iX={key:0,class:"lbl"},rX={key:1,class:"lbl"},lX={key:2,class:"lbl"},aX={key:0,class:"seg","aria-hidden":"true"},uX={key:1,class:"legend"},cX=["disabled","aria-label","aria-expanded","onClick"],dX={class:"mname"},fX={class:"mact"},pX={class:"mphase"},hX=["aria-expanded","onClick"],mX={key:1,class:"fallback-output"},gX={key:2,class:"waiting"},vX=Ge({__name:"DynamicWorkflowTool",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t;function i(B){if(!B)return{};try{const A=JSON.parse(B),F=Array.isArray(A.items)?A.items:void 0;return{description:typeof A.description=="string"?A.description:void 0,itemCount:F?.length}}catch{return{}}}const r=yn("resolveDynamicWorkflowMembers"),l=O(()=>i(o.tool.arg)),a=O(()=>$s(o.tool.name)),u=O(()=>l.value.description??""),c=O(()=>r?.(o.tool.id)??[]),d=O(()=>WJ(o.tool.output)),f=O(()=>o.tool.status),p=O(()=>f.value==="running"?"running":f.value==="error"||(d.value?.failed??0)>0?"error":"ok"),h=O(()=>qJ(c.value,d.value)),m=O(()=>{const B={completed:0,working:0,suspended:0,queued:0,failed:0,cancelled:0};for(const A of h.value)B[A.phase]++;return B}),k=O(()=>h.value.length||l.value.itemCount||0),w=O(()=>m.value.completed+m.value.failed+m.value.cancelled),v=O(()=>m.value.working+m.value.suspended+m.value.queued),y=[{phase:"completed",cls:"s-ok"},{phase:"working",cls:"s-run"},{phase:"suspended",cls:"s-warn"},{phase:"failed",cls:"s-fail"},{phase:"cancelled",cls:"s-queue"},{phase:"queued",cls:"s-queue"}],b=O(()=>y.map(({phase:B,cls:A})=>({phase:B,count:m.value[B],cls:A})).filter(B=>B.count>0)),S=q(f.value==="running"||v.value>0);function I(){S.value=!S.value}const T=O(()=>h.value.length>0||d.value||f.value==="running"?"":(o.tool.output??[]).join(` -`).trim()),$=q(new Set);function L(B){const A=new Set($.value);A.has(B)?A.delete(B):A.add(B),$.value=A}function P(B){return $.value.has(B)}function R(B){return n(`tools.dynamic_workflow.phase${B[0].toUpperCase()}${B.slice(1)}`)}const M=O(()=>{if(!d.value)return"";const B=d.value.aborted??0;return B>0?n("tools.dynamic_workflow.doneSubWithCancelled",{completed:d.value.completed,failed:d.value.failed,cancelled:B}):n("tools.dynamic_workflow.doneSub",{completed:d.value.completed,failed:d.value.failed})});function D(B){if(B.agentId){s("openAgent",B.agentId);return}if(B.live){s("openAgent",B.id);return}B.body&&L(B.id)}function z(B){return B.agentId!==void 0&&B.body.length>0&&(B.phase==="completed"||B.phase==="failed"||B.phase==="cancelled")}return(B,A)=>(g(),C("div",{class:Be(["dynamic-workflow-card",{open:S.value,err:p.value==="error",stacked:e.stackPosition!=="single"}])},[_("button",{class:"head",type:"button","aria-expanded":S.value,onClick:I},[Z(Oe,{class:"ic",name:"git-pull-request",size:"sm"}),_("span",GJ,N(a.value),1),u.value?(g(),C("span",ZJ,"·")):ie("",!0),u.value?(g(),C("span",YJ,N(u.value),1)):ie("",!0),_("span",JJ,[_("span",XJ,[p.value==="ok"?(g(),he(Oe,{key:0,name:"check",size:"sm"})):p.value==="error"?(g(),he(Oe,{key:1,name:"close",size:"sm"})):(g(),he(Vg,{key:2,status:"running"}))]),w.value>0||k.value>0?(g(),C("span",QJ,N(w.value)+" / "+N(k.value),1)):ie("",!0),e.tool.timing?(g(),C("span",eX,N(e.tool.timing),1)):ie("",!0)]),Z(Oe,{class:"car",name:S.value?"chevron-down":"chevron-right",size:"sm"},null,8,["name"])],8,KJ),Fn(_("div",tX,[_("div",nX,[_("div",oX,[_("span",sX,N(x(n)("tools.dynamic_workflow.progress",{done:w.value,total:k.value})),1),p.value==="running"&&k.value>0?(g(),C("span",iX,N(x(n)("tools.dynamic_workflow.runningSub",{count:v.value})),1)):d.value?(g(),C("span",rX,N(M.value),1)):(g(),C("span",lX,N(x(n)("tools.dynamic_workflow.waiting")),1))]),k.value>0&&b.value.length>0?(g(),C("div",aX,[(g(!0),C(Ie,null,ot(b.value,F=>(g(),C("span",{key:F.phase,class:Be(F.cls),style:Ut({flex:F.count})},null,6))),128))])):ie("",!0),b.value.length>1?(g(),C("div",uX,[(g(!0),C(Ie,null,ot(b.value,F=>(g(),C("span",{key:F.phase},[_("i",{class:Be(["lg-dot",F.cls])},null,2),Ve(N(R(F.phase))+" "+N(F.count),1)]))),128))])):ie("",!0)]),h.value.length>0?(g(!0),C(Ie,{key:0},ot(h.value,F=>(g(),C("div",{key:F.id,class:Be(["member",[`phase-${F.phase}`,{open:P(F.id)}]])},[_("button",{class:"member-head",type:"button",disabled:!F.live&&!F.agentId&&!F.body,"aria-label":F.live||F.agentId?x(n)("tasks.openDetail"):void 0,"aria-expanded":F.live||F.agentId?void 0:P(F.id),onClick:W=>D(F)},[Z(Vg,{class:"row-dot",status:F.phase},null,8,["status"]),Z(_n,{text:F.name},{default:ve(()=>[_("span",dX,N(F.name),1)]),_:2},1032,["text"]),F.activity?(g(),he(_n,{key:0,text:F.activity},{default:ve(()=>[_("span",fX,N(F.activity),1)]),_:2},1032,["text"])):ie("",!0),_("span",pX,N(R(F.phase)),1),F.live||F.agentId?(g(),he(Oe,{key:1,class:"mcar",name:"arrow-right",size:"sm"})):F.body?(g(),he(Oe,{key:2,class:"mcar",name:P(F.id)?"chevron-down":"chevron-right",size:"sm"},null,8,["name"])):ie("",!0)],8,cX),z(F)?(g(),C("button",{key:0,class:"member-saved",type:"button","aria-expanded":P(F.id),onClick:W=>L(F.id)},[Z(Oe,{class:"member-saved-car",name:P(F.id)?"chevron-down":"chevron-right",size:"sm"},null,8,["name"]),_("span",null,N(x(n)("tools.output.saved")),1)],8,hX)):ie("",!0),Fn(_("div",{class:"member-body"},N(F.body),513),[[vi,P(F.id)&&(!F.live&&!F.agentId||z(F))]])],2))),128)):T.value?(g(),C("div",mX,N(T.value),1)):(g(),C("div",gX,N(x(n)("tools.dynamic_workflow.waiting")),1))],512),[[vi,S.value]])],2))}}),yX=ht(vX,[["__scopeId","data-v-83b861be"]]),kX={class:"plan-review"},bX={class:"plan-path-value"},wX={key:1,class:"plan-md"},xX={key:2,class:"plan-option"},_X=Ge({__name:"PlanTool",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff"],setup(e,{emit:t}){const n=nr(()=>Is(()=>Promise.resolve().then(()=>vhe),void 0)),o=e,s=t,{t:i}=It(),r=yn("resolvePlan"),l=O(()=>r?.(o.tool.id)),a=O(()=>l.value?.plan&&l.value.plan.length>0?l.value.plan:""),u=O(()=>{try{const w=JSON.parse(o.tool.arg);return w&&typeof w=="object"&&!Array.isArray(w)?w:null}catch{return null}}),c=O(()=>{const w=u.value?.selectedOption??u.value?.selected_option;return typeof w=="string"?w:""}),d=O(()=>{if(o.tool.status==="running")return"pending";const w=(o.tool.output??[]).join(" ").toLowerCase();return w.includes("cancelled")||w.includes("canceled")?"cancelled":w.includes("rejected")?"rejected":w.includes("approved")||o.tool.status==="ok"?"approved":"rejected"}),f=O(()=>i(`tools.plan.review.${d.value}`)),p=O(()=>!0),h=q(o.tool.defaultExpanded===!0);function m(){h.value=!h.value}function k(){o.tool.planPath&&s("openFile",{path:o.tool.planPath})}return Ze(()=>[o.tool.defaultExpanded,o.tool.output?.length,o.tool.status],()=>{o.tool.defaultExpanded===!0&&(h.value=!0)}),(w,v)=>(g(),he(Ui,{status:e.tool.status,icon:x(ji)(e.tool.name),name:x($s)(e.tool.name),arg:h.value?"":c.value,time:e.tool.timing,open:h.value,expandable:p.value,stacked:e.stackPosition!=="single","stack-position":e.stackPosition,onToggle:m},{default:ve(()=>[_("div",kX,N(f.value),1),e.tool.planPath?(g(),C("button",{key:0,class:"plan-path",type:"button",onClick:k},[_("span",null,N(x(i)("tools.plan.pathOnlyHint")),1),_("span",bX,N(e.tool.planPath),1)])):ie("",!0),a.value?(g(),C("div",wX,[Z(x(n),{text:a.value,"open-file":y=>s("openFile",y)},null,8,["text","open-file"])])):ie("",!0),c.value?(g(),C("div",xX,[_("span",null,N(x(i)("tools.plan.selectedOption")),1),_("span",null,N(c.value),1)])):ie("",!0),e.tool.output?.length?(g(),he(Tr,{key:3,lines:e.tool.output,"empty-text":x(i)("tools.output.empty")},null,8,["lines","empty-text"])):ie("",!0)]),_:1},8,["status","icon","name","arg","time","open","expandable","stacked","stack-position"]))}}),SX=ht(_X,[["__scopeId","data-v-2ff075e5"]]),CX={class:"tl-name"},AX={key:1,class:"tl-faint"},MX={key:2,class:"tl-faint"},EX={key:3,class:"tl-dim"},TX={key:0,class:"chip"},IX={key:1,class:"read-code"},$X={class:"read-no"},NX={class:"read-text"},LX=Ge({__name:"ReadTool",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O(()=>QT(n.tool));function r(T){return typeof T=="string"&&T.length>0?T:void 0}function l(T){return typeof T=="number"&&Number.isFinite(T)?T:void 0}const a=O(()=>{try{const T=JSON.parse(n.tool.arg);return T&&typeof T=="object"&&!Array.isArray(T)?T:null}catch{return null}}),u=O(()=>r(a.value?.path)??r(a.value?.file_path)??r(a.value?.filePath)??r(a.value?.filename)??""),c=O(()=>l(a.value?.offset)??l(a.value?.line_start)??l(a.value?.start_line)),d=O(()=>{const T=a.value;if(!T)return;const $=l(T.limit)??l(T.length);return l(T.line_end)??l(T.end_line)??(c.value!==void 0&&$!==void 0?c.value+$:void 0)}),f=O(()=>c.value!==void 0&&d.value!==void 0?`:${c.value}-${d.value}`:c.value!==void 0?`:${c.value}`:"");function p(T){return T.split("/").filter(Boolean).at(-1)??T}function h(T){return/^(.*)[\\/][^\\/]+[\\/]?$/.exec(T)?.[1]??""}const m=/^(\d+)\t(.*)$/;function k(T){if(!T||T.length===0)return null;const $=T.at(-1)===""?T.slice(0,-1):T;if($.length===0)return null;const L=[],P=[];for(const R of $){const M=m.exec(R);if(!M)return null;P.push(Number(M[1])),L.push(M[2]??"")}return{contents:L,lineNumbers:P}}const w=O(()=>n.tool.status==="ok"?k(n.tool.output):null),v=O(()=>!!n.tool.output&&n.tool.output.length>0),y=O(()=>w.value!==null||v.value),b=q(n.tool.defaultExpanded===!0&&y.value);function S(){y.value&&(b.value=!b.value)}function I(){u.value&&o("openFile",{path:u.value,line:c.value})}return Ze(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&y.value&&(b.value=!0)}),(T,$)=>(g(),he(Ui,{status:e.tool.status,icon:x(ji)(e.tool.name),name:x($s)(e.tool.name),arg:"",time:e.tool.timing,open:b.value,expandable:y.value,stacked:e.stackPosition!=="single","stack-position":e.stackPosition,onToggle:S},{title:ve(()=>[_("span",CX,N(x($s)(e.tool.name)),1),u.value?(g(),C("button",{key:0,type:"button",class:"tl-file",onClick:St(I,["stop"])},N(p(u.value)),1)):ie("",!0),u.value?(g(),C("span",AX,N(h(u.value)),1)):ie("",!0),f.value?(g(),C("span",MX,N(f.value),1)):ie("",!0),u.value?ie("",!0):(g(),C("span",EX,N(u.value||e.tool.arg),1))]),trailing:ve(()=>[i.value?(g(),C("span",TX,N(i.value),1)):ie("",!0)]),default:ve(()=>[u.value?(g(),C("button",{key:0,type:"button",class:"path-link",onClick:I},N(u.value),1)):ie("",!0),w.value?(g(),C("div",IX,[(g(!0),C(Ie,null,ot(w.value.contents,(L,P)=>(g(),C("div",{key:P,class:"read-line"},[_("span",$X,N(w.value.lineNumbers[P]),1),_("span",NX,N(L),1)]))),128))])):(g(),he(Tr,{key:2,lines:e.tool.output,"empty-text":e.tool.status==="running"?x(s)("tools.output.waiting"):x(s)("tools.output.empty")},null,8,["lines","empty-text"]))]),_:1},8,["status","icon","name","time","open","expandable","stacked","stack-position"]))}}),FX=ht(LX,[["__scopeId","data-v-5312d698"]]),OX={class:"chip"},RX={class:"todo-bar","aria-hidden":"true"},PX={key:0,class:"todo-list"},DX=["data-status"],BX=["aria-label"],zX=Ge({__name:"TodoTool",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff"],setup(e){const t=e,{t:n}=It();function o(p){try{const h=JSON.parse(p);if(!h||typeof h!="object"||Array.isArray(h))return null;const m=h.todos;return Array.isArray(m)?m.flatMap(k=>{if(!k||typeof k!="object"||Array.isArray(k))return[];const w=k,v=w.title??w.content??w.activeForm??w.text;if(typeof v!="string"||v.length===0)return[];const y=w.status==="done"||w.status==="completed"?"done":w.status==="in_progress"?"in_progress":"pending";return[{title:v,status:y}]}):null}catch{return null}}const s=O(()=>o(t.tool.arg)),i=O(()=>s.value?.filter(p=>p.status==="done").length??0),r=O(()=>s.value?.length??0),l=O(()=>r.value>0?i.value/r.value:0),a=O(()=>s.value?.find(h=>h.status==="in_progress")?.title??Ol(t.tool.name,t.tool.arg)),u=O(()=>(s.value?.length??0)>0||(t.tool.output?.length??0)>0),c=q(t.tool.defaultExpanded===!0&&u.value);function d(p){return p==="done"?"check":p==="in_progress"?"play":"minus"}function f(){u.value&&(c.value=!c.value)}return Ze(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status,t.tool.arg],()=>{t.tool.defaultExpanded===!0&&u.value&&(c.value=!0)}),(p,h)=>(g(),he(Ui,{status:e.tool.status,icon:x(ji)(e.tool.name),name:x($s)(e.tool.name),arg:c.value?"":a.value,time:e.tool.timing,open:c.value,expandable:u.value,stacked:e.stackPosition!=="single","stack-position":e.stackPosition,onToggle:f},{trailing:ve(()=>[s.value?(g(),C(Ie,{key:0},[_("span",OX,N(i.value)+" / "+N(r.value),1),_("span",RX,[_("span",{class:"todo-fill",style:Ut({width:`${l.value*100}%`})},null,4)])],64)):ie("",!0)]),default:ve(()=>[s.value?(g(),C("div",PX,[(g(!0),C(Ie,null,ot(s.value,(m,k)=>(g(),C("div",{key:k,class:"todo-row","data-status":m.status},[_("span",{class:"todo-status",role:"img","aria-label":m.status},[Z(Oe,{name:d(m.status),size:"sm"},null,8,["name"])],8,BX),_("span",null,N(m.title),1)],8,DX))),128))])):(g(),he(Tr,{key:1,lines:e.tool.output,"empty-text":e.tool.status==="running"?x(n)("tools.output.waiting"):x(n)("tools.output.empty")},null,8,["lines","empty-text"]))]),_:1},8,["status","icon","name","arg","time","open","expandable","stacked","stack-position"]))}}),WX=ht(zX,[["__scopeId","data-v-d7e35d4e"]]),HX=3;function Pc(e,t){return new RegExp(`^${t}: (.+)$`,"m").exec(e)?.[1]}function jX(e,t){const n=Number(Pc(e,t)??0);return Number.isFinite(n)?n:0}function ry(e,t){const n=new RegExp(`^\\[${t}\\]$`,"m").exec(e);if(n===null)return;const o=e.slice(n.index+n[0].length),s=/^\[/m.exec(o);return(s===null?o:o.slice(0,s.index)).trim()}function UX(e,t){return e.match(t)?.length??0}function VX(e,t){return[...e.matchAll(/^description: (.+)$/gm)].map(o=>o[1]??"").slice(0,Math.min(HX,t))}function qX(e){if(!e||e.length===0)return;const t=e.join(` -`),n=Pc(t,"wait_status");if(n!=="completed"&&n!=="timed_out"&&n!=="no_tasks")return;const o=Number(Pc(t,"waited_ms")??0),s=ry(t,"finished"),i=ry(t,"completed_during_wait"),r=ry(t,"still_running"),l=r===void 0?0:jX(r,"active_background_tasks");return{status:n,waitedMs:Number.isFinite(o)?o:0,taskId:Pc(t,"task_id"),finishedStatus:s===void 0?void 0:Pc(s,"status"),finishedDescription:s===void 0?void 0:Pc(s,"description"),extraCount:i===void 0?0:UX(i,/^task_id: /gm),runningCount:l,runningSamples:r===void 0?[]:VX(r,l)}}const KX={key:0,class:"chip wf-status warning"},GX={key:0,class:"wf-glance"},ZX={class:"wf-main"},YX=Ge({__name:"WaitForTool",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff"],setup(e){const t=e,{t:n}=It(),o={completed:"tools.waitfor.status.completed",failed:"tools.waitfor.status.failed",timed_out:"tools.waitfor.status.timed_out",killed:"tools.waitfor.status.killed",lost:"tools.waitfor.status.lost"};function s(L){return typeof L=="string"&&L.length>0?L:void 0}function i(L){try{const P=JSON.parse(L);return P&&typeof P=="object"&&!Array.isArray(P)?P:null}catch{return null}}const r=O(()=>t.tool.status),l=O(()=>$s(t.tool.name)),a=O(()=>ji(t.tool.name)),u=O(()=>i(t.tool.arg)),c=O(()=>s(u.value?.task_id)??s(u.value?.taskId)),d=O(()=>t.tool.status==="error"?void 0:qX(t.tool.output)),f=O(()=>{const L=d.value?.finishedStatus;if(!L)return"";const P=o[L];return P?n(P):L}),p=O(()=>{switch(d.value?.finishedStatus){case"completed":return"success";case"failed":case"lost":return"danger";case"timed_out":case"killed":return"warning";default:return"neutral"}}),h=O(()=>t.tool.output?.find(L=>L.trim().length>0)??""),m=O(()=>{if(t.tool.status==="running")return c.value?n("tools.waitfor.waitingTask",{id:c.value}):n("tools.waitfor.waitingAny");if(t.tool.status==="error")return h.value;const L=d.value;if(!L)return c.value??h.value;switch(L.status){case"completed":return L.finishedDescription??L.taskId??"";case"timed_out":return L.runningCount>0?n("tools.waitfor.stillRunning",{count:L.runningCount}):n("tools.waitfor.timedOut");case"no_tasks":return n("tools.waitfor.noTasks")}});function k(L){const P=Math.max(0,Math.floor(L/1e3)),R=n("status.timeUnitHour"),M=n("status.timeUnitMinute"),D=n("status.timeUnitSecond");if(P<60)return P===0?"":`${P}${D}`;const z=Math.floor(P/60);if(z<60){const F=P%60;return F===0?`${z}${M}`:`${z}${M}${F}${D}`}const B=Math.floor(z/60),A=z%60;return A===0?`${B}${R}`:`${B}${R}${A}${M}`}const w=O(()=>{const L=d.value;return!L||L.status==="no_tasks"?"":k(L.waitedMs)}),v=O(()=>w.value||t.tool.timing||"");function y(L){if(L.runningSamples.length===0)return null;const P=[...L.runningSamples],R=L.runningCount-L.runningSamples.length;return R>0&&P.push(n("tools.waitfor.moreRunning",{count:R})),P.join(", ")}const b=O(()=>{const L=d.value;if(!L)return null;if(L.status==="completed"){const P=[L.taskId,f.value].filter(Boolean).join(" · "),R=[];L.finishedDescription&&R.push(L.finishedDescription);const M=[];L.extraCount>0&&M.push(n("tools.waitfor.moreFinished",{count:L.extraCount})),L.runningCount>0&&M.push(n("tools.waitfor.stillRunning",{count:L.runningCount})),M.length>0&&R.push(M.join(" · "));const D=y(L);return D!==null&&R.push(D),{main:P,subs:R}}if(L.status==="timed_out"){if(L.runningCount===0&&L.extraCount===0)return null;const P=[];L.runningCount>0&&L.extraCount>0&&P.push(n("tools.waitfor.moreFinished",{count:L.extraCount}));const R=y(L);return R!==null&&P.push(R),{main:L.runningCount>0?n("tools.waitfor.stillRunning",{count:L.runningCount}):n("tools.waitfor.moreFinished",{count:L.extraCount}),subs:P}}return null}),S=O(()=>!!t.tool.output&&t.tool.output.length>0),I=O(()=>b.value!==null||S.value),T=q(t.tool.defaultExpanded===!0&&I.value);function $(){I.value&&(T.value=!T.value)}return Ze(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&I.value&&(T.value=!0)}),(L,P)=>(g(),he(Ui,{status:r.value,icon:a.value,name:l.value,arg:T.value?"":m.value,time:v.value,open:T.value,expandable:I.value,stacked:e.stackPosition!=="single","stack-position":e.stackPosition,onToggle:$},{trailing:ve(()=>[d.value?.status==="timed_out"?(g(),C("span",KX,N(x(n)("tools.waitfor.timedOut")),1)):d.value?.status==="completed"&&f.value?(g(),C("span",{key:1,class:Be(["chip wf-status",p.value])},N(f.value),3)):ie("",!0)]),default:ve(()=>[b.value?(g(),C("div",GX,[_("div",ZX,N(b.value.main),1),(g(!0),C(Ie,null,ot(b.value.subs,R=>(g(),C("div",{key:R,class:"wf-sub"},N(R),1))),128))])):ie("",!0),Z(Tr,{lines:e.tool.output,"empty-text":e.tool.status==="running"?x(n)("tools.output.waiting"):x(n)("tools.output.empty")},null,8,["lines","empty-text"])]),_:1},8,["status","icon","name","arg","time","open","expandable","stacked","stack-position"]))}}),JX=ht(YX,[["__scopeId","data-v-333157a5"]]),XX=Ge({__name:"WebFetchTool",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff"],setup(e){const t=e,{t:n}=It(),o=O(()=>Ol(t.tool.name,t.tool.arg)),s=O(()=>(t.tool.output?.length??0)>0),i=O(()=>s.value||t.tool.status!=="error"),r=q(t.tool.defaultExpanded===!0&&i.value),l=O(()=>t.tool.status==="running"?n("tools.output.waiting"):t.tool.status==="ok"&&!s.value?n("tools.output.saved"):n("tools.output.empty"));function a(){i.value&&(r.value=!r.value)}return Ze(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&i.value&&(r.value=!0)}),(u,c)=>(g(),he(Ui,{status:e.tool.status,icon:x(ji)(e.tool.name),name:x($s)(e.tool.name),arg:r.value?"":o.value,time:e.tool.timing,open:r.value,expandable:i.value,stacked:e.stackPosition!=="single","stack-position":e.stackPosition,onToggle:a},{default:ve(()=>[Z(Tr,{lines:e.tool.output,"empty-text":l.value},null,8,["lines","empty-text"])]),_:1},8,["status","icon","name","arg","time","open","expandable","stacked","stack-position"]))}});function QX(e){if(e.media&&e.status==="ok")return NJ;const t=Ws(e.name);return t==="bash"?zY:t==="read"?FX:t==="edit"||t==="write"||t==="multi_edit"?rJ:t==="grep"||t==="search"?CJ:t==="glob"||t==="ls"?mJ:t==="web_fetch"?XX:t==="waitfor"?JX:t==="todo"?WX:t==="task"?cY:t==="agentdynamic_workflow"?yX:t==="askuserquestion"?FY:t==="exitplanmode"?SX:t==="creategoal"||t==="getgoal"||t==="setgoalbudget"||t==="updategoal"?yJ:cJ}const dw=Ge({__name:"ToolCall",props:{tool:{},mobile:{type:Boolean,default:!1},stackPosition:{default:"single"},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent"],setup(e,{emit:t}){const n=e,o=t,s=O(()=>QX(n.tool));return(i,r)=>(g(),he(as(s.value),{tool:e.tool,mobile:e.mobile,"stack-position":e.stackPosition,"tool-diff-panel":e.toolDiffPanel,"data-scroll-anchor-id":e.tool.id,onOpenMedia:r[0]||(r[0]=l=>o("openMedia",l)),onOpenFile:r[1]||(r[1]=l=>o("openFile",l)),onOpenToolDiff:r[2]||(r[2]=l=>o("openToolDiff",l)),onOpenAgent:r[3]||(r[3]=l=>o("openAgent",l))},null,40,["tool","mobile","stack-position","tool-diff-panel","data-scroll-anchor-id"]))}});function Rl(e){if(e>=1024*1024)return`${w4(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):w4(t)}k`}return String(e)}function w4(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function eQ(e){if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),n=(e%6e4/1e3).toFixed(1);return`${t}m${n}s`}function fb(e){const t=Math.max(0,Math.floor(e/1e3));if(t<60)return t===0?"":`${t}s`;const n=Math.floor(t/60);if(n<60){const i=t%60;return i===0?`${n}m`:`${n}m${i}s`}const o=Math.floor(n/60),s=n%60;return s===0?`${o}h`:`${o}h${s}m`}function Fu(e){if(e.blocks)return e.blocks;const t=[];e.thinking&&t.push({kind:"thinking",thinking:e.thinking}),e.text&&t.push({kind:"text",text:e.text});for(const n of e.tools??[])t.push({kind:"tool",tool:n});return t}function tQ(e){return!(e.tool.status==="ok"&&e.tool.media)}function nQ(e){const t=Fu(e).flatMap(i=>i.kind==="activity-run"?i.items:[i]),n=[];let o=[];const s=()=>{const[i]=o;o.length===1&&i?i.kind==="thinking"?n.push({kind:"thinking",thinking:i.thinking,sourceIndex:i.sourceIndex}):n.push({kind:"tool",tool:i.tool,sourceIndex:i.sourceIndex}):o.length>1&&n.push({kind:"activity-run",items:o}),o=[]};return t.forEach((i,r)=>{if(i.kind==="thinking"){o.push({kind:"thinking",thinking:i.thinking,sourceIndex:r});return}if(i.kind==="tool"){if(tQ(i)){o.push({kind:"tool",tool:i.tool,sourceIndex:r});return}s(),n.push({kind:"tool",tool:i.tool,sourceIndex:r});return}s(),i.kind==="text"&&i.text&&n.push({kind:"text",text:i.text,sourceIndex:r})}),s(),n}function oQ(e){let t=-1;for(let n=e.length-1;n>=0;n-=1){const o=e[n];if(o?.kind==="text"&&o.text.trim()){t=n;break}}return t<0&&(t=e.findIndex(n=>n.kind==="tool"&&n.tool.status==="ok"&&n.tool.media)),t<0?{folded:e,visible:[]}:{folded:e.slice(0,t),visible:e.slice(t)}}function sQ(e){return Fu(e).flatMap(t=>t.kind==="text"&&t.text?[t.text]:[]).join(` - -`)}function iQ(e){const t=[];for(const n of Fu(e))if(n.kind==="thinking"&&n.thinking)t.push(`> **Thinking** -> ${n.thinking.split(` -`).join(` -> `)}`);else if(n.kind==="text"&&n.text)t.push(n.text);else if(n.kind==="tool"&&n.tool.output&&n.tool.output.length>0){const o=n.tool.output.join(` -`);t.push(`\`\`\` -[${n.tool.name}] -${o} -\`\`\``)}else if(n.kind==="activity-run"){for(const o of n.items)if(o.kind==="thinking"&&o.thinking)t.push(`> **Thinking** -> ${o.thinking.split(` -`).join(` -> `)}`);else if(o.kind==="tool"&&o.tool.output&&o.tool.output.length>0){const s=o.tool.output.join(` -`);t.push(`\`\`\` -[${o.tool.name}] -${s} -\`\`\``)}}return t.join(` - -`)}function o6(e){return e.tool.id||`tool-${e.sourceIndex}`}function s6(e,t){return e.kind==="tool-stack"?`tool-stack-${e.tools[0]?.sourceIndex??t}`:e.kind==="activity-run"?`activity-run-${e.items[0]?.sourceIndex??t}`:e.kind==="tool"?o6({tool:e.tool,sourceIndex:e.sourceIndex}):`${e.kind}-${e.sourceIndex}`}function rQ(e){return e.kind==="tool"?o6({tool:e.tool,sourceIndex:e.sourceIndex}):`thinking-${e.sourceIndex}`}const lQ={class:"tc-anim"},aQ={class:"prev-anim"},uQ={class:"prev"},cQ=Ge({__name:"ThinkingBlock",props:{text:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1},foldable:{type:Boolean,default:!0}},emits:["open"],setup(e,{emit:t}){const n=e,o=t,s=O(()=>n.text.split(/\n{2,}/).filter(u=>u.trim().length>0)),i=O(()=>n.foldable&&s.value.length>1),r=O(()=>n.streaming||!i.value),l=O(()=>s.value.at(-1)??""),a=q(null);return bn(()=>{if(!n.streaming)return;const u=a.value;u&&(u.scrollTop=u.scrollHeight)}),Ze(()=>n.text,()=>{const u=a.value;!u||!(u.scrollHeight-u.scrollTop-u.clientHeight<24)||bt(()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight)})},{immediate:!0}),(u,c)=>(g(),C("div",{class:Be(["think",{mob:e.mobile}])},[i.value?(g(),C("div",{key:0,class:Be(["tc-wrap",{"is-collapsed":!r.value}]),onClick:c[0]||(c[0]=d=>o("open"))},[_("div",lQ,[_("pre",{ref_key:"bodyEl",ref:a,class:"tc"},N(e.text),513)]),_("div",aQ,[_("span",uQ,N(l.value),1)])],2)):(g(),C("pre",{key:1,ref_key:"bodyEl",ref:a,class:"tc"},N(e.text),513))],2))}}),fw=ht(cQ,[["__scopeId","data-v-fa12650e"]]),dQ=["aria-expanded"],fQ=["aria-label"],pQ=["title"],hQ={key:0,class:"ar-sep"},mQ=["inert"],gQ={class:"ar-body-inner"},vQ=Ge({__name:"ActivityRun",props:{items:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent","openThinking"],setup(e,{emit:t}){const n=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]),o={read:"file-text",bash:"terminal",edit:"pencil",multi_edit:"pencil",write:"file-plus",grep:"search",search:"search",glob:"glob",ls:"folder",web_fetch:"globe",todo:"check-list",task:"sparkles",waitfor:"clock"},s=e,i=t,{t:r}=It(),l=O(()=>s.items.at(-1)??null),a=O(()=>{if(s.streaming&&l.value?.kind==="thinking")return l.value;for(let A=s.items.length-1;A>=0;A-=1){const F=s.items[A];if(F?.kind==="tool"&&F.tool.status==="running")return F}return null}),u=O(()=>{if(s.streaming)return"running";for(const A of s.items)if(A.kind==="tool"&&A.tool.status==="running")return"running";for(const A of s.items)if(A.kind==="tool"&&A.tool.status==="error")return"error";return"done"}),c=q(u.value==="running"),d=O(()=>c.value),f=yn("pinScroll",()=>{}),p=q(null);let h=null;const m=q(void 0),k=q(Date.now());let w=null;function v(){w!==null&&(clearInterval(w),w=null)}Ze(u,(A,F)=>{if(A==="running"){F!==void 0&&F!=="running"&&(c.value=!0),h===null&&(h=Date.now()),m.value=void 0,k.value=Date.now(),w===null&&(w=setInterval(()=>{k.value=Date.now()},1e3));return}F==="running"&&(c.value=!1,h!==null&&(m.value=Date.now()-h),h=null),v()},{immediate:!0}),Mn(v);const y=O(()=>{if(u.value==="done")return"check";if(u.value==="error")return"close";const A=a.value??l.value;if(!A)return"tool";if(A.kind==="thinking")return"thinking";const F=Ws(A.tool.name);let W=F==="askuserquestion"?"help-circle":o[F];return!W&&A.tool.name.toLowerCase().includes("skill")&&(W="bolt"),W??"tool"}),b=O(()=>u.value!=="running"||h===null?"":fb(k.value-h));function S(A,F){return n.has(A)?r(`conversation.activityRun.doneClause.${A}`,{count:F}):r("conversation.activityRun.other",{count:F})}function I(A){return{text:r("conversation.activityRun.failedClause",{count:A}),tone:"danger"}}function T(A){return A.map(F=>F.fragments.map(W=>W.text).join("")).join(" · ")}function $(){const A=[],F=new Map;for(const j of s.items){if(j.kind==="thinking")continue;const le=Ws(j.tool.name);let J=F.get(le);J||(J={count:0,errors:0},F.set(le,J),A.push(le)),J.count++,j.tool.status==="error"&&J.errors++}const W=[];for(const j of A){const le=F.get(j);if(!le)continue;const J=[{text:S(j,le.count),tone:"normal"}];le.errors>0&&J.push(I(le.errors)),W.push({fragments:J})}if(m.value!==void 0){const j=fb(m.value);j&&W.push({fragments:[{text:j,tone:"faint"}]})}return{clauses:W,plain:T(W)}}function L(){const A=s.items.filter(X=>X!==a.value&&!(X.kind==="tool"&&X.tool.status==="running")),F=[],W=new Map;for(const X of A){if(X.kind==="thinking")continue;const G=Ws(X.tool.name);let Q=W.get(G);Q||(Q={count:0,errors:0},W.set(G,Q),F.push(G)),Q.count++,X.tool.status==="error"&&Q.errors++}const j=[];for(const X of F){const G=W.get(X);if(!G)continue;const Q=[{text:S(X,G.count),tone:"faint"}];G.errors>0&&Q.push(I(G.errors)),j.push({fragments:Q})}const le=a.value===null?null:P(a.value),J=le?[le,...j]:j;return{current:le,done:j,plain:T(J)}}function P(A){if(A.kind==="thinking")return{fragments:[{text:r("conversation.activityRun.thinking"),tone:"normal"}]};const F=Ws(A.tool.name);let W=Ol(A.tool.name,A.tool.arg);if(F==="write"&&W){const le=r("tools.chip.created");W.endsWith(le)&&(W=W.slice(0,-le.length).trimEnd())}return{fragments:[{text:W&&n.has(F)?r(`conversation.activityRun.doing.${F}`,{subject:W}):r("conversation.activityRun.busy"),tone:"normal"}]}}const R=O(()=>{if(u.value!=="running")return $().clauses;const{current:A,done:F}=L(),W=[];A&&W.push(A),W.push(...F);const j=b.value;return j&&W.push({fragments:[{text:j,tone:"faint"}]}),W}),M=O(()=>u.value!=="running"?$().plain:[L().plain,b.value].filter(Boolean).join(" · "));function D(A){if(A==="danger")return"ar-danger";if(A==="faint")return"ar-faint"}function z(){c.value=!c.value,!s.streaming&&bt(()=>{const A=p.value;A&&f(A)})}function B(A){return s.streaming&&A.kind==="thinking"&&A.sourceIndex===(l.value?.sourceIndex??-1)}return(A,F)=>e.items.length>0?(g(),C("div",{key:0,class:Be(["activity-run",{open:d.value}])},[_("button",{ref_key:"headEl",ref:p,type:"button",class:"ar-head","aria-expanded":d.value,onClick:z},[_("span",{class:Be(["ar-glyph",{run:u.value==="running",err:u.value==="error",ok:u.value==="done"}]),role:"status","aria-label":u.value},[Z(Oe,{name:y.value,size:"sm","aria-hidden":"true"},null,8,["name"])],10,fQ),_("span",{class:"ar-sum",title:M.value},[(g(!0),C(Ie,null,ot(R.value,(W,j)=>(g(),C(Ie,{key:j},[j>0?(g(),C("span",hQ," · ")):ie("",!0),(g(!0),C(Ie,null,ot(W.fragments,(le,J)=>(g(),C("span",{key:J,class:Be(D(le.tone))},N(le.text),3))),128))],64))),128))],8,pQ),Z(Oe,{class:"ar-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,dQ),_("div",{class:Be(["ar-body",{open:d.value}]),inert:!d.value},[_("div",gQ,[(g(!0),C(Ie,null,ot(e.items,W=>(g(),C(Ie,{key:x(rQ)(W)},[W.kind==="thinking"?(g(),he(fw,{key:0,text:W.thinking,mobile:e.mobile,streaming:B(W),onOpen:j=>i("openThinking",W.sourceIndex)},null,8,["text","mobile","streaming","onOpen"])):(g(),he(dw,{key:1,tool:W.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:F[0]||(F[0]=j=>i("openMedia",j)),onOpenFile:F[1]||(F[1]=j=>i("openFile",j)),onOpenToolDiff:F[2]||(F[2]=j=>i("openToolDiff",j)),onOpenAgent:F[3]||(F[3]=j=>i("openAgent",j))},null,8,["tool","mobile","tool-diff-panel"]))],64))),128))])],10,mQ)],2)):ie("",!0)}}),i6=ht(vQ,[["__scopeId","data-v-337047d1"]]);var yQ=Object.create,pw=Object.defineProperty,kQ=Object.getOwnPropertyDescriptor,r6=Object.getOwnPropertyNames,bQ=Object.getPrototypeOf,wQ=Object.prototype.hasOwnProperty,l6=(e,t)=>function(){return t||(0,e[r6(e)[0]])((t={exports:{}}).exports,t),t.exports},a6=e=>{let t={};for(var n in e)pw(t,n,{get:e[n],enumerable:!0});return t},xQ=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=r6(t),i=0,r=s.length,l;it[a]).bind(null,l),enumerable:!(o=kQ(t,l))||o.enumerable});return e},u6=(e,t,n)=>(n=e!=null?yQ(bQ(e)):{},xQ(pw(n,"default",{value:e,enumerable:!0}),e));function _Q(e,t,n,o){const s=Number(e[t].meta.id+1).toString();let i="";return typeof o.docId=="string"&&(i=`-${o.docId}-`),i+s}function SQ(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function CQ(e,t,n,o,s){const i=s.rules.footnote_anchor_name(e,t,n,o,s),r=s.rules.footnote_caption(e,t,n,o,s);let l=i;return e[t].meta.subId>0&&(l+=`:${e[t].meta.subId}`),`${r}`}function AQ(e,t,n){return(n.xhtmlOut?`
-`:`
-`)+`
-
    -`}function MQ(){return`
-
-`}function EQ(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),`
  • `}function TQ(){return`
  • -`}function IQ(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),` ↩︎`}function $Q(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=CQ,e.renderer.rules.footnote_block_open=AQ,e.renderer.rules.footnote_block_close=MQ,e.renderer.rules.footnote_open=EQ,e.renderer.rules.footnote_close=TQ,e.renderer.rules.footnote_anchor=IQ,e.renderer.rules.footnote_caption=SQ,e.renderer.rules.footnote_anchor_name=_Q;function o(l,a,u,c){const d=l.bMarks[a]+l.tShift[a],f=l.eMarks[a];if(d+4>f||l.src.charCodeAt(d)!==91||l.src.charCodeAt(d+1)!==94)return!1;let p;for(p=d+2;p=f||l.src.charCodeAt(++p)!==58)return!1;if(c)return!0;p++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const h=l.src.slice(d+2,p-2);l.env.footnotes.refs[`:${h}`]=-1;const m=new l.Token("footnote_reference_open","",1);m.meta={label:h},m.level=l.level++,l.tokens.push(m);const k=l.bMarks[a],w=l.tShift[a],v=l.sCount[a],y=l.parentType,b=p,S=l.sCount[a]+p-(l.bMarks[a]+l.tShift[a]);let I=S;for(;p=u||l.src.charCodeAt(c)!==94||l.src.charCodeAt(c+1)!==91)return!1;const d=c+2,f=t(l,c+1);if(f<0)return!1;if(!a){l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.list||(l.env.footnotes.list=[]);const p=l.env.footnotes.list.length,h=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,h);const m=l.push("footnote_ref","",0);m.meta={id:p},l.env.footnotes.list[p]={content:l.src.slice(d,f),tokens:h}}return l.pos=f+1,l.posMax=u,!0}function i(l,a){const u=l.posMax,c=l.pos;if(c+3>u||!l.env.footnotes||!l.env.footnotes.refs||l.src.charCodeAt(c)!==91||l.src.charCodeAt(c+1)!==94)return!1;let d;for(d=c+2;d=u)return!1;d++;const f=l.src.slice(c+2,d-1);if(typeof l.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){l.env.footnotes.list||(l.env.footnotes.list=[]);let p;l.env.footnotes.refs[`:${f}`]<0?(p=l.env.footnotes.list.length,l.env.footnotes.list[p]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=p):p=l.env.footnotes.refs[`:${f}`];const h=l.env.footnotes.list[p].count;l.env.footnotes.list[p].count++;const m=l.push("footnote_ref","",0);m.meta={id:p,subId:h,label:f}}return l.pos=d,l.posMax=u,!0}function r(l){let a,u,c,d=!1;const f={};if(!l.env.footnotes||(l.tokens=l.tokens.filter(function(h){return h.type==="footnote_reference_open"?(d=!0,u=[],c=h.meta.label,!1):h.type==="footnote_reference_close"?(d=!1,f[":"+c]=u,!1):(d&&u.push(h),!d)}),!l.env.footnotes.list))return;const p=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let h=0,m=p.length;h0?p[h].count:1;for(let y=0;y?@[\]^_`{|}~-])/g;function OQ(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==126||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos?@[\]^_`{|}~-])/g;function DQ(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==94||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos{t.exports=function(m,k){k=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},k),m.core.ruler.after("inline","github-task-lists",function(w){for(var v=w.tokens,y=0,b=2;b=0;v--)if(m[v].level===w)return v;return-1}function s(m,k){return d(m[k])&&f(m[k-1])&&p(m[k-2])&&h(m[k])}function i(m,k,w,v){var y=w.idPrefix+k;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(y,v)),m.children.push(a(v)),m.children.unshift(r(m,y,w,v)),w.divWrap&&(m.children.unshift(u(w,v)),m.children.push(c(v)))}function r(m,k,w,v){var y=new v("checkbox_input","input",0);return y.attrs=[["type","checkbox"],["id",k]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&y.attrs.push(["checked","true"]),w.disabled===!0&&y.attrs.push(["disabled","true"]),y}function l(m,k){var w=new k("label_open","label",1);return w.attrs=[["for",m]],w}function a(m){return new m("label_close","label",-1)}function u(m,k){var w=new k("checkbox_open","div",0);return w.attrs=[["class",m.divClass]],w}function c(m){return new m("checkbox_close","div",-1)}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function p(m){return m.type==="list_item_open"}function h(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})}),WQ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),HQ=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),ly;const jQ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),UQ=(ly=String.fromCodePoint)!==null&&ly!==void 0?ly:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function VQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=jQ.get(e))!==null&&t!==void 0?t:e}var ys;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ys||(ys={}));const qQ=32;var va;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(va||(va={}));function pb(e){return e>=ys.ZERO&&e<=ys.NINE}function KQ(e){return e>=ys.UPPER_A&&e<=ys.UPPER_F||e>=ys.LOWER_A&&e<=ys.LOWER_F}function GQ(e){return e>=ys.UPPER_A&&e<=ys.UPPER_Z||e>=ys.LOWER_A&&e<=ys.LOWER_Z||pb(e)}function ZQ(e){return e===ys.EQUALS||GQ(e)}var gs;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(gs||(gs={}));var pa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(pa||(pa={}));var YQ=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=gs.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=pa.Strict}startEntity(e){this.decodeMode=e,this.state=gs.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case gs.EntityStart:return e.charCodeAt(t)===ys.NUM?(this.state=gs.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=gs.NamedEntity,this.stateNamedEntity(e,t));case gs.NumericStart:return this.stateNumericStart(e,t);case gs.NumericDecimal:return this.stateNumericDecimal(e,t);case gs.NumericHex:return this.stateNumericHex(e,t);case gs.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|qQ)===ys.LOWER_X?(this.state=gs.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=gs.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,o){if(t!==n){const s=n-t;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(t,s),o),this.consumed+=s}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,s!==0){if(i===ys.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==pa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,o=(n[t]&va.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:o}=this;return this.emitCodePoint(t===1?o[e]&~va.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case gs.NamedEntity:return this.result!==0&&(this.decodeMode!==pa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case gs.NumericDecimal:return this.emitNumericEntity(0,2);case gs.NumericHex:return this.emitNumericEntity(0,3);case gs.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case gs.EntityStart:return 0}}};function c6(e){let t="";const n=new YQ(e,o=>t+=UQ(o));return function(s,i){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(i);const u=n.write(s,l+1);if(u<0){r=l+n.end();break}r=l+u,l=u===0?r+1:r}const a=t+s.slice(r);return t="",a}}function JQ(e,t,n,o){const s=(t&va.BRANCH_LENGTH)>>7,i=t&va.JUMP_TABLE;if(s===0)return i!==0&&o===i?n:-1;if(i){const a=o-i;return a<0||a>=s?-1:e[n+a]-1}let r=n,l=r+s-1;for(;r<=l;){const a=r+l>>>1,u=e[a];if(uo)l=a-1;else return e[a+s]}return-1}const XQ=c6(WQ);c6(HQ);function hw(e,t=pa.Legacy){return XQ(e,t)}var QQ=u6(zQ());const x4={};function eee(e){let t=x4[e];if(t)return t;t=x4[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);t.push(o)}for(let n=0;n=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),i+=6;continue}}if((l&248)===240&&i+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}s+="�"}return s})}c0.defaultChars=";/?:@&=+$,#";c0.componentChars="";var hb=c0;const _4={};function tee(e){let t=_4[e];if(t)return t;t=_4[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);/^[0-9a-z]$/i.test(o)?t.push(o):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const o=tee(t);let s="";for(let i=0,r=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}d0.defaultChars=";/?:@&=+$,-_.!~*'()#";d0.componentChars="-_.!~*'()";var d6=d0;function mw(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function qg(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const nee=/^([a-z0-9.+-]+:)/i,oee=/:[0-9]*$/,see=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,iee=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),ree=["'"].concat(iee),S4=["%","/","?",";","#"].concat(ree),C4=["/","?","#"],lee=255,A4=/^[+a-z0-9A-Z_-]{0,63}$/,aee=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,M4={javascript:!0,"javascript:":!0},E4={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function uee(e,t){if(e&&e instanceof qg)return e;const n=new qg;return n.parse(e,t),n}qg.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const u=see.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=nee.exec(i);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,i=i.substr(r.length)),(t||r||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=i.substr(0,2)==="//",s&&!(r&&M4[r])&&(i=i.substr(2),this.slashes=!0)),!M4[r]&&(s||r&&!E4[r])){let u=-1;for(let h=0;h127?v+="x":v+=w[y];if(!v.match(A4)){const y=h.slice(0,m),b=h.slice(m+1),S=w.match(aee);S&&(y.push(S[1]),b.unshift(S[2])),b.length&&(i=b.join(".")+i),this.hostname=y.join(".");break}}}}this.hostname.length>lee&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));const a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),E4[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};qg.prototype.parseHost=function(e){let t=oee.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var gw=uee,f6=a6({decode:()=>hb,encode:()=>d6,format:()=>mw,parse:()=>gw}),p6=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h6=/[\0-\x1F\x7F-\x9F]/,cee=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,m6=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,dee=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,g6=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,fee=a6({Any:()=>p6,Cc:()=>h6,Cf:()=>cee,P:()=>m6,S:()=>dee,Z:()=>g6}),pee=Object.defineProperty,v6=e=>{let t={};for(var n in e)pee(t,n,{get:e[n],enumerable:!0});return t},cs=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,o=t.length;n=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},hee=v6({arrayReplaceAt:()=>wee,assign:()=>kee,countLines:()=>$o,escapeHtml:()=>Iee,escapeRE:()=>Nee,fromCodePoint:()=>Rp,has:()=>yee,isMdAsciiPunct:()=>Zg,isPunctChar:()=>Gg,isPunctCode:()=>mb,isSpace:()=>bee,isString:()=>gee,isValidEntityCode:()=>p0,isWhiteSpace:()=>Op,lib:()=>Lee,mdurl:()=>f6,normalizeReference:()=>f0,ucmicro:()=>Kg,unescapeAll:()=>Pp,unescapeMd:()=>Cee});const Kg=fee;function mee(e){return Object.prototype.toString.call(e)}function gee(e){return mee(e)==="[object String]"}const vee=Object.prototype.hasOwnProperty;function yee(e,t){return vee.call(e,t)}function kee(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(o=>{e[o]=n[o]})}}),e}function bee(e){return e===9||e===32}function Op(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Gg(e){return Kg.P.test(e)||Kg.S.test(e)}const T4=new Map;function mb(e){if(Zg(e))return!0;if(e>=0&&e<128)return!1;const t=T4.get(e);if(t!==void 0)return t;const n=Gg(String.fromCharCode(e));return T4.set(e,n),n}function Zg(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function f0(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function wee(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function p0(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Rp(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const y6=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,xee=new RegExp(`${y6.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),_ee=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function See(e,t){if(t.charCodeAt(0)===35&&_ee.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return p0(o)?Rp(o):e}const n=hw(e);return n!==e?n:e}function Cee(e){return e.includes("\\")?e.replace(y6,"$1"):e}function Pp(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(xee,(t,n,o)=>n||See(t,o))}const Aee=/[&<>"]/,Mee=/[&<>"]/g,Eee={"&":"&","<":"<",">":">",'"':"""};function Tee(e){return Eee[e]}function Iee(e){return Aee.test(e)?e.replace(Mee,Tee):e}const $ee=/[.?*+^$[\]\\(){}|-]/g;function Nee(e){return e.replace($ee,"\\$&")}const Lee={mdurl:f6,ucmicro:Kg};function $o(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const Fee=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,Oee=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,Ree=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,vw=["references","footnotes","abbreviations","abbr","abbrs"],yw=Symbol.for("markdown-it-ts.global-state"),kw=Object.prototype.hasOwnProperty;function I4(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function wr(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xa(e){if(Array.isArray(e))return e.map(t=>xa(t));if(wr(e)){const t={};for(const n of Object.keys(e))t[n]=xa(e[n]);return t}return e}function Yg(e){return Array.isArray(e)?e.map((t,n)=>String(n)):wr(e)?Object.keys(e):[]}function gb(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;ni.has(r)?!gb(s[r],k6(o.value,r)):!0)}}function Pl(e){const t=bw(e);if(t){for(const n of vw){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){Dee(e,n,o);continue}o.existed?e[n]=Pee(e[n],o.value):delete e[n]}delete e[yw]}}function ay(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const vb=Symbol.for("markdown-it-ts.diagnostics");function rh(e,t){if(e)try{const n=e[vb];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[vb]=o,o}catch{return}}function ml(e){return rh(e,!1)}function zee(e){if(e)try{const t=e[vb];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function Gs(e){zee(e)}function kf(e,t){const n=rh(e,!0);n&&(n.stockFast=t)}function Vo(e,t){const n=rh(e,!0);n&&(n.strategy=t)}function uy(e,t){const n=rh(e,!0);n&&(n.chunk=t)}function b6(e,t){const n=rh(e,!0);n&&(n.unbounded=t)}function Wee(e){const t={};e=e||{},t.src_Any=p6.source,t.src_Cc=h6.source,t.src_Z=g6.source,t.src_P=m6.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function yb(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function h0(e){return Object.prototype.toString.call(e)}function Hee(e){return h0(e)==="[object String]"}function jee(e){return h0(e)==="[object Object]"}function Uee(e){return h0(e)==="[object RegExp]"}function $4(e){return h0(e)==="[object Function]"}function Vee(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const w6={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function qee(e){return Object.keys(e||{}).reduce(function(t,n){return t||w6.hasOwnProperty(n)},!1)}const Kee={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},Gee="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Zee="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Yee(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function N4(){return function(e,t){t.normalize(e)}}function Jg(e){const t=e.re=Wee(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Gee),n.push(t.src_xn),t.src_tlds=n.join("|");function o(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(o(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(o(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(o(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function i(l,a){throw new Error(`(LinkifyIt) Invalid schema "${l}": ${a}`)}Object.keys(e.__schemas__).forEach(function(l){const a=e.__schemas__[l];if(a===null)return;const u={validate:null,link:null};if(e.__compiled__[l]=u,jee(a)){Uee(a.validate)?u.validate=Yee(a.validate):$4(a.validate)?u.validate=a.validate:i(l,a),$4(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=N4();return}if(Hee(a)){s.push(l);return}i(l,a)}),s.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:N4()};const r=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(Vee).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${r})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${r})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function x6(e,t,n,o){const s=e.slice(n,o);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=o,this.raw=s,this.text=s,this.url=s}function Wi(e,t){if(!(this instanceof Wi))return new Wi(e,t);t||qee(e)&&(t=e,e={}),this.__opts__=yb({},w6,t),this.__schemas__=yb({},Kee,e),this.__compiled__={},this.__tlds__=Zee,this.__tlds_replaced__=!1,this.re={},Jg(this)}Wi.prototype.add=function(t,n){return this.__schemas__[t]=n,Jg(this),this};Wi.prototype.set=function(t){return this.__opts__=yb(this.__opts__,t),this};Wi.prototype.test=function(t){if(!t.length)return!1;let n,o;if(this.re.schema_test.test(t)){for(o=this.re.schema_search,o.lastIndex=0;(n=o.exec(t))!==null;)if(this.testSchemaAt(t,n[2],o.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};Wi.prototype.pretest=function(t){return this.re.pretest.test(t)};Wi.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};Wi.prototype.match=function(t){const n=[],o=[],s=[],i=[];let r,l,a;function u(f,p){return f?p?f.index!==p.index?f.index=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(a=this.re.schema_search,a.lastIndex=0;(r=a.exec(t))!==null;)l=this.testSchemaAt(t,r[2],a.lastIndex),l&&o.push({schema:r[2],index:r.index+r[1].length,lastIndex:r.index+r[0].length+l});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;(r=a.exec(t))!==null;)s.push({schema:"",index:r.index+r[1].length,lastIndex:r.index+r[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;(r=a.exec(t))!==null;)i.push({schema:"mailto:",index:r.index+r[1].length,lastIndex:r.index+r[0].length});const c=[0,0,0];let d=0;for(;;){const f=[o[c[0]],i[c[1]],s[c[2]]],p=u(u(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?c[0]++:p===f[1]?c[1]++:c[2]++,p.index{const d=/^xn--/,f=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,k=Math.floor,w=String.fromCharCode;function v(B){throw new RangeError(h[B])}function y(B,A){const F=[];let W=B.length;for(;W--;)F[W]=A(B[W]);return F}function b(B,A){const F=B.split("@");let W="";F.length>1&&(W=F[0]+"@",B=F[1]),B=B.replace(p,".");const j=y(B.split("."),A).join(".");return W+j}function S(B){const A=[];let F=0;const W=B.length;for(;F=55296&&j<=56319&&FString.fromCodePoint(...B),T=function(B){return B>=48&&B<58?26+(B-48):B>=65&&B<91?B-65:B>=97&&B<123?B-97:36},$=function(B,A){return B+22+75*(B<26)-((A!=0)<<5)},L=function(B,A,F){let W=0;for(B=F?k(B/700):B>>1,B+=k(B/A);B>m*26>>1;W+=36)B=k(B/m);return k(W+(m+1)*B/(B+38))},P=function(B){const A=[],F=B.length;let W=0,j=128,le=72,J=B.lastIndexOf("-");J<0&&(J=0);for(let X=0;X=128&&v("not-basic"),A.push(B.charCodeAt(X));for(let X=J>0?J+1:0;X=F&&v("invalid-input");const ge=T(B.charCodeAt(X++));ge>=36&&v("invalid-input"),ge>k((2147483647-W)/ee)&&v("overflow"),W+=ge*ee;const Ce=K<=le?1:K>=le+26?26:K-le;if(gek(2147483647/ze)&&v("overflow"),ee*=ze}const Q=A.length+1;le=L(W-G,Q,G==0),k(W/Q)>2147483647-j&&v("overflow"),j+=k(W/Q),W%=Q,A.splice(W++,0,j)}return String.fromCodePoint(...A)},R=function(B){const A=[];B=S(B);const F=B.length;let W=128,j=0,le=72;for(const G of B)G<128&&A.push(w(G));const J=A.length;let X=J;for(J&&A.push("-");X=W&&eek((2147483647-j)/Q)&&v("overflow"),j+=(G-W)*Q,W=G;for(const ee of B)if(ee2147483647&&v("overflow"),ee===W){let K=j;for(let ge=36;;ge+=36){const Ce=ge<=le?1:ge>=le+26?26:ge-le;if(K32))return i;if(o===41){if(r===0)break;r--}s++}return t===s||r!==0||(i.str=Pp(e.slice(t,s)),i.pos=s,i.ok=!0),i}var C6=_w;const Xm=-2;function Xee(e,t,n,o){let s=1,i=t+1;for(;i=0&&t+1>=c)return-1;const d=l.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=Xee(l,t,a,n);if(f!==Xm)return f;for(e.pos=t+1;e.pos=n)return r;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return r;t++,i++,l===40&&(l=41),r.marker=l}for(;i=0?e.attrs[n][1]:null}function tte(e,t,n){const o=m0(e,t);o<0?Aw(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var nte=v6({attrGet:()=>ete,attrIndex:()=>m0,attrJoin:()=>tte,attrPush:()=>Aw,attrSet:()=>Qee,parseLinkDestination:()=>_w,parseLinkLabel:()=>Sw,parseLinkTitle:()=>Cw});function ote(e){return e.includes("\r")||e.includes("\0")}function M6(e){return typeof e=="string"?e:e.toString()}function ste(e){if(e.inlineMode){const t=new cs("inline","",0);t.content=M6(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const ite=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,rte=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function lte(e,t){let n=e.pos;const o=e.src;if(o.charCodeAt(n)!==60)return!1;const s=n,i=e.posMax;for(;;){if(++n>=i)return!1;const l=o.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=o.slice(s+1,n);if(rte.test(r)){const l=e.md.normalizeLink(r);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}if(ite.test(r)){const l=e.md.normalizeLink(`mailto:${r}`);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}return!1}var E6=lte;function ate(e,t){const n=e.src;let o=e.pos;if(n.charCodeAt(o)!==96)return!1;const s=o;o++;const i=e.posMax;for(;o2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=r),e.pos+=l,!0}var T6=ate;function L4(e){const t={},n=e.length;if(!n)return;let o=0,s=-2;const i=[];for(let r=0;ra;u-=i[u]+1){const d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){const p=u>0&&!e[u-1].open?i[u-1]+1:0;i[r]=r-u+p,i[u]=p,l.open=!1,d.end=r,d.close=!1,c=-1,s=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function ute(e){const t=e.tokens_meta,n=e.tokens_meta.length;L4(e.delimiters);for(let o=0;o=0;s--){const i=t[s],r=i.marker;if(r!==95&&r!==42||i.end===-1)continue;const l=t[i.end],a=i.token,u=l.token,c=s>0&&t[s-1].end===i.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[i.end+1].token===u+1,d=r===42?I6:$6,f=o[a];c?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const p=o[u];c?(p.type="strong_close",p.tag="strong",p.nesting=-1,p.markup=d+d,p.content=""):(p.type="em_close",p.tag="em",p.nesting=-1,p.markup=d,p.content=""),c&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function fte(e){const t=e.tokens_meta,n=e.tokens_meta.length;F4(e,e.delimiters);for(let o=0;o=48&&e<=57}function pte(e){const t=e|32;return Mw(e)||t>=97&&t<=102}function L6(e){const t=e|32;return t>=97&&t<=122}function hte(e){return L6(e)||Mw(e)}function mte(e,t,n){let o=t+2;if(o>=n)return null;let s=!1,i=7,r=o;for((e.charCodeAt(o)|32)===120&&(s=!0,i=6,o++,r=o);o=n||e.charCodeAt(o)!==59?null:e.slice(t,o+1)}function gte(e,t,n){let o=t+1;if(o>=n||!L6(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return N6(s)!==s?s:null}function vte(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const s=mte(e.src,n,o);if(s){if(!t){const i=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),r=e.push("text_special","",0);r.content=p0(i)?Rp(i):Rp(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=gte(e.src,n,o);if(s){const i=N6(s);if(!t){const r=e.push("text_special","",0);r.content=i,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var F6=vte;const O6=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),bb=new Array(128),R6=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);bb[e]=`\\${t}`,R6[e]=O6[e]?t:bb[e]}function O4(e,t,n){e.pending&&e.pushPending();const o=new cs("text_special","",0);o.level=e.level,o.content=t,o.markup=n,o.info="escape",e.pendingLevel=e.level,e.tokens.push(o),e.tokens_meta.push(null)}function yte(e,t){let n=e.pos;const o=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=o))return!1;let i=s.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(i>=55296&&i<=56319&&n+1=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return O4(e,i<256&&O6[i]?r:l,l),e.pos=n+1,!0}var P6=yte;function kte(e){let t,n,o=0;const s=e.tokens,i=e.tokens.length;for(t=n=0;t0&&o++,r.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,B6="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",wte=new RegExp(`^(?:${D6}|${B6}||<\\?[\\s\\S]*?\\?>|]*>|)`),xte=new RegExp(`^(?:${D6}|${B6})`);function z6(e){return e===32||e===9||e===10||e===12||e===13}function _te(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||z6(t)}function Ste(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t=97&&t<=122}function Ate(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos,s=e.src;if(s.charCodeAt(o)!==60||o+2>=n)return!1;const i=s.charCodeAt(o+1);if(i!==33&&i!==63&&i!==47&&!Cte(i))return!1;const r=s.slice(o).match(wte);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,_te(l)&&e.linkLevel++,Ste(l)&&e.linkLevel--}return e.pos+=l.length,!0}var W6=Ate;function Mte(e,t){let n,o,s,i,r,l,a,u,c="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,h=Xg(e,e.pos+1,!1);if(h<0)return!1;if(i=h+1,i=f)return!1;if(l=C6(e.src,i,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?i=l.pos:c="",u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?s=e.src.slice(u,i++):i=h+1):i=h+1,s||(s=e.src.slice(p,h)),r=e.env.references[f0(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){o=e.src.slice(p,h);const m=[];e.md.inline.parse(o,e.md,e.env,m);const k=e.push("image","img",0);k.attrs=[["src",c],["alt",""]],k.children=m,k.content=o,a&&k.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var H6=Mte;function cy(e,t,n){for(;t"u")return!1;let d;if(l=r+1,l=0?(d=n.slice(p,h),d||(d=n.slice(i,r)),l=h+1):d=n.slice(i,r)}else d=n.slice(i,r);const f=e.env.references[f0(d)];if(!f)return e.pos=o,!1;a=f.href,u=f.title}if(!t){e.pos=i,e.posMax=r;const d=e.push("link_open","a",1);d.attrs=u?[["href",a],["title",u]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=l,e.posMax=s,!0}var j6=Ete;function U6(e){const t=e|32;return t>=97&&t<=122}function Tte(e){return e>=48&&e<=57}function Ite(e){return U6(e)||Tte(e)||e===43||e===45||e===46}function $te(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&Ite(e.charCodeAt(t));)t--;return t++,t>=e.length||!U6(e.charCodeAt(t))?null:e.slice(t)}function Nte(e,t,n){let o=t;for(;o0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=$te(e.pending);if(!s)return!1;const i=Nte(e.src,n-s.length,o),r=e.md.linkify.matchAtStart(i);if(!r)return!1;let l=r.url;if(l.length<=s.length)return!1;let a=l.length;for(;a>0&&l.charCodeAt(a-1)===42;)a--;a!==l.length&&(l=l.slice(0,a));const u=e.md.normalizeLink(l);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const c=e.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(l);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=l.length-s.length,!0}function Lte(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,s=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let i=o-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n=s||P4(n.charCodeAt(o)))return!1;let i=o+1;for(;io-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function Dte(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function G6(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,o={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:Ew(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function ud(e,t,n,o,s,i){const r=G6(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=Dte(t,n));a.calls++,a.inclusiveMs+=o,o>a.maxMs&&(a.maxMs=o),a.samples.push(o),i?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=Ew()}function Bte(e){const t=G6(e);if(!t)return null;const n=Object.keys(t.records);for(let o=0;os.name===e);o>=0&&this.rules.splice(o,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const o=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(o<0)return;const s=this.rules[o];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(o<0)throw new Error(`Parser rule not found: ${e}`);this.rules[o].fn=t,n?.alt!==void 0&&(this.rules[o].alt=n.alt),this.invalidateCache()}before(e,t,n,o){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(r=>r.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,o){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(r=>r.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const o of this.rules)if(o.enabled&&o.alt)for(const s of o.alt)e.add(s);const t=new Map,n=new Map;for(const o of e){const s=[],i=[];for(const r of this.rules)r.enabled&&(o!==""&&!r.alt?.includes(o)||(s.push(r.fn),i.push({name:r.name,fn:r.fn})));t.set(o,s),n.set(o,i)}this.cache=t,this.namedCache=n}},Z6=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o,this.tokens_meta=new Array(o.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new cs("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new cs(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const o=new cs(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(s),o}scanDelims(e,t){const{src:n,posMax:o}=this,s=n.charCodeAt(e);let i=e;for(;i0?n.charCodeAt(e-1):32,a=i@[\]\\^_`{}~]/;function B4(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return q6(e,t);case 33:return H6(e,t);case 38:return F6(e,t);case 42:case 95:return kb.tokenize(e,t);case 58:return e.md.options.linkify&&V6(e,t);case 60:return E6(e,t)||W6(e,t);case 91:return j6(e,t);case 92:return P6(e,t);case 96:return T6(e,t);case 126:return wb.tokenize(e,t);default:return K6(e,t)}}function Y6(e){return!zte.test(e)}var Wte=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new D4,this.ruler2=new D4,this.ruler.push("text",K6),this.ruler.push("linkify",V6),this.ruler.push("newline",q6),this.ruler.push("escape",P6),this.ruler.push("backticks",T6),this.ruler.push("strikethrough",wb.tokenize),this.ruler.push("emphasis",kb.tokenize),this.ruler.push("link",j6),this.ruler.push("image",H6),this.ruler.push("autolink",E6),this.ruler.push("html_inline",W6),this.ruler.push("entity",F6),this.ruler2.push("balance_pairs",cte),this.ruler2.push("strikethrough",wb.postProcess),this.ruler2.push("emphasis",kb.postProcess),this.ruler2.push("fragments_join",bte),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),o=n.length,s=e.cache,i=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(i!==void 0){e.pos=i;return}let l=!1;if(e.level=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=B4(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,o=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const i=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,o){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&Y6(e)){const a=new cs("text","",0);a.content=e,o.push(a);return}const s=new Z6(e,t,n,o);this.tokenize(s);const i=this.getRules2(),r=i.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&Y6(i.content)){const r=new cs("text","",0);r.content=i.content,i.children.push(r);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const jte=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,Ute=/[0-9a-z]/i;function Vte(e){return/^\s]/i.test(e)}function qte(e){return/^<\/a\s*>/i.test(e)}function Kte(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n=0;r--){const l=s[r];if(l.type==="link_close"){for(r--;r>=0&&s[r].level!==l.level&&s[r].type!=="link_open";)r--;continue}if(l.type==="html_inline"&&(Vte(l.content)&&i>0&&i--,qte(l.content)&&i++),i>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(p=>Kte(e.md.linkify,p));if(u.length===0)continue;const c=[];let d=l.level,f=0;u.length>0&&u[0].index===0&&r>0&&s[r-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pf){const S=new cs("text","",0);S.content=a.slice(f,w),S.level=d,c.push(S)}const v=new cs("link_open","a",1);v.attrs=[["href",m]],v.level=d++,v.markup="linkify",v.info="auto",c.push(v);const y=new cs("text","",0);y.content=k,y.level=d,c.push(y);const b=new cs("link_close","a",-1);b.level=--d,b.markup="linkify",b.info="auto",c.push(b),f=h.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(Qte,tne)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function one(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&J6.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function sne(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");Xte.test(o)&&nne(n.children||[]),J6.test(o)&&one(n.children||[])}}var ine=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(o=>o.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(o=>o.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const rne=/['"]/,z4=/['"]/g,W4="’";function cm(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function lne(e,t){let n;const o=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let i=0;i=0&&!(o[n].level<=l);n--);if(o.length=n+1,r.type!=="text")continue;let a=r.content,u=0,c=a.length;e:for(;u=0)m=a.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let k=32;if(u=48&&m<=57&&(p=f=!1),f&&p&&(f=w,p=v),!f&&!p){h&&(r.content=cm(r.content,d.index,W4));continue}if(p)for(n=o.length-1;n>=0;n--){let S=o[n];if(o[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!rne.test(o)||!n.children||lne(n.children,e)}}function une(e){const t=e.tokens||[],n=t.length;for(let o=0;o=4||s.charCodeAt(c)!==62)return!1;if(o)return!0;const p=[],h=[],m=[],k=[],w=e.md.block.ruler.getRulesForState(e,"blockquote"),v=e.parentType;e.parentType="blockquote";let y=!1,b;for(b=t;b=d)break;if(s.charCodeAt(c++)===62&&!L){let R=a[b]+1,M,D;s.charCodeAt(c)===32?(c++,R++,D=!1,M=!0):s.charCodeAt(c)===9?(M=!0,(u[b]+R)%4===3?(c++,R++,D=!1):D=!0):M=!1;let z=R;for(p.push(i[b]),i[b]=c;c=d,h.push(u[b]),u[b]=a[b]+1+(M?1:0),m.push(a[b]),a[b]=z-R,k.push(l[b]),l[b]=c-i[b];continue}if(y)break;let P=!1;for(let R=0,M=w.length;R";const T=[t,0];I.map=T,e.md.block.tokenize(e,t,b);const $=e.push("blockquote_close","blockquote",-1);$.markup=">",e.lineMax=f,e.parentType=v,T[1]=e.line;for(let L=0;L=4){o++,s=o;continue}break}e.line=s;const i=e.push("code_block","code",0);return i.content=`${e.getLines(t,s,4+e.blkIndent,!1)} -`,i.map=[t,e.line],!0}function mne(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>i)return!1;const r=e.src.charCodeAt(s);if(r!==126&&r!==96)return!1;let l=s;s=e.skipChars(s,r);let a=s-l;if(a<3)return!1;const u=e.src.slice(l,s),c=e.src.slice(s,i);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(o)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],s=4)&&(s=e.skipChars(s,r),!(s-l=4)return!1;let c=s.charCodeAt(a);if(c!==35||a>=u)return!1;let d=1;for(c=s.charCodeAt(++a);c===35&&a6||aa&&U4(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const p=e.push("heading_open",H4[d],1);p.markup=j4[d],p.map=[t,e.line];const h=e.push("inline","",0);h.content=s.slice(a,u).trim(),h.map=[t,e.line],h.children=[];const m=e.push("heading_close",H4[d],-1);return m.markup=j4[d],!0}function vne(e){switch(e){case 9:case 32:return!0}return!1}function yne(e,t,n,o){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;i|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${xte.source}\\s*$`),/^$/,!1]];function kne(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let r=e.src.slice(s,i),l=0;for(;l<_c.length&&!_c[l][0].test(r);l++);if(l===_c.length)return!1;if(o)return _c[l][2];let a=t+1;if(!_c[l][1].test(r)){for(;a=48&&e<=57}var nI=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o;const s=this.src;let i=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c0&&this.level++,this.tokens.push(o),o}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,o=this.eMarks;for(let s=this.lineMax;et;){const o=n.charCodeAt(--e);if(o!==9&&o!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let o=n.length;en;)if(t!==o.charCodeAt(--e))return e+1;return e}getLines(e,t,n,o){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const p=o?this.eMarks[c]+1:this.eMarks[c];let h=0;const m=this.src,k=this.bsCount,w=this.tShift;for(;fn?new Array(h-n+1).join(" ")+m.slice(f,p):m.slice(f,p)}const s=new Array(t-e),i=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,u=this.tShift;for(let c=0,d=e;dn?s[c]=new Array(f-n+1).join(" ")+i.slice(h,m):s[c]=i.slice(h,m)}return s.join("")}};nI.prototype.Token=cs;function wne(e,t,n){for(let o=t;o=s)return!1;const i=n.charCodeAt(o);switch(i){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return i>=48&&i<=57?!0:wne(n,o,s)}const q4=["","h1","h2"];function xne(e,t,n){const o=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,i=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=oI(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,p,h=t+1;for(;h=S)break;if(a[h]-u>3)continue;if(a[h]>=u&&(p=s.charCodeAt(b),p===45||p===61)){let T=b+1,$=T;for(;T=S){f=p===61?1:2;break}if($-b>1)continue}if(a[h]<0||c&&!sI(e,h,s,b,S))continue;let I=!1;for(let T=0,$=o.length;T<$;T++)if(o[T](e,h,n,!0)){I=!0;break}if(I)break}if(!f)return!1;let m;if(h===t+1){const b=i[t]+r[t];let S=l[t];for(;S>b;){const I=s.charCodeAt(S-1);if(I!==9&&I!==32)break;S--}m=s.slice(b,S)}else m=e.getLines(t,h,u,!1).trim();e.line=h+1;const k=p===61?"=":"-",w=e.push("heading_open",q4[f],1);w.markup=k,w.map=[t,e.line];const v=e.push("inline","",0);v.content=m,v.map=[t,e.line-1],v.children=[];const y=e.push("heading_close",q4[f],-1);return y.markup=k,e.parentType=d,!0}function iI(e){switch(e){case 9:case 32:return!0}return!1}function K4(e,t){const n=e.eMarks,o=e.bMarks,s=e.tShift,i=e.src,r=n[t];let l=o[t]+s[t];const a=i.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l=l)return-1;let u=i.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=i.charCodeAt(a++),u>=48&&u<=57){if(a-r>=10)return-1;continue}if(u===41||u===46)break;return-1}return a0&&++s=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(u=!0);let c,d,f;const p=e.src,h=e.bMarks,m=e.tShift,k=e.eMarks,w=e.sCount,v=e.bsCount,y=h[l]+m[l];if(y>=k[l])return!1;const b=p.charCodeAt(y);if(b>=48&&b<=57){if(f=G4(e,l),f<0||(c=!0,r=y,d=_ne(e,l,f),u&&d!==1))return!1}else if(b===42||b===45||b===43){if(f=K4(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=k[l])return!1;if(o)return!0;const S=p.charCodeAt(f-1),I=String.fromCharCode(S);if(c){const M=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(M.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const T=[l,0];e.tokens[e.tokens.length-1].map=T,e.tokens[e.tokens.length-1].markup=I;let $=!1;const L=e.tokens.length-1,P=e.md.block.ruler.getRulesForState(e,"list"),R=e.parentType;for(e.parentType="list";l=s?B=1:B=D-M,B>4&&(B=1);const A=M+B,F=e.push("list_item_open","li",1);F.markup=I;const W=[l,0];F.map=W,c&&(F.info=f-r-1===1?Sne[p.charCodeAt(r)-48]:p.slice(r,f-1));const j=e.tight,le=e.tShift[l],J=e.sCount[l],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=A,e.tight=!0,e.tShift[l]=z-h[l],e.sCount[l]=D,z>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||$)&&(a=!1),$=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[l]=le,e.sCount[l]=J,e.tight=j,e.push("list_item_close","li",-1).markup=I,l=e.line,W[1]=l,l>=n||e.sCount[l]=4)break;let G=!1;for(let Q=0,ee=P.length;Q3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const y=r[f]+l[f],b=a[f];if(y=b||Z4(i.charCodeAt(y+1)))break}else if(S>=48&&S<=57&&y+1=b){I=-1;break}const T=i.charCodeAt(I++);if(T>=48&&T<=57){if(I-y>=10){I=-1;break}continue}if((T===41||T===46)&&(I>=b||Z4(i.charCodeAt(I))))break;I=-1;break}if(I>=0)break}}}const k=r[f]+l[f],w=a[f];if(d&&!sI(e,f,i,k,w))continue;let v=!1;for(let y=0,b=o.length;y=4||e.src.charCodeAt(s)!==91)return!1;function a(y){const b=e.lineMax;if(y>=b||e.isEmpty(y))return null;let S=!1;if(e.sCount[y]-e.blkIndent>3&&(S=!0),e.sCount[y]<0&&(S=!0),!S){const $=e.parentType;e.parentType="reference";let L=!1;for(let P=0,R=l.length;P"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:w,href:f}),e.line=r),!0):!1}function dy(e){switch(e){case 9:case 32:return!0}return!1}const Tne=65536;function fy(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function Ine(e,t){if(e.lineFlags)return(e.lineFlags[t]&op.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;const r=e.src.charCodeAt(i++);if(r!==124&&r!==45&&r!==58||i>=e.eMarks[s])return!1;const l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!dy(l)||r===45&&dy(l)||!Ine(e,t))return!1;for(;i=4)return!1;u=Y4(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const d=u.length;if(d===0||d!==c.length)return!1;if(o)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRulesForState(e,"blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;const k=e.push("thead_open","thead",1);k.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let b=0;b=4||(u=Y4(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),y+=d-u.length,y>Tne))break;if(s===t+2){const I=e.push("tbody_open","tbody",1);I.map=v=[t+2,0]}const S=e.push("tr_open","tr",1);S.map=[s,s+1];for(let I=0;Ir.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(r=>r.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}after(e,t,n,o){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(r=>r.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:o,fn:s})=>(i,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(i,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return ud(i?.env,"block",o,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const o=this._rules.findIndex(s=>s.name===e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[o].fn=t,n?.alt&&(this._rules[o].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const r=this._rules.findIndex(l=>l.name===i);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const r=this._rules.findIndex(l=>l.name===i);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this._rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const o of this._rules)if(o.enabled)for(const s of o.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const o of e){const s=[],i=[];for(const r of this._rules)r.enabled&&(o!==""&&!r.alt.includes(o)||(s.push(r.fn),i.push({name:r.name,fn:r.fn})));t[o]=s,n[o]=i}this.cache=t,this.namedCache=n}};const fm=[["table",$ne,["paragraph","reference"]],["code",hne],["fence",mne,["paragraph","reference","blockquote","list"]],["blockquote",pne,["paragraph","reference","blockquote","list"]],["hr",yne,["paragraph","reference","blockquote","list"]],["list",Ane,["paragraph","reference","blockquote"]],["reference",Ene],["html_block",kne,["paragraph","reference","blockquote"]],["heading",gne,["paragraph","reference","blockquote"]],["lheading",xne],["paragraph",Mne]];var Lne=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new Nne;for(let e=0;e=a[c];)c++;if(e.line=c,c>=n||u[c]=i){e.line=n;break}const p=e.line;let h=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}if(!h)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c=a[c]&&(d=!0,c++,e.line=c)}return}const f=this.ruler.getNamedRules("");for(;c=a[c];)c++;if(e.line=c,c>=n||u[c]=i){e.line=n;break}const p=e.line;let h=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}}if(!h)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c=a[c]&&(d=!0,c++,e.line=c)}}parse(e,t,n,o){if(!e||e.length===0)return;const s=new nI(e,t,n,o);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},rI=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};rI.prototype.Token=cs;const J4=[["normalize",Jte],["block",ste],["inline",Hte],["linkify",Gte],["replacements",sne],["smartquotes",ane],["text_join",une]],Fne={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},One={parseLinkLabel:Sw,parseLinkDestination:_w,parseLinkTitle:Cw};function Rne(){return{...Fne}}function Pne(){return{...One}}var Dne=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new Lne,this.inline=new Wte,this.ruler=new ine;for(let e=0;e@[\]\\^_`{}~]/;function Qg(e){return!Bne.test(e)}function Bf(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Qm(e,t,n){for(let o=t;o3)return Qg(e);for(let t=0;t=o||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;ll&&t.charCodeAt(a-1)===32;)a--;let u=a;for(;u>l&&t.charCodeAt(u-1)===35;)u--;if(u>l&&t.charCodeAt(u-1)===32)for(a=u-1;a>l&&t.charCodeAt(a-1)===32;)a--;const c=t.slice(l,a);if(!Qg(c))return!1;const d=Wne[i],f=Hne[i],p=sr("heading_open",d,1,0);p.map=[s,s+1],p.markup=f,e.push(p),e.push(Tw(c,s,1));const h=sr("heading_close",d,-1,0);return h.markup=f,e.push(h),!0}function Une(e,t,n){const o=sr("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(Tw(t,n,1)),e.push(sr("paragraph_close","p",-1,0))}function Vne(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function gy(e,t){for(;t=1e5?Q4:my,s="",i=!1,r=!1,l=0,a=0;for(;l"]/,e3=/[&<>"]/g,Xne=/&/g,Qne=/[<>"]/g,eoe={"&":"&","<":"<",">":">",'"':"""};function vy(e){return eoe[e]||e}function Qn(e){if(e.length===0)return"";if(e.length<32)return Jne.test(e)?e.replace(e3,vy):e;const t=e.includes("&"),n=e.includes("<"),o=e.includes(">"),s=e.includes('"');return!t&&!n&&!o&&!s?e:t&&!n&&!o&&!s?e.replace(Xne,"&"):t?e.replace(e3,vy):e.replace(Qne,vy)}const toe=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),noe=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function lI(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(toe,(t,n,o)=>{if(n)return n;if(noe.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return p0(i)?Rp(i):"�"}const s=hw(t);return s!==t?s:t})}const ooe=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,soe=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,ioe=/"/g;function Vc(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function e1(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!e1(e,t,Vc(e,t))}function t3(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let i=s+1;for(;ii&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>i&&e.charCodeAt(l-1)===35;)l--;if(l>i&&e.charCodeAt(l-1)===32)for(r=l-1;r>i&&e.charCodeAt(r-1)===32;)r--;const a=Iw(e.slice(i,r));return a===null?null:`${a} -`}function n3(e,t,n){return t+1" -`;case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return null}return`
  • ${e[t]}
  • -`}function coe(e,t,n){const o=t+2;if(n===o+1)return uoe(e,o);const s=Iw(e.slice(t+2,n));return s===null?null:`
  • ${s}
  • -`}function doe(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let o=n;for(let s=t;s`:"
    ",o.lang=i,o.open=d),{html:`${d}${Qn(c)}
    -`,nextPos:u=25e4,i=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n -`;b -`,l=w,a=v}let y=pm(e,k);for(;y${k}

    -`,u=p,c=h}const m=de.core.parse(t,n,e).tokens);let r=eg(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=voe(r,s.maxChunks)),tg(t,r))return uy(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),ad(n,i,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return uy(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),ad(n,i,()=>{for(let u=0;u=3&&(c?c.marker===y&&S>=c.length&&(c=null):c={marker:y,length:S})}}const k=h-f;s+=k,i+=1,l+=1,m?(a=0,u=0):(a+=1,u+=k);const w=m;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!c)if(w)d(h);else{const v=Math.max(10,Math.floor(t.maxChunkLines*.5)),y=Math.max(t.maxChunkChars,8e3);(a>=v||u>=y)&&d(h)}f=h}return n&&d(e.length),o}function tg(e,t,n={rangesCoverWholeSource:!0}){const o=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;se.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let o=n+1;o=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function goe(e,t){for(let n=0;n=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function Ql(e){return e.length===0?0:$o(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Soe(e,t,n){for(let o=t;o=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}o=s===e.length?e.length:s+1}return n!==null}function Aoe(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return Soe(e,n+1,e.length-1)?!Coe(e,t):!1}function Moe(e,t,n,o={}){const s=o.mode??"full",i=o.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(o.maxChunkChars!==void 0||o.maxChunkLines!==void 0||o.autoTune===!1){const r=o.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??woe:e.options.fullChunkSizeChars??koe),l=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??xoe:e.options.fullChunkSizeLines??boe);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:i}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:i}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:i}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}}var lh=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=Ql(this.pending);if(this.pending.length=o||n>=s}function pI(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??uI))return"yes";const o=e.options.autoUnboundedThresholdLines??cI;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],r=new lh(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(l){dI(i,l)}});if(s&&ww(n,s),r.feed(t),r.flushForce(n),s&&(xw(n),o.fallbackOnGlobalState===!1)){const l=ml(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return i}const cd=(e,t,n)=>en?n:e;function hI(e){return e.experimental?{...e,...e.experimental}:e}const i3=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],r3=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function mI(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Noe(e,t=Math.max(0,e/40|0),n={}){const o=hI(n),s=o.fullChunkFenceAware??!0,i=o.fullChunkTargetChunks??8,r=o.fullChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:cd(Math.ceil(e/i),8e3,64e3),maxChunkLines:cd(Math.ceil(t/i),150,700),maxChunks:cd(Math.ceil(e/64e3),i,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.fullChunkSizeChars??1e4,maxChunkLines:o.fullChunkSizeLines??200,fenceAware:s,maxChunks:o.fullChunkMaxChunks}}function l3(e,t=Math.max(0,e/40|0),n={}){const o=hI(n),s=o.streamChunkFenceAware??!0,i=o.streamChunkTargetChunks??8,r=o.streamChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:cd(Math.ceil(e/i),8e3,64e3),maxChunkLines:cd(Math.ceil(t/i),150,700),maxChunks:cd(Math.ceil(e/64e3),i,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.streamChunkSizeChars??1e4,maxChunkLines:o.streamChunkSizeLines??200,maxChunks:o.streamChunkMaxChunks,fenceAware:s}}var Loe={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},Foe={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Ooe={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function g0(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function ng(e,t){if(g0(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const a3=e=>g0(e)?e:Promise.resolve(e);function ip(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return Qn(e)}}function Ia(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${ip(t[0])}="${Qn(t[1])}"`;for(let o=1;o=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${t} -`;const i=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${o}`;return i<0?r.push(["class",l]):(r[i]=r[i].slice(),r[i][1]+=` ${l}`),`
    ${t}
    -`}return`
    ${t}
    -`}function Dp(e){return!e.attrs||e.attrs.length===0?`${Qn(e.content)}`:`${Qn(e.content)}`}function xb(e){const t=Qn(e.content);return e.attrs?`${t} -`:`
    ${t}
    -`}function Roe(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

    `;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function u3(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Poe(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function c3(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function n1(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const Doe={langPrefix:"language-",xhtmlOut:!1,breaks:!1},hm=Object.prototype.hasOwnProperty,$n={code_inline(e,t){return Dp(e[t])},code_block(e,t){return xb(e[t])},fence(e,t,n,o,s){const i=e[t],r=i.info?lI(i.info).trim():"",{langName:l,langAttrs:a}=gI(r),u=n.highlight,c=Qn(i.content);if(!u)return rp(i,c,r,l,n);const d=u(i.content,l,a);return g0(d)?d.then(f=>rp(i,f||c,r,l,n)):rp(i,d||c,r,l,n)},image(e,t,n,o,s){const i=e[t],r=s.renderInlineAsText(i.children||[],n,o),l=i.attrIndex("alt");return l>=0&&i.attrs?i.attrs[l][1]=r:i.attrs?i.attrs.push(["alt",r]):i.attrs=[["alt",r]],n1(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
    -`:`
    -`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
    -`:`
    -`:` -`},text(e,t){return Qn(e[t].content)},text_special(e,t){return Qn(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function d3(e,t,n){const o=e.info?lI(e.info).trim():"",{langName:s,langAttrs:i}=gI(o),r=t.highlight,l=Qn(e.content);if(!r)return rp(e,l,o,s,t);const a=r(e.content,s,i);if(g0(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return rp(e,a||l,o,s,t)}function yy(e,t,n,o){switch(e.type){case"text":return t.text===$n.text?e.content.length===0?"":Qn(e.content):null;case"text_special":return t.text_special===$n.text_special?e.content.length===0?"":Qn(e.content):null;case"softbreak":return t.softbreak===$n.softbreak?o:null;case"hardbreak":return t.hardbreak===$n.hardbreak?n:null;case"html_inline":return t.html_inline===$n.html_inline?e.content:null;case"code_inline":return t.code_inline===$n.code_inline?Dp(e):null;default:return null}}function Boe(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===$n.text)return i.content.length===0?"":Qn(i.content);break;case"text_special":if(s.text_special===$n.text_special)return i.content.length===0?"":Qn(i.content);break;case"softbreak":if(s.softbreak===$n.softbreak)return t.breaks?t.xhtmlOut?`
    -`:`
    -`:` -`;break;case"hardbreak":if(s.hardbreak===$n.hardbreak)return t.xhtmlOut?`
    -`:`
    -`;break;case"html_inline":if(s.html_inline===$n.html_inline)return i.content;break;case"code_inline":if(s.code_inline===$n.code_inline)return Dp(i);break}const r=s[i.type];if(!r)return n1(i,t.xhtmlOut===!0);const l=r(e,0,t,n,o);return typeof l=="string"?l:ng(l,i.type)}var zoe=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...$n}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,r=o.xhtmlOut===!0;let l,a,u,c,d,f,p="",h="",m=!1,k="";for(let w=0;w0&&e[w-1].hidden?` -`:"";if(y==="list_item_open"&&(!v.attrs||v.attrs.length===0)&&w+3${this.renderInlineTokens($.children||[],o,s)}`,w+=3;continue}}if(w+2 -`,w+=2;continue}}}if(y==="inline"){const T=v.children||[];if(T.length===1){m||(l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,p=o.xhtmlOut?`
    -`:`
    -`,h=o.breaks?p:` -`,m=!0);const $=T[0];switch($.type){case"text":if(l===$n.text){k+=Qn($.content);continue}break;case"text_special":if(a===$n.text_special){k+=Qn($.content);continue}break;case"softbreak":if(u===$n.softbreak){k+=h;continue}break;case"hardbreak":if(c===$n.hardbreak){k+=p;continue}break;case"html_inline":if(d===$n.html_inline){k+=$.content;continue}break;case"code_inline":if(f===$n.code_inline){k+=Dp($);continue}break}}k+=this.renderInlineTokens(T,o,s);continue}const S=i[y];if(!S){const T=v.attrs;if(!v.hidden){if(!T||T.length===0)switch(y){case"hr":k+=r?`


    -`:`
    -`;continue;case"heading_open":k+=`<${v.tag}>`;continue;case"heading_close":k+=` -`;continue;case"paragraph_open":k+=`${b}

    `;continue;case"paragraph_close":k+=`

    -`;continue;case"list_item_open":{const $=e[w+1];k+=b+($&&($.type==="inline"||$.hidden||$.nesting===-1&&$.tag==="li")?"
  • ":`
  • -`);continue}case"list_item_close":k+=`
  • -`;continue;case"bullet_list_open":k+=`${b}
      -`;continue;case"bullet_list_close":k+=`
    -`;continue;case"blockquote_open":k+=b+(e[w+1]&&e[w+1].nesting===-1&&e[w+1].tag==="blockquote"?"
    ":`
    -`);continue;case"blockquote_close":k+=`
    -`;continue;case"ordered_list_open":k+=`${b}
      -`;continue;case"ordered_list_close":k+=`
    -`;continue;case"table_open":k+=`${b} -`;continue;case"table_close":k+=`
    -`;continue;case"thead_open":k+=`${b} -`;continue;case"thead_close":k+=` -`;continue;case"tbody_open":k+=`${b} -`;continue;case"tbody_close":k+=` -`;continue;case"tr_open":k+=`${b} -`;continue;case"tr_close":k+=` -`;continue;case"td_open":k+=`${b}`;continue;case"td_close":k+=` -`;continue;case"th_open":k+=`${b}`;continue;case"th_close":k+=` -`;continue}else if(T.length===1){const $=T[0];if(y==="ordered_list_open"&&$[0]==="start"){k+=`${b}
      -`;continue}if(y==="td_open"&&$[0]==="style"){k+=`${b}`;continue}if(y==="th_open"&&$[0]==="style"){k+=`${b}`;continue}}}k+=this.renderToken(e,w,o);continue}if(y==="code_block"&&S===$n.code_block){k+=xb(v);continue}if(y==="fence"&&S===$n.fence){k+=d3(v,o);continue}if(y==="html_block"&&S===$n.html_block){k+=v.content;continue}const I=S(e,w,o,s,this);typeof I=="string"?k+=I:k+=ng(I,v.type)}return k}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let r="";for(let l=0;l0&&e[t-1].hidden?` -`:"",c=a?`> -`:">";if(!l||l.length===0)return i===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:i===-1?`${u}(n||(n={...t}),n);if(hm.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),hm.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(hm.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(hm.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Doe,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===$n.code_block)return xb(t);if(i==="html_block"&&s.html_block===$n.html_block)return t.content;const r=this.mergeOptions(n),l=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[i];if(!a)return t.block?this.renderToken(e,0,r):n1(t,r.xhtmlOut===!0);if(i==="fence"&&a===$n.fence)return d3(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:ng(u,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Boe(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
      -`:`
      -`,r=t.breaks?i:` -`,l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,p=o.link_open,h=o.link_close,m=o.em_open,k=o.em_close,w=o.strong_open,v=o.strong_close;let y="";for(let b=0;b`;if(u===$n.softbreak&&b+3`,b+=1;continue}if(S.type==="em_open"&&!m&&!k&&b+2${L}`,b+=2;continue}}}if(S.type==="strong_open"&&!w&&!v&&b+2${L}`,b+=2;continue}}}switch(S.type){case"text":if(l===$n.text){const $=S.content.length===0?"":Qn(S.content);if(d===$n.html_inline&&b+1=4)return!0;continue}if(l===9){if(r+=4-r%4,i++,r>=4)return!0;continue}break}if(i0&&u<=6){if(a=3)return!0;break}default:if(l>=48&&l<=57){let a=i+1;for(;a57)break;a++}if(a=Ce,!te&&ze!==void 0&&(me=$o(e),te=me>=ze)),te){const H=this.parseFullDocument(e,D,n,me,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Vo(D,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ml(D)?.unbounded}),H.tokens}else if(W){const H=(xe,fe,ue)=>xeue?ue:xe;me===void 0&&(me=$o(e));const Y=ee&&!Q?l3(e.length,me,n.options):null,ke=Y?.maxChunkChars??(j?H(Math.ceil(e.length/le),8e3,64e3):J??1e4),Se=Y?.maxChunkLines??(j?H(Math.ceil(me/le),150,700):X??200),ye=Y?.maxChunks??(j?H(Math.ceil(e.length/64e3),le,32):G),ne=e.length>0&&e.charCodeAt(e.length-1)===10,ce=F&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Y?.strategy!=="plain";if((A||ce)&&(e.length>=ke*2||me>=Se*2)&&ne){const xe=t1(n,e,D,{maxChunkChars:ke,maxChunkLines:Se,fenceAware:Y?.fenceAware??K,maxChunks:ye});return this.cache={src:e,tokens:xe,env:D,lineCount:me,lastSegment:void 0,globalStateReason:hi(e)},this.updateCacheLineCount(this.cache,me),this.recordChunkedParseResult(D,A?"explicit-initial-large-doc":"default-initial-large-doc"),xe}}const oe=this.parseFullDocument(e,D,n,me);return me=oe.lineCount,this.cache={src:e,tokens:oe.tokens,env:D,lineCount:me,lastSegment:void 0,globalStateReason:hi(e)},this.updateCacheLineCount(this.cache,me),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Vo(D,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ml(D)?.unbounded}),oe.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",Vo(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=hi(s.src),s.globalStateReason=r);const l=r?null:i!==null?this.detectGlobalStateForAppend(s,i):hi(e),a=r||l;if(a){const D=o??s.env;Pl(D);const z=hi(e),B=this.parseFullDocument(e,D,n),A=B.tokens,F=B.lineCount;return this.cache={src:e,tokens:A,env:D,lineCount:F,lastSegment:void 0,globalStateReason:z},this.updateCacheLineCount(this.cache,F),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Vo(D,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ml(D)?.unbounded}),A}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?z=8:c.length>1e3?z=6:c.length>200&&(z=4),z=Math.min(z,D);let B=null;const A=n.options?.streamContextParseStrategy??"chars",F=n.options?.streamContextParseMinChars??200,W=n.options?.streamContextParseMinLines??2;let j;const le=()=>(j===void 0&&(j=$o(c)),j),J=this.canDirectlyParseAppend(s),X=J&&this.shouldUseUnboundedAppend(e,s,c);let G=!1;if(!J)switch(A){case"lines":G=le()>=W;break;case"constructs":if(c.length>=F){G=!0;break}if(joe(c)){G=!0;break}G=le()>=W;break;case"chars":default:G=c.length>=F}if(z>0&&G){const K=this.getTailLines(s.src,z)+c;try{const ge=this.core.parse(K,s.env,n).tokens,Ce=ge.findIndex(ze=>ze.map&&typeof ze.map[1]=="number"&&ze.map[1]>z);if(Ce!==-1){const ze=ge.slice(Ce),me=D-z;me!==0&&this.shiftTokenLines(ze,me),B={tokens:ze}}}catch{B=null}}else B=null;if(!B){const K=D;if(X)B={tokens:sp(n,c,s.env,{mode:"stream"})},K>0&&this.shiftTokenLines(B.tokens,K);else{const ge=this.core.parse(c,s.env,n);K>0&&this.shiftTokenLines(ge.tokens,K),B=ge}}let Q=0;if(s.tokens.length>0&&B.tokens.length>0){const K=s.tokens[s.tokens.length-1],ge=B.tokens[0];try{K.type==="inline"&&ge.type==="inline"&&(ge.children&&ge.children.length>0&&(K.children||(K.children=[]),this.appendTokens(K.children,ge.children)),K.content=(K.content||"")+(ge.content||""),Q=1)}catch{Q=0}}const ee=s.tokens.length;if(B.tokens.length>Q){const K=s.tokens,ge=B.tokens,Ce=Math.min(K.length,ge.length-Q);let ze=0;for(let me=Ce;me>0;me--){let te=!0;for(let oe=0;oe0&&(Q+=ze),ge.length>Q&&this.appendTokens(s.tokens,ge,Q)}if(s.src=e,s.globalStateReason=null,s.lineCount=D+(j??le()),s.tokens.length>ee){const K=this.getLastSegment(s.tokens,e,ee,s.tokens.length,e.length-c.length,D);K?s.lastSegment=K:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,X&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",Vo(s.env,{area:"stream",path:X?"stream-unbounded-append":"stream-append",reason:X?"large-delta":"safe-append",unbounded:X}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",Vo(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,h=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,k=!p&&!c&&h,w=m||k,v=n.options?.streamChunkAdaptive!==!1,y=n.options?.streamChunkTargetChunks??8,b=n.options?.streamChunkSizeChars,S=n.options?.streamChunkSizeLines,I=n.options?.streamChunkMaxChunks,T=!!n.__explicitStreamChunkConfig,$=n.options?.autoTuneChunks!==!1,L=n.options?.streamChunkFenceAware??!0;let P=c&&s.lineCount!==void 0?s.lineCount+$o(c):void 0;if(w){P===void 0&&(P=$o(e));const D=(le,J,X)=>leX?X:le,z=$&&!T?l3(e.length,P,n.options):null,B=z?.maxChunkChars??(v?D(Math.ceil(e.length/y),8e3,64e3):b??1e4),A=z?.maxChunkLines??(v?D(Math.ceil(P/y),150,700):S??200),F=z?.maxChunks??(v?D(Math.ceil(e.length/64e3),y,32):I),W=e.length>0&&e.charCodeAt(e.length-1)===10,j=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&z?.strategy!=="plain";if((m||j)&&(e.length>=B*2||P>=A*2)&&W){const le=t1(n,e,d,{maxChunkChars:B,maxChunkLines:A,fenceAware:z?.fenceAware??L,maxChunks:F});return this.cache={src:e,tokens:le,env:d,lineCount:P,lastSegment:void 0,globalStateReason:hi(e)},this.updateCacheLineCount(this.cache,P),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),le}}const R=this.parseFullDocument(e,d,n,P),M=R.tokens;return P=R.lineCount,this.cache={src:e,tokens:M,env:d,lineCount:P,lastSegment:void 0,globalStateReason:hi(e)},this.updateCacheLineCount(this.cache,P),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Vo(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ml(d)?.unbounded}),M}recordChunkedParseResult(e,t){const n=ml(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",Vo(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ml(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",Vo(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=hi(e);ih(t)&&Pl(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?pI(n,e.length,o):"no";if(r==="yes"){const a=sp(n,e,t);return Vo(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?$o(e):0)}}let l=o;if(r==="need-lines"&&(l=$o(e),fI(n,e.length,l))){const a=sp(n,e,t);return Vo(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?$o(e):0),{tokens:ad(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:$o(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` -`))return null;const o=n??t.slice(e.length);if(!o)return null;const s=o.length;if(o.charCodeAt(s-1)!==10)return null;let i=0,r=-1;for(let a=0;a=2));a++);if(i<2)return null;const l=(r===-1?o:o.slice(0,r)).trim();if(l.length===0)return null;if(/^[-=]+$/.test(l)){const a=e.slice(0,-1),u=a.lastIndexOf(` -`);if(a.slice(u+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(o)?null:o}tryTailSegmentReparse(e,t,n,o){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const i=t.src.slice(0,s.srcOffset);if(!e.startsWith(i))return null;const r=t.src.slice(s.srcOffset),l=e.slice(s.srcOffset);if(l===r)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const u=this.tryContainerTailAppendMerge(e,t,n,o,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,o),c=this.getLastSegment(u.tokens,l);return s.lineStart>0&&this.shiftTokenLines(u.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,u.tokens),t.lineCount=s.lineStart+$o(l),c?t.lastSegment={tokenStart:s.tokenStart+c.tokenStart,tokenEnd:s.tokenStart+c.tokenEnd,lineStart:s.lineStart+c.lineStart,lineEnd:s.lineStart+c.lineEnd,srcOffset:s.srcOffset+c.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let o=e.length-1;o>=0;o--)if(e.charCodeAt(o)===10&&(n--,n===0))return e.slice(o+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,o=e.slice(n),s=o.length;let i=null,r=0;for(;r<=s;){let l=o.indexOf(` -`,r);l===-1&&(l=s);let a=r;for(;a=3&&(i?i.marker===u&&d>=i.length&&(i=null):i={marker:u,length:d})}}if(l===s)break;r=l+1}return i!==null}peek(){return this.cache?.tokens??Hoe}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sky?n.slice(n.length-ky):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=o-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]l&&(l=c.map[1])),c.nesting<0){a+=-c.nesting;continue}if(c.nesting>0){if(a-=c.nesting,c.level===0&&a<=0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(c.level===0&&a===0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` -`,i+1),i===-1)return e.length;s--}return i+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let o=n,s=t-1;for(;o>0;){if(s=e.indexOf(` -`,s+1),s===-1)return e.length;o--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,o,s,i){if(!i||this.mayContainReferenceDefinition(i))return null;const r=t.tokens[s.tokenStart];switch(r?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,o,s,i,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,o,s,i,r);default:return null}}tryListTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),h=this.getListParagraphMode(c,0,c.length,0);(p==="loose"||h==="loose"||this.endsWithBlankLine(t.src)||(c[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,r.level,!1),this.setListParagraphVisibility(d,0,d.length,r.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+$o(i);t.lineCount=m;const k=this.getDocLineCount(e,m);return r.map&&(r.map[1]=k),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:k,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(i))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(h.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(h,m);const k=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,w=t.lineCount??$o(t.src);t.tokens.splice(k,0,...h),t.src=e,t.env=n,t.globalStateReason=null;const v=w+$o(i);t.lineCount=v;const y=this.getDocLineCount(e,v);if(r.map&&(r.map[1]=y),p.tbodyOpenIndex>=0){const b=t.tokens[p.tbodyOpenIndex];b?.map&&(b.map[1]=y)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` -`);if(t<0)return null;const n=e.indexOf(` -`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let l=n-1;l>t;l--){const a=e[l];if(a.type==="table_close"&&a.level===o){s=l;break}}if(s<0)return null;let i=-1,r=-1;for(let l=t+1;l=0){for(let l=s-1;l>i;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===o+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let r=0;for(let l=0;l0&&l0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const r=o+2;for(let l=t;l=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=$o(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let r=i.children.length-1;r>=0;r--)n.push(i.children[r])}}}}};const p3={default:Foe,zero:Ooe,commonmark:Loe};function Koe(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Goe(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function h3(e){return e.experimental?{...e,...e.experimental}:e}function Xi(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function m3(e,t,n){for(let o=0;o=4?n.quotes=[$[0],$[1],$[2],$[3]]:n.quotes=["“","”","‘","’"]}let r=m3(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=m3(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=g3(i?.options,s,"fullChunkedFallback"),u=g3(i?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const p=new Dne;let h=null;const m=()=>(h||(h=new Woe(n)),h);let k=null;const w=()=>(k||(k=new qoe(p)),k);let v=null;const y=()=>(v||(v=new _6),v),b=$=>!c&&!!d&&!Goe($,d),S=($,L)=>o==="default"&&!c&&h===null&&f!==null&&$.parse===f&&b($)&&!$.stream.enabled&&L<($.options.autoUnboundedThresholdChars??4e6)&&$.options.html===!1&&$.options.xhtmlOut===!1&&$.options.breaks===!1&&$.options.langPrefix==="language-"&&$.options.linkify===!1&&$.options.typographer===!1&&$.options.highlight===null,I=($,L)=>o==="default"&&!c&&b($)&&!$.stream.enabled&&!$.options.fullChunkedFallback&&L<($.options.autoUnboundedThresholdChars??4e6)&&$.options.html===!1&&$.options.linkify===!1&&$.options.typographer===!1,T={core:p,block:p.block,inline:p.inline,get linkify(){const $=y();return Object.defineProperty(this,"linkify",{value:$,writable:!0,configurable:!0}),$},get renderer(){const $=m();return Object.defineProperty(this,"renderer",{value:$,writable:!0,configurable:!0}),$},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return b(this)},set($){const L=h3($);return this.options={...this.options,...L},(Xi($,"fullChunkSizeChars")||Xi($,"fullChunkSizeLines")||Xi($,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(Xi($,"streamChunkSizeChars")||Xi($,"streamChunkSizeLines")||Xi($,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),Xi($,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),Xi($,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),h&&h.set(L),typeof L.stream=="boolean"&&(this.stream.enabled=L.stream,k&&(k.reset(),k.resetStats())),this},configure($){const L=typeof $=="string"?p3[$]:$;if(!L)throw new Error("Wrong `markdown-it` preset, can't be empty");if(L.options&&this.set(L.options),L.components){const P=L.components;P.core?.rules&&this.core.ruler.enableOnly(P.core.rules),P.block?.rules&&this.block.ruler.enableOnly(P.block.rules),P.inline?.rules&&this.inline.ruler.enableOnly(P.inline.rules),P.inline2?.rules&&this.inline.ruler2.enableOnly(P.inline2.rules)}return this},enable($,L){const P=Array.isArray($)?$:[$],R=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],M=new Set;for(const D of R){if(!D)continue;const z=D.enable(P,!0);for(let B=0;B!M.has(z));if(D.length)throw new Error(`Rules manager: invalid rule name ${D.join(", ")}`)}return this},disable($,L){const P=Array.isArray($)?$:[$],R=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],M=new Set;for(const D of R){if(!D)continue;const z=D.disable(P,!0);for(let B=0;B!M.has(z));if(D.length)throw new Error(`Rules manager: invalid rule name ${D.join(", ")}`)}return this},use($,...L){const P=typeof $=="function"?$:$&&typeof $.default=="function"?$.default:void 0;if(!P)throw new TypeError("MarkdownIt.use: plugin must be a function");const R=[this,...L],M=$;return c=!0,P.apply(M,R),this},render($,L){let P;if(S(this,$.length)){L!==void 0&&(Gs(L),P=ay("render"));const D=P?Sc():0,z=P?s3($,P):o3($);if(P&&(P.attemptMs=Sc()-D,z===null&&(P.fallbackReason="unsupported-stock-subset"),kf(L,P)),z!==null)return L!==void 0&&Vo(L,{area:"render",path:"stock-fast",reason:"stock-subset"}),z}const R=L??{},M=this.parse($,R);return P&&kf(R,P),m().render(M,this.options,R)},async renderAsync($,L){let P;if(S(this,$.length)){L!==void 0&&(Gs(L),P=ay("render"));const D=P?Sc():0,z=P?s3($,P):o3($);if(P&&(P.attemptMs=Sc()-D,z===null&&(P.fallbackReason="unsupported-stock-subset"),kf(L,P)),z!==null)return L!==void 0&&Vo(L,{area:"render",path:"stock-fast",reason:"stock-subset"}),z}const R=L??{},M=this.parse($,R);return P&&kf(R,P),m().renderAsync(M,this.options,R)},renderIterable($,L={}){const P=this.parseIterable($,L);return m().render(P,this.options,L)},async renderAsyncIterable($,L={}){const P=await this.parseAsyncIterable($,L);return m().renderAsync(P,this.options,L)},renderInline($,L={}){const P=this.parseInline($,L);return m().render(P,this.options,L)},validateLink:Q6,normalizeLink:eI,normalizeLinkText:tI,utils:hee,helpers:{...nte},parse($,L){if(typeof $!="string")throw new TypeError("Input data should be a String");if(L!==void 0&&Gs(L),I(this,$.length)){const D=L===void 0?void 0:ay("parse"),z=D?Sc():0,B=Yne($,D);if(D&&(D.attemptMs=Sc()-z,B===null&&(D.fallbackReason="unsupported-stock-subset"),kf(L,D)),B!==null)return L!==void 0&&Vo(L,{area:"parse",path:"stock-fast",reason:"stock-subset"}),B}const P=L??{};let R;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&b(this)){const D=pI(this,$.length);if(D==="yes"){const z=sp(this,$,P);return Vo(L,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),z}D==="need-lines"&&(R=$o($))}if(!this.stream.enabled){const D=$.length,z=this.options.autoTuneChunks!==!1,B=r,A=!a&&b(this),F=!!this.options.fullChunkedFallback,W=A&&D>=2e5;let j;(F||W||R!==void 0)&&(j=R??$o($));const le=(F||W)&&z&&!B?Noe(D,j,this.options):null;if(F||W){const J=j??0;if(F?D>=(this.options.fullChunkThresholdChars??2e4)||J>=(this.options.fullChunkThresholdLines??400):W){if(le&&le.strategy!=="plain"){const X=t1(this,$,P,{maxChunkChars:le.maxChunkChars,maxChunkLines:le.maxChunkLines,fenceAware:le.fenceAware,maxChunks:le.maxChunks});return L&&v3(L,F?"explicit-full-chunk":"default-large-string"),X}if(F){const X=(te,oe,H)=>teH?H:te,G=this.options.fullChunkAdaptive!==!1,Q=this.options.fullChunkTargetChunks??8,ee=X(Math.ceil(D/Q),8e3,64e3),K=X(Math.ceil(J/Q),150,700),ge=G?ee:this.options.fullChunkSizeChars??1e4,Ce=G?K:this.options.fullChunkSizeLines??200,ze=G?X(Math.ceil(D/64e3),Q,32):this.options.fullChunkMaxChunks,me=t1(this,$,P,{maxChunkChars:ge,maxChunkLines:Ce,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:ze});return L&&v3(L,"explicit-full-chunk"),me}}}if(R!==void 0&&b(this)&&fI(this,D,j??R)){const J=sp(this,$,P);return Vo(L,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),J}}const M=hi($);return Vo(L,{area:"parse",path:"plain",reason:"default-plain"}),ad(P,M,()=>p.parse($,P,this).tokens)},parseIterable($,L={}){return Gs(L),Eoe(this,$,L)},parseAsyncIterable($,L={}){return Gs(L),Toe(this,$,L)},parseIterableToSink($,L,P={}){return Gs(P),Ioe(this,$,L,P)},parseAsyncIterableToSink($,L,P={}){return Gs(P),$oe(this,$,L,P)},parseInline($,L={}){if(typeof $!="string")throw new TypeError("Input data should be a String");Gs(L),ih(L)&&Pl(L);const P=p.createState($,L,this);return P.inlineMode=!0,p.process(P),P.tokens}};if(T.stream={enabled:!!n.stream,parse($,L){return T.stream.enabled?w().parse($,L,T):T.parse($,L??{})},reset(){w().reset()},peek(){return k?k.peek():[]},stats(){return k?k.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){k&&k.resetStats()}},i?.components){const $=i.components;$.core?.rules&&T.core.ruler.enableOnly($.core.rules),$.block?.rules&&T.block.ruler.enableOnly($.block.rules),$.inline?.rules&&T.inline.ruler.enableOnly($.inline.rules),$.inline2?.rules&&T.inline.ruler2.enableOnly($.inline2.rules)}return d=Koe(T),f=T.parse,T}var Yoe=Zoe;const yI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Joe=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],kI=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],Xoe=["svg","g","path"],Qoe=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],ese=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],tse=["action","data","href","src","srcset","poster","xlink:href","formaction"],nse=["script"],ose=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],$a=new Set(yI),bI=new Set(kI),Bp=new Set([...yI,...Joe,...kI,...Xoe]),wI=new Set([...Bp,...Qoe]),sse=new Set(ese),ise=new Set(tse),ah=new Set(nse),xI=new Set(ose);function _I(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const rse={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function SI(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const r=Number.parseInt(i,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return rse[String(s??"").toLowerCase()]??t})}const mm=new Set(["http","https","mailto","tel"]),lse=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),lu=new Set(["http","https"]);function CI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const ase=/^https?:\/\//i;function use(e){if(!ase.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function cse(e,t,n){if(!lp(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function lp(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function dse(e,t){return t==="href"||t==="xlink:href"?lp(e,t)?mm:lu:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?lu:(lp(e,t),mm)}function Ou(e,t={}){if(use(e))return!1;const n=_I(SI(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const r=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!r:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=CI(n);return i?i==="file"?!cse(n,o,s):lp(o,s)?lse.has(i):!dse(o,s).has(i):!1}function fse(e){const t=SI(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=CI(_I(t).toLowerCase());return n==="http"||n==="https"}function pse(e,t={}){const n=String(e??"").trim();return n?Ou(n,t)?"":n:""}function y3(e){return pse(e,{tagName:"img",attrName:"src"})}function hse(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,p,h,m,k){return f[p].nesting===1&&f[p].attrJoin("class",t),k.renderToken(f,p,h,m,k)}n=n||{};const i=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||o,c=n.render||s;function d(f,p,h,m){let k,w=!1,v=f.bMarks[p]+f.tShift[p],y=f.eMarks[p];if(l!==f.src.charCodeAt(v))return!1;for(k=v+1;k<=y&&r[(k-v)%a]===f.src[k];k++);const b=Math.floor((k-v)/a);if(b=h||(v=f.bMarks[T]+f.tShift[T],y=f.eMarks[T],v=4)){for(k=v+1;k<=y&&r[(k-v)%a]===f.src[k];k++);if(!(Math.floor((k-v)/a)=2){const r=Number(i[0]),l=Number(i[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&AI(s.children,t,n)}}function gse(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(hse,t,{render(n,o){return n[o].nesting===1?`
      `:`
      -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,r=i.bMarks[n]+i.tShift[n],l=i.eMarks[n],a=i.src.slice(r,l),u=a.match(/^:::\s*([^\s{]+)/);if(!u)return!1;const c=u[1];if(!c.trim())return!1;const d=a.slice(u[0].length).trim();let f,p;const h=d.indexOf("{"),m=h>=0?d.slice(h).trimStart():void 0;if(h===-1)f=d||void 0;else{if(f=d.slice(0,h).trim()||void 0,m?.startsWith("{")){let I=0,T=-1;for(let $=0;$0&&(p=m.slice(0,T))}p||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let w=n+1,v=!1;for(;w<=o;){const I=i.bMarks[w]+i.tShift[w],T=i.eMarks[w];if(i.src.slice(I,T).trim()===":::"){v=!0;break}w++}v||(w=o);const y=i.push("vmr_container_open","div",1);if(y.attrSet("class",`vmr-container vmr-container-${c}`),y.map=[n,v?w:o],y.meta={...y.meta??{},unclosed:!v&&!k},f&&y.attrSet("data-args",f),p)try{const I=JSON.parse(p);for(const[T,$]of Object.entries(I)){const L=$!=null&&typeof $=="object";y.attrSet(`data-${T}`,L?JSON.stringify($):String($))}}catch{const I=mse(p);if(I)for(const[T,$]of Object.entries(I)){const L=$!=null&&typeof $=="object";y.attrSet(`data-${T}`,L?JSON.stringify($):String($))}else y.attrSet("data-attrs",p)}const b=[];for(let I=n+1;II.trim().length>0)){let I=b.join(` -`);I.endsWith(` -`)||(I+=` -`),I.endsWith(` - -`)||(I+=` -`);const T=i.tokens[i.tokens.length-1];T&&(T.raw=I);const $=[];i.md.block.parse(I,i.md,i.env,$),AI($,n+1,n+1+b.length),i.tokens.push(...$)}const S=i.push("vmr_container_close","div",-1);return v||(S.hidden=!0,S.map=[o,o]),i.line=v?w+1:w,!0},{alt:["paragraph","reference","blockquote","list"]})}function Er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Lo(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function v0(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const vse=/^[a-z][a-z0-9_-]*$/;function k3(e){return vse.test(String(e??"").trim().toLowerCase())}function ar(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return k3(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":k3(s)?s:""}function Xu(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=ar(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function yse(...e){const t=new Set,n=[];for(const o of e)for(const s of Xu(o))t.has(s)||(t.add(s),n.push(s));return n}function kse(e){const t=Xu(e);return{key:t.join(","),tags:t}}function MI(e){return ar(e)}function bse(e,t){const n=String(e??""),o=ar(t);if(!o)return!1;const s=Er(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function EI(e,t){const n=ar(t);return!!n&&!Bp.has(n)&&!bse(e,n)}function wse(e,t){const n=String(e??""),o=ar(t);if(!o)return n;const s=Er(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),r=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(r,"")}const TI=$a,xse=Bp,II=new Set(bI);II.delete("details");const _se=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Sse=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,_b=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Cse=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function o1(e){return(e.match(_b)?.[1]??"").toLowerCase()}function $w(e){return/^\s*<\s*\//.test(e)}function Nw(e,t){return TI.has(t)||/\/\s*>\s*$/.test(e)}function Ase(e,t){let n=0;for(let o=0;o0&&n--;continue}Nw(s,i)||n++}}return n}function b3(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${Er(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const r=i[0]??"",l=!!i[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:i.index,end:i.index+r.length};s--;continue}a||s++}return null}function Ese(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${Er(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(i);if(r){o>0&&o--;continue}l||o++}return o}function s1(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Tse(e){const t=e;return t.meta||(t.meta={}),t.meta}function by(e,t,n){const o=Tse(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function Ise(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${Er(p)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=p=>p?n.some(h=>h.test(p)):!1,r=p=>{if(!(!p||!o.length))for(const h of o)h.raw+=p,h.inner+=p},l=()=>{!o.length||!s||(r(` -`),s=!1)},a=p=>{r(p)},u=p=>{for(let m=0;m{const h=o[o.length-1]?.tag;if(!h)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${Er(h)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!c(p),f=(p,h,m)=>{const k=m??(p.type==="html_inline"?o1(h):"");if(!(k&&t.has(k))){r(h);return}const w=$w(h),v=!w&&Nw(h,k);if(w){if(!o.length||o[o.length-1].tag!==k){r(h);return}u(h);return}if(r(h),v){by(p,h,"");return}o.push({tag:k,token:p,raw:h,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const h=String(p.content??"");if(d(h)?s=!1:l(),!o.length&&!i(h)){s=!1;continue}let m=0,k=!0;for(const w of p.children){const v=s1(w),y=w.type==="html_inline"?o1(v):"",b=y&&t.has(y);let S=v;if(k&&h&&v&&(o.length||b)){const I=h.indexOf(v,m);if(I!==-1)a(h.slice(m,I)),S=h.slice(I,I+v.length),m=I+v.length;else{if(o.length&&!b)continue;k=!1}}f(w,S,y)}k&&h&&m0;continue}if(o.length&&typeof p.content=="string"){const h=s1(p),m=p.type==="html_block"?c(h):null;if(m){u(`${s?` -`:""}${m}`),s=o.length>0;continue}if(!p.content)continue;l(),r(p.content),s=!0}}for(const p of o)by(p.token,p.raw,p.inner)}function $se(e){return/^\s*<\s*[!?]/.test(e)}function Nse(e){const t=new Set(xse);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function w3(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Lse(e,t){let n=null;for(const i of e.matchAll(_se)){const r=i.index??-1;if(r<0)continue;const l=(i[1]??"").toLowerCase();w3(l,t)&&Lo(e.slice(r))===-1&&(!n||r")&&(!n||i")&&(!n||i{const p=f,h=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const y of m){const b=ar(String(y??""));b&&h.add(b)}const k=Nse(Array.from(h)),w=new Set(Rse);for(const y of h)w.add(y);return{autoCloseInlineTagSet:w,commonHtmlTags:k,customTagSet:h,shouldMergeHtmlBlockTag:y=>h.has(y)||!k.has(y)||II.has(y)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},i=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,p)=>{const h=r(f);if(!/\S/.test(h))return[];if(l(h))return[{type:"code_block",content:a(h),raw:h}];const m=h.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const k={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[k]},c=(f,p,h)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":h,d=(f,p)=>{const h=r(p);return!/\S/.test(h)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${h}`,f.children.push({type:"text",content:h,raw:h}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:h,customTagSet:m}=o(f);for(const k of p){const w=k;if(w.type!=="inline"||!Array.isArray(w.children))continue;const v=String(w.content??""),y=w.children.length?w.children:v.includes("<")?[{type:"text",content:v,raw:v}]:null;if(y)try{const b=Ose(y,h);if(w.children=b.children,b.pendingBuffer){const S=v.lastIndexOf(b.pendingBuffer);if(S!==-1){const I=v.slice(0,S);w.content=I,typeof w.raw=="string"&&(w.raw=I)}}}catch(b){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",b)}}Ise(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:h,customTagSet:m,shouldMergeHtmlBlockTag:k}=o(f),w=[];for(let v=0;v0){const[S,I]=w[w.length-1];if(v!==I){if(y.type==="paragraph_open"||y.type==="paragraph_close"){p.splice(v,1),v--;continue}const T=String(y.content??y.raw??"");if(T){const $=p[I],L=`${String($.content||"")} -${T}`,P=Lo(L),R=P===-1?null:b3(L,S,P+1);if(R){const M=L.slice(0,R.end),D=L.slice(R.end);$.content=M,$.loading=!1,p.splice(v,1),w.pop();const z=d($,D)?[]:u(D,c(p,v,"paragraph"));z.length&&p.splice(v,0,...z),v--;continue}$.content=L,$.loading!==!1&&($.loading=!0)}p.splice(v,1),v--;continue}}const b=s(y);if(b){if($se(b))continue;const S=(b.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),I=/^\s*<\s*\//.test(b);if(!S||!k(S))continue;if(i(y,b),!I)S&&!new RegExp(`^\\s*<\\s*${S}\\b[^>]*\\/\\s*>`,"i").test(b)&&Ese(b,S)>0&&w.push([S,v]);else if(w.length>0&&S&&w[w.length-1][0]===S){const[,T]=w[w.length-1],$=p[T];$.content=`${String($.content||"")} -${b}`,$.loading=!1,w.pop(),p.splice(v,1),v--}continue}else if(w.length>0){if(y.type==="paragraph_open"||y.type==="paragraph_close"){p.splice(v,1),v--;continue}const S=y.content||"",I=new RegExp(`<\\s*\\/\\s*${w[w.length-1][0]}\\s*>`,"i").test(S);if(S){const[,T]=w[w.length-1],$=p[T];$.content=`${$.content||""} -${S}`,$.loading!==!1&&($.loading=!I)}I&&w.pop(),p.splice(v,1),v--}else continue}if(m.size>0){const v=new Map,y=new Map,b=T=>{let $=v.get(T);return $||($=new RegExp(`<\\s*${T}\\b`,"i"),v.set(T,$)),$},S=T=>{let $=y.get(T);return $||($=new RegExp(`<\\s*\\/\\s*${T}\\s*>`,"i"),y.set(T,$)),$},I=[];for(let T=0;T0){const R=I[I.length-1],M=p[R.index],D=$.type==="html_block"?S(R.tag).exec(L):null;if(D){const A=D.index+D[0].length,F=L.slice(0,A),W=L.slice(A);M.content=`${String(M.content??"")} -${F}`,Array.isArray(M.children)&&M.children.push({type:"html_inline",content:``,raw:``}),I.pop();const j=d(M,W)?[]:u(W,c(p,T,"paragraph"));j.length?p.splice(T,1,...j):(p.splice(T,1),T--);continue}if($.type!=="inline")continue;const z=Array.isArray($.children)?$.children:[],B=Ase(z,R.tag);if(B!==-1){const A=z.slice(0,B+1),F=z.slice(B+1),W=A.map(j=>String(j?.content??j?.raw??"")).join("");if(M.content=`${String(M.content??"")} -${W}`,Array.isArray(M.children)&&M.children.push(...A),F.length){const j=F.map(le=>String(le.content??le.raw??"")).join("");if(j.trim()){const le=j.replace(/^\s+/,"");if(d(M,j))p.splice(T,1),T--;else if(le.startsWith("<"))p.splice(T,1,{type:"html_block",content:le});else{const J=u(j,c(p,T,"paragraph"));p.splice(T,1,...J)}}else p.splice(T,1),T--}else p.splice(T,1),T--;I.pop();continue}M.content=`${String(M.content??"")} -${L}`,Array.isArray(M.children)&&M.children.push(...z),p.splice(T,1),T--;continue}if($.type!=="inline")continue;const P=Array.isArray($.children)?$.children:[];for(const R of m)if((P.length?Mse(P,R):b(R).test(L)&&!S(R).test(L)?1:0)>0){I.push({tag:R,index:T});break}}}{let v=0;for(let y=0;y0?v--:(p.splice(y,1),y--))}}for(let v=0;v/]+)/)?.[1]??"").toLowerCase();if($.startsWith("!")||$.startsWith("?")){y.loading=!1;continue}if(m.has($)){const B=String(y.content??""),A=Lo(B),F=A===-1?null:b3(B,$,A+1);y.loading=F?!1:y.loading!==void 0?y.loading:!0;const W=F?.start??-1,j=F?F.end-F.start:0;if(W!==-1){const le=B.slice(0,W+j);let J="";A!==-1&&A]+)))?/g;let P;for(;(P=L.exec(y.content||""))!==null;)P[1],P[2]||P[3]||P[4];const R=String(y.content??""),M=new RegExp(`<\\/\\s*${$}\\s*>`,"i").exec(R),D=M?M.index:-1,z=M?M[0].length:0;if(D!==-1){const B=R.slice(0,D+z),A=(R.slice(D+z)||"").replace(/^\s+/,"");y.children=[{type:"html_block",content:B,tag:$,loading:!1}],y.content=B,y.raw=B,A&&p.splice(v+1,0,A.startsWith("<")?{type:"html_block",content:A}:{type:"text",content:A,raw:A})}else y.children=[{type:"html_block",content:y.content,tag:$,loading:!0}];continue}if(!y||y.type!=="inline")continue;if(y.children.length===2&&y.children[0].type==="html_inline"){const $=(y.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),L=y.children[1],P=String(L?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(L?.type==="html_inline"&&P===$)continue;h.has($)?(y.children[0].loading=!0,y.children[0].tag=$,y.children.push({type:"html_inline",tag:$,loading:!0,content:``})):y.children=[{type:"html_block",loading:!0,tag:$,content:String(y.children[0]?.content??"")+String(y.children[1]?.content??"")}];continue}else if(y.children.length===3&&y.children[0].type==="html_inline"&&y.children[2].type==="html_inline"){const $=(y.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(h.has($))continue;y.children=[{type:"html_block",loading:!1,tag:$,content:y.children.map(L=>L.content).join("")}];continue}if(!y.content?.startsWith("<")||y.children?.length!==1)continue;const b=String(y.content),S=y,I=S.children[0];if(I?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(b)&&(S.children.length=0);continue}const T=String(I.content??b).match(Cse)?.[1]?.toLowerCase()??"";if(T){if(/\/\s*>\s*$/.test(b)||TI.has(T)){S.children=[{type:"html_inline",content:b}];continue}S.children.length=0}}})}function Dse(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Bse(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(l.length===1&&!Dse(l[0]??"")){const a=l[0]??"",u=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:u},{type:"inline",tag:"",nesting:0,level:u,content:a,children:[{type:"text",content:a,level:u+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:u}),s+=2}}})}const $I=/\.([a-z0-9]{1,15})$/i,zse=/[_()[\]{}<>]/u,Wse=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Hse=/[?#@]/u,jse=/[\\/]/u,Use=/^[\p{L}\p{N}./\\-]+$/u,Vse=/^[A-Za-z0-9-]{1,63}$/u,qse=/^xn--[a-z0-9-]{2,59}$/i,Kse=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Gse=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Zse=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,Yse=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Jse=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,Xse=2e3,Qse=512,eie={},tie=new Set(["ai","md","py","rs","sh","zip"]),NI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),nie=new Set([...NI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),oie=new Set(["com","dev","io","page","site"]),sie=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),iie=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),Au=new Map;function x3(e,t){if(!e||e.length>Qse)return t;for(Au.set(e,t);Au.size>Xse;){const n=Au.keys().next().value;if(!n)break;Au.delete(n)}return t}function zp(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function wy(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return zp(n)?n:void 0}function _3(e,t){if(!zp(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function S3(e){const t=uh(e);return zp(t)?t:void 0}function rie(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function C3(e,t){if(!zp(t))return;const n=String(e??"").trim().split(/\s+/u).map(rie).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>i1(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>i1(s,{marketTicker:!0}))&&(o.marketTicker=!0),zp(o)?o:void 0}function Wa(e,t=!1){let n;return{options(o){return t||o==null?_3(e,n):_3(e,wy(S3(o),C3(o,n)))},remember(o){const s=S3(o);n=t?wy(n,s):wy(s,C3(o,n))},reset(){n=void 0}}}function A3(e){return Vse.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function lie(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return A3(n)||qse.test(n)?t.every(A3):!1}function LI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function aie(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function uie(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function FI(e,t,n){const o=aie(t);return LI(e)&&uie(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function cie(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function uh(e){const t=String(e??""),n=Au.get(t);return n?(Au.delete(t),Au.set(t,n),n):cie(t)?x3(t,{explicitFilename:Zse.test(t),filename:Yse.test(t),marketTicker:Jse.test(t)}):x3(t,eie)}function die(e){return lie(e.split(/[\\/]/)[0]??"")}function fie(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function pie(e){if(zse.test(e)||!Use.test(e))return!0;if(jse.test(e))return!die(e);const t=e.replace($I,"");return LI(t)?!0:t.split(".").filter(Boolean).some(fie)}function hie(e,t,n){if(!(n?nie:NI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Gse:Kse).test(o)}function i1(e,t={}){if(!e||Wse.test(e)||Hse.test(e))return!1;const n=e.match($I);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return hie(e,o,t.marketTicker===!0)?!0:iie.has(o)?!tie.has(o)||t.filename?!0:pie(e):!!(t.explicitFilename&&oie.has(o)||t.filename&&sie.has(o))}const M3=["!"];function fi(e){return{type:"text",content:e,raw:e}}function au(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function uu(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function ea(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function mie(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(fi(t))}}function E3(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function vie(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function T3(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;or.type==="code_inline"),o=new Map;let s=0;for(let r=0;r0&&u?I3(u):-1;if(c!==-1&&u)for(const d of u.slice(c))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(r=a);continue}if(!(l.type!=="text"||typeof l.content!="string"))for(const a of l.content)a==="("?s++:a===")"&&s>0&&s--}const i=uh(t);for(let r=0;r<=e.length-1;r++){r<0&&(r=0);const l=e[r];if(!l)break;if(l.type==="link_open"&&(l.markup==="linkify"||l.markup==="autolink")){let a=-1;for(let u=r+1;u0){const h=I3(u);h!==-1&&(d===-1||h=m.content.length){p-=m.content.length;continue}if(p<0)break;const k=m.content[p],w=m.content.slice(0,p);let v=m.content.slice(p);for(let S=h+1;S0&&(e.splice(h+1,y),a=h+1);let b=c;if(k==="!"&&f!==-1)b=c.slice(0,f);else if(v){const S=encodeURI(v);if(S&&c.endsWith(S))b=c.slice(0,c.length-S.length);else{const I=k?encodeURI(k):"",T=I?c.indexOf(I):-1;T!==-1&&(b=c.slice(0,T))}}b!==c&&vie(l,b),v&&e.splice(a+1,0,fi(v));break}}}if(!n){if(l?.type==="em_open"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("*")){const a=e[r-1].content?.replace(/(\*+)$/,"")||"";e[r-1].content=a,l.type="strong_open",l.tag="strong",l.markup="**";for(let u=r+1;ud[0]==="href")?.[1]||"";if(e[r+3]?.type==="text"){const d=(e[r+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(c+=e[r+3]?.content?.slice(0,d)||"",e[r+3].content=""),a.push(ea(u,c,f));const p=e[r+3].content?.replace(/^\)\**/,"");p&&a.push(fi(p)),e.splice(r-4,8,...a)}else a.push({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`}),e.splice(r-4,7,...a);continue}else if(e[r-1].content==="]("&&e[r-3]?.type==="text"&&e[r-3].content?.endsWith(")"))if(e[r-2]?.type==="strong_open"){const[a,u]=e[r-3].content?.split("[**")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else if(e[r-2]?.type==="em_open"){const[a,u]=e[r-3].content?.split("[*")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else{const[a,u]=e[r-3].content?.split("[")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}}if(l.type==="link_close"&&l.nesting===-1&&e[r-2]?.type==="link_open"&&e[r+1]?.type==="text"&&e[r-1]?.type==="text"){const a=e[r-1].content||"",u=e[r-2].attrs||[],c=u.find(w=>w[0]==="href")?.[1]||"",d=u.find(w=>w[0]==="title")?.[1]||"";let f=3,p=2;const h=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(h){p+=1;const w=h[1].length;au(m,w)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let w=r+1;wk[0]==="href")?.[1];e[r+5]?.type==="text"&&e[r+5].content==="."?(f=(m||f)+e[r+5].content,e[r+5].content=""):f=m||f,p+=3}let h=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const m=(e[r+2]?.content??"").indexOf(")");h=m===-1,m===-1&&(f+=e[r+2]?.content?.slice(0,m)||"",e[r+2].content="")}a.push(ea(d,f,h)),uu(a,2),e.splice(r-2,p,...a)}if(l.type==="text"&&/\*+\[[^\]]*$/.test(l.content||"")&&e[r+1]?.type==="strong_open"&&e[r+2]?.type==="text"&&e[r+2].content==="]("&&e[r+3]?.type==="link_open"&&e[r+5]?.type==="link_close"&&e[r+6]?.type==="text"&&e[r+6].content===")"&&e[r+7]?.type==="strong_close"){const a=(l.content||"").match(/^(\*+)\[(.*)$/);if(a){const u=(a[2]||"")+a[1];let c=e[r+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!c&&e[r+4]?.type==="text"&&(c=e[r+4].content||"");const d=[];au(d,2),d.push(ea(u,c,!1)),uu(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=c+1;for(;k=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=c+1;for(;k{const n=t;try{const o=Nie(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function $3(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function N3(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function L3(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function OI(e,t){if(!e.startsWith("|")||e.includes(` -`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function xy(e){return OI(e)!==null}function RI(e){return/^:?-+:?$/.test(e.trim())}function Mie(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(RI)}function Eie(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Tie(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(RI)&&Eie(n)}function Iie(e){return e==="|"||e==="|:"}function $ie(e){const t=OI(e);return t!==null&&t.every(n=>!n.includes(":"))}function Nie(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const r=String(i.content??""),l=r.split(` -`)[0]??"",[a="",u="",...c]=r.split(` -`),d=!t&&!r.includes(` -`)&&/\r?\n$/.test(n)&&xy(r);if(!t&&(r.includes(` -`)&&c.length===0&&xy(a)&&Tie(u)||d)){const f=l.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>L3(h)),p=[...$3(),...f,...N3()];o.splice(s-1,3,...p)}else if(r.includes(` -`)&&c.length===0&&xy(a)&&Mie(u)){const f=l.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>L3(h)),p=[...$3(),...f,...N3()];o.splice(s-1,3,...p)}else r.includes(` -`)&&c.length===0&&$ie(a)&&Iie(u)&&(i.content=r.slice(0,-2),i.children.splice(2,1))}return o}function Lie(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let u=t;for(;u=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const i=n[n.length-1],r=o;let l=0,a=t;for(;a=0&&e[c]==="\\";)d++,c--;if(d%2===0){if(l===0)return a;l--,a+=r.length;continue}}const u=e[a];if(u==="\\"){a+=2;continue}u===i?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var Fie=Lie;const Oie=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],r1=Oie.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),Rie=/\\[a-z]+/i,PI="(?:\\\\|\\u0008)",Pie=new RegExp(String.raw`${PI}(?:${r1})\s*\{[^}]+\}`,"i"),Die=new RegExp(String.raw`(?:${PI})?(?:${r1})\s*\{`,"i"),Bie=/\\(?:text|frac|left|right|times)/,zie=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Wie=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Hie=/[A-Z]+\s*\([^)]+\)/i,jie=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,Uie=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,Vie=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,qie={"\b":"\\b","\v":"\\v","\f":"\\f"};function Kie(e){let t="";for(const n of e)t+=qie[n]??n;return t}function ha(e){if(!e)return!1;const t=Kie(e),n=t.trim();if(Vie.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=Rie.test(t),s=Pie.test(t),i=Die.test(t),r=Bie.test(t),l=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=zie.test(t)&&!Wie.test(t),u=Hie.test(t),c=jie.test(n),d=Uie.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||r||l||a||u||c||d||f||p}const DI="__markstreamMathPluginApplied",Sb=80,BI=2e4,F3=BI+4096;function Lw(e){return!!e[DI]}function Gie(e){e[DI]=!0}const zI=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],Zie=["cdot","mathbf{","partial","mu_{"],WI=zI.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),HI="[ \r\b\f\v]",Yie=new RegExp(`([^\\\\])(${Zie.map(e=>e).join("|")})+`,"g"),Jie=/span\{([^}]+)\}/,Xie=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,Qie=/(^|[^\\])\\\r?\n/g,ere=/(^|[^\\])\\$/g,tre=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,nre=new RegExp(`(${HI})|(${WI})\\b`,"g"),O3=new Map,R3=new Map;function ore(e){if(!e)return nre;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),o=O3.get(n);if(o)return o;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${HI})|(${s})\\b`,"g");return O3.set(n,i),i}function sre(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const o=e?"__default__":n.join(""),s=R3.get(o);if(s)return s;const i=e?[r1,WI].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),r1].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return R3.set(o,r),r}const P3={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function D3(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function ire(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&tre.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function B3(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function ta(e,t){const n=t?.commands??zI,o=t?.escapeExclamation??!0,s=t?.commands==null,i=ore(s?void 0:n);let r=e.replace(i,(u,c,d,f,p)=>{if(c!==void 0&&P3[c]!==void 0)return`\\${P3[c]}`;if(d&&n.includes(d)){const h=p&&typeof f=="number"?p[f-1]:void 0;return h==="\\"||h&&/\w/.test(h)?u:`\\${d}`}return u});o&&(r=ire(r));let l=r;const a=sre(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(Jie,"span\\{$1\\}").replace(Xie,"\\operatorname{span}\\{$1\\}"),l=l.replace(Qie,`$1\\\\ -`),l=l.replace(ere,"$1\\\\"),l=l.replace(Yie,"$1\\$2"),l}function z3(e){const t=e.trim();return!(!ha(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function jI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[l]==="\\"&&l+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function Cb(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=l)break;const u=l1(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}ch(e,a)||i++,r=a+Math.max(1,t.length)}return i}function Fw(e,t,n){const o=Hp(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!Hp(o.slice(0,s)).trim()||ch(o,s))return-1;const i=jI(o);if(l1(i,s))return-1;const r=W3(o,t,0,s,i);if(t==="$$"){if(r%2===1)return-1}else if(r>W3(o,n,0,s,i))return-1;return s}function Wp(e){return e===" "||e===" "}function Hp(e){let t=e.length;for(;t>0&&Wp(e[t-1]);)t--;return e.slice(0,t)}function H3(e){let t=0;for(let n=0;n=48&&t<=57}function lre(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function are(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function ure(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(are)}function cre(e){let t=0;if(!j3(e[t]))return!1;for(;j3(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:Wp(e[t+1])}function UI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&Wp(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&Wp(t[1])||cre(t)||lre(t)||ure(t))}function U3(e,t){return e?t?`${e} -${t}`:e:t}function Ab(e){const t=String(e??"").trim();return t?ha(t):!1}function V3(e){let t=0;for(let n=0;nSb){p=!0;break}const m=s[h],k=Dc(m,c);if(k!==-1){const w=U3(f,m.slice(0,k));if(!Ab(w)){p=!0;break}const v=m.slice(k+c.length),y=v.trim()?`suffix:${V3(v)}`:"nosuffix";return["closed",u,o+l,d,o+h,k,V3(w),y].join(":")}if(UI(m)){p=!0;break}if(f=U3(f,m),f.length>BI){p=!0;break}}if(!p&&Ab(f))return["pending",u,o+l,d].join(":")}}return null}function Sy(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function fre(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function Cy(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function pre(e,t){Gie(e);const n=(r,l,a)=>{const u=String(l??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!u)return;const c=r.push("paragraph_open","p",1);c.map=[a,a+1];const d=r.push("inline","",0);d.content=u,d.map=[a,a+1],d.children=[],r.push("paragraph_close","p",-1)},o=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(v,y)=>{let b=y;for(;b=3&&(!b||/\s/.test(b))){const S=a.push("text","",0);return S.content=a.src.slice(a.pos,v),a.pos=v,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),h=Math.max(0,a.pos-p.length);let m=h,k=h;const w=h;for(const[v,y]of f){const b=a.src,S=jI(b),I=rre(b,c);let T=!1;v==="$$"&&m!==w&&(m=w);let $=-1,L=-1,P=0;const R=M=>{if((M==="undefined"||M==null)&&(M=""),M==="\\"){a.pos=a.pos+M.length,m=a.pos;return}if(M==="\\)"||M==="\\("){const B=a.push("text_special","",0);B.content=M==="\\)"?")":"(",B.markup=M,a.pos=a.pos+M.length,m=a.pos;return}if(!M)return;if(v==="$$"&&M.includes("$")){let B=0;for(;B0&&M[A-1]==="$"||A+10){const F=M.slice(0,D),W=a.push("text","",0);W.content=F,a.pos=a.pos+F.length,m=a.pos}const B=M.slice(D).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(B){const[,F,W]=B,j=W.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),le=j?j[1]:W,J=j&&j[2]?j[2]:null,X=a.push("image","img",0);X.attrs=[["src",le],["alt",F]],J&&X.attrs.push(["title",J]),X.content=F,X.children=[{type:"text",content:F,tag:""}],a.pos=a.pos+B[0].length,m=a.pos;const G=M.slice(D+B[0].length);G&&R(G);return}const A=a.push("text","",0);A.content=M,a.pos=a.pos+M.length,m=a.pos;return}const z=a.push("text","",0);z.content=M,a.pos=a.pos+M.length,m=a.pos};for(;!(m>=b.length);){const M=b.indexOf(v,m);if(M===-1)break;if(ch(b,M)){m=M+Math.max(1,v.length);continue}const D=l1(S,M);if(D){m=D[1];continue}const z=l1(I,M);if(z){m=z[1];continue}if(M===$&&m===L){if(P++,P>2){m=M+Math.max(1,v.length);continue}}else P=0,$=M,L=m;if(v==="("&&M>0){let G=M-1;for(;G>=0&&b[G]===" ";)G--;if(G>=0&&b[G]==="]"){m=M+v.length;continue}}if(v==="$"&&M>0&&b[M-1]==="$"){m=M+1;continue}if(v==="$"&&M=b.length);){const D=Cb(b,M);if(D===-1)break;if(D+10&&b[D-1]==="$"){M=D+1;continue}const z=_y(b,D+1);if(z===-1)break;const B=b.slice(D+1,z),A=B.includes("`"),F=!B||!B.trim(),W=b[z+1],j=Sy(B,W),le=Cy(B);if(!A&&!F&&!j&&!le){const J=b.slice(m,D);J&&R(J);const X=a.push("math_inline","math",0);X.content=ta(B,t),X.markup="$",X.raw=`$${B}$`,X.loading=!1,m=z+1,M=z+1}else R("$"),M=D+1}M{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],h=c.bMarks[l]+c.tShift[l];let m=c.src.slice(h,c.eMarks[l]).trim(),k=!1,w="",v="",y=!1,b="",S=!1;for(const[J,X]of p)if(m.startsWith(J))if(J.includes("[")){const G=J==="\\["?m.slice(J.length):"";if(J==="\\["&&Dc(G,X)===-1&&!/^\s*!\[/.test(G)&&!G.includes("`")&&ha(G)){k=!0,w=J,v=X;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1=0?"\\]":v,P=$>=0?$:Dc(m,v,T);if(!y&&P>w.length){const J=m.slice(I+w.length,P),X=c.push("math_block","math",0);X.content=ta(J),X.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",X.map=[l,l+1],X.raw=`${w}${J}${L}`,X.block=!0,X.loading=!1,c.line=l+1;const G=m.slice(P+L.length);return G.trim()&&n(c,G,l),!0}let R=l,M="",D=!1,z="",B=l;const A=y?m:m===w?"":m.slice(w.length),F=!f&&w==="\\["?"]":"",W=Dc(A,v);if(W!==-1){const J=W;M=A.slice(0,J),z=A.slice(J+v.length),B=y?l+1:l,D=!0,R=B}else for(A&&!y&&(M=A),R=l+1;R{const c=r,d=c.bMarks[l]+c.tShift[l],f=c.src.slice(d,c.eMarks[l]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(r,l,a,u)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function hre(e){const t=e.renderer.rules.image||function(n,o,s,i,r){const l=n,a=r;return a.renderToken?a.renderToken(l,o,s):""};e.renderer.rules.image=(n,o,s,i,r)=>{const l=n;return l[o].attrSet?.("loading","lazy"),t(l,o,s,i,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
      ${e.utils.escapeHtml(String(s.content??""))}
      `})}const mre=/^\s]/i,gre=/^<\/a\s*>/i;function vre(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const r=String(i.content??"");mre.test(r)&&o>0&&o--,gre.test(r)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function yre(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const r=s.filter(l=>vre(l,i));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:r}))})}function kre(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,r=e;r.__markstreamOriginalValidateLink=i,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return o(...l);const c=a.validateLink;a.validateLink=u;try{return o(...l)}finally{a.validateLink=c}}),t.at("image",(...l)=>{const a=l[0].md;if(!a)return s(...l);const u=a.validateLink;a.validateLink=i;try{return s(...l)}finally{a.validateLink=u}})}function bre(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new Yoe({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:r=>!Ou(r,{tagName:"a",attrName:"href"})}),kre(i),yre(i),(e.enableMath??!0)&&pre(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&gse(i),e.enableFixIndentedCodeBlock!==!1&&Bse(i),yie(i),xie(i),bie(i),Aie(i),hre(i),Pse(i,{customHtmlTags:e.customHtmlTags}),i}function Ru(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>Ru(n))),t}function wre(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function xre(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function _re(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function gm(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function K3(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function G3(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Are(e,t){const n=[],o=[],s=[],i=[],r=e.split(Sre),l=/\r?\n$/.test(e),a=r.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),u=p=>{const h=p;if(!KI.some(m=>h.startsWith(m)))if(h.startsWith("-")){const m=h.slice(1);s.push(G3(m,a))}else if(h.startsWith("+")){const m=h.slice(1);i.push(G3(m,a))}else{K3(n,o,s,i);const m=a&&h.startsWith(" ")?h.slice(1):h;n.push(m),o.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let p=0;p0||i.length>0)&&K3(n,o,s,i);const d=n.join(` -`),f=o.join(` -`);return{original:t&&l&&d?`${d} -`:d,updated:t&&l&&f?`${f} -`:f}}function Ow(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},o=typeof n.closed=="boolean"?n.closed:void 0,s=o===!0||o!==!1&&t,i=String(e.info??""),r=i.startsWith("diff"),l=r?(()=>{const u=i,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():i;let a=String(e.content??"");if(q3.test(a)&&(a=a.replace(q3,"")),r){const{original:u,updated:c}=Are(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t}}function Mre(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Ere(){return{type:"hardbreak",raw:`\\ -`}}function Tre(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i\s*$/.test(t)||$a.has(e)}function Ire(e){if(!e||e.length===0)return Z3();const t=My.get(e);if(t)return t;const n=e.map(ar).filter(Boolean);if(!n.length){const s=Z3();return My.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:w0({customHtmlTags:e})};return My.set(e,o),o}function JI(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function $re(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function a1(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Nre(e,t,n){const o=e.slice();return a1(o,"href")||o.push(["href",t]),n!=null&&!a1(o,"title")&&o.push(["title",n]),o}function Mb(e){return e.map(JI).join("")}function og(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:og(o.children)});continue}t.push(o)}return t}function Lre(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(S.toLowerCase())||(m+=S),w=!0,k=!0}const v=[],y=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let b;for(;(b=y.exec(l))!==null;){const S=b[1],I=b[2]||b[3]||b[4]||"";v.push([S,I])}if(u?.has(a)){const S=$re(e);return[{type:a,tag:a,attrs:v,content:S?S.inner:p.innerTokens.length?Mb(p.innerTokens):"",children:p.innerTokens.length?o(p.innerTokens,s,i,r):[],raw:S?.raw??m,loading:e.loading||k,autoClosed:w},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:v,content:m,children:h,raw:m,loading:k,autoClosed:w},p.nextIndex]}function XI(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>XI(t)).join(""):String(e.content??"")}function Ore(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>XI(t)).join("")}function Y3(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],r=Ore(o??e);let l="";r?l=r:i!=null&&String(i).length>0?l=String(i):o?.content!=null&&String(o.content).length>0?l=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?l=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?l=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(l=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,u=a===null?null:String(a),c=String(e.content??"");return{type:"image",src:s,alt:l,title:u,raw:c,loading:t}}function Rre(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Pre(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Bre(e,t,n){const o=e.slice();return u1(o,"href")||o.push(["href",t]),n!=null&&!u1(o,"title")&&o.push(["title",n]),o}function vm(e,t,n){const o=e[t],s=Dre(o.attrs),i=String(u1(s,"href")??""),r=u1(s,"title"),l=r==null?null:String(r),a=Bre(s,i,l);let u=t+1;const c=[];let d=!0;for(;uk.type==="strong_open")){const k=String(p.content??""),w=String(p.raw??k),v=Ru(p);v.content=k.slice(0,-2),v.raw=w.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=v}const h=So(f,void 0,void 0,n),m=h.map(k=>{const w=k;return"content"in k?String(w.content??""):String(w.raw??"")}).join("");return{node:{type:"link",href:i,title:l,text:m,children:h,raw:`[${m}](${i}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,Xre=/\p{P}/u,Qre=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,ele=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,tle=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,nle=/:\/\//,Eb=1,QI=2,ole=4,sle=8,e9=16,aa=32,sg=64,zf=128,t9=256,ile=512,Wf=1024,rle=1982;function ym(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function Na(e){return!!e&&Yre.test(e)}function La(e){return!!e&&(Jre.test(e)||Xre.test(e))}function o9(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&Qre.test(e)}function s9(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&ele.test(e)}function ale(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||Na(o)?!1:!(La(o)&&!o9(o,n)&&n&&!Na(n)&&!La(n))}function ule(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||Na(n)?!1:!(La(n)&&!s9(n,o)&&o&&!Na(o)&&!La(o))}function cle(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||Na(o)?!1:!(La(o)&&!o9(o,n)&&n&&!Na(n)&&!La(n))}function fle(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||Na(n)?!1:!(La(n)&&!s9(n,o)&&o&&!Na(o)&&!La(o))}function ple(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const vle=/[\p{L}\p{N}]/u,yle=/^[\p{L}\p{N}]+$/u;function Tb(e){return e?vle.test(e):!1}function i9(e){return e?yle.test(e):!1}function ap(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function xle(e){return e?tle.test(e)||nle.test(e):!1}function _le(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function So(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=uh(t),r={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(o={...o,__linkifyDemotionContext:r});const l=o,a=[];let u=null,c=0;const d=o?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function h(){u=null}function m(te,oe){const H=e.length===1?t:String(oe.content??""),Y=[],ke=kle(te);if(ke!==-1){S(te.slice(0,ke),te.slice(0,ke));const ye=te.slice(ke);return ye&&(R({type:"text",content:ye,raw:ye}),c--),c++,!0}if(qre.test(te)){const ye=te.indexOf("~~");ye!==-1&&Y.push({type:"strikethrough",index:ye})}if(Kre.test(te)){const ye=te.indexOf("**");ye!==-1&&Y.push({type:"strong",index:ye})}if(/[^*]*\*[^*]+/.test(te)){const ye=H?n9(H,0):te.indexOf("*");if(H&&ye===-1)return!1;ye!==-1&&Y.push({type:"emphasis",index:ye})}Y.sort((ye,ne)=>ye.index!==ne.index?ye.index-ne.index:ye.type===ne.type?0:ye.type==="strong"?-1:ne.type==="strong"?1:0);const Se=Y[0];if(!Se)return!1;if(Se.type==="strikethrough"){const ye=Se.index,ne=ye>-1?te.slice(0,ye):"";if(ne&&S(ne,ne),ye===-1)return c++,!0;const ce=te.indexOf("~~",ye+2),xe=ce===-1?te.slice(ye+2):te.slice(ye+2,ce),fe=ce===-1?"":te.slice(ce+2),{node:ue}=X3([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:xe,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return h(),b(ue),fe&&(R({type:"text",content:fe,raw:fe}),c--),c++,!0}if(Se.type==="strong"){const ye=Se.index,ne=ye>-1?te.slice(0,ye):"";if(ne&&S(ne,ne),ye===-1)return c++,!0;if(t&&ye===0){let se=!1,_e=0;for(;_e=2)return S(te,te),c++,!0}}if(t&&(te.match(/\*/g)||[]).length>lle(t))return S(te.slice(ne.length),te.slice(ne.length)),c++,!0;const ce=ap(te,ye);if(ce.len>=3){const se=wle(te,ye+ce.len);if(se!==-1){const _e=te.slice(ye+ce.len,se);if(ble(_e)){const{node:Re}=bf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:_e,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);h(),b(Re);const lt=te.slice(se+3);return lt&&(R({type:"text",content:lt,raw:lt}),c--),c++,!0}}}if(!dle(te,ye)){const se=te.slice(ye,ye+ce.len);S(se,se);const _e=te.slice(ye+ce.len);return _e&&(R({type:"text",content:_e,raw:_e}),c--),c++,!0}const xe=ple(te,ye+2);let fe="",ue="";if(xe.index!==-1){fe=te.slice(ye+2,xe.index),ue=te.slice(xe.index+2);const se=xe.index,_e=ap(te,se);if(ce.intraword&&_e.intraword&&!i9(fe)||!fe&&ce.len>=4&&ce.intraword)return S(te.slice(ne.length),te.slice(ne.length)),c++,!0}else{if(d||xe.sawInvalidClose||ce.intraword)return S(te.slice(ne.length),te.slice(ne.length)),c++,!0;fe=te.slice(ye+2),ue=""}if(!fe&&/^\*+$/.test(ue))return S(te,te),c++,!0;const{node:we}=bf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:fe,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return h(),b(we),ue&&(R({type:"text",content:ue,raw:ue}),c--),c++,!0}if(Se.type==="emphasis"){let ye=Se.index;ye===-1&&(ye=0);const ne=te.slice(0,ye);if(ne&&S(ne,ne),!ale(te,ye)){S(te[ye],te[ye]);const se=te.slice(ye+1);return se&&(R({type:"text",content:se,raw:se}),c--),c++,!0}const ce=ap(te,ye),xe=cle(H,te,ye+1),fe=xe.index,ue=e[c+1];if(o?.final&&ue?.type==="em_open"&&fe!==-1&&te.slice(ye+1,fe).trim()!==te.slice(ye+1,fe)||fe===-1&&(xe.sawInvalidClose||o?.final||ce.intraword||!Tb(te[ye+1])))return S(te.slice(ye),te.slice(ye)),c++,!0;const{node:we}=gm([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:fe>-1?te.slice(ye+1,fe):te.slice(ye+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(h(),b(we),fe!==-1&&fe{for(let we=0;we=0&&ue[_e]==="\\";_e--)se++;if(se%2===0)return we}return-1})(te);if(Y===-1)return!1;let ke=1;for(let ue=Y+1;ueSe?.type==="math_inline")||!Gre.test(te))return null;const H=oe.parseInline(te,{__markstreamFinal:!!o?.final});if(!Array.isArray(H)||H.length===0)return null;const Y=(H.find(Se=>Se?.type==="inline")?.children??[]).filter(Se=>!(Se?.type==="text"&&String(Se.content??"")===""));if(!Y.length||!Y.some(Se=>Se?.type!=="text")||Y.length===1&&Y[0]?.type==="text"&&String(Y[0].content??"")===te)return null;const ke=So(Y,te,n,o);return ke.length?ke:null}function v(te){h(),a.push(te)}function y(te){h();const oe=Ru(te);a.push(oe)}function b(te){v(te)}function S(te,oe){u?(u.content+=te,u.raw+=oe??te):(u={type:"text",content:String(te??""),raw:String(oe??te??"")},a.push(u))}function I(te,oe){if(!te)return;const H=So([{...oe,type:"text",content:te,raw:te}],te,n,o);if(H.length===1&&H[0]?.type==="text"){const Y=H[0];S(String(Y.content??""),String(Y.raw??Y.content??""));return}for(const Y of H)b(Y)}function T(te,oe){return String(te.markup??"").startsWith(oe)}function $(te){if(!u||te.loading!==!0||te.markup!=="\\(\\)")return;const oe=e[c-1];!oe||oe.type!=="text"||!T(oe,"\\(")||u.content.endsWith("(")&&(u.content=u.content.slice(0,-1),u.raw.endsWith("(")&&(u.raw=u.raw.slice(0,-1)),!u.content&&a[a.length-1]===u&&(a.pop(),u=null))}function L(te){return te.endsWith("](")?e[c+1]?.type==="link_open"&&e[c+1]?.markup==="linkify"&&e[c+2]?.type==="text"&&e[c+3]?.type==="link_close"&&e[c+4]?.type==="text"&&String(e[c+4]?.content??"").startsWith(")"):!1}function P(te,oe,H=ym(te)){let Y=te;const ke=String(oe.content??"");return(H&Eb)!==0&&Y.endsWith("\\")&&!T(oe,"\\\\")&&!ke.endsWith("\\\\")&&(Y=Y.slice(0,-1)),(H&Wf)!==0&&Y.endsWith("(")&&!T(oe,"\\(")&&!ke.endsWith("\\(")&&(Y=Y.slice(0,-1)),(H&QI)!==0&&/\*+$/.test(Y)&&!T(oe,"\\*")&&!ke.endsWith("\\*")&&(Y=Y.replace(/\*+$/,"")),Y}for(;c=0;se--){const _e=a[se];if(_e.type!=="text")break;ce=se,xe=String(_e.content??"")+xe}cene==="href")?.[1],ye=String(Se??"");if(t&&ye){const ne=t.indexOf("](");if(ne!==-1){const ce=t.indexOf(")",ne+2);ce===-1?oe.loading=!0:oe.loading&&t.slice(ne+2,ce).includes(ye)&&(oe.loading=!1)}}F(oe)||v(oe)}function B(te){if(te.markup!=="linkify")return!1;const{node:oe,nextIndex:H}=vm(e,c,o);return j(oe,H)?(c=H,!0):!1}function A(te){h(),b(zre(te)),c++}function F(te){if(te.type!=="link")return!1;const oe=a[a.length-1];if(!oe||oe.type!=="text")return!1;const H=String(oe.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!H)return!1;const Y=te,ke=String(Y.href??""),Se=String(Y.text??""),ye=String(H[2]??""),ne=ke.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!ke||!(Se===ke||Se===ne||xle(Se)))return!1;const ce=String(H[1]??"");return ce?(oe.content=ce,oe.raw=ce):a.pop(),v({...te,text:ye,children:[{type:"text",content:ye,raw:ye}],raw:`[${ye}](${ke}${Y.title?` "${Y.title}"`:""})`}),!0}function W(te){if(te.type!=="link")return!1;const oe=te,H=String(oe.href??"");return H?j({href:H,title:oe.title==null||oe.title===""?null:String(oe.title),loading:!!oe.loading},c+1):!1}function j(te,oe){const H=a[a.length-1];if(H?.type!=="image"||H.src||!H.loading||!String(H.raw??"").endsWith("]("))return!1;const Y=e[oe],ke=String(Y?.content??"");if(Y?.type!=="text"||!ke.startsWith(")"))return!1;a.pop(),u=null;const Se=String(H.alt??"");v({type:"image",src:te.href,alt:Se,title:te.title,raw:`![${Se}](${te.href}${te.title?` "${te.title}"`:""})`,loading:!!te.loading});const ye=ke.slice(1),ne=Ru(Y);return ne.content=ye,ne.raw=ye,p()[oe]=ne,!0}function le(te){if(te.type!=="link")return!1;const oe=a[a.length-1],H=e[c-1];if(!oe||oe.type!=="text"||H?.type!=="text")return!1;const Y=String(oe.content??""),ke=String(H.content??"");if(!Y.endsWith("!")||!ke.endsWith("!")||T(H,"\\!"))return!1;const Se=Y.slice(0,-1);Se?(oe.content=Se,oe.raw=Se,u=oe):(a.pop(),u=null);const ye=te,ne=String(ye.text??ye.children?.map(fe=>String(fe?.content??fe?.raw??"")).join("")??""),ce=String(ye.href??""),xe=ye.title==null||ye.title===""?null:String(ye.title);return v({type:"image",src:ce,alt:ne,title:xe,raw:`![${ne}](${ce}${xe?` "${xe}"`:""})`,loading:!!ye.loading}),!0}function J(te,oe="",H=null){const Y=String(te.alt??te.raw??"");return{type:"link",href:oe,title:H,text:Y,children:[te],raw:`[${Y}](${oe}${H?` "${H}"`:""})`,loading:!0}}function X(te){const oe=te.startsWith("![")?te:`![${te}`,H=oe.slice(2),Y=H.indexOf("](");return{type:"image",src:"",alt:Y===-1?H.replace(/\]$/,""):H.slice(0,Y),title:null,raw:oe,loading:!0}}function G(te){const oe=te.indexOf("[![");if(oe===-1||typeof t=="string"&&e.length===1&&gle(t,oe,"["))return!1;const H=te.slice(0,oe);return H&&S(H,H),v(J(X(te.slice(oe+1)))),c++,!0}function Q(te){if(o?.final)return!1;const oe=e[c-1];if(oe?.type!=="text"||!String(oe.content??"").endsWith("[")||T(oe,"\\["))return!1;const H=a[a.length-1];if(H?.type==="text"&&H.content.endsWith("[")){const Y=H.content.slice(0,-1);Y?(H.content=Y,H.raw=Y,u=H):(a.pop(),u=null)}return v(J(Y3(te))),c++,!0}function ee(te){if(te.type!=="link")return!1;const oe=te,H=String(oe.raw??""),Y=String(oe.text??"");if(!H.startsWith("[![")&&!Y.startsWith("!["))return!1;const ke=oe.title==null||oe.title===""?null:String(oe.title);return v(J({type:"image",src:String(oe.href??""),alt:Y.replace(/^!\[/,"").replace(/\]$/,""),title:ke,raw:H.startsWith("[![")?H.slice(1):H,loading:!0})),!0}function K(te){if(!te.startsWith("]("))return!1;const oe=e[c-2];if(oe?.type==="text"&&String(oe.content??"").endsWith("[")&&T(oe,"\\["))return!1;const H=a[a.length-1];if(H?.type!=="image"&&H?.type!=="link")return!1;const Y=H,ke=H?.type==="link"&&Array.isArray(Y.children)&&Y.children.length===1&&Y.children[0]?.type==="image"?a.pop():null,Se=ke?ke.children[0]:a.pop();if(!Se||Se.type!=="image")return!1;const ye=e[c+1];let ne=String(ke?.href??""),ce=ke?.title==null?null:String(ke.title),xe=!0;if(ye?.type==="link_open"){const{node:ue,nextIndex:we}=vm(e,c+1,o);ne=ue.href,ce=ue.title,xe=!0,c=we}else{if(ne=te.slice(2),ne.includes('"')){const ue=ne.split('"');ne=String(ue[0]??"").trim(),ce=ue[1]==null?null:String(ue[1]).trim()}c++}const fe=J(Se,ne,ce);return fe.loading=xe,v(fe),!0}function ge(){const te=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&te?.type==="text"&&String(te.content??"").endsWith("[")&&T(te,"\\[")}function Ce(te,oe){const H=te.indexOf("[");if(H===-1)return!1;let Y=te.slice(0,H);const ke=te.indexOf("](",H);if(ke!==-1){const Se=e[c+2];let ye=te.slice(H+1,ke);if(ye.includes("[")){const se=ye.indexOf("[");Y+=te.slice(0,H+se+1);const _e=H+se+1;ye=te.slice(_e+1,ke)}const ne=e[c+1];if(te.endsWith("](")&&ne?.type==="link_open"&&Se){const se=e[c+4];let _e=4,Re=!0;if(se?.type==="text"){const ct=String(se.content??"");if(ct.startsWith(")")){Re=!1;const Ct=ct.slice(1);if(Ct){const Mt=Ru(se);Mt.content=Ct,Mt.raw=Ct,p()[c+4]=Mt}else _e++}else ct==="."&&_e++}I(Y,oe);const lt=String(Se.content??"");return o?.validateLink&&!o.validateLink(lt)?S(ye,ye):v({type:"link",href:lt,title:null,text:ye,children:[{type:"text",content:ye,raw:ye}],loading:Re}),c+=_e,!0}const ce=te.indexOf(")",ke),xe=ce!==-1?te.slice(ke+2,ce):"",fe=ce===-1;let ue=Y.match(/\*+$/);if(ue&&(Y=Y.replace(/\*+$/,"")),I(Y,oe),ue||(ue=ye.match(/^\*+/)),!d&&ue){const se=ue[0].length;ye=ye.replace(/^\*+/,"").replace(/\*+$/,"");const _e=[];if(se===1?_e.push({type:"em_open",tag:"em",nesting:1}):se===2?_e.push({type:"strong_open",tag:"strong",nesting:1}):se===3&&(_e.push({type:"strong_open",tag:"strong",nesting:1}),_e.push({type:"em_open",tag:"em",nesting:1})),_e.push({type:"link",href:xe,title:null,text:ye,children:[{type:"text",content:ye,raw:ye}],loading:fe}),se===1){_e.push({type:"em_close",tag:"em",nesting:-1});const{node:Re}=gm(_e,0,o);b(Re)}else if(se===2){_e.push({type:"strong_close",tag:"strong",nesting:-1});const{node:Re}=bf(_e,0,void 0,o);b(Re)}else if(se===3){_e.push({type:"em_close",tag:"em",nesting:-1}),_e.push({type:"strong_close",tag:"strong",nesting:-1});const{node:Re}=bf(_e,0,void 0,o);b(Re)}else{const{node:Re}=gm(_e,0,o);b(Re)}}else o?.validateLink&&!o.validateLink(xe)?S(ye,ye):v({type:"link",href:xe,title:null,text:ye,children:[{type:"text",content:ye,raw:ye}],loading:fe});const we=ce!==-1?te.slice(ce+1):"";return we&&(R({type:"text",content:we,raw:we}),c--),c++,!0}return!1}function ze(te){const oe=te.indexOf("![");if(oe===-1)return!1;const H=te.slice(0,oe);return H&&!u?u={type:"text",content:H,raw:H}:H&&u&&(u.content+=H),u&&(a.push(u),u=null),v(X(te.slice(oe))),c++,!0}function me(te){if(!(te?.startsWith("[")&&n?.type==="list_item_open"))return!1;const oe=te.slice(1).match(/[^\s\]]/);if(oe===null)return c++,!0;if(oe&&/x/i.test(oe[0])){const H=oe[0]==="x"||oe[0]==="X";return v({type:"checkbox_input",checked:H,raw:H?"[x]":"[ ]"}),c++,!0}return!1}return a}function Pw(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function Q3(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` -`&&r++,{startLine:i,endLine:r}}function jp(e,t,n,o){const s=Sle(e,t,n);return Pw(s.startLine,s.endLine,o)}function Cle(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:Pw(o,s,t)}function Ln(e,t,n){if(!n?.includeSourceMap)return e;const o=Cle(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function Ale(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(i)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=Pw(i,Math.max(r,l),o)),e}function Mle(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),r=i.replace(/[ \t\r\n]+$/g,"");if(r===i)break;if(r){s.content=r;break}o.pop();continue}break}}function Ele(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const r=i.replace(/[ \t\r\n\d.)]+$/g,"");r!==i&&(r?s.content=r:o.pop())}break}}function Tle(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Dd(e,t,n){const o=e[t],s=[],i=Wa(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&Ln(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(u=>u[0]==="start");if(a){const u=Number(a[1]);return Number.isFinite(u)&&u!==0?u:1}}})(),items:s,raw:s.map(a=>a.raw).join(` -`)};return n?.includeSourceMap&&Ln(l,o,n),[l,r+1]}function Ile(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=Wa(o,!0);let a=t+1;for(;au.raw).join(` -`)} -:::`},a+1]}const $le=new Set(["warning","info","note","tip","danger","caution"]);function Nle(e){let t=0;for(;t=0;m--){const k=f[m];if(k.type==="text"&&/:+/.test(k.content)){p=m;break}}const h={type:"paragraph",children:So((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Ln(h,e[u],n),l.push(h),a.remember(h.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Dd(e,u,a.options());n?.includeSourceMap&&Ln(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Bd(e,u,a.options());n?.includeSourceMap&&Ln(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=y0(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:i,children:l,raw:`:::${s} ${i} -${l.map(d=>d.raw).join(` -`)} -:::`},u+1]}const Fle=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Ole(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Fle.exec(String(o.info??""));return s?Ile(e,t,s,n):null}const Dw={parseContainer:(e,t,n)=>Lle(e,t,n),matchAdmonition:Ole};function Bd(e,t,n){const o=[],s=Wa(n,!0);let i=t+1;for(;il.raw).join(` -`)};return n?.includeSourceMap&&Ln(r,e[t],n),[r,i+1]}function Rle(e){if(e.info?.startsWith("diff"))return Ow(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function Ple(e,t,n){const o=[];let s=t+1,i=[],r=[];const l=Wa(n,!0);for(;su.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a0&&(o.push({type:"definition_item",term:i,definition:r,raw:`${i.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` -`)}`}),i=[]),s=a+1}else s++;return[{type:"definition_list",items:o,raw:o.map(a=>a.raw).join(` -`)},s+1]}function Dle(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],r=Wa(n,!0);let l=t+1;for(;la.raw).join(` -`)}`},l+1]}function Ble(e,t,n){const o=e[t],s=o.attrs,i=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(c=>Array.isArray(c)&&c.length>=1&&c[0]).map(([c,d])=>[String(c),d==null||d===""?!0:String(d)])):void 0,r=String(o.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...i?{attrs:i}:{},children:So(a.children||[],u,void 0,n),raw:u}}function zle(e,t,n){const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function r9(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!k.includes(">");else if(u)u=!k.includes("?>");else if(k.startsWith("");else if(k.startsWith("");else if(k.startsWith("");else{const w=s(k);if(w)if(w.closing){for(let v=r.length-1;v>=0;v--)if(r[v]===w.tag){r.length=v;break}}else w.selfClosing||i(w.after,w.tag)||r.push(w.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function _ae(e,t,n){if(!n?.length)return!1;const o=new Set(Xu(n));if(!o.size)return!1;const s=c=>{const d=c.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||c==="_"||c==="-"||c===":"},i=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const k=c.indexOf(">",d);if(k===-1)return null;let w=k-1;for(;w>=0&&i(c[w]);)w--;return{closing:f,tag:h,selfClosing:!f&&c[w]==="/",after:c.slice(k+1)}},l=(c,d)=>{const f=c.toLowerCase();let p=0;for(;p")return!0}}return!1},a=[];let u=0;for(;u=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=zd(p);if(h){const m=r(p.slice(h.index));if(m)if(m.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===m.tag){a.length=k;break}}else m.selfClosing||l(m.after,m.tag)||a.push(m.tag)}if(c===-1||c>=t)break;u=c+1}return a.length>0}function Sae(e,t){const n=nae.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` -`,s),r=e.slice(s,i===-1?e.length:i);return!zd(r.endsWith("\r")?r.slice(0,-1):r)||wae(e,s)||xae(e,s)||_ae(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function v9(e,t,n){let o=t;for(;oo&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!wf(e,l)){o!=null&&s&&n+i+2>o&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!wf(e,l)){const a=v9(e,i,"`"),u=Cae(e,i+a,a);if(u===-1)break;i=u+a;continue}if(e.startsWith("\\[",i)&&!wf(e,l)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!wf(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return r}function Aae(e,t){if(!Lw(t))return e;const n=t,o=sA.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?y9(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:b0(e).state;sA.set(n,{source:e,state:s});const{context:i}=s,r=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(r==null)return e;const l=e.slice(r+2),a=e.lastIndexOf(` -`,r-1)+1;if(e.slice(a,r).trim()!==""&&!/^\r?\n/.test(l)||/^\s*!\[/.test(l))return e;const u=l.trim(),c=/^(?:[a-z]|pi)$/i.test(u);return ha(l)&&!c?e:e.slice(0,r)}function Mae(e,t,n,o,s){const i=Ww(e),r=Hw(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&jw(e)==null&&Ly(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(l.rest)&&Ly(t):(t.inFence=!0,t.fenceChar=l.markerChar,t.fenceLen=l.markerLen,t.fenceInBlockquote=l.inBlockquote,t.fenceInList=l.inList||t.listContentIndent!=null&&!l.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return aA(e,t,n,o,s)}else return aA(e,t,n,o,s);return!1}function b0(e,t=gae(),n=null,o=!1,s=0){const i=up(t);let r=up(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,p=e.slice(u,f);Mae(p,i,s+u,n,o)&&(a=!0),d?(r=up(i),l=""):l=p,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:i,lineBuffer:l}}}function y9(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:up(e.committedContext),context:up(e.context),lineBuffer:e.lineBuffer+t}}:b0(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Eae(e,t){if(!Lw(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=k0.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,r=i&&s?t.slice(s.source.length):"",l=i&&s?y9(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):b0(t),a=l.state,u=i&&s?l.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!u&&!bae(s.source,r)&&!yae(t)){s.source=t,s.explicitBracketMath=a;return}const c=dre(t);(s&&(s&&!i||s.key!==c||u)||!s&&c)&&n.reset(),vae(e,t,c,a)}function Tae(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function Iae(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function Fy(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&Iae(e,t)}function uA(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function $ae(e){for(let t=0;t+5":""}function dA(e){return{type:"paragraph",children:e,raw:e.map(Fae).join("")}}function fA(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function pA(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=dae(t);if(!s?.size)return null;let i=-1;for(let c=0;cp?.type==="hardbreak")){i=c;break}}if(i===-1)return null;const r=o.slice(0,i),l=o[i];if(!l)return null;const a=[];r.length&&a.push(dA(r)),a.push(l);const u=o.slice(i+1);return u.length&&a.push(dA(u)),a}function Oae(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function cp(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Rae(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${Er(t)}\s*>\s*$`,"i").test(n)}const Oy=new Set(["iframe","script","style","textarea","title"]);function dh(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:y===-1?e.length:y+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:y===-1?e.length:y+3,selfClosing:!1,tag:""}}const p=Lo(e.slice(f));if(p===-1)return null;const h=f+p+1,m=e.slice(f,h);if(/^<\s*[!?]/.test(m))return{closing:!1,end:h,selfClosing:!1,tag:""};let k=m.slice(1).trimStart();const w=k.startsWith("/");w&&(k=k.slice(1).trimStart());const v=k.match(/^([A-Z][\w:-]*)/i);return v?.[1]?{closing:w,end:h,selfClosing:/\/\s*>$/.test(m),tag:v[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,p)=>{const h=new RegExp(String.raw`<\s*\/\s*${Er(f)}(?=\s|>)`,"gi");h.lastIndex=p;const m=h.exec(e);if(!m||m.index==null)return null;const k=s(m.index);return k?{start:m.index,end:k.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(Oy.has(o)){const f=i(o,l+1);return f?{raw:e.slice(r,f.end),start:r,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(r),start:r,end:e.length,closed:!1}}let c=1,d=l+1;for(;d]*$/,"")} -`}function hA(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Bae(e,t,n){return n?e.includes(n,t)?!0:hA(e.slice(Math.max(0,t))).includes(hA(n)):!1}function zae(e,t){let n=Math.max(0,t);for(;n)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function b9(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Hae=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),jae=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function Uae(e){return/\n\s*\n/.test(e)||jae.test(e)}function Vae(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Hae.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!Uae(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function qae(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=dh(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Kae(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,r=oA.get(i),l=r&&r.final===o&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:dd(u,t,n));return oA.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Gae(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,r=String(i.tag??"").toLowerCase();if(!r||r==="details"||xI.has(r)||Array.isArray(i.children))return s;const l=String(s.raw??i.content??"");if(!l)return s;const a=Lo(l);if(a===-1)return s;const u=dh(l,r,0),c=u?.closeStart??-1,d=u?.closed===!0&&c>=a+1,f=d?l.slice(a+1,c):l.slice(a+1);if(!f.trim())return s;const p=b9(n,o),h=d?null:qae(f),m=h?Kae(h,t,p,o):dd(f,t,p);return Vae(f,m)?{...s,children:m}:s})}function Zae(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function dd(e,t,n){return e.trim()?x9(e,t,{...n,__disableStreamParse:!0}):[]}function Yae(e,t,n){const o=dd(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Jae(e,t,n){const o=r9({content:e}),s=Lo(e),i=k9(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const r=Yae(e.slice(s+1,i),t,n);r.length>0&&(o.children=r)}return o.raw=e,o}function Xae(e,t,n){const o=Lo(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=dh(s,"summary",0);if(!i)return dd(s,t,n);const r=s.slice(0,i.start),l=s.slice(i.end);return[...dd(r,t,n),Jae(i.raw,t,n),...dd(l,t,n)]}function w9(e,t,n,o,s,i=0){const r=[];let l=i;for(let a=0;a{const le=k9(f,"details");return le!==-1?f.slice(0,le):f})():f,[y]=w9(w?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,p+f.length),b=Xae(v,n,b9(o,s)),S=m===-1?"":String(e[m].raw??cp(e[m])??""),I=w||m!==-1&&k?.closed===!0,T=S.replace(/[\t\r\n ]+$/,""),$=I?(()=>{const le=(k?.raw??"").lastIndexOf(T);return le===-1?t.length:p+le})():t.length,L=Lo(f),P=w&&L!==-1?p+L+1:p+f.length,R=t.slice(P,$===-1?t.length:$),M=n.parse(R,{__markstreamFinal:s}),D=n.renderer.render(M,n.options,{__markstreamFinal:s}),z=$+T.length,B=I?Math.max($+S.length,zae(t,z)):t.length,A=I?t.slice($,B):S,F=I?t.slice(p,B):t.slice(p),W=w&&L!==-1?f.slice(0,L+1):f,j={...u,tag:"details",attrs:v0(f.slice(0,L+1)),raw:F,content:`${W}${D}${A}`,children:[...b,...y],loading:!s&&!I};if(o.includeSourceMap&&(j.sourceMap=jp(t,p,I?B:t.length,o)),r.push(j),l=I?B:t.length,m===-1&&!w)break;m!==-1&&(a=m)}return[r,l]}function Qae(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let r=0;r=d.start&&L.end<=d.end){s.splice(I,1);continue}break}S=$+T.length,s.splice(I,1)}}return s}function eue(e){const t=l=>l===" "||l===" "||l===` -`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a{const k=m.charCodeAt(0);return k>=65&&k<=90||k>=97&&k<=122},c=m=>{const k=m.charCodeAt(0);return k>=48&&k<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",p=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",h=p;if(a>=l.length||!d(l[a]))return!1;for(a++;a=l.length)return!0;if(l[a]==="/"){for(a++;a=l.length}if(!p(l[a]))return!1;for(a++;a=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a=l.length)return!0;a++}else{for(;a"||k==='"'||k==="'"||k==="`")break;a++}if(a>=l.length)return!0}}}return!0},o=(l,a)=>{let u=!1,c="",d=0;const f=v=>v===" "||v===" ",p=v=>{let y=0;for(;y{let y=0;for(;y";)for(b=!0,y++;y{const y=p(v);if(y)return y;const b=h(v);return b==null?null:p(b)};let k=0;const w=l.split(/\r?\n/);for(const v of w){const y=k,b=k+v.length;if(a=d&&/^\s*$/.test(S.rest)&&(u=!1,c="",d=0):(u=!0,c=I,d=T)}if(a<=b)break;k=b+1}return u},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const l=s[i-1],a=l===" "||l===" "||l===` -`||l==="\r",u=s[i-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(i);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` -`||r[1]==="\r")||!n(r)?s:s.slice(0,i)}function gA(e,t){if(e===t)return;const n=e.split(/\r?\n/),o=t.split(/\r?\n/),s=[];let i=0;for(let r=0;r{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(lString(h??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=h=>h===" "||h===" ",s=h=>{const m=h.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||h==="_"||h==="-"||h===":"},i=h=>{if(!h)return!1;if(h[0]===" ")return!0;let m=0;for(let k=0;k=4)return!0;continue}if(w===" ")return!0;break}return!1},r=h=>{let m=!1,k=!1;for(let w=0;w")return w}return-1},l=h=>{let m=0;for(;m{if(i(h))return-1;const k=h.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let w=!1,v=0;for(;v=S.length){w=!0,v++;continue}const T=S[I];if(T==="!"||T==="?"){w=!0,v+=b+1;continue}if(T==="/"){w=!0,v+=b+1;continue}const $=I;for(;I"&&P!=="/"){w=!0,v++;continue}const R=new RegExp(String.raw`<\s*\/\s*${L}\s*>`,"i"),M=/\/\s*>$/.test(S),D=R.test(h.slice(v+b+1)),z=R.test(e.slice(m+v+b+1)),B=/[\r\n]/.test(e.slice(m+v+b+1));if(w&&n.has(L)&&!M&&!D&&(z||B))return v;w=!0,v+=b+1}return-1};let u=!1,c="",d=0,f="",p=0;for(;pp&&e[h-1]==="\r",w=m?k?h-1:h:e.length,v=e.slice(p,w),y=m?k?`\r -`:` -`:"",b=l(v);let S=v;if(!u&&!b){const I=a(v,p);if(I!==-1){const T=y||` -`;S=`${v.slice(0,I).replace(/[ \t]+$/,"")}${T}${T}${v.slice(I).replace(/^[ \t]+/,"")}`}}f+=S,f+=y,b&&(u?b.markerChar===c&&b.markerLen>=d&&/^\s*$/.test(b.rest)&&(u=!1,c="",d=0):(u=!0,c=b.markerChar,d=b.markerLen)),p=m?h+1:e.length}return f}function nue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,p=!1;for(let h=0;h")return h}return-1},l=(d,f,p)=>{const h=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let k=m+1;for(;k=d.length||d[k]!=="/"){m=d.indexOf("<",m+1);continue}for(k++;kd.length){m=d.indexOf("<",m+1);continue}let w=!0;for(let y=0;y="A"&&b<="Z"?String.fromCharCode(b.charCodeAt(0)+32):b)!==h[y]){w=!1;break}}if(!w){m=d.indexOf("<",m+1);continue}let v=k+h.length;if(v")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const p=f;for(;fc&&e[d-1]==="\r",p=f?d-1:d,h=e.slice(c,p);u+=a(h),u+=f?`\r -`:` -`,c=d+1}return u}function oue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let p=0,h=!1,m=0;for(;p=f.length||f[p]!==">")break;for(h=!0,p++;p{let p=0;for(;pnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let l=!1,a="",u=0,c="",d=0;for(;dd&&e[f-1]==="\r",m=p?h?f-1:f:e.length,k=e.slice(d,m),w=p?h?`\r -`:` -`:"",v=s(k),y=v?.prefix??"",b=v?.content??k,S=i(b);S&&(l?S.markerChar===a&&S.markerLen>=u&&/^\s*$/.test(S.rest)&&(l=!1,a="",u=0):(l=!0,a=S.markerChar,u=S.markerLen));let I=b;if(!l&&I.includes("{if(R.replace(/^[\t ]+/,"").startsWith("|"))return $;const M=R.slice(0,P).replace(/^[\t ]+/,"");if(M.length>0){const D=L.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",z=M.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!D||!z||D!==z)return $}return`${L} - -`});if(y){const T=y+I.split(` -`).join(` -${y}`);c+=T}else c+=I;c+=w,d=p?f+1:e.length}return c}function sue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(M=>String(M??"").toLowerCase()));if(!n.size)return e;const o=M=>M===" "||M===" ",s=M=>{if(!M)return!1;if(M[0]===" ")return!0;let D=0;for(let z=0;z=4)return!0;continue}if(B===" ")return!0;break}return!1},i=M=>{const D=M.charCodeAt(0);return D>=65&&D<=90||D>=97&&D<=122||D>=48&&D<=57||M==="_"||M==="-"||M===":"},r=M=>{let D=0;for(;D{let D=0,z=!1,B=0;for(;D=M.length||M[D]!==">")break;for(z=!0,D++;Dr(M).startsWith("<"),u=M=>{for(let D=0;D{if(s(M))return"";const D=r(M);if(!D.startsWith("<"))return"";let z=1;for(;z=D.length||D[z]==="/"||D[z]==="!"||D[z]==="?")return"";const B=z;for(;z"&&F!=="/"?"":A},d=M=>{if(s(M))return null;const D=r(M);if(!D.startsWith("<"))return null;let z=1;for(;z=D.length)return null;const B=D[z]==="/";if(B)for(z++;z"&&j!=="/")return null;if(B)return{type:"close",name:W};if(/\/\s*>\s*$/.test(D))return{type:"open",name:W,complete:!0};const le=D.indexOf(">",z);if(le!==-1){const J=D.slice(le+1);if(new RegExp(`<\\s*\\/\\s*${W}\\s*>`,"i").test(J))return{type:"open",name:W,complete:!0}}return{type:"open",name:W,complete:!1}},f=M=>{if(s(M))return null;const D=r(M).replace(/[ \t]+$/,"");if(!D.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(D))return null;const z=D.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(z?.[1])return z[1].toLowerCase();const B=D.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!B?.[1]||!B[2])return null;const A=B[1].toLowerCase();return A===B[2].toLowerCase()?A:null};let p=!1,h="",m=0;const k=M=>{let D=0;for(;Dk(M),v=M=>{const D=r(M);return D?s(M)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(D):!1},y=(M,D,z)=>{let B=M,A=0;for(;BB&&e[F-1]==="\r",le=W?j?F-1:F:e.length,J=e.slice(B,le),X=l(J),G=X?.key??"";if(A>0&&D&&G!==D)break;const Q=X?.content??J,ee=d(Q);if(ee?.name===z){if(ee.type==="open")ee.complete||A++;else if(A>0&&(A--,A===0))return!1}else if(A>0&&(u(Q)||v(Q)))return!0;if(W)B=F+1;else break}return!1};let b="",S=0,I=!0,T=!1,$=!1,L=` -`;const P=[];let R="";for(;SS&&e[M-1]==="\r",B=D?z?M-1:M:e.length,A=e.slice(S,B),F=D?z?`\r -`:` -`:"",W=l(A),j=W?.key??"",le=W?.content??A,J=w(le);J&&(p?J.markerChar===h&&J.markerLen>=m&&/^\s*$/.test(J.rest)&&(p=!1,h="",m=0):(p=!0,h=J.markerChar,m=J.markerLen));const X=P.length>0;if(!p&&!X){const Q=c(le),ee=!!Q&&!I&&T&&$&&y(S,j,Q);Q&&!I&&(!T||ee)&&(j&&R&&j===R?b+=`${j}${L}`:j||(b+=L))}if(b+=A,b+=F,F&&(L=F),!p){const Q=d(le);if(Q){if(Q.type==="open")Q.complete||P.push(Q.name);else for(let ee=P.length-1;ee>=0;ee--)if(P[ee]===Q.name){P.length=ee;break}}}const G=u(le);I=G,T=!G&&a(le),$=!G&&!!f(le),R=j,S=D?M+1:e.length}return b}function x9(e,t,n={}){const o=c9(n),s=o?_d():0,i=!!n.final,r=(e??"").toString();let l=r.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(hae(t,n)&&(t.stream.reset(),mae(t)),i||(l.endsWith("- *")&&(l=l.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*-\s*$/,v=>v.startsWith(` -`)?` -`:""):/(?:^|\n)\s*--\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*--\s*$/,v=>v.startsWith(` -`)?` -`:""):/(?:^|\n)\s*>\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*>\s*$/,v=>v.startsWith(` -`)?` -`:""):/\n\s*[*+]\s*$/.test(l)?l=l.replace(/\n\s*[*+]\s*$/,` -`):/(?:^|\n)\s*\d+\s*$/.test(l)?/^\d+$/.test(l.trim())||(l=l.replace(/(?:^|\n)\s*\d+\s*$/,v=>v.startsWith(` -`)?` -`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(l)?l=l.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(v,y,b)=>`${y}${b.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*\d+[.)]\s*$/,v=>v.startsWith(` -`)?` -`:""):/\n[[(]\n*$/.test(l)&&(l=l.replace(/(\n\[|\n\()+\n*$/g,` -`)),l=Aae(l,t),l=Sae(l,n.customHtmlTags)??l),n.customHtmlTags?.length&&l.includes("<")){const v=Xu(n.customHtmlTags);if(v.length&&(l=tue(l,v),l=nue(l,v),l=sue(l,v),l=oue(l,v),l.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");l=l.replace(b,"$1$2$2")}}i||(l=eue(l));const a=Oae(l);if(a){if(n.includeSourceMap){const b={...n,__sourceLineMapper:gA(r,l)};a[0].sourceMap=jp(l,0,l.length,b)}const v=n.preTransformTokens,y=n.postTransformTokens;if(zw(t,n)||typeof v=="function"||typeof y=="function"){const b=cA(t,l,{__markstreamFinal:i},n),S=typeof v=="function"&&v(b)||b;typeof y=="function"&&y(S)}return iA(a,n,o,s)}const u=cA(t,l,{__markstreamFinal:i},n);if(!u||!Array.isArray(u))return iA([],n,o,s);const c=n.preTransformTokens,d=n.postTransformTokens;let f=u;c&&typeof c=="function"&&(f=c(f)||f);const p=t,h=typeof p.validateLink=="function"&&p.__markstreamOriginalValidateLink&&p.validateLink!==p.__markstreamOriginalValidateLink?p.validateLink:void 0,m=n.validateLink??h??p.options?.validateLink??(typeof p.validateLink=="function"?p.validateLink:void 0),k={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?gA(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let w=cae(t,l,f,k,o);if(d&&typeof d=="function"){const v=d(f);if(Array.isArray(v)){const y=v[0],b=y?.type;y&&typeof b=="string"?w=ig(v,{...k,__customHtmlBlockCursor:0},o):w=v}}if(Zae(w)&&(w=Qae(w,i,l,k),w=w9(w,l,t,k,i)[0],w=Gae(w,t,k,i)),i){const v=new WeakSet,y=b=>{if(!b||typeof b!="object"||v.has(b))return;if(v.add(b),Array.isArray(b)){for(const I of b)y(I);return}const S=b;S.type==="html_block"&&S.loading===!0&&(S.loading=!1);for(const I of Object.values(S))y(I)};y(w)}return w=f9(w,n),n.debug&&console.log("Parsed Markdown Tree Structure:",w),d9(w,o,s)}function vA(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=Wa(t),s=t?.includeSourceMap===!0;let i=0;for(;ic.type==="html_block")){if(s)for(const c of u)Ln(c,l,t);for(const c of u)zr(c,l,t);n.push(...u)}else{const c={type:"paragraph",raw:a,children:u};s&&Ln(c,l,t);const d=pA(c,t);if(d){s&&fA(d,c);for(const f of d)zr(f,l,t);n.push(...d)}else zr(c,l,t),n.push(c)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const iue=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,rue=new Set([...ah,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),lue=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function yA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function aue(e){return typeof e=="string"?e:e==null?"":String(e)}function _9(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function ma(e){return aue(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function S9(e){return ma(e).replace(/`/g,"`")}function x0(e){return String(e??"").trim().toLowerCase()}function Uw(e,t="safe"){const n=x0(e);return n?t==="escape"?!0:t==="trusted"?ah.has(n):!lue.has(n):!1}function C9(e,t="safe"){const n=x0(e);return n?t==="escape"?!0:t==="trusted"?ah.has(n):rue.has(n):!1}function kA(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${S9(o)}"`).join("")}function A9(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(iue);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function uue(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||Ou(s,{tagName:t,attrName:"srcset"})})}function M9(e,t,n,o){return sse.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?uue(t,o):!!(ise.has(e)&&t&&Ou(t,{tagName:o,attrName:e}))}function wu(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function E9(e,t,n,o=!1){if(t!=="safe"||x0(n)!=="a")return e;const s=wu(e,"href");if(o&&(!s||!e[s])){const a=wu(e,"target"),u=wu(e,"rel");return a&&delete e[a],u&&delete e[u],e}const i=wu(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const r=wu(e,"rel"),l=new Set(String(r?e[r]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return l.add("noopener"),l.add("noreferrer"),r&&r!=="rel"&&delete e[r],e.rel=Array.from(l).join(" "),e}function bA(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!_9(r)||M9(l,i,t,n)||(o[r]=i)}return E9(o,t,n,!!wu(e,"href"))}function T9(e,t){const n=e.toLowerCase();return wI.has(n)?!1:yA(t,n)||yA(t,e)}function Vw(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!_9(r)||M9(l,i,t,n)||(o[r]=i)}return E9(o,t,n,!!wu(e,"href"))}function dp(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function rg(e,t="safe",n){const o=Vw(dp(e),t,n),s=Object.entries(o).map(([i,r])=>[i,r]);return s.length>0?s:void 0}function cue(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function due(e){const t={};for(const[n,o]of Object.entries(e))t[n]=cue(o,n);return t}function Ry(e){return e.trim().length>0}function I9(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const r=e.slice(n,o);Ry(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=A9(e.slice(o+1,s));if(!i){const r=e.slice(o,s+1);Ry(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:i.isSelfClosing||$a.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r})}n=s+1}return t}function fue(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=A9(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:i.isSelfClosing||$a.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r}),n=s+1}return t}function pue(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${ma(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${ma(o)}`:` ${ma(o)}="${S9(s)}"`).join("");return e.type==="self_closing"?`<${ma(t)}${n} />`:`<${ma(t)}${n}>`}function hue(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of I9(e))if((n.type==="tag_open"||n.type==="self_closing")&&T9(n.tagName??"",t))return!0;return!1}function fd(e,t="safe"){if(!e)return"";if(t==="escape")return ma(e);const n=fue(e),o=[],s=[],i=[];for(const r of n){if(r.type==="text"){i.length===0&&s.push(ma(r.content??""));continue}const l=x0(r.tagName);if(!l)continue;if(C9(l,t)){r.type==="tag_open"?i.push(l):r.type==="tag_close"&&i[i.length-1]===l&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&Uw(l,t)){s.push(pue(r));continue}if(r.type==="self_closing"){s.push(`<${l}${kA(bA(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${kA(bA(r.attrs??{},t,l))}>`),$a.has(l)||o.push(l);continue}const a=o.lastIndexOf(l);if(a===-1)continue;for(;o.length>a+1;){const c=o.pop();c&&s.push(``)}const u=o.pop();u&&s.push(``)}for(;o.length>0;){const r=o.pop();r&&s.push(``)}return s.join("")}const mue=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],wA="http://www.w3.org/2000/svg",gue=new Set(["script","style","iframe","object","embed","link","meta"]),vue=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),yue=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),kue=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),bue=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function wue(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function xue(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function _ue(e){const t=e.nodeName.toLowerCase();return t==="use"?wue(e):t==="image"?xue(e):t==="text"||t==="tspan"?!!e.textContent?.trim():bue.has(t)}function Sue(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function Cue(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?Ou(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Ou(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":Ou(i,{tagName:o,attrName:s})?"":i:""}function Aue(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function N9(e){const t=$9(e),n=t.toLowerCase();let o=0;for(;on.test(t))||N9(t)}function Mue(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function bm(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function L9(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!gue.has(o)){if(o==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))L9(s,t)}}function Eue(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];L9(t,n);const o=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=bm(t.getAttribute("width")),i=bm(t.getAttribute("height")),r=bm(t.getAttribute("x")),l=bm(t.getAttribute("y")),a=e.ownerDocument.createElementNS(wA,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const u=t.querySelector(".nodeLabel");if(u?.getAttribute("class")&&a.setAttribute("class",u.getAttribute("class")),o.length===1)a.textContent=o[0];else{const c=-.6*(o.length-1);for(const[d,f]of o.entries()){const p=e.ownerDocument.createElementNS(wA,"tspan");p.setAttribute("x",String(r+s/2)),p.setAttribute("dy",d===0?`${c}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function Tue(e){Eue(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!vue.has(o)){n.remove();continue}if(o==="style"&&xA(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const r=i.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(i.name);continue}if(r==="style"&&i.value&&xA(i.value)){n.removeAttribute(i.name);continue}if(r==="srcdoc"){n.removeAttribute(i.name);continue}if(yue.has(r)&&i.value){const l=Cue(o,r,i.value);if(!l){n.removeAttribute(i.name);continue}l!==i.value&&n.setAttribute(i.name,l);continue}if(kue.has(r)&&i.value&&N9(i.value)){n.removeAttribute(i.name);continue}if(i.value){const l=Sue(i.value);l!==i.value&&n.setAttribute(i.name,l)}}Mue(n)}}function aBe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return Tue(n),Iue(n)?null:n}catch{return null}}function Iue(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(r)||i<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){_ue(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const wm=[];function Py(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $ue(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function Nue(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function _A(e=`editor-${Date.now()}`,t={}){const n=bre(t),o=n;o.__markstreamRegisteredPluginCount=wm.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||wm.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;i=m=>h[m]??s[m]??m}else i=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const m=h;if(Array.isArray(m)){const[k,...w]=m;typeof k=="function"&&n.use(k,...w)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(wm.length)for(const h of wm)if(Array.isArray(h)){const[m,...k]=h;typeof m=="function"&&n.use(m,...k)}else typeof h=="function"&&n.use(h);n.use(RQ),n.use(BQ),n.use(LQ);const r=QQ,l=r.default??r;n.use(l),n.use(NQ),n.use($Q),n.core.ruler.after("block","mark_fence_closed",h=>{const m=h,k=m.src,w=!!m.env?.__markstreamFinal,v=k.split(/\r?\n/);for(const y of m.tokens){if(y.type!=="fence"||!y.map||!y.markup)continue;const b=y.map[0],S=y.map[1],I=y.markup,T=I[0],$=I.length,L=v[Math.max(0,S-1)]??"";let P=0;for(;Pb+1&&R>=$&&M===L.length,z=y;z.meta=z.meta??{},z.meta.unclosed=!D,z.meta.closed=!!D}});const a=(h,m)=>{const k=h,w=k.pos;if(k.src[w]!=="~")return!1;const v=k.src[w-1],y=k.src[w+1];if(/\d/.test(v)&&/\d/.test(y)){if(!m){const b=k.push("text","",0);b.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(h,m)=>{const k=h[m],w=String(k.info??"").trim(),v=String(k.content??""),y=btoa(unescape(encodeURIComponent(v))),b=$ue(w),S=Py(b),I=Nue(`editor-${e}-${m}-${b}`),T=Py(i("common.copy"));return`
      -
      - ${Py(b.toUpperCase())} - -
      -
      -
      `};const u=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=c.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const w=u.exec(k.src.slice(k.pos));if(!w)return!1;const v=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(v))return!1;const y=k.src.slice(k.pos+w[0].length);if(y.startsWith("](")||y.startsWith("(")||d(y))return!1;if(!m){const b=w[1],S=k.push("reference","span",0);S.content=b,S.markup=w[0],S.raw=w[0]}return k.pos+=w[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const w=String(h[m].content??"");return`${w}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function Lue({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function F9({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:Lue({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Fue={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Oue(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function O9(e){const t=Oue(e);return Fue[t]??t}function Rue(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>O9(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Pue(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function Due(e){return Pue(e)?.join("\0")??""}function Bue(e,t){return`${Due(e)}\0\0${Rue(t)?.join("\0")??""}`}function Cc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function SA(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var zue=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=CA();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=CA();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=Uue(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),v=jue(this.source.slice(this.visible.length),w,this.segmenter);v.text&&(this.visible+=v.text,this.charBudget=Math.max(0,this.charBudget-v.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Cc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Cc(o,1e3,1)),this.normalizedTargetLatencyMs=Cc(s,900,1),this.normalizedCatchUpLatencyMs=Cc(i,350,1),this.normalizedCatchUpThreshold=SA(r,600),this.normalizedStartDelayMs=SA(a,80),this.maxCommitFps=Math.trunc(Cc(l,30,1)),this.maxCharsPerCommit=Math.trunc(Cc(u,80,1)),this.flushOnFinish=c,this.segmenter=Hue(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Wue(e={},t){const n=new zue(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Hue(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function jue(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function CA(){return typeof performance<"u"?performance.now():Date.now()}function Uue(e,t,n){return Math.min(n,Math.max(t,e))}var Vue=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const Nb=Symbol.for("markstream-vue:node-lifecycle");function uBe(){}const qw=new Map;let R9="material";const qc=new Map,AA=new Map;let Lb=null;function que(e){qw.set(e.id,e)}function Kue(e){const t=qw.get(R9);if(!t)return;const n=t.core[e];if(n)return n;const o=qc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!qc.has(t.id)&&Zue(t)}function Gue(){var e,t;return(t=(e=qw.get(R9))==null?void 0:e.fallback)!=null?t:""}function Zue(e){return Vue(this,null,function*(){var t,n,o;if(qc.has(e.id))return(t=qc.get(e.id))!=null?t:null;let s=AA.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(qc.set(e.id,i),Lb?.(),i)).catch(()=>(qc.set(e.id,null),null)),AA.set(e.id,s)),s})}const MA='',EA='',Yue={id:"material",core:{"":EA,plain:'',text:EA,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:MA,csharp:MA,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Is(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Jue=_o(0);Lb=()=>{Jue.value++},que(Yue);const Xue={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function _0(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[r]=i.split(":");return r.toLowerCase()})(e);return(t=Xue[n])!=null?t:n}function cBe(e){const t=_0(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function dBe(e){return Kue(_0(e))||Gue()}const TA={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var S0=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});let Xs=null,Mu=!1,Eu=null,C0=Gw;function fh(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Kw(){try{const e=globalThis;return fh(e?.katex)}catch{return null}}function Gw(){return S0(null,null,function*(){const e=Kw();if(e)return e;const t=yield Is(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Is(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return fh(t)})}function P9(e){const t=Promise.resolve(e).then(n=>{var o;return Eu===t&&n?(Xs=(o=fh(n))!=null?o:n,Xs):null}).catch(()=>null).finally(()=>{Eu===t&&(Eu=null)});return Eu=t,Mu=!0,t}function Que(e){C0=e,Xs=null,Mu=!1,Eu=null}function ece(e){Que(Gw)}function D9(){return typeof C0=="function"}function fBe(){var e;const t=C0;if(!t||t===Gw)return null;if(Xs)return Xs;const n=Kw();if(n)return Xs=n,Xs;if(Mu)return null;try{const o=t();return o?typeof o?.then=="function"?(P9(o),null):(Xs=(e=fh(o))!=null?e:o,Xs):null}catch{return null}}function B9(){return S0(this,null,function*(){var e;const t=Kw();if(t)return Xs=t,Xs;if(Xs)return Xs;if(Eu)return Eu;if(Mu)return null;const n=C0;if(!n)return Mu=!0,null;try{const o=n();if(typeof o?.then=="function")return P9(o);if(o)return Xs=(e=fh(o))!=null?e:o,Mu=!0,Xs}catch{}return Mu=!0,null})}function z9(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let ya=null,da=null;const Cs=new Map,El=new Map;let Vp=5;const Pu=new Set;function fp(){if(Cs.size{const{id:n,html:o,error:s}=t.data,i=Cs.get(n);if(i)if(Cs.delete(n),clearTimeout(i.timeoutId),i.cleanup(),fp(),s)i.aborted||i.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(El.set(a,o),El.size>200){const u=El.keys().next().value;El.delete(u)}}i.aborted||i.resolve(o)}},ya.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Cs.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Cs.clear(),W9()}}function nce(){var e;for(const t of Cs.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Cs.clear(),W9(),ya&&((e=ya.terminate)==null||e.call(ya)),ya=null,da=null}function oce(e,t=!0,n=2e3,o){return S0(this,null,function*(){performance.now();const s=z9(e);if(!D9()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(da)return Promise.reject(da);const i=`${t?"d":"i"}:${s}`,r=El.get(i);if(r)return fp(),Promise.resolve(r);const l=ya||(da=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),da.name="WorkerInitError",da.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(da);if(Cs.size>=Vp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Cs.size,a.max=Vp,Promise.reject(a)}return new Promise((a,u)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void u(m)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Cs.get(c);if(!m)return;Cs.delete(c),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),fp()},n);d=()=>{const m=Cs.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",u(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=u;Cs.set(c,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const k=Cs.get(c);Cs.delete(c),clearTimeout(f),k?.cleanup(),k?.reject(m),fp()}})})}function pBe(e,t=!0,n){const o=`${t?"d":"i"}:${z9(e)}`;if(El.set(o,n),El.size>200){const s=El.keys().next().value;El.delete(s)}}const sce="WORKER_BUSY";function ice(e=2e3,t){return Cs.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Pu.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},Pu.add(l),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",o(u)},e),queueMicrotask(()=>fp()),t&&(r=()=>{if(i)return;i=!0,a();const u=new Error("Aborted");u.name="AbortError",o(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const xf={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function hBe(e){return S0(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!D9()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:xf.timeout,u=(i=o.waitTimeout)!=null?i:xf.waitTimeout,c=(r=o.backoffMs)!=null?r:xf.backoffMs,d=(l=o.maxRetries)!=null?l:xf.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):xf.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield oce(t,n,a,p)}catch(m){if(m?.code!==sce||h>=f)throw m;if(h++,yield ice(u,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}c>0&&(yield new Promise(k=>globalThis.setTimeout(k,c*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function rce(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function d1(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=rce(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function f1(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function H9(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function p1(e,t=360,n=500){return H9(e,t,n)}function h1(e,t=360,n=500){return H9(e,t,n)}var lce=Object.defineProperty,ace=Object.defineProperties,uce=Object.getOwnPropertyDescriptors,IA=Object.getOwnPropertySymbols,cce=Object.prototype.hasOwnProperty,dce=Object.prototype.propertyIsEnumerable,$A=(e,t,n)=>t in e?lce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j9=(e,t)=>{for(var n in t||(t={}))cce.call(t,n)&&$A(e,n,t[n]);if(IA)for(var n of IA(t))dce.call(t,n)&&$A(e,n,t[n]);return e},NA=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const m1=()=>Is(()=>import("./mermaid.core-DLN3CXA3.js").then(e=>e.bn),[]);let fl=null,Gc=m1,jf=null,Fb=!1,Ob=!1,Uf=0;function fce(e){Gc=e,Uf++,fl=null,jf=null,Fb=!1,Ob=!1}function pce(e){fce(m1)}function LA(){return typeof Gc=="function"}function FA(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=j9({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},ace(n,uce(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function OA(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=j9({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function mBe(){return NA(this,null,function*(){if(fl)return fl;const e=(function(){try{const o=globalThis;return FA(o?.mermaid)}catch{return null}})();if(e)return fl=e,OA(fl),fl;const t=Gc,n=Uf;return t?t===m1&&Fb?null:jf||(jf=NA(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===m1)return n===Uf&&t===Gc&&(Fb=!0,(function(i){Ob||(Ob=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Uf&&t===Gc&&(jf=null)}return n!==Uf||t!==Gc?null:o?(fl=FA(o),OA(fl),fl):null}),jf):null})}let mi=null,fa=null;const yr=new Map,mu=new Map;function lg(e){for(const t of yr.values())t.reject(e);yr.clear(),mu.clear()}let RA=5,PA=!1;const hce="WORKER_BUSY",DA="MERMAID_DISABLED";function mce(e){if(mi&&mi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",lg(n)}mi=e,fa=null;const t=e;mi.onmessage=n=>{if(mi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=yr.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},mi.onerror=n=>{var o,s;if(mi===t)if(yr.size!==0){try{PA?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}lg(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},mi.onmessageerror=n=>{var o,s;if(mi===t)if(yr.size!==0){try{PA?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}lg(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function gce(){var e;if(mi)try{lg(new Error("Worker cleared")),(e=mi.terminate)==null||e.call(mi)}catch{}mi=null,fa=null}function U9(e,t,n,o){if(!LA()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=DA,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=mu.get(s);return i||(i=(function(r,l,a=1400){if(!LA()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=DA,Promise.reject(c)}if(fa)return Promise.reject(fa);const u=mi||(fa=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),fa.name="WorkerInitError",fa.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(fa);if(yr.size>=RA){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=hce,c.inFlight=yr.size,c.max=RA,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),yr.delete(f))},k={resolve:w=>{m(),c(w)},reject:w=>{m(),d(w)}};yr.set(f,k);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return yr.delete(f),void d(w)}p=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const v=yr.get(f);v&&v.reject(w)},a)})})(e,t,n),mu.set(s,i),i.then(()=>{mu.get(s)===i&&mu.delete(s)},()=>{mu.get(s)===i&&mu.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,u)=>{let c=()=>{};const d=()=>l.removeEventListener("abort",c);c=()=>{d();const f=new Error("Aborted");f.name="AbortError",u(f)},l.addEventListener("abort",c,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),u(f)})})})(i,o)}function gBe(e,t,n=1400,o){return U9("canParse",{code:e,theme:t},n,o)}function vBe(e,t,n=1400,o){return U9("findPrefix",{code:e,theme:t},n,o)}var vce=Object.defineProperty,yce=Object.defineProperties,kce=Object.getOwnPropertyDescriptors,BA=Object.getOwnPropertySymbols,bce=Object.prototype.hasOwnProperty,wce=Object.prototype.propertyIsEnumerable,zA=(e,t,n)=>t in e?vce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t)=>{for(var n in t||(t={}))bce.call(t,n)&&zA(e,n,t[n]);if(BA)for(var n of BA(t))wce.call(t,n)&&zA(e,n,t[n]);return e},un=(e,t)=>yce(e,kce(t)),po=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const xce="__global__",Dy="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",Rb=(()=>{const e=globalThis;if(e[Dy])return e[Dy];const t={scopedCustomComponents:{},revision:_o(0)};return e[Dy]=t,t})(),WA=Rb.revision,_ce=Symbol("markstreamCustomComponents"),Sce=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function ph(e){return Sce.has(String(e).trim().toLowerCase())}function Cce(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function By(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([ar(n),ar(Cce(n))]))!s||ph(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function es(e){const t=yn(_ce,null);return O(()=>{var n;return WA.value,(function(o,s={}){return WA.value,vt(vt(vt({},By(Rb.scopedCustomComponents[xce]||{})),By(s)),By((function(i){return i&&Rb.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const Ace=["aria-label"],Mce={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},Ece={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},Vn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Oi=Vn(Ge({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),C("svg",Ece,[...n[1]||(n[1]=[_("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),_("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),C("svg",Mce,[...n[0]||(n[0]=[_("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,Ace))}),[["__scopeId","data-v-be21ab83"]]);Oi.install=e=>{e.component(Oi.__name,Oi)};const Tce={class:"emoji-node"},xi=Vn(Ge({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("span",Tce,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);xi.install=e=>{e.component(xi.__name,xi)};const Ice=["id"],$ce=["title"],Ri=Vn(Ge({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),C("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[_("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,$ce)],8,Ice))}}),[["__scopeId","data-v-c1463a29"]]);Ri.install=e=>{e.component(Ri.__name,Ri)};const V9=(()=>{try{return!1}catch{}return!1})();function zy(e){V9&&console.warn(e)}function HA(e,t="safe",n){return Vw(e,t,n)}function q9(e){return due(e)}function Wy(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Zw(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=rg((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Wy(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Wy(r.value)]):Object.entries(s).map(([r,l])=>[r,Wy(l)]):null,t,n);var s;if(!o)return;const i=q9(dp(o));return Object.keys(i).length>0?i:void 0}function jA(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,r])=>r===""?` ${i}`:` ${i}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function _f(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Hy(e,t,n,o,s,i,r=!1){const l=(function(d,f){return T9(d,f)})(e,o);if(ah.has(e.toLowerCase())||!l&&C9(e,i))return null;if(!l&&Uw(e,i))return r?[jA(e,t,!0)]:[jA(e,t),...n,``];const a=Vw(t,i,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=o[e]||o[e.toLowerCase()],f=q9(a);return an(d,un(vt({},f),{key:c}),n.length>0?n:void 0)}return an(e,un(vt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function K9(e,t){return hue(e,t)}function g1(e,t,n="safe"){if(!e)return[];try{return(function(i,r,l="safe"){let a=0;const u=[],c=[];for(const d of i)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=Hy(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);_f(u.length>0?u[u.length-1].children:c,f)}else if(d.type==="tag_open")u.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=u.length-1;h>=0;h--)if(u[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;u.length>p;){const h=u.pop(),m=Hy(h.tagName,h.attrs||{},h.children,r,h.autoKey,l);u.length>0?_f(u[u.length-1].children,m):_f(c,m),h.tagName.toLowerCase()!==f&&u.length>p&&zy(`Auto-closing unclosed tag: <${h.tagName}>`)}else zy(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=Hy(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?_f(u[u.length-1].children,f):_f(c,f),zy(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(I9(e),t,n)}catch(s){return o=s,V9&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const Nce=["innerHTML"],Pi=Vn(Ge({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=yn("markstreamHtmlPolicy",void 0),o=O(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=es(()=>t.customId),i=Ge({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=O(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=g1(l,s.value,o.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!K9(l,s.value))return{mode:"html",content:fd(l,o.value)};const a=g1(l,s.value,o.value);return a===null?{mode:"html",content:fd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(g(),C("span",{key:0,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[Z(x(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(g(),C("span",{key:1,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(g(),C("span",{key:2,class:Be(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,Nce))}}),[["__scopeId","data-v-d17f12b0"]]);Pi.install=e=>{e.component(Pi.__name,Pi)};const Lce={class:"inline-code"},Fce={key:0},Hs=Vn(Ge({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=oh(),o=yn("markstreamFade",void 0),s=yn("markstreamTextStreamState",void 0),i=yn("markstreamStreamVersion",void 0),r=O(()=>{const v=n.fade;return v===""||v===!0||v==="true"||v!==!1&&v!=="false"&&void 0}),l=O(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=O(()=>{var v;return String((v=t.node.code)!=null?v:"")}),u=O(()=>!l.value),c=O(()=>{var v;const y=(v=n["index-key"])!=null?v:n.indexKey;return y==null||y===""?"":String(y)}),d=q(t.node.code),f=q(""),p=q(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ze([()=>t.node.code,c,l],([v])=>{const y=String(v??""),b=c.value,S=F9({nextContent:y,persistedContent:b?s?.get(b):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=S.settledContent,f.value=S.streamedDelta,S.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const I=i.value;h=Ze(()=>i.value,T=>{T!==I&&k()},{flush:"sync"})})()):f.value||m(),b&&s?.set(b,y)},{immediate:!0}),Ld(m);const w=O(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(v,y)=>(g(),C("code",Lce,[u.value?(g(),C(Ie,{key:0},[Ve(N(a.value),1)],64)):(g(),C(Ie,{key:1},[d.value?(g(),C("span",Fce,N(d.value),1)):ie("",!0),f.value?(g(),C("span",{key:1,class:Be(["inline-code-stream-delta",[w.value]]),onAnimationend:k},N(f.value),35)):ie("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);Hs.install=e=>{e.component(Hs.__name,Hs)};const Pb=q(!1),UA=q(""),VA=q("top"),pp=q(null),hp=q(null),Db=q(null),Bb=q(null),qA=q(null);let ag=null,ug=null,zb=0;function G9(){ag&&(clearTimeout(ag),ag=null),ug&&(clearTimeout(ug),ug=null)}let xm=!1,_m=null,KA=!1;function Oce(e,t,n="top",o=!1,s,i){if(!e)return;const r=++zb;G9();const l=()=>po(null,null,function*(){var a,u;if(yield(function(){return po(this,null,function*(){if(!xm&&!KA&&typeof document<"u"){_m!=null||(_m=po(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Is(()=>import("./vue.runtime.esm-bundler-C6xa6Xt4.js"),[]),Is(()=>import("./Tooltip-KOtF1YpV.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),c({setup:()=>()=>{var h;return d(f,{visible:Pb.value,"anchor-el":pp.value,content:UA.value,placement:VA.value,id:hp.value,originX:Db.value,originY:Bb.value,isDark:(h=qA.value)!=null?h:void 0})}}).mount(p),xm=!0}));try{yield _m}catch(c){xm=!1,_m=null,KA=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),xm&&r===zb){hp.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,pp.value=e,UA.value=t,VA.value=n,Db.value=(a=s?.x)!=null?a:null,Bb.value=(u=s?.y)!=null?u:null,qA.value=typeof i=="boolean"?i:null,Pb.value=!0;try{e.setAttribute("aria-describedby",hp.value)}catch{}}});o?l():ag=setTimeout(l,80)}function Rce(e=!1){zb+=1,G9();const t=()=>{if(pp.value&&hp.value)try{pp.value.removeAttribute("aria-describedby")}catch{}Pb.value=!1,pp.value=null,hp.value=null,Db.value=null,Bb.value=null};e?t():ug=setTimeout(t,120)}const Pce={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},Dce=Symbol("markstreamI18nFallback");function Z9(e,t){var n;return(n=t?.[e])!=null?n:Pce[e]}const Wb=(e,t)=>{var n;return(n=Z9(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function GA(e,t){return{t(n){const o=Z9(n,t);if(e.te&&o!=null&&!e.te(n))return Wb(n,t);const s=e.t(n);return s===n&&o!=null?Wb(n,t):s}}}function Bce(){const e=(function(){var n,o,s;try{const i=Xo(),r=Dce,l=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=l?.[r])!=null?o:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=Xo(),i=s?.proxy,r=i?.$t;if(typeof r=="function"){const u=i?.$te;return{t:r.bind(i),te:typeof u=="function"?u.bind(i):void 0}}const l=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=l?.$t;if(typeof a=="function"){const u=l?.$te;return{t:a.bind(l),te:typeof u=="function"?u.bind(l):void 0}}}catch{}return null})();if(t)return GA(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return GA({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>Wb(n,e)}}const Y9=Symbol("ViewportPriority"),J9=Symbol("ViewportPriorityOptions"),X9=Symbol("OffscreenHeavyNodeDeferral"),zce=O(()=>!1),ju="400px";function Yw(){return yn(J9,void 0)}function Jw(){return yn(X9,zce)}function Wce(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?q(t):t,r=s?(n=window.requestIdleCallback)!=null?n:T=>window.setTimeout(()=>T({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(o=window.cancelIdleCallback)!=null?o:T=>window.clearTimeout(T):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let p=null,h=null;function m(T){if(!T)return"viewport";let $=a.get(T);return $||($=u++,a.set(T,$)),String($)}function k(){if(p!=null){try{l?.(p)}catch{}p=null}}function w(T){if(T){const $=c.get(T);if($&&!$.targets.size){try{$.io.disconnect()}catch{}c.delete(T)}}d.size||f.size||k()}function v(T){const $=d.get(T);if(!$)return;const L=c.get($.bucketKey);if(!$.visible.value){$.visible.value=!0;try{$.resolve()}catch{}}try{L?.io.unobserve(T)}catch{}L?.targets.delete(T),d.delete(T),f.delete(T),w($.bucketKey)}function y(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&p==null&&f.size&&(p=r(()=>{p=null;const T=f.values().next().value;T&&(f.delete(T),v(T),f.size&&y())},{timeout:1200}))}function b(T,$){if(!s||typeof IntersectionObserver>"u")return null;const L=(function(B,A){var F,W,j;return{root:(F=e?.(B??null))!=null?F:null,rootMargin:(W=A?.rootMargin)!=null?W:ju,threshold:(j=A?.threshold)!=null?j:0}})(T,$),P=[m((R=L).root),R.rootMargin,R.threshold].join("\0");var R;const M=c.get(P);if(M)return{key:P,bucket:M};let D;try{D=new IntersectionObserver(B=>{for(const A of B)(A.isIntersecting||A.intersectionRatio>0)&&v(A.target)},{root:L.root,rootMargin:L.rootMargin,threshold:L.threshold})}catch{return null}const z={io:D,targets:new Map};return c.set(P,z),{key:P,bucket:z}}function S(){if(s&&i.value)for(const[T,$]of Array.from(d.entries())){const L=b(T,$.opts);if(!L){v(T);continue}if(L.key===$.bucketKey)continue;const P=$.bucketKey,R=c.get(P);try{R?.io.unobserve(T)}catch{}R?.targets.delete(T),$.bucketKey=L.key,L.bucket.targets.set(T,$),L.bucket.io.observe(T),w(P)}}Ze(i,T=>{if(!T){for(const $ of Array.from(d.keys()))v($);k()}},{flush:"sync"});const I=(T,$)=>{const L=q(!1);let P,R=!1;const M=new Promise(A=>{P=()=>{R||(R=!0,A())}}),D=()=>{const A=d.get(T);if(!A)return f.delete(T),void w();const F=c.get(A.bucketKey);try{F?.io.unobserve(T)}catch{}F?.targets.delete(T),d.delete(T),f.delete(T),w(A.bucketKey)};if(!s||!i.value)return L.value=!0,P(),{isVisible:L,whenVisible:M,destroy:D};const z=b(T,$);if(!z)return L.value=!0,P(),{isVisible:L,whenVisible:M,destroy:D};const B={resolve:P,visible:L,bucketKey:z.key,opts:$};return d.set(T,B),z.bucket.targets.set(T,B),z.bucket.io.observe(T),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,S()})),$?.allowIdle!==!1&&(f.add(T),y()),{isVisible:L,whenVisible:M,destroy:D}};return I.refresh=S,Wn(Y9,I),I}function Xw(){var e,t;const n=yn(Y9,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),c(h.bucketKey),i.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=q(!1);let k,w=!1;const v=new Promise(S=>{k=()=>{w||(w=!0,S())}}),y=()=>{const S=o.get(p);if(!S)return i.delete(p),void(i.size||u());const I=s.get(S.bucketKey);try{I?.io.unobserve(p)}catch{}o.delete(p),I?.targets.delete(p),i.delete(p),c(S.bucketKey),i.size||u()},b=(S=>{var I,T;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const $=(D=>{var z,B;return[(z=D?.rootMargin)!=null?z:ju,(B=D?.threshold)!=null?B:0].join("\0")})(S),L=s.get($);if(L)return{key:$,bucket:L};const P=(I=S?.rootMargin)!=null?I:ju;let R;try{R=new IntersectionObserver(D=>{for(const z of D)(z.isIntersecting||z.intersectionRatio>0)&&d(z.target)},{root:null,rootMargin:P,threshold:(T=S?.threshold)!=null?T:0})}catch{return null}const M={io:R,targets:new Set};return s.set($,M),{key:$,bucket:M}})(h);return b?(o.set(p,{resolve:k,visible:m,bucketKey:b.key}),b.bucket.targets.add(p),b.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:v,destroy:y}):(m.value=!0,k(),{isVisible:m,whenVisible:v,destroy:y})}}function Hce(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const jce=["data-markstream-viewport-pending"],Uce=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],Vce={key:1,class:"image-placeholder"},qce={key:1,class:"image-node__raw-text"},Kce={key:2,class:"image-shimmer-overlay"},Gce={key:1,class:"image-node__raw-text"},Zce={key:3,class:"image-error"},_a=Vn(Ge({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,r=t,l=q(!1),a=q(!1),u=q(""),c=q("primary"),d=q(null),f=oh(),p=yn(Nb,null),h=Xw(),m=Yw(),k=Jw(),w=O(()=>y3(i.node.src)),v=O(()=>y3(i.fallbackSrc)),y=(s=(o=(n=Xo())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),b=typeof window<"u"&&y?.getAttribute("src")===(w.value||v.value),S=q(typeof window>"u"||b||!k.value),I=_o(null);let T="",$=null;const L=O(()=>u.value),P=O(()=>!i.lazy),R=O(()=>typeof window<"u"&&k.value&&!b),M=O(()=>!R.value||S.value),D=O(()=>M.value?L.value:""),z=O(()=>{var Ce,ze;return(ze=(Ce=m?.value.heavyBlockMargin)!=null?Ce:m?.value.rootMargin)!=null?ze:ju}),B=O(()=>!i.node.loading&&c.value!=="failed"&&u.value.length>0),A=O(()=>c.value==="failed"),F=O(()=>(!P.value||R.value&&!S.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),W=O(()=>Hce(i,f));function j(Ce=W.value){Ce&&d.value&&p?.reportHeight(Ce,d.value.offsetHeight)}function le(Ce=W.value){Ce&&bt(()=>{j(Ce)})}function J(){$&&(clearTimeout($),$=null)}function X(){const Ce=W.value;Ce&&T!==Ce&&(T&&p?.markSettled(T),J(),T=Ce,p?.markPending(Ce),typeof window<"u"&&($=window.setTimeout(()=>{T===Ce&&(le(Ce),G())},8e3)))}function G(){return po(this,null,function*(){const Ce=T;Ce&&(J(),T="",yield bt(),j(Ce),p?.markSettled(Ce))})}function Q(){if(c.value==="primary"&&v.value&&v.value!==u.value)return c.value="fallback",u.value=v.value,l.value=!1,a.value=!1,void le();c.value="failed",a.value=!0,r("error",u.value),le()}function ee(){l.value=!0,a.value=!1,r("load",L.value),le()}function K(Ce){Ce.preventDefault(),l.value&&!a.value&&r("click",[Ce,L.value])}const{t:ge}=Bce();return Ze([w,v,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||w.value?(u.value=w.value,void(c.value="primary")):v.value?(u.value=v.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ze([d,R],([Ce,ze],me,te)=>{var oe;if((oe=I.value)==null||oe.destroy(),I.value=null,!ze||S.value)return void(S.value=!0);if(!Ce)return void(S.value=!1);let H=!0;const Y=h(Ce,{rootMargin:z.value,allowIdle:!1});I.value=Y,S.value=Y.isVisible.value,Y.whenVisible.then(()=>{H&&I.value===Y&&(S.value=!0)}),te(()=>{H=!1,Y.destroy(),I.value===Y&&(I.value=null)})},{immediate:!0}),Ze([B,l,a,L,()=>i.lazy,M],([Ce,ze,me,te,oe,H])=>Ce&&te&&!me&&H?ze?(G(),void le()):oe?(X(),void le()):void(ze||me||X()):(G(),void le()),{flush:"post",immediate:!0}),uo(()=>{var Ce;(Ce=I.value)==null||Ce.destroy(),I.value=null,(function(){const ze=T;ze&&(J(),T="",p?.markSettled(ze))})()}),(Ce,ze)=>{var me,te,oe,H,Y;return g(),C("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":R.value&&!S.value?"true":void 0},[B.value?(g(),C("img",{key:0,src:D.value||void 0,alt:String((te=(me=i.node.alt)!=null?me:i.node.title)!=null?te:""),title:String((H=(oe=i.node.title)!=null?oe:i.node.alt)!=null?H:""),class:Be(["image-node__img",{"is-loading":!P.value&&!l.value,"is-loaded":P.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:P.value?"high":void 0,decoding:P.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Y=i.node.alt)!=null?Y:x(ge)("image.preview"),onError:Q,onLoad:ee,onClick:K},null,42,Uce)):ie("",!0),e.node.loading&&!a.value?(g(),C("span",Vce,[i.usePlaceholder?xn(Ce.$slots,"placeholder",{key:0,node:i.node,displaySrc:L.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[ze[0]||(ze[0]=_("span",{class:"image-shimmer"},null,-1))],!0):(g(),C("span",qce,N(e.node.raw),1))])):ie("",!0),F.value&&!e.node.loading?(g(),C("span",Kce,[i.usePlaceholder?xn(Ce.$slots,"placeholder",{key:0,node:i.node,displaySrc:L.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[ze[1]||(ze[1]=_("span",{class:"image-shimmer"},null,-1))],!0):(g(),C("span",Gce,N(e.node.raw),1))])):ie("",!0),A.value?(g(),C("span",Zce,[xn(Ce.$slots,"error",{node:i.node,displaySrc:L.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[ze[2]||(ze[2]=_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[_("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),_("span",null,N(x(ge)("image.loadError")),1)],!0)])):ie("",!0)],8,jce)}}}),[["__scopeId","data-v-046e82ac"]]);_a.install=e=>{e.component(_a.__name,_a)};const Yce={key:2},el=Ge({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=es(()=>t.customId),o=yn("markstreamHtmlPolicy",void 0),s=yn("markstreamNestedRendererProps",void 0),i=O(()=>{var h;return(h=o?.value)!=null?h:"safe"}),r=O(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return un(vt({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),l=nr({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1}),a=O(()=>t.components[String(t.node.type)]),u=O(()=>!!(a.value&&n.value[t.node.type]&&!ph(String(t.node.type)))),c=O(()=>u.value?Zw(t.node,i.value):void 0),d=O(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=O(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=O(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&u.value?(g(),he(as(a.value),jn({key:0},c.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:ve(()=>[d.value?(g(),he(x(l),jn({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),he(x(l),jn({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ie("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),he(as(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),C("span",Yce,N(p.value),1)):ie("",!0)}}),ZA=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Jce(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return un(vt(vt({},ZA),n),{enabled:(t=n.enabled)==null||t})}return vt({},ZA)}function Qw(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function Q9(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function YA(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function Xce(e){var t;return e.diff===!0||YA(e.language)||YA(Q9(String((t=e.raw)!=null?t:"")))}function Qce(e,t,n){const o=(function(s){const i=Q9(s);if(!i)return"";const r=i.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const u=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(u&&/[./\\-]/.test(u))return u}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const ede=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],tde={key:0,translate:"no",class:"markstream-pre__diff-code"},nde={class:"markstream-pre__diff-pane-content"},ode={class:"markstream-pre__diff-number","aria-hidden":"true"},sde={class:"markstream-pre__diff-content"},ide={class:"markstream-pre__diff-content-inner"},rde={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},lde=["textContent"],ade=["textContent"],gi=Ge({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(ee,K){const ge=String(ee??"");return K?ge:ge.replace(/\r\n$|\n$|\r$/,"")}const o=O(()=>{var ee,K,ge;const Ce=String((K=(ee=t.node)==null?void 0:ee.language)!=null?K:"");return String((ge=String(Ce).split(/\s+/g)[0])!=null?ge:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=O(()=>`language-${o.value}`),i=O(()=>{var ee;return t.loading===!0||((ee=t.node)==null?void 0:ee.loading)===!0}),r=O(()=>{var ee;return n((ee=t.node)==null?void 0:ee.code,i.value)});let l="",a=1;const u=O(()=>(function(ee){let K=0,ge=1;ee.startsWith(l)&&(K=l.length,ge=a,K>0&&ee[K-1]==="\r"&&ee[K]===` -`&&K++);for(let Ce=K;Cer.value.split(/\r\n|\n|\r/));let d=0,f="";const p=O(()=>{const ee=u.value;ee{var ee;return t.showLineNumbers===!0&&((ee=t.node)==null?void 0:ee.diff)===!0}),m=O(()=>h.value&&t.diffInline===!0),k=O(()=>{const ee=Number(t.reservedHeightPx);if(!Number.isFinite(ee)||ee<=0)return;const K=`${Math.ceil(ee)}px`;return i.value?{maxHeight:K,overflow:"auto"}:{height:K,minHeight:K,maxHeight:K,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function v(ee){return String(ee??"").trim().length===0}function y(ee,K="context",ge={}){const Ce=v(ee);return{code:ee,kind:Ce&&K!=="hunk"&&K!=="spacer"&&!ge.preserveBlankKind?"context":K,empty:Ce}}function b(ee){const K=n(ee,i.value);return K?K.split(/\r\n|\n|\r/):[]}function S(ee,K){return!v(ee[K])||Kw.some(ge=>K.startsWith(ge)))}function L(ee,K){return K||!ee.startsWith(" ")||ee.startsWith(" ")?ee:` ${ee}`}function P(ee,K){const ge=ee.length,Ce=K.length,ze=[];let me=0;for(;me=me&&H>=me&&ee[oe]===K[H];)te.unshift({originalIndex:oe,modifiedIndex:H}),oe--,H--;const Y=oe-me+1,ke=H-me+1;if(Y<=0||ke<=0||i.value||(Y+1)*(ke+1)>15e5)return ze.concat(te);const Se=ke+1,ye=new Uint32Array((Y+1)*(ke+1));for(let fe=Y-1;fe>=0;fe--)for(let ue=ke-1;ue>=0;ue--){const we=fe*Se+ue;if(ee[me+fe]===K[me+ue])ye[we]=ye[(fe+1)*Se+ue+1]+1;else{const se=ye[(fe+1)*Se+ue],_e=ye[fe*Se+ue+1];ye[we]=se>=_e?se:_e}}const ne=[];let ce=0,xe=0;for(;ce=ye[ce*Se+xe+1]?ce++:xe++;return ze.concat(ne,te)}function R(ee){var K;const ge=(function(){var H,Y;const ke=t.diffHideUnchangedRegions;if(ke==null||ke===!1)return null;const Se=ke===!0?{}:ke;return Se.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((H=Se.contextLineCount)!=null?H:2)),minimumLineCount:Math.max(1,Math.floor((Y=Se.minimumLineCount)!=null?Y:4))}})();if(!ge||ee.length<1||ee.length>2||ee.length===2&&ee[0].lines.length!==ee[1].lines.length)return ee;const Ce=ee[0].lines,ze=(K=ee[1])==null?void 0:K.lines,me=H=>Ce[H].kind==="context"&&(ze===void 0||ze[H].kind==="context"&&Ce[H].code===ze[H].code),te=[];let oe=0;for(;oe=ge.minimumLineCount){const ke=H+(H===0?0:ge.contextLineCount),Se=Y-(Y===Ce.length?0:ge.contextLineCount);Se-ke>=ge.minimumLineCount&&te.push({start:ke,end:Se})}oe===H&&oe++}return te.length?ee.map((H,Y)=>{const ke=[];let Se=0;for(const ye of te)ke.push(...H.lines.slice(Se,ye.start)),ke.push({code:Y===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${H.key}-collapsed-${ye.start}-${ye.end}`,number:""}),Se=ye.end;return ke.push(...H.lines.slice(Se)),un(vt({},H),{lines:ke})}):ee}const M=O(()=>{var ee,K,ge,Ce;if(!h.value)return[];const ze=(function(Y){const ke=Y.some(ye=>I(ye)),Se=Y.some(ye=>T(ye));return ke&&Se||(function(){var ye,ne,ce,xe;if(o.value==="diff")return!0;const fe=(xe=(ce=String((ne=(ye=t.node)==null?void 0:ye.raw)!=null?ne:"").split(/\r?\n/,1)[0])==null?void 0:ce.trim())!=null?xe:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(fe)})()&&(ke||Se)})(c.value),me=(function(){var Y,ke;return((Y=t.node)==null?void 0:Y.originalCode)!=null||((ke=t.node)==null?void 0:ke.updatedCode)!=null})();if(m.value){const Y=me?(function(ke,Se){const ye=b(ke),ne=b(Se),ce=P(ye,ne);if(ce.length>0){const _e=[];let Re=0,lt=0;for(const ct of ce){for(;Re=fe&&we>=fe&&ye[ue]===ne[we];)se.unshift(un(vt({},y(ne[we])),{key:`inline-suffix-${we}`,number:we+1})),ue--,we--;for(let _e=fe;_e<=ue;_e++)xe.push(un(vt({},y(ye[_e],"removed",{preserveBlankKind:S(ye,_e)})),{key:`inline-removed-source-${_e}`,number:_e+1}));for(let _e=fe;_e<=we;_e++)xe.push(un(vt({},y(ne[_e],"added",{preserveBlankKind:S(ne,_e)})),{key:`inline-added-source-${_e}`,number:_e+1}));return xe.concat(se)})((ee=t.node)==null?void 0:ee.originalCode,(K=t.node)==null?void 0:K.updatedCode):(function(ke){const Se=[];let ye=1,ne=1;const ce=$(ke);for(const[xe,fe]of ke.entries())if(fe.startsWith("@@")){const ue=fe.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);ue&&(ye=Number(ue[1]),ne=Number(ue[2])),Se.push(un(vt({},y(fe,"hunk")),{key:`inline-hunk-${xe}`,number:""}))}else if(I(fe))Se.push(un(vt({},y(L(fe.slice(1),ce),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${xe}`,number:ye++}));else if(T(fe))Se.push(un(vt({},y(L(fe.slice(1),ce),"added",{preserveBlankKind:!0})),{key:`inline-added-${xe}`,number:ne++}));else{const ue=ce&&fe.startsWith(" ")?fe.slice(1):fe;Se.push(un(vt({},y(ue)),{key:`inline-context-${xe}`,number:ne})),ye++,ne++}return Se})(c.value);return R([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Y}])}if(!ze&&me)return(function(Y,ke){const Se=b(Y),ye=b(ke),ne=P(Se,ye),ce=[],xe=[];let fe=0,ue=0,we=0;const se=(_e,Re)=>{const lt=Math.max(_e-fe,Re-ue);for(let ct=0;ctun(vt({},Y),{key:`original-${ke}`,number:ke+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:oe.map((Y,ke)=>un(vt({},Y),{key:`modified-${ke}`,number:ke+1}))}])}),D=O(()=>M.value.some(ee=>ee.lines.some(K=>K.kind==="collapsed"))),z=O(()=>{const ee=o.value;return ee?`Code block: ${ee}`:"Code block"}),B=q(null),A=q([]);let F=null,W=!1,j=null;function le(ee){const K=Number.parseFloat(String(ee??""));return Number.isFinite(K)&&K>0?K:0}function J(ee,K){var ge;if(!ee)return K;if(ee.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const Ce=ee.querySelector(".markstream-pre__diff-content"),ze=Ce?.getBoundingClientRect(),me=(ge=ze?.height)!=null?ge:0;return Math.max(K,Math.ceil(me))}function X(){W||typeof window>"u"||(F!=null&&window.cancelAnimationFrame(F),F=window.requestAnimationFrame(()=>{F=null,W||(function(){var ee,K;F=null;const ge=B.value;if(!ge||!h.value||m.value||!ge.classList.contains("is-wrap"))return void(A.value.length&&(A.value=[]));const Ce=(function(ke){const Se=window.getComputedStyle(ke),ye=le(Se.getPropertyValue("--markstream-pre-diff-line-height"));if(ye>0)return ye;const ne=le(Se.lineHeight);return ne>0?ne:18})(ge),ze=Array.from(ge.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),me=Array.from(ge.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),te=Math.max(ze.length,me.length),oe=[];for(let ke=0;ke{const ye=Y[Se];return ye&&Math.abs(ke.rowHeight-ye.rowHeight)<=.5&&Math.abs(ke.originalHeight-ye.originalHeight)<=.5&&Math.abs(ke.modifiedHeight-ye.modifiedHeight)<=.5})||(A.value=oe)})()}))}function G(ee){j?.disconnect(),j=null,ee&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(j=new ResizeObserver(()=>{X()}),j.observe(ee))}function Q(ee,K){const ge=A.value[ee];if(!ge)return;const Ce=K==="original"?ge.originalHeight:ge.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(ge.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(Ce)}px`}}return Ze(B,ee=>{G(ee),bt(()=>X())},{flush:"post"}),Ze([h,m,M],()=>{G(B.value),bt(()=>X())},{flush:"post",immediate:!0}),uo(()=>{W=!0,F!=null&&(window.cancelAnimationFrame(F),F=null),j?.disconnect(),j=null}),(ee,K)=>(g(),C("pre",{ref_key:"preRef",ref:B,style:Ut(k.value),class:Be([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":D.value}]),"aria-busy":i.value,"aria-label":z.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),C("code",tde,[(g(!0),C(Ie,null,ot(M.value,ge=>(g(),C("span",{key:ge.key,class:Be(["markstream-pre__diff-pane",ge.className])},[_("span",nde,[(g(!0),C(Ie,null,ot(ge.lines,(Ce,ze)=>(g(),C("span",{key:Ce.key,class:Be(["markstream-pre__diff-line",[`markstream-pre__diff-line--${Ce.kind}`,{"markstream-pre__diff-line--empty":Ce.empty}]]),style:Ut(Q(ze,ge.key))},[K[0]||(K[0]=_("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),_("span",ode,N(Ce.number),1),_("span",sde,[_("span",ide,N(Ce.code),1)])],6))),128))])],2))),128))])):(g(),C(Ie,{key:1},[t.showLineNumbers?(g(),C("span",rde,[_("span",{class:"markstream-pre__line-numbers-text",textContent:N(p.value)},null,8,lde)])):ie("",!0),_("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,ade)],64))],14,ede))}});gi.install=e=>{e.component(gi.__name,gi)};const ude={key:0},Fo=Vn(Ge({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=oh(),o=yn("markstreamFade",void 0),s=yn("markstreamTextStreamState",void 0),i=yn("markstreamStreamVersion",void 0),r=O(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=O(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=O(()=>{var k;const w=(k=n["index-key"])!=null?k:n.indexKey;return w==null||w===""?"":String(w)}),u=q(t.node.content),c=q(""),d=q(0);let f;function p(){f?.(),f=void 0}function h(){p(),c.value&&(u.value=u.value+c.value,c.value="")}Ze([()=>t.node.content,a,l],([k])=>{const w=String(k??""),v=a.value,y=F9({nextContent:w,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=y.settledContent,c.value=y.streamedDelta,y.appended?(d.value+=1,(function(){if(!c.value||f||!i)return;const b=i.value;f=Ze(()=>i.value,S=>{S!==b&&h()},{flush:"sync"})})()):c.value||p(),v&&s?.set(v,w)},{immediate:!0}),Ld(p);const m=O(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,w)=>(g(),C("span",{class:Be([[e.node.center?"text-node-center":""],"text-node"])},[u.value?(g(),C("span",ude,N(u.value),1)):ie("",!0),c.value?(g(),C("span",{key:1,class:Be(["text-node-stream-delta",[m.value]]),onAnimationend:h},N(c.value),35)):ie("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Vf(e,t,n){return Ge({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=Xw(),u=Yw(),c=Jw(),d=typeof window<"u"&&((l=(r=Xo())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=q(typeof window>"u"||d||!c.value),p=_o(null);let h=null;function m(k){const w=k&&"$el"in k?k.$el:k;p.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Ze([p,c],([k,w],v,y)=>{if(h?.destroy(),h=null,!w||f.value)return void(f.value=!0);if(!k)return;let b=!0;const S=a(k,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});h=S,f.value=S.isVisible.value,S.whenVisible.then(()=>{b&&h===S&&(f.value=!0)}),y(()=>{b=!1,S.destroy(),h===S&&(h=null)})},{immediate:!0}),uo(()=>{h?.destroy(),h=null}),()=>an(f.value?t:n,un(vt({},s),{ref:m}),i)}})}Fo.install=e=>{e.component(Fo.__name,Fo)};const v1=Ge({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,r,l,a,u;const c=_0(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=TA[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):TA[""]),f=Xce(n.node),p=Qce(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),h=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:Qw(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,w=k==="dark"||k!=="light"&&n.isDark===!0,v=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,y=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:v===12?18:Math.max(12,Math.round(1.5*v)),b=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,S=f?0:8,I=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:S,T=typeof((u=h?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:S,$=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",L=vt(vt({fontSize:`${v}px`,lineHeight:`${y}px`,tabSize:b,paddingTop:`${I}px`,paddingBottom:`${T}px`,"--markstream-pre-line-number-top":`${I}px`},f?{"--markstream-pre-diff-line-height":`${y}px`}:{}),$?{"--markstream-code-font-family":$}:{}),P=()=>an("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[an("svg",{class:"action-icon"})]),R=n.isShowPreview!==!1&&(c==="html"||c==="svg"),M=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||R&&n.showPreviewButton!==!1,D=B=>{if(B!=null)return typeof B=="number"?`${B}px`:String(B)},z=vt(vt(vt({"--markstream-code-layout-character-width":"1ch"},D(n.minWidth)?{minWidth:D(n.minWidth)}:{}),D(n.maxWidth)?{maxWidth:D(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return an("div",un(vt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":w,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[z,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:an("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[an("div",{class:"code-header-main"},[an("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),an("div",{class:"code-header-copy"},[an("div",{class:"code-header-title"},p.title),p.caption?an("div",{class:"code-header-caption"},p.caption):null])]),an("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?an("div",{class:"code-diff-stats","aria-hidden":"true"},[an("span",{class:"code-diff-stat removed"},"-0"),an("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:P(),n.showCollapseButton===!1?null:P(),M?an("div",{class:"relative"},[P()]):null])]),an("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[an(gi,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?Jce(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:L,"data-markstream-code-loading":"1"})]),an("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[an("div",{class:"loading-skeleton"},[an("div",{class:"skeleton-line"}),an("div",{class:"skeleton-line"}),an("div",{class:"skeleton-line short"})])]),an("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),jy=Vf("ViewportDeferredCodeBlockNode",nr({loader:()=>po(null,null,function*(){try{return(yield Is(()=>import("./CodeBlockNode-D0mkXbsY.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),gi}}),loadingComponent:v1,delay:0,suspensible:!1}),v1),Ir=nr(()=>po(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return an(Fo,un(vt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield B9(),(yield Is(()=>import("./index7-BG8k65SW.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return an(Fo,un(vt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),e$=nr(()=>po(null,null,function*(){try{return yield B9(),(yield Is(()=>import("./index6-BCRHBZmN.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return an(Fo,un(vt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),ei=Vn(Ge({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),C("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},N(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);ei.install=e=>{e.component(ei.__name,ei)};const cde={class:"superscript-node"},_i=Vn(Ge({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,strong:ti,emphasis:si,footnote_reference:Ri,strikethrough:ni,highlight:Di,insert:Ci,subscript:Si,emoji:xi,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("sup",cde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"superscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);_i.install=e=>{e.component(_i.__name,_i)};const dde={class:"subscript-node"},Si=Vn(Ge({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,strong:ti,emphasis:si,footnote_reference:Ri,strikethrough:ni,highlight:Di,insert:Ci,superscript:_i,emoji:xi,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("sub",dde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"subscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Si.install=e=>{e.component(Si.__name,Si)};const fde={class:"strong-node"},ti=Vn(Ge({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,emphasis:si,strikethrough:ni,highlight:Di,insert:Ci,subscript:Si,superscript:_i,emoji:xi,footnote_reference:Ri,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("strong",fde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"strong"}-${l}`,components:o.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);ti.install=e=>{e.component(ti.__name,ti)};const pde={class:"strikethrough-node"},ni=Vn(Ge({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,strong:ti,emphasis:si,highlight:Di,insert:Ci,subscript:Si,superscript:_i,emoji:xi,footnote_reference:Ri,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("del",pde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"strikethrough"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);ni.install=e=>{e.component(ni.__name,ni)};const hde=["href","title","aria-label","aria-hidden","target","rel"],mde=["aria-hidden"],gde={class:"link-text-wrapper relative inline-flex"},vde={class:"leading-[normal] link-text"},oi=Vn(Ge({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=yn("markstreamShowTooltips",void 0),o=O(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=O(()=>{var w,v,y,b,S;const I=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",T=(w=t.animationOpacity)!=null?w:.35,$=Math.max(.12,Math.min(.5*T,T)),L={"--underline-height":`${(v=t.underlineHeight)!=null?v:2}px`,"--underline-bottom":I,"--underline-opacity":String(T),"--underline-rest-opacity":String($),"--underline-duration":`${(y=t.animationDuration)!=null?y:1.6}s`,"--underline-timing":(b=t.animationTiming)!=null?b:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(S=t.animationIteration)!=null?S:"infinite"};return t.color&&(L["--link-color"]=t.color),L}),i=es(()=>t.customId),r=O(()=>vt({text:Fo,strong:ti,strikethrough:ni,emphasis:si,image:_a,html_inline:Pi,inline_code:Hs},i.value)),l=oh(),a=O(()=>{var w,v;const y=(w=t.node)==null?void 0:w.attrs;if(!y||typeof y!="object")return{};const b={};if(Array.isArray(y))for(const S of y)Array.isArray(S)&&S[0]&&(b[String(S[0])]=String((v=S[1])!=null?v:""));else for(const[S,I]of Object.entries(y))S&&I!=null&&I!==!1&&(b[S]=I===!0?"":String(I));return HA(b,"safe","a")}),u=O(()=>vt(vt({},l),a.value)),c=O(()=>{var w,v;return HA({href:String((v=(w=t.node)==null?void 0:w.href)!=null?v:"")},"safe","a").href}),d=O(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(fse(c.value)?"_blank":void 0)}),f=O(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),p=O(()=>{if(!c.value)return;const w=u.value.rel,v=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),y=new Set(Array.from(v).filter(b=>b.toLowerCase()!=="opener"));return f.value&&(y.add("noopener"),y.add("noreferrer")),y.size>0?Array.from(y).join(" "):void 0}),h=O(()=>{const w=vt({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function m(){o.value&&Rce()}const k=O(()=>{var w,v;const y=(w=t.node)==null?void 0:w.title;return typeof y=="string"&&y.trim().length>0?y:String((v=c.value)!=null?v:"")});return(w,v)=>{var y,b;return e.node.loading?(g(),C("span",jn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},x(l),{style:s.value}),[_("span",gde,[_("span",vde,[Z(x(Fo),{class:"leading-[normal] link-text",node:{type:"text",content:String((y=e.node.text)!=null?y:""),raw:String((b=e.node.text)!=null?b:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),v[1]||(v[1]=_("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,mde)):(g(),C("a",jn({key:0,class:"link-node",href:c.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:v[0]||(v[0]=S=>(function(I){var T,$,L,P;if(!o.value)return;const R=I,M=R?.clientX!=null&&R?.clientY!=null?{x:R.clientX,y:R.clientY}:void 0,D=((T=t.node)==null?void 0:T.title)||(($=c.value)!=null&&$.includes("xn--")&&((P=(L=t.node)==null?void 0:L.text)!=null&&P.includes("://"))?t.node.text:c.value)||"";Oce(I.currentTarget,D,"top",!1,M)})(S)),onMouseleave:m}),[(g(!0),C(Ie,null,ot(e.node.children,(S,I)=>(g(),he(x(el),{key:`${e.indexKey||"emphasis"}-${I}`,components:r.value,node:S,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${I}`},null,8,["components","node","custom-id","index-key"]))),128))],16,hde))}}}),[["__scopeId","data-v-367e6ca4"]]);oi.install=e=>{e.component(oi.__name,oi)};const yde={class:"insert-node"},Ci=Vn(Ge({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,strong:ti,emphasis:si,strikethrough:ni,highlight:Di,subscript:Si,superscript:_i,emoji:xi,footnote_reference:Ri,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("ins",yde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"insert"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Ci.install=e=>{e.component(Ci.__name,Ci)};const kde={class:"highlight-node"},Di=Vn(Ge({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,strong:ti,emphasis:si,strikethrough:ni,insert:Ci,subscript:Si,superscript:_i,emoji:xi,footnote_reference:Ri,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("mark",kde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"highlight"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);Di.install=e=>{e.component(Di.__name,Di)};const bde={class:"emphasis-node"},si=Vn(Ge({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=O(()=>vt({text:Fo,inline_code:Hs,link:oi,html_inline:Pi,strong:ti,strikethrough:ni,highlight:Di,insert:Ci,subscript:Si,superscript:_i,emoji:xi,footnote_reference:Ri,math_inline:Ir,reference:ei},n.value));return(s,i)=>(g(),C("em",bde,[(g(!0),C(Ie,null,ot(e.node.children,(r,l)=>(g(),he(x(el),{key:`${e.indexKey||"emphasis"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);si.install=e=>{e.component(si.__name,si)};const wde={class:"hard-break"},Sa=Vn(Ge({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("br",wde))}),[["__scopeId","data-v-50c58f70"]]);Sa.install=e=>{e.component(Sa.__name,Sa)};const qp=Ge({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=At({checkbox:Oi,checkbox_input:Oi,emoji:xi,emphasis:si,hardbreak:Sa,highlight:Di,inline_code:Hs,insert:Ci,link:oi,reference:ei,strikethrough:ni,strong:ti,subscript:Si,superscript:_i,text:Fo}),o=es(()=>t.customId),s=O(()=>{const i=o.value;return Object.keys(i).length>0?vt(vt({},n),i):n});return(i,r)=>(g(!0),C(Ie,null,ot(e.nodes,(l,a)=>(g(),he(x(el),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function Hb(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(Hb)}function y1(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(Hb))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(Hb)?s:null}function Uu(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const xde=["cite"],_de={key:0,dir:"auto",class:"paragraph-node"},Sde=["custom-id"],cg=Vn(Ge({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=es(()=>t.customId),o=O(()=>!!n.value.paragraph),s=O(()=>!!n.value.text),i=O(()=>y1(t.node.children,!o.value)),r=O(()=>t.fade!==!1||s.value?null:Uu(i.value));return Wn("markstreamShowTooltips",O(()=>t.showTooltips)),Wn("markstreamFade",O(()=>t.fade)),(l,a)=>(g(),C("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),C("p",_de,[r.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,Sde)):(g(),he(x(qp),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),he(x(Ai),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=u=>l.$emit("copy",u))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,xde))}}),[["__scopeId","data-v-abfecebc"]]);cg.install=e=>{e.component(cg.__name,cg)};const Cde={class:"definition-list"},Ade={class:"definition-term"},Mde={class:"definition-desc"},dg=Vn(Ge({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),C("dl",Cde,[(g(!0),C(Ie,null,ot(t.node.items,(s,i)=>(g(),C(Ie,{key:i},[_("dt",Ade,[Z(x(Ai),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),_("dd",Mde,[Z(x(Ai),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);dg.install=e=>{e.component(dg.__name,dg)};const Ede=["href","title"],mp=Vn(Ge({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(i);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),C("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Ede))}}),[["__scopeId","data-v-e1eb37b6"]]);mp.install=e=>{e.component(mp.__name,mp)};const Tde=["id"],Ide={class:"flex-1"},fg=Ge({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),C("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[_("div",Ide,[Z(x(Ai),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Tde))}});fg.install=e=>{e.component(fg.__name,fg)};const $de=["custom-id"],jb=Vn(Ge({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=es(()=>t.customId),o=yn("markstreamFade",void 0),s=O(()=>o?.value!==!1||n.value.text?null:Uu(t.node.children)),i=O(()=>vt({text:Fo,inline_code:Hs,link:oi,image:_a,strong:ti,emphasis:si,strikethrough:ni,highlight:Di,insert:Ci,subscript:Si,superscript:_i,emoji:xi,checkbox:Oi,checkbox_input:Oi,footnote_reference:Ri,hardbreak:Sa,math_inline:Ir,reference:ei},n.value));return(r,l)=>(g(),he(as(`h${e.node.level}`),jn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ve(()=>[s.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,$de)):(g(!0),C(Ie,{key:1},ot(e.node.children,(a,u)=>(g(),he(x(el),{key:u,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${u}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),A0=jb;A0.install=e=>{e.component(jb.__name,jb)};const Nde={key:0,dir:"auto",class:"paragraph-node"},Lde=["custom-id"],Fde={dir:"auto",class:"paragraph-node"},Ode=["custom-id"],pd=Vn(Ge({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=O(()=>{var p;return(p=t.node)!=null?p:t.item}),o=es(()=>t.customId),s=O(()=>!!o.value.paragraph),i=O(()=>!!o.value.text),r=O(()=>{var p;return y1((p=n.value)==null?void 0:p.children,!s.value)}),l=O(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(v=>v?.type==="list"))return null;const w=y1([m]);return w?{paragraphChildren:w,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const u=O(()=>a()?Uu(r.value):null),c=O(()=>{var p;return a()?Uu((p=l.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=O(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return Wn("markstreamShowTooltips",O(()=>t.showTooltips)),Wn("markstreamFade",O(()=>t.fade)),(p,h)=>{var m,k;return g(),C("li",jn({class:"list-item",dir:"auto"},f.value),[r.value?(g(),C("p",Nde,[u.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,Lde)):(g(),he(x(qp),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(g(),C(Ie,{key:1},[_("p",Fde,[c.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,Ode)):(g(),he(x(qp),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),C(Ie,null,ot(l.value.nestedLists,(w,v)=>(g(),he(x(Ai),{key:v,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${v}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=y=>p.$emit("copy",y))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),he(x(Ai),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=w=>p.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pd.install=e=>{e.component(pd.__name,pd)};const hd=Vn(Ge({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=es(()=>e.customId),n=O(()=>t.value.list_item||pd);return(o,s)=>(g(),he(as(e.node.ordered?"ol":"ul"),{class:Be(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ve(()=>[(g(!0),C(Ie,null,ot(e.node.items,(i,r)=>{var l;return g(),he(as(n.value),jn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hd.install=e=>{e.component(hd.__name,hd)};const Rde={key:2,class:"html-block-node__raw"},Pde=["innerHTML"],Dde={key:1,class:"html-block-node__placeholder"},gp=Vn(Ge({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=yn("markstreamHtmlPolicy",void 0),o=yn("markstreamNestedRendererProps",void 0),s=O(()=>{var M,D;return(D=(M=t.htmlPolicy)!=null?M:n?.value)!=null?D:"safe"}),i=O(()=>{var M,D;const z=(M=o?.value)!=null?M:{};return un(vt({},z),{customId:(D=t.customId)!=null?D:z.customId,htmlPolicy:s.value})}),r=nr({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1}),l=O(()=>{const M=rg(t.node.attrs,s.value);if(!M)return;const D=dp(M);return Object.keys(D).length>0?D:void 0}),a=O(()=>{const M=String(t.node.tag||"").trim(),D=rg(t.node.attrs,s.value,M);if(!D)return;const z=dp(D);return Object.keys(z).length>0?z:void 0}),u=es(()=>t.customId),c=Ge({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=q(null),f=q(typeof window>"u"),p=q(t.node.content),h=O(()=>Array.isArray(t.node.children)?t.node.children:[]),m=O(()=>String(t.node.tag||"div")),k=O(()=>{var M;if(m.value.trim().toLowerCase()!=="details"||(M=t.node.attrs)!=null&&M.some(([z])=>String(z).toLowerCase()==="open"))return null;const D=h.value[0];return D?.type==="html_block"&&String(D.tag||"").toLowerCase()==="summary"?D:null}),w=O(()=>{var M;return Uu((M=k.value)==null?void 0:M.children)}),v=O(()=>{const M=k.value;if(!M)return;const D=rg(M.attrs,s.value,"summary");if(!D)return;const z=dp(D);return Object.keys(z).length>0?z:void 0}),y=O(()=>w.value==null?h.value:h.value.slice(1)),b=O(()=>{const M=m.value.trim().toLowerCase();return xI.has(M)||Uw(M,s.value)}),S=O(()=>h.value.length>0&&!!t.node.tag&&!b.value),I=O(()=>{var M,D,z;if(S.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(M=p.value)!=null?M:""};const B=(D=p.value)!=null?D:t.node.content;if(!B)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fd(B,s.value)};if(t.node.loading){const F=g1(B,u.value,s.value);return F===null?{mode:"text",content:(z=t.node.raw)!=null?z:B}:{mode:"dynamic",nodes:F}}if(!K9(B,u.value))return{mode:"html",content:fd(B,s.value)};const A=g1(B,u.value,s.value);return A===null?{mode:"html",content:fd(B,s.value)}:{mode:"dynamic",nodes:A}}),T=Xw(),$=Yw(),L=Jw(),P=_o(null),R=!!t.node.loading;return typeof window<"u"?(Ze([()=>d.value,()=>$?.value.heavyBlockMargin,()=>$?.value.rootMargin],([M],D,z)=>{var B,A,F,W;if((A=(B=P.value)==null?void 0:B.destroy)==null||A.call(B),P.value=null,!R)return f.value=!0,void(p.value=t.node.content);if(!M)return void(f.value=!1);let j=!0;const le=(W=(F=$?.value.heavyBlockMargin)!=null?F:$?.value.rootMargin)!=null?W:ju,J=T(M,{rootMargin:le,allowIdle:!L.value});P.value=J,f.value=f.value||J.isVisible.value,J.whenVisible.then(()=>{j&&P.value===J&&(f.value=!0)}),z(()=>{j=!1,J.destroy(),P.value===J&&(P.value=null)})},{immediate:!0}),Ze(()=>t.node.content,M=>{R&&!f.value||(p.value=M)})):f.value=!0,uo(()=>{var M,D;(D=(M=P.value)==null?void 0:M.destroy)==null||D.call(M),P.value=null}),(M,D)=>(g(),he(as(S.value?m.value:"div"),jn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":x(L)&&!f.value?"true":void 0},S.value?a.value:void 0),{default:ve(()=>[f.value?(g(),C(Ie,{key:0},[I.value.mode==="structured"?(g(),C(Ie,{key:0},[w.value!==null?(g(),C(Ie,{key:0},[_("summary",rF(zE(v.value)),N(w.value),17),y.value.length?(g(),he(x(r),jn({key:0},i.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):ie("",!0)],64)):(g(),he(x(r),jn({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):I.value.mode==="dynamic"?(g(),he(x(c),{key:1,nodes:I.value.nodes},null,8,["nodes"])):I.value.mode==="text"?(g(),C("pre",Rde,N(I.value.content),1)):(g(),C("div",jn({key:3},l.value,{innerHTML:I.value.content}),null,16,Pde))],64)):(g(),C("div",Dde,[xn(M.$slots,"placeholder",{node:e.node},()=>[D[0]||(D[0]=_("span",{class:"html-block-node__placeholder-bar"},null,-1)),D[1]||(D[1]=_("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),D[2]||(D[2]=_("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);gp.install=e=>{e.component(gp.__name,gp)};const Bde={dir:"auto",class:"paragraph-node"},zde=["custom-id"],Du=Vn(Ge({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=es(()=>t.customId),o=yn("markstreamHtmlPolicy",void 0),s=yn("markstreamFade",void 0),i=yn("markstreamParseOptions",void 0),r=yn("markstreamCustomMarkdownIt",void 0),l=yn("markstreamNestedRendererProps",void 0),a=O(()=>{var $;return($=o?.value)!=null?$:"safe"}),u=O(()=>{var $;return($=t.parseOptions)!=null?$:i?.value}),c=O(()=>{var $;return($=t.customMarkdownIt)!=null?$:r?.value}),d=O(()=>{var $,L;return(L=t.customHtmlTags)!=null?L:($=l?.value)==null?void 0:$.customHtmlTags}),f=O(()=>{var $,L;const P=($=l?.value)!=null?$:{};return un(vt({},P),{customId:(L=t.customId)!=null?L:P.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),p=nr({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1});function h($){var L;return $.type==="text"&&String((L=$.content)!=null?L:"").trim()===""}const m=O(()=>t.node.children.filter($=>!h($))),k=O(()=>m.value.length>0&&m.value.every($=>$.type==="image"||(function(L){var P;const R=(function(M){return M.type==="link"&&Array.isArray(M.children)?M.children.filter(D=>!h(D)):[]})(L);return R.length===1&&((P=R[0])==null?void 0:P.type)==="image"})($))),w=O(()=>new Set(Xu(d.value))),v=O(()=>{if(!k.value||m.value.length<=1)return t.node.children;const $=[];for(let L=0;L0,M=t.node.children.slice(L+1).some(D=>!h(D));R&&M&&$.push(un(vt({},P),{content:" ",raw:" "}))}return $}),y=O(()=>s?.value===!1&&!n.value.text),b=O(()=>y.value?Uu(v.value):null);function S($,L){return{node:$,"index-key":`${t.indexKey}-${L}`,"custom-id":t.customId,"custom-html-tags":d.value}}const I=O(()=>vt({inline_code:Hs,image:_a,link:oi,hardbreak:Sa,emphasis:si,strong:ti,strikethrough:ni,highlight:Di,insert:Ci,subscript:Si,superscript:_i,html_inline:Pi,html_block:gp,emoji:xi,checkbox:Oi,math_inline:Ir,checkbox_input:Oi,reference:ei,footnote_anchor:mp,footnote_reference:Ri,text:Fo},n.value)),T=O(()=>v.value.map(($,L)=>{var P;const R=(function(M){var D,z,B,A;if(M.type==="html_block"||M.type==="html_inline"){const F=String((D=M.tag)!=null?D:"").trim().toLowerCase()||MI(M.content);if(F&&!w.value.has(F)&&EI((z=M.content)!=null?z:M.raw,F)){const W=String((A=(B=M.content)!=null?B:M.raw)!=null?A:"");return{child:{type:"text",content:W,raw:W},component:Fo,isCustomComponent:!1}}}return{child:M,component:I.value[M.type],isCustomComponent:!!(n.value[M.type]&&!ph(String(M.type)))}})($);return un(vt({},R),{index:L,key:`${t.indexKey||"paragraph"}-${L}`,customAttrs:R.isCustomComponent?Zw(R.child,a.value):void 0,hasSlotChildren:Array.isArray(R.child.children)&&R.child.children.length>0,slotContent:String((P=R.child.content)!=null?P:""),originalChild:$})}));return($,L)=>(g(),C("p",Bde,[b.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(b.value),9,zde)):(g(!0),C(Ie,{key:1},ot(T.value,P=>{return g(),C(Ie,{key:P.key},[k.value&&h(P.originalChild)?(g(),C(Ie,{key:0},[Ve(N((R=P.originalChild,String((M=R.content)!=null?M:""))),1)],64)):P.isCustomComponent?(g(),he(as(P.component),jn({key:1,ref_for:!0},P.customAttrs,{node:P.child,loading:P.child.loading,"index-key":P.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ve(()=>[P.hasSlotChildren?(g(),he(x(p),jn({key:0,ref_for:!0},f.value,{nodes:P.child.children,"index-key":P.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):P.slotContent?(g(),he(x(p),jn({key:1,ref_for:!0},f.value,{content:P.slotContent,final:!P.child.loading,"index-key":`${P.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ie("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),he(as(P.component),jn({key:2,ref_for:!0},S(P.child,P.index)),null,16))],64);var R,M}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Du.install=e=>{e.component(Du.__name,Du)};const Wde={class:"table-node-wrapper"},Hde=["aria-busy"],jde={key:0},Ude=["custom-id"],Vde=["aria-label","onPointerdown"],qde=["custom-id"],Kde={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},vp=Vn(Ge({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=O(()=>{var w;return(w=t.node.loading)!=null&&w}),o=O(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=q(null),i=q([]);let r=null;const l=O(()=>t.node.header.cells.length),a=O(()=>i.value.some(w=>Number.isFinite(w)&&w>0)),u=O(()=>a.value?i.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Wn("markstreamShowTooltips",O(()=>t.showTooltips)),Wn("markstreamFade",O(()=>t.fade));const c=es(()=>t.customId),d=O(()=>!!c.value.text),f=O(()=>!!c.value.paragraph),p=new WeakMap;function h(w){const v=t.fade===!1&&!d.value,y=!f.value,b=p.get(w);if(b?.children===w.children&&b.textFastPath===v&&b.paragraphFastPath===y)return b.info;const S=y1(w.children,y,!0),I={simpleChildren:S,plainText:S&&v?Uu(S):null};return p.set(w,{children:w.children,textFastPath:v,paragraphFastPath:y,info:I}),I}function m(w){if(!r)return;w.preventDefault();const v=r.startWidth+r.nextStartWidth,y=Math.min(48,Math.floor(v/2)),b=Math.max(y,Math.min(v-y,Math.round(r.startWidth+w.clientX-r.startX))),S=[...r.widths];S[r.index]=b,S[r.index+1]=v-b,i.value=S}function k(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),r=null)}return Ze(l,()=>{k(),i.value=[]}),uo(k),(w,v)=>(g(),C("div",Wde,[_("table",{ref_key:"tableRef",ref:s,class:Be(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),C("colgroup",jde,[(g(!0),C(Ie,null,ot(e.node.header.cells,(y,b)=>(g(),C("col",{key:b,style:Ut(u.value[b])},null,4))),128))])):ie("",!0),_("thead",null,[_("tr",null,[(g(!0),C(Ie,null,ot(e.node.header.cells,(y,b)=>(g(),C("th",{key:b,dir:"auto",class:Be([y.align==="right"?"text-right":y.align==="center"?"text-center":"text-left"])},[h(y).plainText!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(h(y).plainText),9,Ude)):h(y).simpleChildren?(g(),he(x(qp),{key:1,nodes:h(y).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${b}`},null,8,["nodes","custom-id","index-key"])):(g(),he(x(Ai),{key:2,nodes:y.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[0]||(v[0]=S=>w.$emit("copy",S))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),b(function(I,T){if(T.button!==0)return;const $=(function(){var R;const M=(R=s.value)==null?void 0:R.querySelectorAll("thead th");return Array.from(M??[],D=>Math.round(D.getBoundingClientRect().width))})(),L=$[I],P=$[I+1];L&&P&&(T.preventDefault(),r={index:I,startX:T.clientX,startWidth:L,nextStartWidth:P,widths:$},i.value=$,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(b,S)},null,40,Vde)):ie("",!0)],2))),128))])]),_("tbody",null,[(g(!0),C(Ie,null,ot(o.value,(y,b)=>(g(),C("tr",{key:b},[(g(!0),C(Ie,null,ot(y.cells,(S,I)=>(g(),C("td",{key:I,class:Be([S.align==="right"?"text-right":S.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(S).plainText!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(h(S).plainText),9,qde)):h(S).simpleChildren?(g(),he(x(qp),{key:1,nodes:h(S).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${b}-${I}`},null,8,["nodes","custom-id","index-key"])):(g(),he(x(Ai),{key:2,nodes:S.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[1]||(v[1]=T=>w.$emit("copy",T))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Hde),Z(Sr,{name:"table-node-fade"},{default:ve(()=>[n.value?(g(),C("div",Kde,[xn(w.$slots,"loading",{isLoading:n.value},()=>[v[2]||(v[2]=_("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),v[3]||(v[3]=_("span",{class:"sr-only"},"Loading",-1))],!0)])):ie("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);vp.install=e=>{e.component(vp.__name,vp)};const Gde={class:"hr-node"},pg=Vn({},[["render",function(e,t){return g(),C("hr",Gde)}],["__scopeId","data-v-39b2349c"]]);pg.install=e=>{e.component(pg.__name,pg)};const Zde={class:"unknown-node"},Ub=Ge({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),C("div",Zde,N(e.node.raw),1))}),hg=Vn(Ge({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=O(()=>`vmr-container vmr-container-${t.node.name}`),o=es(()=>t.customId),s=O(()=>vt({text:Fo,paragraph:Du,heading:A0,inline_code:Hs,link:oi,image:_a,strong:ti,emphasis:si,strikethrough:ni,insert:Ci,subscript:Si,superscript:_i,checkbox:Oi,checkbox_input:Oi,hardbreak:Sa,math_inline:Ir,reference:ei,list:hd,math_block:e$,table:vp},o.value));return(i,r)=>(g(),C("div",jn({class:n.value},e.node.attrs),[(g(!0),C(Ie,null,ot(e.node.children,(l,a)=>{return g(),he(as((u=l.type,s.value[u]||Ub)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var u}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);hg.install=e=>{e.component(hg.__name,hg)};const Yde=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],JA=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Jde(e){if(e<=255)return Yde[e];let t=0,n=JA.length-1;for(;t<=n;){const o=t+n>>1,s=JA[o];if(es[1]))return s[2];t=o+1}}return"L"}const Xde=/[ \t\n\r\f]+/g,Qde=/[\t\n\r\f]| {2,}|^ | $/;let Uy=null;const efe=new RegExp("\\p{Script=Arabic}","u"),Fa=new RegExp("\\p{M}","u"),ex=new RegExp("\\p{Nd}","u");function XA(e){return efe.test(e)}function QA(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Yr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(QA(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(QA(n))return!0}}return!1}const tfe=new Set([" "," ","⁠","\uFEFF"]),nfe=new Set(["-","‐","–","—"]);function t$(e,t){return!((function(n){const o=yp(n);return o!==null&&tfe.has(o)})(e)||t&&((function(n){const o=yp(n);return o!==null&&(tx.has(o)||Vu.has(o))})(e)||(function(n){const o=yp(n);return o!==null&&nfe.has(o)})(e)))}const tx=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),M0=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),nx=new Set(["'","’"]),Vu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),ofe=new Set([":",".","،","؛"]),sfe=new Set(["၏"]),ife=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function rfe(e){if(ox(e))return!0;let t=!1;for(const n of e)if(Vu.has(n)||b1(n))t=!0;else if(!t||!Fa.test(n))return!1;return t}function lfe(e){for(const t of e)if(!tx.has(t)&&!Vu.has(t))return!1;return e.length>0}function afe(e){if(ox(e))return!0;for(const t of e)if(!(M0.has(t)||nx.has(t)||Fa.test(t)||b1(t)))return!1;return e.length>0}function ox(e){let t=!1;for(const n of e)if(n!=="\\"&&!Fa.test(n)){if(!(M0.has(n)||Vu.has(n)||nx.has(n)))return!1;t=!0}return t}function k1(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function yp(e){if(e.length===0)return null;const t=k1(e,e.length);return e.slice(t)}const ufe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function b1(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,ufe)}function cfe(e){const t=(function(n){for(const o of n)if(!Fa.test(o))return o;return null})(e);return t!==null&&ex.test(t)}function dfe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Fa.test(o))n--;else{if(!M0.has(o)&&!nx.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function ffe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function eM(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function tM(e,t){return e&&t!==null&&ofe.has(t)}function pfe(e){const t=yp(e);return t!==null&&sfe.has(t)}function hfe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function Vb(e){let t=e.length;for(;t>0;){const n=k1(e,t),o=e.slice(n,t);if(ife.has(o))return!0;if(!Vu.has(o))return!1;t=n}return!1}function mfe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const gfe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function vr(e){return e.length===1?e[0]:e.join("")}function vfe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),vr(n)}function yfe(e,t,n,o){if(!gfe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=mfe(c,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:vr(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return i!==null&&s.push({text:vr(r),isWordLike:a,kind:i,start:l}),s}function Vy(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const kfe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function bfe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||kfe.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!Cfe.has(e)&&!Sfe.test(e)&&_fe.test(e)}function nM(e){let t=!1;for(const n of e)if(!Fa.test(n)){if(!n$(n))return!1;t=!0}return t}function Afe(e,t,n,o){const s=!t&&nM(e),i=!o&&nM(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=k1(c,d),p=c.slice(f,d);if(!Fa.test(p))return p;d=f}return null})(a);return u!==null&&b1(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=k1(a,u),d=a.slice(c,u);if(!Fa.test(d))return n$(d)||b1(d);u=c}return!1})(e);return!!(s||i||l)&&!Yr(e)&&!Yr(n)&&(t||s||r)&&(o||i)}function oM(e){for(const t of e)if(ex.test(t))return!0;return!1}function mg(e){if(e.length===0)return!1;for(const t of e)if(!ex.test(t)&&!xfe.has(t))return!1;return!0}function Mfe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,p;const h=(Uy===null&&(Uy=new Intl.Segmenter(void 0,{granularity:"word"})),Uy);let m=0;const k=[],w=[],v=[],y=[],b=[],S=[],I=[],T=[],$=[],L=[],P=[],R=[];for(const A of h.segment(a))for(const F of yfe(A.segment,(d=A.isWordLike)!=null&&d,A.index,c)){let W=function(){S[K]!==null&&(w[K]=[eM(k,S,I,K)],S[K]=null),w[K].push(F.text),v[K]=v[K]||F.isWordLike,T[K]=T[K]||J,$[K]=$[K]||X,L[K]=Q,P[K]=ee,R[K]=tM($[K],G)};const j=F.kind==="text",le=ffe(F.text,F.isWordLike,F.kind),J=Yr(F.text),X=XA(F.text),G=yp(F.text),Q=Vb(F.text),ee=pfe(F.text),K=m-1;u.carryCJKAfterClosingQuote&&j&&m>0&&y[K]==="text"&&J&&T[K]&&L[K]||j&&m>0&&y[K]==="text"&&lfe(F.text)&&T[K]||j&&m>0&&y[K]==="text"&&P[K]?W():j&&m>0&&y[K]==="text"&&F.isWordLike&&X&&R[K]?(W(),v[K]=!0):le!==null&&m>0&&y[K]==="text"&&S[K]===le?I[K]=((f=I[K])!=null?f:1)+1:j&&!F.isWordLike&&m>0&&y[K]==="text"&&!T[K]&&(rfe(F.text)||F.text==="-"&&v[K])?W():(k[m]=F.text,w[m]=[F.text],v[m]=F.isWordLike,y[m]=F.kind,b[m]=F.start,S[m]=le,I[m]=le===null?0:1,T[m]=J,$[m]=X,L[m]=Q,P[m]=ee,R[m]=tM(X,G),m++)}for(let A=0;Anull);let D=-1;for(let A=m-1;A>=0;A--){const F=k[A];if(F.length!==0){if(y[A]==="text"&&!v[A]&&D>=0&&y[D]==="text"&&(afe(F)||F==="-"&&cfe(k[D]))){const W=(p=M[D])!=null?p:[];W.push(F),M[D]=W,b[D]=b[A],k[A]="";continue}D=A}}for(let A=0;AJ+1){F.push(vr(ee)),W.push(ge),j.push("text"),le.push(A.starts[J]),J=K;continue}}F.push(X),W.push(Q),j.push(G),le.push(A.starts[J]),J++}return{len:F.length,texts:F,isWordLike:W,kinds:j,starts:le}})((function(A){const F=[],W=[],j=[],le=[];for(let J=0;J1;for(let ee=0;ee=A.len||Vy(A.kinds[G]))continue;const Q=[],ee=A.starts[G];let K=G;for(;K0&&(F.push(vr(Q)),W.push(!0),j.push("text"),le.push(ee),J=K-1)}return{len:F.length,texts:F,isWordLike:W,kinds:j,starts:le}})((function(A){const F=A.texts.slice(),W=A.isWordLike.slice(),j=A.kinds.slice(),le=A.starts.slice();for(let X=0;X=0&&!t$(u.texts[y-1],c)&&v(y),m<0&&(m=y),k=k||Yr(b))}return v(u.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,r,t.breakKeepAllAfterPunctuation):r;return vt({normalized:i,chunks:Mfe(l,s)},l)}let Ac=null;const sM=new Map;let Mc=null;const Tfe=new RegExp("\\p{Emoji_Presentation}","u"),Ife=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let qy=null;const iM=new Map;function qb(){if(Ac!==null)return Ac;if(typeof OffscreenCanvas<"u")return Ac=new OffscreenCanvas(1,1).getContext("2d"),Ac;if(typeof document<"u")return Ac=document.createElement("canvas").getContext("2d"),Ac;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function na(e,t){let n=t.get(e);return n===void 0&&(n={width:qb().measureText(e).width,containsCJK:Yr(e)},t.set(e,n)),n}function w1(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function o$(){return qy===null&&(qy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),qy}function $fe(e){return Tfe.test(e)||e.includes("️")}function cu(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let r=0;const l=o$();for(const a of l.segment(i))$fe(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function Nfe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function rM(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function lM(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function sx(e,t){return t===0?0:e+t}function Ofe(e,t,n,o,s){return sx(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function aM(e,t,n,o){return sx(o,t==="tab"?0:e.lineEndFitAdvances[n])}function uM(e,t,n,o,s){return sx(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function Rfe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Pfe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Sm(e,t,n){let o=t;for(;oW){if(Se!==null&&ne>H){K(oe,ne,ce),xe=ne,ye=Sm(Se,ye,xe+1),ne=-1,ce=0;continue}K(),Ce(oe,xe,fe)}else le+=fe,X=oe,G=xe+1;else Ce(oe,xe,fe);const ue=xe+1;Se!==null&&Se[ye]===ue&&(ne=ue,ce=le,ye++),xe++}J&&X===oe&&G===ke.length&&(X=oe+1,G=0)}let te=0;for(;te=z.length)));){const oe=z[te],H=rM(B[te]);if(J)if(le+oe>W){if(H){ze(te,oe),K(te+1,0,le-oe),te++;continue}if(Q>=0){if(X>Q||X===Q&&G>0){K();continue}K(Q,0,ee);continue}if(oe>W&&A[te]!==null){K(),me(te,0),te++;continue}K()}else ze(te,oe),H&&(Q=te+1,ee=le-oe),te++;else oe>W&&A[te]!==null?me(te,0):ge(te,oe),H&&(Q=te+1,ee=le-oe),te++}return J&&K(),j})(n,o);const{widths:s,kinds:i,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=w1(),d=o+c.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,w=-1,v=0,y=null;function b(){w=-1,v=0,y=null}function S(M=m,D=k,z){f++,p=0,h=!1,b()}function I(M,D){h=!0,m=M+1,k=0,p=D}function T(M,D,z){h=!0,m=M,k=D+1,p=z}function $(M,D){h?(p+=D,m=M+1,k=0):I(M,D)}function L(M,D,z,B,A,F){if(!D)return;const W=aM(n,M,z,A);uM(n,M,z,A,B),w=z+1,v=p-F+W,y=M}function P(M,D){var z;const B=r[M],A=(z=l[M])!=null?z:null;let F=A===null?-1:Sm(A,0,D+1),W=-1,j=D;for(;jd){if(A!==null&&W>D){S(M,W),j=W,F=Sm(A,F,j+1),W=-1;continue}S(),T(M,j,le)}else p=G,m=M,k=j+1}else T(M,j,le);const J=j+1;A!==null&&A[F]===J&&(W=J,F++),j++}h&&m===M&&k===B.length&&(m=M+1,k=0)}function R(M){f++,b()}for(let M=0;M=D.endSegmentIndex)));){const B=i[z],A=rM(B),F=Ffe(n,h,z),W=B==="tab"?Lfe(p+F,n.tabStopAdvance):s[z],j=F+W,le=Ofe(n,B,z,F,W);if(B!=="soft-hyphen")if(h){if(p+le>d){const J=p+aM(n,B,z,F);if(uM(n,B,z,F,W),y==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&v<=d){S(w,0);continue}if(A&&J<=d){$(z,j),S(z+1,0),z++;continue}if(w>=0&&v<=d){if(m>w||m===w&&k>0){S();continue}const X=w;S(X,0),z=X;continue}if(le>d&&r[z]!==null){S(),P(z,0),z++;continue}S();continue}$(z,j),L(B,A,z,W,F,j),z++}else le>d&&r[z]!==null?P(z,0):I(z,W),L(B,A,z,W,F,j),z++;else h&&(m=z+1,k=0,w=z+1,v=p+a,y=B),z++}h&&(D.consumedEndSegmentIndex,S(D.consumedEndSegmentIndex,0))}return f})(e,t)}let Ky=null;function ix(){return Ky===null&&(Ky=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Ky}function Bfe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,p){o=[d],s=f,i=p,r=Vb(d),l=M0.has(d)}function c(d,f){o.push(d),i=i||f;const p=Vb(d);r=d.length===1&&Vu.has(d)&&r||p,l=!1}for(const d of ix().segment(e)){const f=d.segment,p=Yr(f);o.length!==0?l||tx.has(f)||Vu.has(f)||t.carryCJKAfterClosingQuote&&p&&r?c(f,p):i||p?(a(),u(f,d.index,p)):c(f,p):u(f,d.index,p)}return a(),n}function zfe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(l){if(!(s<0)){if(i)s+1===l?o.push(t[s]):(function(a,u){const c=t[a].start,d=u=0&&!t$(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||Yr(a.text)}return r(t.length),o}function cM(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=ix();for(const s of o.segment(e))n++;return n}function Wfe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Hfe(e,t,n,o,s){const i=w1(),{cache:r,emojiCorrection:l}=(function(R,M){qb().font=R;const D=(function(A){let F=sM.get(A);return F||(F=new Map,sM.set(A,F)),F})(R),z=(function(A){const F=A.match(/(\d+(?:\.\d+)?)\s*px/);return F?parseFloat(F[1]):16})(R),B=M?(function(A,F){let W=iM.get(A);if(W!==void 0)return W;const j=qb();j.font=A;const le=j.measureText("😀").width;if(W=0,le>F+.5&&typeof document<"u"&&document.body!==null){const J=document.createElement("span");J.style.font=A,J.style.display="inline-block",J.style.visibility="hidden",J.style.position="absolute",J.textContent="😀",document.body.appendChild(J);const X=J.getBoundingClientRect().width;document.body.removeChild(J),le-X>.5&&(W=le-X)}return iM.set(A,W),W})(R,z):0;return{cache:D,fontSize:z,emojiCorrection:B}})(t,(a=e.normalized,Ife.test(a)));var a;const u=cu("-",na("-",r),l)+(s===0?0:2*s),c=8*cu(" ",na(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const w=null,v=[],y=[],b=[],S=null,I=Array.from({length:e.len});function T(R,M,D,z,B,A,F,W,j){B!=="text"&&B!=="space"&&B!=="zero-width-break"&&(k=!1),f.push(M),p.push(D),h.push(z),m.push(B),v.push(F),y.push(W),d&&b.push(j)}function $(R,M,D,z,B){const A=na(R,r),F=d?cM(R,M):0,W=(function(X,G,Q){return G>1?X+(G-1)*Q:X})(cu(R,A,l),F,s),j=M==="space"||M==="preserved-space"||M==="zero-width-break"?0:W,le=j===0?0:j+(F>0?s:0),J=M==="space"||M==="zero-width-break"?0:W;if(B&&z&&R.length>1){let X="sum-graphemes";s!==0?X="segment-prefixes":mg(R)?X="pair-context":i.preferPrefixWidthsForBreakableRuns&&(X="segment-prefixes");const G=(function(ee,K,ge,Ce,ze){if(K.breakableFitAdvances!==void 0&&K.breakableFitMode===ze)return K.breakableFitAdvances;K.breakableFitMode=ze;const me=o$(),te=[];for(const ke of me.segment(ee))te.push(ke.segment);if(te.length<=1)return K.breakableFitAdvances=null,K.breakableFitAdvances;if(ze==="sum-graphemes"){const ke=[];for(const Se of te){const ye=na(Se,ge);ke.push(cu(Se,ye,Ce))}return K.breakableFitAdvances=ke,K.breakableFitAdvances}if(ze==="pair-context"||te.length>96){const ke=[];let Se=null,ye=0;for(const ne of te){const ce=cu(ne,na(ne,ge),Ce);if(Se===null)ke.push(ce);else{const xe=Se+ne,fe=na(xe,ge);ke.push(cu(xe,fe,Ce)-ye)}Se=ne,ye=ce}return K.breakableFitAdvances=ke,K.breakableFitAdvances}const oe=[];let H="",Y=0;for(const ke of te){H+=ke;const Se=cu(H,na(H,ge),Ce);oe.push(Se-Y),Y=Se}return K.breakableFitAdvances=oe,K.breakableFitAdvances})(R,A,r,l,X),Q=G===null||o==="keep-all"?null:(function(ee){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(ee))return null;const K=[];let ge=0;for(const Ce of ix().segment(ee))ge++,Wfe(Ce.segment)&&K.push(ge);return K.length===0?null:K})(R);return void T(R,W,le,J,M,D,G,Q,F)}T(R,W,le,J,M,D,null,null,F)}for(let R=0;R=55296&&ee<=56319&&Q+1=56320&&ze<=57343&&(K=ze-56320+(ee-55296<<10)+65536,ge=2)}const Ce=Jde(K);Ce!=="R"&&Ce!=="AL"&&Ce!=="AN"||(W=!0);for(let ze=0;ze=0&&F[ee]==="ET";ee--)F[ee]="EN";for(ee=Q+1;ee0?F[Q-1]:X)!=="L"?"R":"L";if(K===((ee{const e=globalThis;if(e[Gy])return e[Gy];const t={configs:{},controllers:{},revision:_o(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Gy]=t,t})();let Sf=null;const Zy=rs.revision;function dM(e){var t;return e&&(t=rs.configs[e])!=null?t:null}function fM(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function Ufe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function Yy(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!Ufe(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function Jy(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Sf!=null)return Sf;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return Sf=!!((i=r.getContext)!=null&&i.call(r,"2d")),Sf}catch{return Sf=!1,!1}})())return null;try{const i=Math.round(100*t)/100,r=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),l=rs.blockEstimateCache.get(r);if(l)return rs.blockEstimateCache.delete(r),rs.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(p,h,m){const k=`${m}\0${h}\0${p}`,w=rs.preparedCache.get(k);if(w)return rs.preparedCache.delete(k),rs.preparedCache.set(k,w),w.prepared;const v=(function(y,b,S){return(function(I,T,$,L){var P,R;const M=(P=L?.wordBreak)!=null?P:"normal",D=(R=L?.letterSpacing)!=null?R:0;return Hfe(Efe(I,w1(),L?.whiteSpace,M),T,!1,M,D)})(y,b,0,S)})(p,h,{whiteSpace:m});for(rs.preparedCache.set(k,{prepared:v});rs.preparedCache.size>240;){const y=rs.preparedCache.keys().next().value;if(!y)break;rs.preparedCache.delete(y)}return v})(e,n.font,a),c=(function(p,h,m){const k=Dfe(p,h);return{lineCount:k,height:k*m}})(u,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(rs.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});rs.blockEstimateCache.size>4e3;){const p=rs.blockEstimateCache.keys().next().value;if(!p)break;rs.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function s$(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=Yy(e.children);return i&&n.paragraph?Jy(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=Yy(e.children),l=n.headings[i];return r&&l?Jy(r,t,l):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const r=Yy((s=i[0])==null?void 0:s.children);return r?Jy(r,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of i){const a=s$(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function Cf(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function du(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function Xy(e,t,n=0){return e.diff?Qw(t??{},n)?(function(o){const s=du(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!jfe.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return Cf(du(o.originalCode))+Cf(du(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Cf(du(s)),Cf(du(i)));const r=du(o.code).split(/\r?\n/);let l=0,a=0;for(const u of r)u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):Cf(du(e.code,e.loading===!0))}function Vfe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function Qy(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=fM(o.lineHeight,1.5*fM(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:Vfe(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const qfe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function pM(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(i))qfe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function hM(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,i-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-r);hd&&(e.scrollTop=u)}function mM(e,t){let n=0,o=null,s=null;const i=()=>{const r=s;s=null,o=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(o&&(clearTimeout(o),o=null),n=l,s=null,e(...r)):o||(o=setTimeout(i,a))}}function gM(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const i$=Symbol("MarkstreamMathBlockMinHeightCache");function yBe(){return yn(i$,null)}const Kfe=new Set(["text","inline_code","emoji","footnote_reference"]),Gfe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Af(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function fu(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/i),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*o+12))}function r$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(Kfe.has(o))return!0;if(!Gfe.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(r$)}function Kb(e){var t,n,o,s,i,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((o=(n=u.content)!=null?n:u.raw)!=null?o:"");if(c==="inline_code")return String((r=(i=(s=u.code)!=null?s:u.content)!=null?i:u.raw)!=null?r:"");if(c==="emoji")return String((a=(l=u.name)!=null?l:u.raw)!=null?a:"");if(typeof u.text=="string")return u.text;const d=[];for(const f of["children","items","cells","rows"]){const p=u[f];if(Array.isArray(p)){const h=p.map(Kb).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function l$(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(l$)})}function Zfe(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function Yfe(e,t){var n,o,s,i,r,l,a,u,c,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,w=String((n=k.type)!=null?n:""),v=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(y){var b;const S=Number((b=y.level)!=null?b:y.depth);return S>=4?20:S===3?30:S===2?32:44})(k);case"paragraph":return(function(y,b){const S=String(y??"");if(!S)return 28;const I=Math.max(18,Math.floor(Math.max(320,b)/8)),T=S.split(/\r?\n/).length,$=Math.ceil(S.length/I);return Math.max(1,T,$)<=1?28:fu(S,b,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),v);case"list":return(function(y,b){var S;const I=Array.isArray(y.items)?y.items:[];if(!I.length)return 48;const T=Math.max(48,30*I.length+12);let $=12;for(const R of I)$+=Zfe(Kb(R)||String((S=R.raw)!=null?S:""),b);const L=Math.max(0,$-T);if(I.length>20){const R=Math.round(2.4*I.length);return Math.round(T+Math.max(R,Math.min(L,3*I.length)))}if(L<=0)return T;const P=I.length>8?8*I.length:L;return Math.round(T+Math.min(L,P))})(k,v);case"list_item":return fu(String((r=(i=k.raw)!=null?i:k.content)!=null?r:""),v,34);case"blockquote":return fu(String((a=(l=k.raw)!=null?l:k.content)!=null?a:""),v,56);case"table":return(function(y,b){const S=[...y.header?[y.header]:[],...Array.isArray(y.rows)?y.rows:[]];if(!S.length){const I=Array.isArray(y.children)?y.children.length:3;return Math.max(120,38*I+48)}return Math.max(120,Math.round(4+S.reduce((I,T)=>I+(function($,L){const P=Math.max(1,$.length),R=Math.max(80,(L-32)/P),M=Math.max(10,Math.floor(R/8)),D=Math.max(1,...$.map(z=>{var B;const A=Kb(z)||String((B=z?.raw)!=null?B:"");return Math.ceil(A.length/M)||1}));return 54+34*Math.max(0,D-1)+(P<=3&&$.some(l$)?14:0)})((function($){var L;return Array.isArray($?.cells)&&(L=$.cells)!=null?L:[]})(T),b),0)))})(k,v);case"code_block":{const y=String((u=k.language)!=null?u:"").trim().toLowerCase(),b=String((d=(c=k.code)!=null?c:k.raw)!=null?d:"");return y==="mermaid"?p1(d1(b)):y==="infographic"?h1(f1(b)):fu(b,v,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(y,b){var S,I,T;const $=y.match(/^\s*]*)>/i);return $&&!/(?:^|\s)open(?:\s|=|$)/i.test((S=$[1])!=null?S:"")?fu(((T=(I=y.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:I[1])==null?void 0:T.replace(/<[^>]*>/g,"").trim())||"Details",b,28,28):fu(y,b,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),v);case"thematic_break":return 24;default:return fu(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),v,40)}}function vM(e,t,n){return Math.min(Math.max(e,t),n)}const Jfe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Xfe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],Qfe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),a$=["raw","content","code","originalCode","updatedCode"],yM=new WeakMap,kM=new WeakMap;let epe=1;function mr(){return typeof performance<"u"?performance.now():Date.now()}function bM(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Li(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=yM.get(t);return n||(n=epe++,yM.set(t,n)),String(n)}function wM(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Li(t),customMarkdownIt:Li(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Li(e.validateLink),preTransformTokens:Li(e.preTransformTokens),postTransformTokens:Li(e.postTransformTokens),postTransformNodes:Li(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function xM(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` -`,t-1)+1;return e.slice(n,t).trim()}function _M(e){const t=u$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function u$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function c$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function rx(e){const t=String(e??"");return`${t.length}:${c$(t)}`}function Gb(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?rx(r):`${r.length}:${c$(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Li(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${Li(o)}`;const i=Li(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>Gb(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(u=>`${u}:${Gb(r[u],t,n+1)}`).join(";")}`}return typeof e}function x1(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function d$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>x1(o)?Oa(o,t,n+1):d$(o,t,n+1)).join(",")}`:x1(e)?Oa(e,t,n):Gb(e,t,n)}function tpe(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!a$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${rx(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Li(s)}`:Qfe.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${d$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Li(s)}`:""}).filter(Boolean).join(";")}function npe(e){return a$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${rx(n)}`:""}).filter(Boolean).join(";")}function Oa(e,t=new WeakMap,n=0){const o=kM.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${Li(s)}`;const r=Li(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>Oa(h,u,c+1)).join("|"):"";return[a.type,npe(d),tpe(d,u,c),f.length,p].join(":")})(e,t,n);return kM.set(s,l),l}function f$(e,t){return Oa(e)===Oa(t)}function lx(e,t,n){const o=mr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=mr()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function SM(e,t,n){return lx(t,n,()=>Oa(e))}function p$(e,t,n){return SM(e,n,"stabilizeSignatureMs")===SM(t,n,"stabilizeSignatureMs")}function Cm(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function CM(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function AM(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function ope(e,t){return e.length===t.length&&e===t}function ax(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(i.length!==r.length)return!1;for(let c=0;c{o=ax(e,t)}),o??p$(e,t,n)}function rpe(e,t){const n={};for(const o of Jfe){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function lpe(e,t){var n;const o=_A(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:O(()=>!1),r=q(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let z="",B=0,A=!1,F=!1,W=!1,j=!1;function le(){z="",B=0,A=!1,F=!1,W=!1,j=!1}function J(X){let G=!1;for(let Q=0;Q{if(!X||!G.startsWith(X)||G.length<=X.length)return le(),[!0,0];let Q=0;z!==X&&(le(),J(X),Q=X.length);const ee=G.slice(X.length),K=J(ee);return z=G,[K,Q+ee.length]}})();let p,h=0,m=0,k=mr(),w=-1,v=0;function y(z){w=Number.isInteger(z)?z:0,v+=1}function b(){p&&(clearTimeout(p),p=void 0)}function S(){b();const z=t.renderContent.value;r.value!==z&&(r.value=z),k=mr()}Ze([t.renderContent,t.effectiveFinal,i],([z,B,A])=>{r.value!==z&&(!A||B||(function(F,W){if(!F&&W||W.length<=80||W.length\s*|`{3,}|~{3,})/.test(j))||j.endsWith(` -`)&&!(function(le){const J=xM(le);if(_M(J))return!1;const X=u$(J);return X.length>=2&&X.some(G=>G.trim())})(W))})(r.value,z)?S():(function(){if(m+=1,p)return;const F=Math.max(0,(function(W){const j=W.parseCoalesceMs;return typeof j=="number"&&Number.isFinite(j)&&j>=0?j:80})(e)-(mr()-k));F<=0?S():p=setTimeout(S,F)})())},{flush:"sync",immediate:!0}),Ld(b);const I=O(()=>{var z,B,A,F;return yse(e.customHtmlTags,(z=e.parseOptions)==null?void 0:z.customHtmlTags,(F=(A=(B=t.customComponentsMap)==null?void 0:B.value)!=null?A:{},Object.entries(F).map(([W,j])=>{const le=ar(W);return j==null||!le||ph(le)||wI.has(le)||ah.has(le)?"":le}).filter(Boolean)))}),T=O(()=>{const{key:z,tags:B}=kse(I.value);if(!z)return o;const A=s.get(z);if(A)return A;const F=_A(t.instanceMsgId,{customHtmlTags:B});return s.set(z,F),F}),$=O(()=>{const z=T.value;if(!e.customMarkdownIt)return z;const B=e.customMarkdownIt(z);return z.__markstreamHasCustomParserExtensions=!0,B.__markstreamHasCustomParserExtensions=!0,B}),L=O(()=>{var z,B;const A=(z=e.parseOptions)!=null?z:{},F=t.effectiveFinal.value,W=I.value,j=F!=null,le=W.length>0;return j||le||A.streamParse==null?vt(vt(un(vt({},A),{streamParse:(B=A.streamParse)==null||B}),j?{final:F}:{}),le?{customHtmlTags:W}:{}):A}),P=O(()=>{var z;return new Set(((z=L.value.customHtmlTags)!=null?z:[]).map(B=>String(B).trim().toLowerCase()).filter(Boolean))}),R=O(()=>wM(L.value,$.value,e.customMarkdownIt,{includeFinal:!0})),M=O(()=>wM(L.value,$.value,e.customMarkdownIt,{includeFinal:!1}));Ze([R,M],([z,B],[A,F])=>{A&&(z===A&&B===F||(S(),B!==F&&(l=[],c="")))},{flush:"sync"});const D=O(()=>{var z,B,A,F,W,j,le,J,X,G,Q;if((z=e.nodes)!=null&&z.length)return l=[],c="",y(0),At(e.nodes.slice());const ee=r.value;if(!ee)return l=[],c="",y(-1),[];const K=t.debugPerformanceEnabled.value,ge=K?mr():0,Ce=$.value,ze=R.value,me=M.value;a&&ze!==a&&(function(lt){var ct,Ct;(Ct=(ct=lt.stream)==null?void 0:ct.reset)==null||Ct.call(ct)})(Ce),u&&me!==u&&(l=[],c="");const te=Object.keys((A=(B=t.customComponentsMap)==null?void 0:B.value)!=null?A:{}).length>0||typeof L.value.postTransformNodes=="function";te!==d&&(l=[],c="");const oe=!te&&l.length>0&&ee.startsWith(c)&&me===u,H=K?bM(Ce):null,Y=K?{}:void 0,ke=AM(Ce),Se=!ke&&!te,ye=vt(vt(un(vt({},L.value),{__reuseStableTopLevelNodes:Se}),ke?{__disableStreamParse:!0}:{}),Y?{__timing:Y}:{}),ne=x9(ee,Ce,ye),ce=K?mr():0,xe=K?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let fe,ue=K?Cm(ne.length):void 0,we=0,se=0,_e=0;if(oe){const lt=K?mr():0,[ct,Ct]=(function(Bt){var Vt,Je;const[tt,dt]=Bt.scanGlobalReferenceAppend(Bt.previousContent,Bt.content),Rt=Bt.parseOptions;return[Bt.previousDirtyStartIndex>0&&Rt.final!==!0&&!Bt.customMarkdownIt&&!AM(Bt.md)&&!tt&&typeof Rt.preTransformTokens!="function"&&typeof Rt.postTransformTokens!="function"&&typeof Rt.postTransformNodes!="function"&&((Je=(Vt=Rt.customHtmlTags)==null?void 0:Vt.length)!=null?Je:0)===0?Bt.previousDirtyStartIndex:0,dt]})({content:ee,previousContent:c,previousDirtyStartIndex:w,parseOptions:L.value,customMarkdownIt:e.customMarkdownIt,md:Ce,scanGlobalReferenceAppend:f});_e=Ct;const Mt=ct<=0;if(xe){const Bt=(function(Vt,Je,tt,dt={}){var Rt;if(!Je.length)return{nodes:Vt,metrics:Cm(Vt.length)};const Fe=(Rt=dt.scanStartIndex)!=null?Rt:0,Ye=dt.reuseDirtyTail!==!1,it=(function(Tt,tn,fn,Kt=0){const Dn=Math.min(Tt.length,tn.length);for(let Yt=Math.min(Dn,Math.max(0,Kt));YtOa(lt[Mt]))})(fe,xe,se):(function(lt,ct=0){for(let Ct=Math.max(0,ct);Ct((W=H?.total)!=null?W:0);t.logPerf(ct?"parse(stream)":"parse(sync)",vt(vt(vt({rendererId:t.instanceMsgId,ms:Math.round(mr()-ge),nodes:fe.length,contentLength:ee.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:Re,referenceDefinitionScanChars:_e,signatureMs:(j=xe?.signatureMs)!=null?j:0,stabilizeSignatureMs:(le=xe?.stabilizeSignatureMs)!=null?le:0,primeSignatureMs:(J=xe?.primeSignatureMs)!=null?J:0,signatureCallCount:(X=xe?.signatureCallCount)!=null?X:0,stabilizeSignatureCallCount:(G=xe?.stabilizeSignatureCallCount)!=null?G:0,primeSignatureCallCount:(Q=xe?.primeSignatureCallCount)!=null?Q:0,stabilizeMs:we},ue??{}),Y?Object.fromEntries(Xfe.map(Ct=>{var Mt;return[Ct,(Mt=Y[Ct])!=null?Mt:0]})):{}),lt?{streamMode:lt.lastMode,streamDelta:rpe(lt,H),streamStats:lt}:{}))}return At(fe)});return{effectiveCustomHtmlTags:I,effectiveCustomHtmlTagsSet:P,mdBase:T,mdInstance:$,mergedParseOptions:L,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>v,parsedNodes:D}}function ape(e){const{isClient:t}=e,n=q(new Set),o=new Map,s=new Map,i=new Map;function r(u){if(!t)return;const c=i.get(u);c!=null&&(window.clearTimeout(c),i.delete(u))}function l(){if(t)for(const u of i.values())window.clearTimeout(u);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,w=k.has(f);if(p){if(w)return;const y=new Set(k);return y.add(f),void(n.value=y)}if(!w)return;const v=new Set(k);v.delete(f),n.value=v})(u,c),c&&((d=e.onNodeMarkedVisible)==null||d.call(e,u))},resetNodeVisibleState:a,cleanupNodeVisibility:function(u){var c;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,o.value=c.done},r=s.subscribe(i);i();const l=O(()=>Math.max(0,t.value.length-n.value.length)),a=O(()=>l.value===0),u=O(()=>o.value&&a.value);return N2()&&Ld(()=>{r(),s.destroy()}),{source:t,visible:n,done:o,final:u,caughtUp:a,pendingChars:l,enqueue:c=>s.enqueue(c),finish:c=>s.finish(c),flush:()=>s.flush(),reset:c=>s.reset(c),pause:()=>s.pause(),resume:()=>s.resume()}}const cpe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},MM=/auto|scroll|overlay/i;function dpe(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return MM.test(t)||MM.test(n)}function fpe(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const ppe={class:"m-0 p-0"},hpe=["data-probe"],mpe=Vn(Ge(un(vt({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),C("div",{class:"height-estimation-probes",style:Ut({width:`${e.width}px`}),"aria-hidden":"true"},[_("div",{ref:i=>e.setParagraphWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[Z(x(Du),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),_("div",{ref:i=>e.setListItemWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[_("ul",ppe,[Z(x(pd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),_("div",{ref:i=>e.setListWrapper(i),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[Z(x(hd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),C(Ie,null,ot(6,i=>_("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:Be(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[Z(x(A0),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,hpe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),EM=Ge({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=O(()=>{var n,o;return h1((o=Kc(e.estimatedPreviewHeightPx))!=null?o:f1(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return an("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?an("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[an("div",{class:"flex items-center gap-x-2 overflow-hidden"},[an("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),an("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),an("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>an("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,an("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[an("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),an("div",{class:"absolute inset-0"},[an("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),TM=Ge({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=O(()=>{var n,o;return p1((o=Kc(e.estimatedPreviewHeightPx))!=null?o:d1(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return an("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?an("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[an("div",{class:"flex items-center gap-x-2 overflow-hidden"},[an("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),an("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>an("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[an("span",{class:"action-icon block"})])))]):null,an("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[an("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),an("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),gpe={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function ms(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const vpe=["data-custom-id"],ype=["data-node-index","data-node-type"],IM="typewriter-simple-cursor-target",h$=Vn(Ge(un(vt({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(E){if(!(typeof Event<"u"&&E instanceof Event))return typeof E=="string"&&s("copy-code",E),void s("copy",E)}const r=Xo(),l=yn("markstreamNestedRendererProps",void 0);function a(E){const U=r?.vnode.props;return!!U&&(Object.prototype.hasOwnProperty.call(U,E)||Object.prototype.hasOwnProperty.call(U,String(E).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function u(E){var U,re;const ae=o[E];return a(E)?ae:(re=(U=l?.value)==null?void 0:U[E])!=null?re:ae}const c=O(()=>{return(E=u("mode"))==="chat"||E==="minimal"||E==="docs"?E:"docs";var E}),d=O(()=>gM(u("typewriter"))),f=O(()=>d.value!=="off"),p=O(()=>u("domMode")==="minimal"?"minimal":"full"),h=O(()=>{return(E={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":E.codeRenderer==="pre"||E.codeRenderer==="shiki"||E.codeRenderer==="monaco"?E.codeRenderer:E.renderCodeBlocksAsPre===!1||E.mode==="docs"?"monaco":"pre";var E}),m=O(()=>gpe[c.value]),k=O(()=>{var E;return(E=u("showTooltips"))!=null?E:m.value.showTooltips}),w=O(()=>{var E;return(E=u("fade"))!=null?E:m.value.fade}),v=O(()=>{var E;return(E=u("batchRendering"))!=null?E:m.value.batchRendering}),y=O(()=>{var E;return(E=u("initialRenderBatchSize"))!=null?E:m.value.initialRenderBatchSize}),b=O(()=>{var E;return(E=u("renderBatchSize"))!=null?E:m.value.renderBatchSize}),S=O(()=>{var E;return(E=u("renderBatchDelay"))!=null?E:m.value.renderBatchDelay}),I=O(()=>{var E;return(E=u("renderBatchBudgetMs"))!=null?E:m.value.renderBatchBudgetMs}),T=O(()=>{var E;return(E=u("renderBatchIdleTimeoutMs"))!=null?E:m.value.renderBatchIdleTimeoutMs}),$=O(()=>{var E;return(E=u("deferNodesUntilVisible"))!=null?E:m.value.deferNodesUntilVisible}),L=O(()=>{var E;return(E=u("maxLiveNodes"))!=null?E:m.value.maxLiveNodes}),P=O(()=>{var E;return(E=u("liveNodeBuffer"))!=null?E:m.value.liveNodeBuffer}),R=O(()=>{var E;return(E=u("nodeVirtual"))!=null?E:m.value.nodeVirtual}),M={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return p.value},get htmlPolicy(){return u("htmlPolicy")},get viewportPriority(){return u("viewportPriority")},get viewportPriorityOptions(){return u("viewportPriorityOptions")},get codeBlockStream(){return u("codeBlockStream")},get codeBlockDarkTheme(){return u("codeBlockDarkTheme")},get codeBlockLightTheme(){return u("codeBlockLightTheme")},get codeBlockMonacoOptions(){return u("codeBlockMonacoOptions")},get codeRenderer(){return u("codeRenderer")},get renderCodeBlocksAsPre(){return u("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return u("codeBlockMinWidth")},get codeBlockMaxWidth(){return u("codeBlockMaxWidth")},get codeBlockProps(){return u("codeBlockProps")},get mermaidProps(){return u("mermaidProps")},get d2Props(){return u("d2Props")},get infographicProps(){return u("infographicProps")},get showTooltips(){return k.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return o.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return w.value},get batchRendering(){return v.value},get initialRenderBatchSize(){return y.value},get renderBatchSize(){return b.value},get renderBatchDelay(){return S.value},get renderBatchBudgetMs(){return I.value},get renderBatchIdleTimeoutMs(){return T.value},get deferNodesUntilVisible(){return $.value},get maxLiveNodes(){return L.value},get liveNodeBuffer(){return P.value},get nodeVirtual(){return R.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function D(E){s("height-change",E)}function z(E){s("virtual-state-change",E)}function B(E){s("anchor-change",E)}const A=q(),F=q(null),W=q(null),j=q(null),le=Es({1:null,2:null,3:null,4:null,5:null,6:null}),J=q(!1),X=new Map,G=q(0),Q=q(0),ee=q({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function K(E,U){return typeof E!="string"?U:E.trim()||U}function ge(E){const U=Number(E);return Number.isFinite(U)&&U>0?Math.max(1,Math.trunc(U)):640}const Ce=O(()=>{var E;const U=(E=M.viewportPriorityOptions)!=null?E:{},re=K(U.rootMargin,ju);return{rootMargin:re,heavyBlockMargin:K(U.heavyBlockMargin,re),maxTargets:ge(U.maxTargets)}}),ze=O(()=>{var E;return(E=Ce.value.rootMargin)!=null?E:ju}),me=O(()=>{var E;return(E=Ce.value.maxTargets)!=null?E:640});function te(){var E,U;if(((E=o.virtualScroll)==null?void 0:E.enabled)!==!0)return null;const re=(U=o.virtualScroll)==null?void 0:U.scrollRoot;return oe(typeof re=="function"?re():re)}function oe(E){return E?typeof HTMLElement<"u"&&E instanceof HTMLElement?E:typeof E=="object"&&"value"in E?oe(E.value):typeof E=="object"&&"$el"in E?oe(E.$el):null:null}Wn(J9,Ce);const{isClient:H,renderAsFragment:Y,debugPerformanceEnabled:ke,resolvedShowTooltips:Se,resolvedHtmlPolicy:ye,inheritedSmoothStreaming:ne,ownsTypewriterCursor:ce}=(function(E){const U=typeof window<"u",re=oh(),ae=yn("markstreamHtmlPolicy",void 0),be=yn("markstreamTypewriterCursor",void 0),$e=yn("markstreamSmoothStreaming",void 0),Pe=O(()=>E.renderAsFragment===!0),We=O(()=>!!(E.debugPerformance&&U&&typeof console<"u")),et=O(()=>{var Qe;if(typeof E.showTooltips=="boolean")return E.showTooltips;const De=(Qe=re.showTooltips)!=null?Qe:re["show-tooltips"];return De===""||De===!0||De==="true"||De!==!1&&De!=="false"&&void 0}),He=O(()=>{var Qe,De;return(De=(Qe=E.htmlPolicy)!=null?Qe:ae?.value)!=null?De:"safe"}),qe=O(()=>be?.value!==!0);return{isClient:U,renderAsFragment:Pe,debugPerformanceEnabled:We,resolvedShowTooltips:et,resolvedHtmlPolicy:He,inheritedSmoothStreaming:$e,inheritedTypewriterCursor:be,ownsTypewriterCursor:qe}})(M),{resolveViewportRoot:xe,resolveScrollContainer:fe,isReverseFlexScrollRoot:ue,getNormalizedScrollTop:we,getOffsetTopWithinRoot:se}=(function(E,U){function re(){var We,et;return(et=(We=U.scrollRoot)==null?void 0:We.call(U))!=null?et:null}function ae(We){if(typeof window>"u")return null;const et=re();if(et)return et;const He=We??E.value;if(!He)return null;const qe=He.ownerDocument||document,Qe=qe.scrollingElement||qe.documentElement;let De=He;for(;De&&De!==qe.body&&De!==Qe;){if(dpe(window.getComputedStyle(De))&&fpe(De))return De;De=De.parentElement}return null}function be(We){if(!U.isClient)return!1;try{const et=window.getComputedStyle(We);return!!(et.display||"").toLowerCase().includes("flex")&&(et.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function $e(We,et,He){var qe,Qe;if(He)return Pe(et);const De=We.scrollTop;if(!be(We))return De;const Ke=De<0?-De:De;return Math.max(0,((qe=We.scrollHeight)!=null?qe:0)-((Qe=We.clientHeight)!=null?Qe:0))-Ke}function Pe(We){var et,He,qe,Qe,De;const Ke=Number((et=We.scrollingElement)==null?void 0:et.scrollTop),ft=Number((qe=(He=We.documentElement)==null?void 0:He.scrollTop)!=null?qe:0),ut=Number((De=(Qe=We.body)==null?void 0:Qe.scrollTop)!=null?De:0);return Math.max(0,Number.isFinite(Ke)?Ke:0,Number.isFinite(ft)?ft:0,Number.isFinite(ut)?ut:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(We){var et,He,qe,Qe;const De=re();if(De)return De;const Ke=ae((et=We??E.value)!=null?et:null);if(Ke)return Ke;const ft=(Qe=(qe=We?.ownerDocument)!=null?qe:(He=E.value)==null?void 0:He.ownerDocument)!=null?Qe:typeof document<"u"?document:null;return ft?.scrollingElement||ft?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:$e,getOffsetTopWithinRoot:function(We,et){const He=et.ownerDocument||We.ownerDocument||document;if((function(Ke,ft){return Ke===ft.documentElement||Ke===ft.body||Ke===ft.scrollingElement})(et,He))return We.getBoundingClientRect().top+Pe(He);const qe=et.getBoundingClientRect(),Qe=We.getBoundingClientRect(),De=$e(et,He,!1);return Qe.top-qe.top+De}}})(A,{isClient:H,scrollRoot:te});Wn("markstreamShowTooltips",Se),Wn("markstreamHtmlPolicy",ye),Wn("markstreamTypewriter",f),Wn("markstreamFade",O(()=>M.fade!==!1)),Wn("markstreamTypewriterCursor",O(()=>!0)),Wn("markstreamTextStreamState",X),Wn("markstreamStreamVersion",G),Wn("markstreamParseOptions",O(()=>M.parseOptions)),Wn("markstreamCustomMarkdownIt",O(()=>M.customMarkdownIt));const{smoothStreamingEnabled:_e,renderContent:Re,requestedFinal:lt,effectiveFinal:ct}=(function(E,U){const re=upe(vt(vt({},cpe),E.smoothStreamingOptions)),ae=O(()=>{var De,Ke,ft;return E.smoothStreaming!==!1&&!((De=E.nodes)!=null&&De.length)&&(E.smoothStreaming===!0||!((Ke=U.inheritedSmoothStreaming)!=null&&Ke.value))&&(E.smoothStreaming===!0||gM(E.typewriter)!=="off"||((ft=E.maxLiveNodes)!=null?ft:0)<=0)}),be=q(!U.isClient||E.smoothStreaming===!0);bn(()=>{be.value=!0});const $e=O(()=>be.value&&ae.value),Pe=O(()=>{var De;return $e.value?re.visible.value:(De=E.content)!=null?De:""}),We=O(()=>{var De,Ke;const ft=(De=E.parseOptions)!=null?De:{};return(Ke=E.final)!=null?Ke:ft.final}),et=O(()=>{const De=We.value;return $e.value&&De!=null?!!De&&re.caughtUp.value:De});let He=0,qe=!1;function Qe(){He=0,qe=!1}return Ze([()=>E.content,()=>E.nodes,$e,We],([De,Ke,ft,ut])=>{if(Ke?.length)return Qe(),void re.reset("");const _t=De??"";if(!ft)return Qe(),re.reset(_t),void(ut&&re.finish({flush:!0}));const mt=re.source.value;if(_t){if(_t!==mt)if(_t.startsWith(mt)){const Ft=_t.slice(mt.length),Pt=re.pendingChars.value;Ft.length<=8?(He++,qe||He>=2&&Pt<=8?(qe=!0,re.reset(_t)):re.enqueue(Ft)):(Qe(),re.enqueue(Ft))}else Qe(),re.reset(_t)}else Qe(),re.reset("");ut&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ae,smoothStreamingEnabled:$e,renderContent:Pe,requestedFinal:We,effectiveFinal:et}})(M,{isClient:H,inheritedSmoothStreaming:ne}),Ct=lt.value===!0;Wn("markstreamSmoothStreaming",_e);const Mt=q(!1),Bt=q(!1),Vt=q(!1);let Je="",tt=!1,dt=null;function Rt(){H&&dt!=null&&(window.clearTimeout(dt),dt=null)}function Fe(){Mt.value=!1,Rt()}function Ye(E,U){if(!ke.value)return;const re=(function(){if(!ke.value)return null;const ae=tn(it),be=tn(rt),$e=Math.max(Tt,be);if(ae<=0&&$e<=0)return null;const Pe={total:ae,maxPerFrame:$e,byLabel:(We=it,Object.fromEntries(Array.from(We.entries()).sort((et,He)=>He[1]-et[1]||et[0].localeCompare(He[0]))))};var We;return it.clear(),rt.clear(),Tt=0,Pe})();console.info(`[markstream-vue][perf] ${E}`,re?un(vt({},U),{layoutReads:re}):U)}Ze([()=>M.indexKey,()=>M.customId],()=>{var E,U;Fe(),Bt.value=!1,Vt.value=!((E=o.nodes)!=null&&E.length)&<.value!==!0&&!!o.content,Je=(U=Re.value)!=null?U:"",tt=Je.length>0},{flush:"sync"}),Ze([()=>o.content,()=>o.nodes,lt],([E,U,re])=>{!U?.length&&re!==!0&&E&&(Vt.value=!0)},{flush:"sync",immediate:!0}),Ze([Re,()=>o.nodes,lt],([E,U,re])=>{const ae=E??"";return U?.length||re===!0?(Fe(),Bt.value=!1,Je=ae,void(tt=!0)):(ae.length>0&&(Vt.value=!0),tt?(Je&&ae.length>Je.length&&ae.startsWith(Je)?(Mt.value=!0,Bt.value=!0,H&&(Rt(),dt=window.setTimeout(()=>{var be;dt=null,ct.value===!0||(be=o.nodes)!=null&&be.length||(mc(),Mt.value=!1,il())},1200))):(ae.length"u")return null;const $e=window;if($e.__markstreamLayoutReadPerformance)return $e.__markstreamLayoutReadPerformance;const Pe={total:0,maxPerFrame:0,byLabel:{}};return $e.__markstreamLayoutReadPerformance=Pe,Pe})();be&&(be.total=Number(be.total||0)+1,be.byLabel[ae]=Number(be.byLabel[ae]||0)+1,be.currentFrameTotal=Number(be.currentFrameTotal||0)+1,be.frameScheduled||(be.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Kt(be),0):queueMicrotask(()=>Kt(be)):window.requestAnimationFrame(()=>Kt(be))))})(E),gt||(gt=!0,H&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(fn):typeof queueMicrotask!="function"?setTimeout(fn,0):queueMicrotask(fn)))}function Yt(E,U){return Dn(E),U()}const Eo=M.customId?`renderer-${M.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Wo=(function(E){const U=new Map;return{scope:E,cache:U,clear:()=>U.clear()}})(Eo),ho=Eo;Wn(i$,Wo);const Bn=es(()=>M.customId),{effectiveCustomHtmlTagsSet:bs,mergedParseOptions:nt,parsedNodes:Ae,getParsedNodesDirtyStartIndex:kt,getParsedNodesRevision:Nt}=lpe(M,{instanceMsgId:Eo,renderContent:Re,effectiveFinal:ct,smoothStreamingEnabled:_e,debugPerformanceEnabled:ke,customComponentsMap:Bn,logPerf:Ye});Ze(Ae,()=>{Mt.value||Wo.clear(),G.value+=1},{immediate:!0});const Xt=O(()=>({customId:M.customId,customHtmlTags:nt.value.customHtmlTags,parseOptions:M.parseOptions,customMarkdownIt:M.customMarkdownIt,htmlPolicy:ye.value,viewportPriority:M.viewportPriority,viewportPriorityOptions:Ce.value,mode:c.value,domMode:M.domMode,codeRenderer:h.value,codeBlockStream:M.codeBlockStream,codeBlockDarkTheme:M.codeBlockDarkTheme,codeBlockLightTheme:M.codeBlockLightTheme,codeBlockMonacoOptions:M.codeBlockMonacoOptions,renderCodeBlocksAsPre:M.renderCodeBlocksAsPre,codeBlockMinWidth:M.codeBlockMinWidth,codeBlockMaxWidth:M.codeBlockMaxWidth,codeBlockProps:M.codeBlockProps,mermaidProps:M.mermaidProps,d2Props:M.d2Props,infographicProps:M.infographicProps,showTooltips:Se.value,themes:M.themes,langs:M.langs,isDark:M.isDark,typewriter:f.value,smoothStreamingOptions:M.smoothStreamingOptions,parseCoalesceMs:M.parseCoalesceMs,fade:M.fade}));Wn("markstreamNestedRendererProps",Xt);const ko=O(()=>Ae.value),Gn=O(()=>Ae.value.length),qn=q(null),oo=q(null),lo=q(null),fs=q(null),Ei=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),Ns=!Ei&&M.customId?dM(M.customId):null,Ls=O(()=>Ns?(Zy.value,dM(M.customId)):null),js=O(()=>{var E;return!!(!Y.value&&M.customId&&!Ei&&((E=Ls.value)!=null&&E.enabled))}),ii=O(()=>!!(H&&js.value)),ps=O(()=>{var E;return!!(!Y.value&&((E=o.virtualScroll)!=null&&E.enabled))}),cr=O(()=>ps.value),Vi=q(!1);bn(()=>{Vi.value=!0});const wn=O(()=>!!(H&&ps.value));Wn("markstreamHostScrollManaged",wn);const Us=O(()=>!!(Vi.value&&wn.value)),zn=O(()=>ii.value||wn.value),ri=O(()=>ii.value||Us.value),Fs=O(()=>{var E;return zn.value&&((E=Ls.value)==null?void 0:E.textEstimation)!==!1});function Ti(){const E=Q.value||Yt("getMeasuredContainerWidth.clientWidth",()=>{var U;return((U=A.value)==null?void 0:U.clientWidth)||0});return Number.isFinite(E)&&E>0?E:0}const ts=O(()=>{const E=Ti();return E>0?Math.max(1,Math.round(E)):640}),To=O(()=>{var E,U;return!(ct.value!==!0||ps.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(E=o.nodes)!=null&&E.length||Vt.value||!(((U=M.maxLiveNodes)!=null?U:0)<=0))}),ns=O(()=>{var E;return To.value?50:Math.max(1,(E=M.maxLiveNodes)!=null?E:320)}),Oo=O(()=>{var E;return To.value?16:Math.max(0,(E=M.liveNodeBuffer)!=null?E:60)}),sn=O(()=>{var E;return!Y.value&&M.nodeVirtual!==!1&&!(((E=M.maxLiveNodes)!=null?E:0)<=0&&!To.value)&&(M.nodeVirtual===!0?Ae.value.length>0:Ae.value.length>ns.value)}),li=O(()=>sn.value||ii.value||wn.value),os=O(()=>M.viewportPriority!==!1),bo=O(()=>!!os.value&&!J.value);var ai;ai=O(()=>os.value),Wn(X9,ai);const ui=O(()=>{var E;return!(Y.value||M.deferNodesUntilVisible===!1||((E=M.maxLiveNodes)!=null?E:0)<=0||sn.value||Ae.value.length>900||M.viewportPriority===!1)}),ss=Wce(E=>{var U;return xe((U=E??A.value)!=null?U:null)},os),{requestFrame:In,cancelFrame:wo,hasIdleCallback:Nr,isTestEnv:Te}=(function(E){const U=E.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=E.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ae=E.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var $e;if(typeof globalThis>"u"||!("process"in globalThis))return;const Pe=($e=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:$e.value;return Pe?.env})();return{requestFrame:U,cancelFrame:re,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:H}),Ne=O(()=>ct.value===!0&&!ps.value),{resolvedBatchSize:Ue,resolvedInitialBatch:rn,batchingEnabled:cn,incrementalRenderingActive:Sn,renderedCount:Cn,previousRenderContext:de,adaptiveBatchSize:Me,previousBatchConfig:Le}=(function(E,U){var re;const ae=O(()=>{var Qe;const De=Math.trunc((Qe=E.renderBatchSize)!=null?Qe:80);return Number.isFinite(De)?Math.max(0,De):0}),be=O(()=>{var Qe;const De=Math.trunc((Qe=E.initialRenderBatchSize)!=null?Qe:ae.value);return Number.isFinite(De)?Math.max(0,De):ae.value}),$e=O(()=>!U.renderAsFragment.value&&E.batchRendering!==!1&&ae.value>0&&U.isClient&&!U.isTestEnv),Pe=q(0),We=q({key:E.indexKey,total:0}),et=q(Math.max(1,ae.value||1)),He=O(()=>{var Qe,De,Ke;return $e.value&&!((Qe=U.continuousStreaming)!=null&&Qe.value)&&!((De=U.forceFullRenderFinalContent)!=null&&De.value)&&((Ke=E.maxLiveNodes)!=null?Ke:0)<=0}),qe=q({batchSize:ae.value,initial:be.value,delay:(re=E.renderBatchDelay)!=null?re:16,enabled:He.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:$e,incrementalRenderingActive:He,renderedCount:Pe,previousRenderContext:We,adaptiveBatchSize:et,previousBatchConfig:qe}})(M,{isClient:H,isTestEnv:Te,renderAsFragment:Y,forceFullRenderFinalContent:Ne,continuousStreaming:O(()=>Bt.value&&ct.value!==!0)}),je=O(()=>{var E;return!Y.value&&M.batchRendering!==!1&&Ue.value>0&&!Te&&((E=M.maxLiveNodes)!=null?E:0)<=0&&!Ne.value}),at=O(()=>je.value),yt=O(()=>zn.value||at.value),Gt=O(()=>{var E;return yt.value&&((E=Ls.value)==null?void 0:E.codeBlockEstimation)!==!1}),nn=new Map,Zn=new Map,gn=new WeakMap;let An=null;const Ho=new WeakMap,Ot=new Map,Zt=[];let pn=[],Yn=[],Jn=-1;const is=_o(Zt),Ro=new Set,Vs=q(0);let Lr=0;const st=q(0),V=O(()=>(st.value,Array.from(nn.entries()).sort((E,U)=>E[0]-U[0]))),pe=q(null),Xe=q(null);let on,Io=null,tl=0,Ga=null;function qi(){on.markFallbackHeightPrefixDirty()}function q0(E){return on.getFallbackNodeHeight(E)}function tc(E,U){return on.estimateHeightRange(E,U)}function K0(E){return on.estimateIndexForOffset(E)}const{activeRestoreAnchor:nc,getRelativeScrollTopWithinContainer:V7,setRelativeScrollTopWithinContainer:q7,resolveAnchorOffset:K7,clearRestoreReconcile:wh,scheduleRestoreReconcile:jd,captureRestoreAnchor:h_,restoreAnchor:m_,getAnchorDrift:G7}=(function(E){const{isClient:U,containerRef:re,parsedNodeCount:ae,requestFrame:be,cancelFrame:$e,resolveScrollContainer:Pe,getNormalizedScrollTop:We,getOffsetTopWithinRoot:et,isReverseFlexScrollRoot:He,estimateIndexForOffset:qe,estimateHeightRange:Qe,getFallbackNodeHeight:De,clamp:Ke}=E,ft=q(null);let ut=null,_t=[];function mt(){const qt=Pe(),mn=re.value;if(!qt||!mn)return null;const kn=qt.ownerDocument||mn.ownerDocument||document;if(qt===kn.documentElement||qt===kn.body||qt===kn.scrollingElement){const Xn=mn.getBoundingClientRect();return Math.max(0,-Xn.top)}return Math.max(0,We(qt,kn,!1)-et(mn,qt))}function Ft(qt){var mn;const kn=Pe(),Xn=re.value;if(!kn||!Xn)return;const _s=Math.max(0,qt),hs=kn.ownerDocument||Xn.ownerDocument||document,fr=hs.defaultView||(typeof window<"u"?window:null);if(kn===hs.documentElement||kn===hs.body||kn===hs.scrollingElement){const Pr=We(kn,hs,!0)+Xn.getBoundingClientRect().top;return void((mn=fr?.scrollTo)==null||mn.call(fr,0,Math.max(0,Pr+_s)))}hM(kn,hs,et(Xn,kn)+_s,{isReverseFlexScrollRoot:Pr=>{var df;return(df=He?.(Pr))!=null&&df},getNormalizedScrollTop:We})}function Pt(qt){const mn=ae.value,kn=Ke(qt.nodeIndex,0,Math.max(0,mn-1));return Qe(0,kn)+Math.max(0,qt.offsetWithinNodePx)}function jt(){if(ut!=null&&($e?.(ut),ut=null),U)for(const qt of _t)window.clearTimeout(qt);_t=[]}function zt(qt){const mn=Pt(qt),kn=mt();kn!=null&&Math.abs(kn-mn)<=.5||Ft(mn)}return{activeRestoreAnchor:ft,getRelativeScrollTopWithinContainer:mt,setRelativeScrollTopWithinContainer:Ft,resolveAnchorOffset:Pt,clearRestoreReconcile:jt,applyRestoreAnchor:zt,scheduleRestoreReconcile:function(){ft.value&&U&&ut==null&&(ut=be?be(()=>{ut=null,ft.value&&zt(ft.value)}):null,ut==null&&ft.value&&zt(ft.value))},captureRestoreAnchor:function(){const qt=mt(),mn=ae.value;if(qt==null||mn<=0)return null;const kn=Ke(qe(qt+1),0,mn-1),Xn=Qe(0,kn),_s=De(kn);return{nodeIndex:kn,offsetWithinNodePx:Ke(qt-Xn,0,Math.max(0,_s-1))}},restoreAnchor:function(qt){const mn=ae.value;if(ft.value={nodeIndex:Ke(qt.nodeIndex,0,Math.max(0,mn-1)),offsetWithinNodePx:Math.max(0,qt.offsetWithinNodePx)},jt(),zt(ft.value),U)for(const kn of[0,120,280,480])_t.push(window.setTimeout(()=>{ft.value&&zt(ft.value)},kn))},getAnchorDrift:function(qt){const mn=mt();return mn==null?null:mn-Pt(qt)}}})({isClient:H,containerRef:A,parsedNodeCount:Gn,requestFrame:In,cancelFrame:wo,resolveScrollContainer:()=>pe.value||fe(),getNormalizedScrollTop:we,getOffsetTopWithinRoot:se,isReverseFlexScrollRoot:ue,estimateIndexForOffset:K0,estimateHeightRange:tc,getFallbackNodeHeight:q0,clamp:xs}),{nodeHeights:oc,heightStats:Ki,heightTreeSize:G0,heightSumTree:Z7,heightKnownTree:Y7,averageNodeHeight:g_,resetHeightMeasurements:J7,pruneHeightMeasurements:X7,rebuildHeightTrees:xh,recordNodeHeight:Q7,removeNodeHeights:eL,exportHeightCache:tL,importHeightCache:nL,fenwickRangeSum:oL}=(function(E={}){const U=Es({}),re=Es({total:0,count:0}),ae=q(0),be=q([]),$e=q([]);function Pe(){for(const De of Object.keys(U))delete U[Number(De)];re.total=0,re.count=0,ae.value=0,be.value=[],$e.value=[]}function We(De,Ke,ft){for(let ut=Ke+1;ut0;ut-=ut&-ut)ft+=De[ut];return ft}function He(De){ae.value=De;const Ke=new Array(De+1).fill(0),ft=new Array(De+1).fill(0);for(const[ut,_t]of Object.entries(U)){const mt=Number(ut),Ft=Number(_t);!Number.isFinite(mt)||mt<0||mt>=De||!Number.isFinite(Ft)||Ft<=0||(We(Ke,mt,Ft),We(ft,mt,1))}be.value=Ke,$e.value=ft}function qe(De){if(!Number.isInteger(De)||De<0)return!1;const Ke=U[De];if(!Number.isFinite(Ke)||Ke<=0)return!1;if(delete U[De],re.total=Math.max(0,re.total-Ke),re.count=Math.max(0,re.count-1),ae.value>De){const ft=be.value,ut=$e.value;ft.length&&ut.length&&(We(ft,De,-Ke),We(ut,De,-1))}return!0}const Qe=O(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:U,heightStats:re,heightTreeSize:ae,heightSumTree:be,heightKnownTree:$e,averageNodeHeight:Qe,resetHeightMeasurements:Pe,pruneHeightMeasurements:function(De){if(De<=0)return void Pe();let Ke=0,ft=0;for(const[ut,_t]of Object.entries(U)){const mt=Number(ut),Ft=Number(_t);!Number.isFinite(mt)||mt<0||mt>=De||!Number.isFinite(Ft)||Ft<=0?delete U[mt]:(Ke+=Ft,ft++)}re.total=Ke,re.count=ft},rebuildHeightTrees:He,recordNodeHeight:function(De,Ke,ft={}){(function(ut,_t,mt={}){var Ft;if(!Number.isFinite(_t)||_t<=0)return!1;const Pt=U[ut];if(Pt&&(mt.allowShrink===!1&&_tut){const jt=be.value,zt=$e.value;if(jt.length&&zt.length)if(Pt){const qt=_t-Pt;qt!==0&&We(jt,ut,qt)}else We(jt,ut,_t),We(zt,ut,1)}mt.notify!==!1&&((Ft=E.onHeightRecorded)==null||Ft.call(E))})(De,Ke,un(vt({},ft),{notify:!0}))},removeNodeHeight:function(De,Ke={}){var ft;const ut=qe(De);return ut&&Ke.notify!==!1&&((ft=E.onHeightRecorded)==null||ft.call(E)),ut},removeNodeHeights:function(De,Ke={}){var ft;let ut=0;for(const _t of De)qe(Number(_t))&&ut++;return ut>0&&Ke.notify!==!1&&((ft=E.onHeightRecorded)==null||ft.call(E)),ut},exportHeightCache:function(){return Object.entries(U).map(([De,Ke])=>({index:Number(De),height:Number(Ke)})).filter(De=>Number.isFinite(De.index)&&De.index>=0&&Number.isFinite(De.height)&&De.height>0).sort((De,Ke)=>De.index-Ke.index)},importHeightCache:function(De,Ke={}){var ft;if(!Array.isArray(De))return;const ut=ae.value;let _t=!1;if(Ke.mode!=="merge"){const mt=Object.keys(U);if(mt.length>0){for(const Ft of mt)delete U[Number(Ft)];_t=!0}}for(const mt of De){const Ft=Number(mt.index),Pt=Number(mt.height);if(!Number.isInteger(Ft)||Ft<0||ut>0&&Ft>=ut||!Number.isFinite(Pt)||Pt<=0)continue;const jt=U[Ft];jt&&Math.abs(jt-Pt)<=1||(U[Ft]=Pt,_t=!0)}_t&&((function(){let mt=0,Ft=0;const Pt=ae.value;for(const[jt,zt]of Object.entries(U)){const qt=Number(jt),mn=Number(zt);!Number.isFinite(qt)||qt<0||Pt>0&&qt>=Pt||!Number.isFinite(mn)||mn<=0?delete U[qt]:(mt+=mn,Ft++)}re.total=mt,re.count=Ft})(),ut>0&&He(ut),(ft=E.onHeightRecorded)==null||ft.call(E))},fenwickRangeSum:function(De,Ke,ft){if(ft<=Ke)return 0;const ut=et(De,ft-1);return Ke<=0?ut:ut-et(De,Ke-1)}}})({onHeightRecorded:()=>{qi(),wn.value&&sf(),nc.value&&jd(),Xe.value&&fc(),co("node-resize")}});function v_(E){Number.isInteger(E)&&E>=0&&Ro.add(E)}function y_(E){for(const U of E)v_(Number(U))}function sc(E){Lr++;let U=!0;try{const re=E();return U=re!==!1,re}finally{Lr--,Lr===0&&U&&Vs.value++}}function Z0(){pn=[],Yn=[],Jn=-1,Ro.clear(),is.value=Zt}function _h(){Z0(),sc(()=>J7()),Ot.clear()}function k_(E){!Number.isInteger(E)||E<0||E>=Ae.value.length||Ot.set(E,Kd(E))}function b_(E,U,re={}){const ae=oc[E];v_(E),Q7(E,U,re);const be=oc[E];return Object.is(ae,be)?(Ro.delete(E),!1):(be&&be>0?k_(E):ae&&Ot.delete(E),!0)}function w_(E,U){const re=Yt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=nn.get(E))==null?void 0:ae.offsetHeight)!=null?be:0});return re>0?re:Yt("getNodeLayoutHeight.content.offsetHeight",()=>U.offsetHeight)}function x_(E,U={}){U.mode!=="merge"?Z0():y_(E.map(re=>re.index)),sc(()=>nL(E,U)),_v()}const Fr=O(()=>ui.value&&bo.value),sL=O(()=>{var E;return!Y.value&&M.batchRendering!==!1&&Ue.value>0&&((E=M.maxLiveNodes)!=null?E:0)<=0}),iL=O(()=>!Y.value&&Ct&&ct.value===!0&&!sn.value&&!ps.value&&!js.value&&!Fr.value&&!sL.value),__=O(()=>!!ss&&Fr.value),S_=O(()=>sn.value||wn.value),{focusIndex:nl,liveRange:ws,updateLiveRange:Ud}=(function(E,U){const{parsedNodeCount:re,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:$e,clamp:Pe}=U,We=$e??O(()=>{var qe;return Math.max(0,(qe=E.liveNodeBuffer)!=null?qe:60)}),et=q(0),He=Es({start:0,end:0});return{liveNodeBufferResolved:We,focusIndex:et,liveRange:He,updateLiveRange:function(){const qe=re.value;if(!ae.value||qe===0)return He.start=0,void(He.end=qe);const Qe=Math.min(be.value,qe),De=We.value,Ke=Pe(et.value-De,0,Math.max(0,qe-Qe));He.start=Ke,He.end=Math.min(qe,Ke+Qe)}}})(M,{parsedNodeCount:Gn,virtualizationEnabled:sn,maxLiveNodesResolved:ns,liveNodeBufferResolved:Oo,clamp:xs}),Or=new Map,Za=new Map,Ul=new Map,Sh=[],ol=new Map,Vl=new Set,C_=q(0);let Y0=!1;const A_=O(()=>(C_.value,Vl.size)),Ii=new Map,Rr=new Map,M_=q(0),J0=O(()=>{M_.value;let E=0;for(const U of Ii.values())E+=Math.max(0,U);return E});let $i=null;const Ch=O(()=>{if(!sn.value)return Ae.value.length;const E=Oo.value,U=Math.max(ws.end+E,rn.value),re=Math.min(Ae.value.length,U);return Math.max(Cn.value,re)});function Ah(){Y0||(Y0=!0,queueMicrotask(()=>{Y0=!1,C_.value+=1}))}function E_(E,U,re="node-resize"){if(!H||typeof window>"u")return null;const ae=window.setTimeout(()=>{Vl.delete(ae)&&Ah();try{U()}finally{co(re)}},Math.max(0,E));return Vl.add(ae),Ah(),ae}function Mh(E){H&&E!=null&&(Vl.delete(E)&&Ah(),window.clearTimeout(E))}function T_(){if(H&&typeof window<"u")for(const E of Vl)window.clearTimeout(E);Vl.size&&(Vl.clear(),Ah()),Sh.length=0,Ul.clear()}function rL(E){F.value=E}function lL(E){W.value=E}function aL(E){j.value=E}const{cancelScheduledFocusSync:X0,scheduleFocusSync:dr}=(function(E){const{isClient:U,containerRef:re,virtualizationEnabled:ae,requestFrame:be,cancelFrame:$e,syncFocusToScroll:Pe}=E;let We=null;function et(){var qe,Qe,De;return(De=(Qe=(qe=re.value)==null?void 0:qe.ownerDocument)==null?void 0:Qe.defaultView)!=null?De:typeof window<"u"?window:null}function He(){if(!We)return;const qe=et();We.viaTimeout?qe?qe.clearTimeout(We.id):clearTimeout(We.id):$e?.(We.id),We=null}return{cancelScheduledFocusSync:He,scheduleFocusSync:function(qe={}){if(!ae.value)return;if(!U)return void Pe(!0);if(qe.immediate)return He(),void Pe(!0);if(We)return;const Qe=()=>{We=null,Pe()};if(be)return void(We={id:be(Qe),viaTimeout:!1});const De=et();We={id:De?De.setTimeout(Qe,16):setTimeout(Qe,16),viaTimeout:!0}}}})({isClient:H,containerRef:A,virtualizationEnabled:sn,requestFrame:In,cancelFrame:wo,syncFocusToScroll:function(E=!1){var U;if(!sn.value)return;const re=pe.value||fe();if(!re)return;const ae=re.ownerDocument||((U=A.value)==null?void 0:U.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),$e=re===ae?.documentElement||re===ae?.body,Pe=Ae.value.length;if(Pe<=0)return;if(!$e&&Pe>0&&ue(re)){const ut=Yt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),_t=Yt("syncFocusToScroll.scrollTop",()=>re.scrollTop),mt=_t<0?-_t:_t;return void Ih(xs((We=Math.max(0,mt)+.5*Math.max(0,ut),on.estimateIndexForOffsetFromEnd(We)),0,Math.max(0,Pe-1)),E)}var We;const et=(function(ut,_t,mt,Ft){const Pt=A.value;if(!Pt)return null;const jt=Ft?0:Yt("syncFocusToScroll.model.root.getBoundingClientRect",()=>ut.getBoundingClientRect().top),zt=Yt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Pt.getBoundingClientRect().top),qt=Math.max(0,jt-zt),mn=Ft?Yt("syncFocusToScroll.model.viewport.clientHeight",()=>{var kn,Xn,_s,hs;return(hs=(_s=(Xn=mt?.innerHeight)!=null?Xn:(kn=_t.documentElement)==null?void 0:kn.clientHeight)!=null?_s:ut.clientHeight)!=null?hs:0}):Yt("syncFocusToScroll.model.root.clientHeight",()=>ut.clientHeight);return xs(K0(qt+.5*Math.max(0,mn)),0,Math.max(0,Ae.value.length-1))})(re,ae,be,$e);if(et!=null)return void Ih(et,E);const He=$e?null:Yt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),qe=$e?0:He.top,Qe=$e?Yt("syncFocusToScroll.viewport.clientHeight",()=>{var ut,_t;return(_t=(ut=be?.innerHeight)!=null?ut:re.clientHeight)!=null?_t:0}):He.bottom,De=V.value;let Ke=null,ft=null;for(const[ut,_t]of De){if(!_t)continue;const mt=Yt("syncFocusToScroll.slot.getBoundingClientRect",()=>_t.getBoundingClientRect());mt.bottom<=qe||mt.top>=Qe||(Ke==null&&(Ke=ut),ft=ut)}if(Ke==null||ft==null){const ut=A.value;if(!ut)return;const _t=$e?{top:0}:Yt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),mt=Yt("syncFocusToScroll.fallback.scrollTop",()=>we(re,ae,$e)),Ft=$e?(()=>{const jt=Yt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>ut.getBoundingClientRect()),zt=($e?0:_t.top)-jt.top;return Math.max(0,zt)})():(()=>{const jt=se(ut,re);return Math.max(0,mt-jt)})(),Pt=$e?Yt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var jt,zt,qt,mn;return(mn=(qt=(zt=be?.innerHeight)!=null?zt:(jt=ae?.documentElement)==null?void 0:jt.clientHeight)!=null?qt:re.clientHeight)!=null?mn:0}):Yt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void Ih(xs(K0(Ft+.5*Math.max(0,Pt)),0,Math.max(0,Ae.value.length-1)),!0)}Ih(Math.round((Ke+ft)/2),E)}}),{visibleNodeIndices:Q0,nodeVisibilityHandles:ic,nodeVisibilityWatchStops:Eh,nodeVisibilityFallbackTimers:I_,clearVisibilityFallback:Th,markNodeVisible:ql,cleanupNodeVisibility:uL,destroyNodeVisibilityState:ev}=ape({isClient:H,shouldTrackVisibleNodeIndices:()=>Fr.value,shouldCleanupNodeVisibility:()=>sn.value,onNodeMarkedVisible:E=>{sn.value?dr():nl.value=xs(E,0,Math.max(0,Ae.value.length-1))},onNodeVisibilityCleaned:E=>{nn.delete(E)&&sS()}}),{cleanupScrollListener:$_,setupScrollListener:cL}=(function(E){const{isClient:U,virtualizationEnabled:re,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:$e,scheduleFocusSync:Pe,onScroll:We}=E;let et=null,He=null;function qe(){et&&(et(),et=null),He=null,be.value=null}function Qe(De){const Ke=E.getScrollTop?E.getScrollTop(De):De.scrollTop;return Math.max(0,Number.isFinite(Ke)?Math.abs(Ke):0)}return{cleanupScrollListener:qe,setupScrollListener:function(){if(!U)return;if(!((De=ae?.value)!=null?De:re.value))return void qe();var De;const Ke=$e();if(!Ke)return void qe();if(be.value===Ke&&et)return;qe(),He=Qe(Ke);const ft=()=>{if(We?.(),re.value){const ut=(function(_t){const mt=Qe(_t),Ft=He;He=mt;const Pt=Math.max(480,.75*(_t.clientHeight||0));return Ft==null?mt>Pt?{immediate:!0}:void 0:Math.abs(mt-Ft)>Pt?{immediate:!0}:void 0})(Ke);ut?Pe(ut):Pe()}};Ke.addEventListener("scroll",ft,{passive:!0}),be.value=Ke,et=()=>{Ke.removeEventListener("scroll",ft)}}}})({isClient:H,virtualizationEnabled:sn,listenerEnabled:S_,scrollRootElement:pe,resolveScrollContainer:fe,scheduleFocusSync:dr,onScroll:function(){const E=Xe.value;if(!E)return;const U=qd();if(!U||(function(ae){if(Xd()>=tl)return Ga=null,!1;const be=Ga;if(be==null)return!0;const $e=Math.abs(ae.scrollTop-be)<=2;return $e||(Ga=null),$e})(U))return;const re=q_(U);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,E.distanceFromBottomPx))>32)&&dc("restore"):dc("restore")},getScrollTop:E=>{var U;const re=E.ownerDocument||((U=A.value)==null?void 0:U.ownerDocument)||document,ae=E===re.documentElement||E===re.body||E===re.scrollingElement;return Yt("scrollListener.getScrollTop",()=>we(E,re,ae))}});function Ih(E,U=!1){const re=xs(E,0,Math.max(0,Ae.value.length-1));!U&&Math.abs(re-nl.value)<=1||(nl.value=re,Ud())}function xs(E,U,re){return Math.min(Math.max(E,U),re)}function tv(E=Ae.value.length){const U=kt();return!Number.isInteger(U)||U<0?E:xs(U,0,E)}function nv(E){return E?.firstElementChild}function N_(E,U){var re;return E?(re=E.matches)!=null&&re.call(E,U)?E:E.querySelector(U):null}function dL(E,U){E<1||E>6||(le[E]=U)}function L_(){if(!zn.value)return void(Q.value=0);const E=Yt("updateExperimentContainerWidth.clientWidth",()=>{var U,re;return(re=(U=A.value)==null?void 0:U.clientWidth)!=null?re:0});Q.value=E>0?E:0}let Vd=null;function ov(){Vd?.disconnect(),Vd=null}const F_=Vf("ViewportDeferredMarkdownCodeBlockNode",nr({loader:()=>po(null,null,function*(){return(yield Is(()=>import("./index5-CCjgec83.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:v1,delay:0,suspensible:!1}),v1);function O_(E){return E===F_}const R_=O(()=>h.value==="pre"?gi:h.value==="shiki"?F_:jy);function P_(){var E;return((E=M.codeBlockProps)==null?void 0:E.showHeader)!==!1}function D_(E,U,re){const ae=oc[U],be=typeof ae=="number"&&ae>0;if(Fs.value&&!be&&!(function($e){return!!Bn.value.paragraph&&($e.type==="paragraph"||$e.type==="list_item"||$e.type==="list")})(E)){const $e=s$(E,re,ee.value);if($e)return $e}if(Gt.value&&E.type==="code_block"){const $e=(function(Pe){if(Pe.type!=="code_block")return null;const We=gS(Pe,zh(Pe));return O_(We)?"markdown":We===gi?"pre":We===R_.value||We===jy?"monaco":null})(E);if($e==="monaco"||$e==="markdown"||$e==="pre")return(function(Pe,We){var et,He,qe;if(!Pe||Pe.type!=="code_block")return null;const Qe=We.rendererKind,De=Qe!=="pre"&&We.showHeader!==!1,Ke=!!Pe.diff;let ft=0,ut=500;if(Qe==="monaco"){const mt=(et=We.monacoOptions)!=null?et:{},Ft=Xy(Pe,mt,We.width),Pt=(function(zt){const qt=typeof zt?.fontSize=="number"&&zt.fontSize>0?zt.fontSize:12;return typeof zt?.lineHeight=="number"&&zt.lineHeight>0?zt.lineHeight:Math.round(1.5*qt)})(mt),jt=(function(zt,qt){var mn,kn;const Xn=typeof((mn=zt?.padding)==null?void 0:mn.top)=="number"?zt.padding.top:qt?0:8,_s=typeof((kn=zt?.padding)==null?void 0:kn.bottom)=="number"?zt.padding.bottom:qt?0:8;return Math.max(0,Xn)+Math.max(0,_s)})(mt,Ke);ut=typeof mt.MAX_HEIGHT=="number"&&mt.MAX_HEIGHT>0?mt.MAX_HEIGHT:500,ft=Math.round(Ft*Pt+jt)}else if(Qe==="markdown"){const mt=Xy(Pe);ft=Math.round(21*mt+32)}else{const mt=Xy(Pe);ft=Math.round(28*mt),ut=Number.POSITIVE_INFINITY}const _t=Math.max(1,Math.min(ft,ut));return vt({kind:"code-block",height:Math.round(_t+(De?40:0)),contentHeight:_t,rendererKind:Qe},Ke&&Qe==="monaco"?{diffInline:Qw((He=We.monacoOptions)!=null?He:{},(qe=We.width)!=null?qe:0)}:{})})(E,{rendererKind:$e,monacoOptions:M.codeBlockMonacoOptions,showHeader:P_(),width:re})}return null}iE(()=>{if(Vs.value,Lr>0)return;const E=Ae.value,U=Nt();if(!E.length||!yt.value)return pn=[],Yn=[],Jn=-1,Ro.clear(),void(is.value=Zt);const re=Q.value||Yt("estimatedNodeHeights.clientWidth",()=>{var He;return((He=A.value)==null?void 0:He.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return pn=[],Yn=[],Jn=-1,Ro.clear(),void(is.value=Zt);const ae=(function(He){return[Math.round(He),Fs.value,Gt.value,ee.value,M.codeBlockMonacoOptions,P_(),h.value,Bn.value,Zy.value]})(re),be=pn.length<=E.length&&(Pe=ae,($e=Yn).length===Pe.length&&$e.every((He,qe)=>Object.is(He,Pe[qe])));var $e,Pe;const We=be&&Jn===U?E.length:be?tv(E.length):0,et=be?Array.from(Ro):[];pn.length=E.length;for(let He=We;He=0&&Heis.value);on=(function(E){let U=!0,re=[0],ae="";function be(qe){var Qe;const De=E.nodeHeights[qe];if(Number.isFinite(De)&&De>0)return De;const Ke=E.parsedNodes.value[qe],ft=Ke?.type,ut=!!((Qe=E.hasCustomParagraphComponent)!=null&&Qe.call(E)),_t=E.estimatedNodeHeights.value[qe],mt=_t?.height;if(!(function(Pt,jt,zt){return!!(zt&&jt?.kind==="simple-text"&&(Pt==="paragraph"||Pt==="list_item"||Pt==="list"))})(ft,_t,ut)&&Number.isFinite(mt)&&mt>0)return mt;const Ft=Yfe(Ke,E.getContainerWidth()||640);return ft==="heading"||ft==="paragraph"&&Ft<=28&&(function(Pt,jt){if(jt)return!1;const zt=Pt.children;return!Array.isArray(zt)||!zt.length||zt.every(r$)})(Ke,ut)?Ft:Math.max(E.averageNodeHeight.value,Ft)}function $e(){var qe;const Qe=E.parsedNodes.value.length,De=E.getPrefixCacheKeyParts().join(":");if(!U&&ae===De)return re;const Ke=new Array(Qe+1);Ke[0]=0;for(let ft=0;ft=((Qe=ft[Ke])!=null?Qe:0))return Ke-1;let ut=0,_t=Ke-1,mt=Ke-1;for(;ut<=_t;){const Ft=ut+_t>>1;((De=ft[Ft+1])!=null?De:0)>=qe?(mt=Ft,_t=Ft-1):ut=Ft+1}return mt}function We(qe,Qe){var De,Ke;if(qe>=Qe)return 0;if(E.heightEstimationActive.value)return(function(_t,mt){var Ft,Pt;const jt=E.parsedNodes.value.length,zt=vM(Math.trunc(_t),0,jt),qt=vM(Math.trunc(mt),zt,jt);if(zt>=qt)return 0;const mn=$e();return((Ft=mn[qt])!=null?Ft:0)-((Pt=mn[zt])!=null?Pt:0)})(qe,Qe);if(E.heightTreeSize.value!==E.parsedNodes.value.length){let _t=0;for(let mt=qe;mtzt<=0?0:E.fenwickRangeSum(ut,0,zt)+(zt-E.fenwickRangeSum(_t,0,zt))*ft;let Ft=0,Pt=De.length-1,jt=De.length-1;for(;Ft<=Pt;){const zt=Ft+Pt>>1;mt(zt+1)>=qe?(jt=zt,Pt=zt-1):Ft=zt+1}return jt}let Ke=qe;for(let ft=0;ft0||qe++}return qe}return{markFallbackHeightPrefixDirty:function(){U=!0},getFallbackNodeHeight:be,estimateHeightRange:We,estimateIndexForOffset:et,estimateIndexForOffsetFromEnd:function(qe){var Qe,De;const Ke=E.parsedNodes.value;if(!Ke.length)return 0;if(qe<=0)return Math.max(0,Ke.length-1);if(E.heightEstimationActive.value){const ut=(Qe=$e()[Ke.length])!=null?Qe:0;return Pe(Math.max(0,ut-qe))}if(E.heightTreeSize.value===Ke.length){const ut=We(0,Ke.length);return et(Math.max(0,ut-qe))}let ft=qe;for(let ut=Ke.length-1;ut>=0;ut--){const _t=(De=E.nodeHeights[ut])!=null?De:E.averageNodeHeight.value;if(ft<=_t)return ut;ft-=_t}return 0},getEstimatedNodeHeightCount:He,buildVirtualHeightSummary:function(qe){var Qe;const De=E.parsedNodes.value.length;return{totalNodes:De,measuredCount:E.heightStats.count,estimatedCount:He(),averageNodeHeight:E.averageNodeHeight.value,topSpacerHeight:qe.topSpacerHeight,bottomSpacerHeight:qe.bottomSpacerHeight,estimatedTotalHeight:We(0,De),width:(Qe=qe.width)!=null?Qe:E.getContainerWidth()}}}})({parsedNodes:Ae,nodeHeights:oc,heightStats:Ki,heightTreeSize:G0,heightSumTree:Z7,heightKnownTree:Y7,averageNodeHeight:g_,heightEstimationActive:zn,estimatedNodeHeights:rc,getContainerWidth:Ti,hasCustomParagraphComponent:()=>!!Bn.value.paragraph,getPrefixCacheKeyParts:()=>{var E;const U=Af(Q.value||Yt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=A.value)==null?void 0:ae.clientWidth)||0})),re=((E=o.virtualScroll)==null?void 0:E.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Ae.value.length,Ki.count,Math.round(Ki.total),Math.round(100*g_.value),re,U,zn.value?1:0,Zy.value,G.value,Bn.value.paragraph?1:0]},fenwickRangeSum:oL}),Ze(()=>Ae.value.length,E=>{var U;qi(),E<=0?_h():(EX7(U))),E!==G0.value&&xh(E))},{immediate:!0});const fL=O(()=>{if(!sn.value)return Ae.value.map((ae,be)=>({node:ae,index:be}));const E=Ae.value.length,U=xs(ws.start,0,E),re=xs(ws.end,U,E);return Ae.value.slice(U,re).map((ae,be)=>({node:ae,index:U+be}))}),sv=O(()=>sn.value?tc(0,Math.min(ws.start,Ae.value.length)):0),iv=O(()=>{if(!sn.value)return 0;const E=Ae.value.length;return tc(Math.min(ws.end,E),E)});function B_(){return on.buildVirtualHeightSummary({topSpacerHeight:sv.value,bottomSpacerHeight:iv.value,width:Ya()})}function pL(){const E=Ae.value,U=B_();return un(vt({},U),{probe:{paragraphReady:!!ee.value.paragraph,listItemReady:!!ee.value.listItem,listWrapperOverhead:ee.value.listWrapperOverhead,headingReadyLevels:Object.entries(ee.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:E.map((re,ae)=>{var be,$e,Pe,We,et,He,qe,Qe,De;return{index:ae,type:re.type,estimateKind:($e=(be=rc.value[ae])==null?void 0:be.kind)!=null?$e:null,rendererKind:(We=(Pe=rc.value[ae])==null?void 0:Pe.rendererKind)!=null?We:null,estimatedHeight:(He=(et=rc.value[ae])==null?void 0:et.height)!=null?He:null,estimatedContentHeight:(Qe=(qe=rc.value[ae])==null?void 0:qe.contentHeight)!=null?Qe:null,measuredHeight:(De=oc[ae])!=null?De:null}})})}function rv(){return o.indexKey!=null?String(o.indexKey):ps.value?`virtual-${mo()}`:"markdown-renderer"}function z_(E){const U=String(E),re=`${rv()}-`;if(!U.startsWith(re))return null;const ae=U.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=Ae.value.length?null:be}function mo(){var E,U,re;const ae=(E=o.virtualScroll)==null?void 0:E.sessionKey;return String(ae!=null&&ae!==""?ae:(re=(U=o.indexKey)!=null?U:M.customId)!=null?re:Eo)}function jo(){var E;const U=(E=o.virtualScroll)==null?void 0:E.threadKey;return U==null||U===""?void 0:String(U)}const hL=O(()=>{var E,U,re;return(re=jo())!=null?re:String((U=(E=o.indexKey)!=null?E:M.customId)!=null?U:Eo)});function lv(E){var U;return(E??"")===((U=jo())!=null?U:"")}function sl(){var E,U,re;return U=(E=o.virtualScroll)==null?void 0:E.measurementKey,re=(function(){const ae=h.value;return(function(be){var $e,Pe;const We=be.renderer,et=We==="monaco"?be.codeBlockMonacoOptions:void 0,He=be.codeBlockProps,qe=We==="shiki";return[be.isDark?"dark":"light",We==="monaco"?"code-rich":We==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",ms(be.codeBlockMinWidth),ms(be.codeBlockMaxWidth),...qe?[Bue(($e=He?.themes)!=null?$e:be.themes,(Pe=He?.langs)!=null?Pe:be.langs)]:[],ms(et?.fontSize),ms(et?.lineHeight),ms(et?.fontFamily),ms(et?.tabSize),ms(et?.MAX_HEIGHT),ms(et?.wordWrap),ms(et?.wrappingIndent),ms(et?.padding),ms(He?.showHeader),ms(He?.showCopyButton),ms(He?.showExpandButton),ms(He?.showPreviewButton),ms(He?.showCollapseButton),ms(He?.showFontSizeButtons)].join("\0")})({renderer:ae,isDark:M.isDark,codeBlockStream:M.codeBlockStream,codeBlockMinWidth:M.codeBlockMinWidth,codeBlockMaxWidth:M.codeBlockMaxWidth,codeBlockMonacoOptions:ae==="monaco"?M.codeBlockMonacoOptions:void 0,codeBlockProps:M.codeBlockProps,themes:ae==="shiki"?M.themes:void 0,langs:ae==="shiki"?M.langs:void 0})})(),[U==null?"":String(U),re].join("\0")}function Ya(){return Ti()}const $h=O(()=>Af(Ya())),Ni=O(()=>[sl(),$h.value].join("\0")),mL=O(()=>{var E;return ps.value?["virtual",(E=jo())!=null?E:"",mo(),Ni.value].join("\0"):o.indexKey});function lc(){M_.value+=1}function av(E){return!(!E||!Number.isInteger(E.index)||E.index<0||E.index>=Ae.value.length||E.sessionKey!==mo()||E.threadKey!==jo()||E.layoutEpochKey!==Ni.value)}function W_(E){const U=String(E),re=Rr.get(U);return re?av(re)?re.index:null:z_(U)}function H_(E="async-node"){(Ii.size||Rr.size)&&(Ii.clear(),Rr.clear(),lc(),co(E))}const ac=yn(Nb,null),uv={reportHeight(E,U){if(!wn.value)return;const re=W_(E);if(re==null)return;const ae=Or.get(re);if(!ae)return;const be=Number(U),$e=w_(re,ae);(function(Pe,We,et={}){sc(()=>b_(Pe,We,et))})(re,Number.isFinite(be)&&be>0?Math.max(be,$e||0):$e)},markPending(E){if(!wn.value)return;const U=z_(E);U!=null&&(function(re,ae){var be;const $e=Rr.get(re);if($e&&av($e))return Ii.set(re,Math.max(0,(be=Ii.get(re))!=null?be:0)+1),lc(),void co("async-node");Ii.set(re,1),Rr.set(re,(function(Pe){return{index:Pe,sessionKey:mo(),threadKey:jo(),layoutEpochKey:Ni.value}})(ae)),lc(),co("async-node")})(String(E),U)},markSettled(E){if(!wn.value)return;const U=String(E),re=W_(E);(re!=null||(function(ae){return Ii.has(String(ae))})(U))&&(function(ae){var be;const $e=(be=Ii.get(ae))!=null?be:0;return!($e<=0||($e<=1?(Ii.delete(ae),Rr.delete(ae)):Ii.set(ae,$e-1),lc(),$e===1&&co("async-node"),0))})(U)&&re!=null&&il()}};function gL(){let E=0;for(const U of Or.values())E+=Yt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=U?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,E))}Wn(Nb,{reportHeight(E,U){uv.reportHeight(E,U),ac?.reportHeight(E,U)},markPending(E){uv.markPending(E),ac?.markPending(E)},markSettled(E){uv.markSettled(E),ac?.markSettled(E)}});let cv,dv=null,uc=null;function Nh(E){return E!==!1&&E!=null&&E!==""}function j_(){return sn.value?(function(){if(!sn.value)return!0;const E=Ae.value.length,U=xs(ws.start,0,E),re=xs(ws.end,U,E);if(U>=re)return!0;for(let ae=U;ae=Ch.value}function fv(){return ct.value===!0&&!Mt.value&&J0.value===0&&Vl.size===0&&ol.size===0&&$i==null&&j_()}function U_(){var E,U;if(((E=o.virtualScroll)==null?void 0:E.settleMode)!=="manual"||dv===mo()&&cv===jo())return!0;const re=(U=o.virtualScroll)==null?void 0:U.settledToken;return!!Nh(re)&&uc===rf(re)}function pv(){return fv()&&U_()}function vL(E,U){return U.totalNodes<=0?E==="final"?"final":"estimate":U.measuredCount>=U.totalNodes?E==="final"?"final":"measured":U.measuredCount>0||U.estimatedCount>0?"mixed":"estimate"}function Ja(E="manual",U){const re=B_(),ae=(function(be){return be||(ct.value!==!0?Ae.value.length>0?"streaming":"estimating":!j_()||ol.size>0||$i!=null?"measuring":pv()?"settled":"settling")})(U);return{sessionKey:mo(),threadKey:jo(),phase:ae,nodeCount:re.totalNodes,liveRange:{start:ws.start,end:ws.end},renderedCount:Cn.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:gL(),totalHeight:V_(),width:re.width,final:ct.value===!0,stable:pv(),confidence:vL(ae,re),reason:E}}function qd(){const E=pe.value||fe(),U=A.value;if(!E||!U)return null;const re=E.ownerDocument||U.ownerDocument||document,ae=E===re.documentElement||E===re.body||E===re.scrollingElement,be=Yt("getScrollBox.scrollTop",()=>we(E,re,ae)),$e=Yt("getScrollBox.scrollHeight",()=>{var We,et,He,qe,Qe;return ae?Math.max((et=(We=re.documentElement)==null?void 0:We.scrollHeight)!=null?et:0,(qe=(He=re.body)==null?void 0:He.scrollHeight)!=null?qe:0,(Qe=E.scrollHeight)!=null?Qe:0):E.scrollHeight}),Pe=Yt("getScrollBox.clientHeight",()=>{var We;return ae?((We=re.documentElement)==null?void 0:We.clientHeight)||E.clientHeight||0:E.clientHeight});return{root:E,doc:re,isViewportRoot:ae,scrollTop:be,scrollHeight:$e,clientHeight:Pe}}function V_(){const E=Ae.value.length,U=Math.max(0,tc(0,E)),re=Yt("getRendererLogicalHeight.offsetHeight",()=>{var be,$e;return($e=(be=A.value)==null?void 0:be.offsetHeight)!=null?$e:0}),ae=Math.max(0,re>0?re:Yt("getRendererLogicalHeight.scrollHeight",()=>{var be,$e;return($e=(be=A.value)==null?void 0:be.scrollHeight)!=null?$e:0}));return E<=0?Math.ceil(re):sn.value?U>0?Math.max(1,Math.ceil(U),(function(){let be=sv.value+iv.value;for(const $e of nn.values())$e&&(be+=Math.max(0,Yt("getVirtualizedDomLogicalHeight.offsetHeight",()=>$e.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,$e){return be<=0||$e<=0?0:$e<=be+Math.max(512,.05*be)?Math.ceil($e):0})(U,ae)):Math.max(1,Math.ceil(ae)):wn.value?U>0||Ki.count>0||on.getEstimatedNodeHeightCount()>0?(Sn.value&&Cn.value,Math.max(1,Math.ceil(ae),Math.ceil(U))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(U))}function q_(E){const U=A.value;if(!U)return null;const re=Yt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>U.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:Yt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(E)-re.bottom}function yL(E={}){const U=E.requireViewport!==!1,re=(function($e=64){const Pe=qd(),We=A.value;if(!Pe||!We)return!1;const et=(function(qe){if(qe.isViewportRoot)return{top:0,bottom:qe.clientHeight};const Qe=Yt("getVirtualViewportRect.getBoundingClientRect",()=>qe.root.getBoundingClientRect());return{top:Qe.top,bottom:Qe.bottom}})(Pe),He=Yt("isRendererNearVirtualViewport.getBoundingClientRect",()=>We.getBoundingClientRect());return He.bottom>=et.top-$e&&He.top<=et.bottom+$e})();if(U&&!re)return null;const ae=(function(){const $e=qd(),Pe=A.value;if(!$e||!Pe||Math.max(0,$e.scrollHeight-$e.scrollTop-$e.clientHeight)>64)return null;const We=q_($e);return We==null?null:We>=-8&&We<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,We)}:null})();if(ae)return{anchor:ae,captured:!0};const be=h_();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:re};if(E.allowFallback===!0){const $e=(function(){const Pe=Ae.value.length;return Pe<=0?null:{type:"node",nodeIndex:xs(nl.value,0,Math.max(0,Pe-1)),offsetWithinNodePx:0}})();return $e?{anchor:$e,captured:!1}:null}return null}function hv(E){let U=2166136261;for(let re=0;re>>0).toString(36)}function kL(E,U){let re=E;for(let ae=0;ae8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${hv(be)}`})(E)}`;if(typeof E=="function")return"fn";if(typeof E!="object")return typeof E;if(U.has(E))return"cycle";if(re>=6)return"max-depth";U.add(E);try{if(Array.isArray(E)){if(E.length<=160){const He=[];for(let qe=0;qe=We&&Pe.push(qe)}return[`a:${E.length}`,`h=${$e.join(",")}`,`t=${Pe.join(",")}`,`all=${(et>>>0).toString(36)}`].join(":")}const ae=E,be=Object.keys(ae).filter($e=>{const Pe=ae[$e];return $e!=="parent"&&$e!=="el"&&$e!=="component"&&(Pe==null||typeof Pe=="string"||typeof Pe=="number"||typeof Pe=="boolean"||bL.has($e))}).sort();return`o:${be.length}:${be.map($e=>`${$e}=${Lh(ae[$e],U,re+1)}`).join(";")}`}finally{U.delete(E)}}let mv=-1,gv="",Xa=[2166136261];function Kd(E){const U=Ae.value[E];return U?hv(Lh(U)):""}function wL(E,U){let re=E;for(let ae=0;ae>>0}function vv(){var E,U;const re=G.value;if(mv===re)return gv;const ae=Ae.value.length;let be=tv(ae);(mv!==re-1||be>ae||Xa.length>>0).toString(36),mv=re,gv}function cc(E,U={}){var re;const ae=U.includeHeightCache===!0,be=(re=U.includeContentHash)!=null?re:ae,$e=ae?(function(We){const et=(function(){var ut,_t;const mt=Number((_t=(ut=o.virtualScroll)==null?void 0:ut.heightCacheLimit)!=null?_t:5e3);return!Number.isFinite(mt)||mt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(mt))})();if(!Number.isFinite(et)||We.length<=et)return We;const He=new Map,qe=ut=>{!ut||He.size>=et||He.set(ut.index,ut)},Qe=Ae.value.length,De=xs(ws.start-2*Oo.value,0,Qe),Ke=xs(ws.end+2*Oo.value,De,Qe);for(const ut of We)ut.index>=De&&ut.index=0&&He.sizeut.index-_t.index).slice(0,et)})(tL().map(We=>{var et;const He=Ae.value[We.index];return He?un(vt({},We),{nodeType:String((et=He.type)!=null?et:""),signature:Kd(We.index)}):null}).filter(We=>!!We)):[],Pe=yL({allowFallback:U.allowAnchorFallback===!0,requireViewport:U.requireViewport});return Pe||$e.length||U.includeEmptyState===!0?un(vt({sessionKey:E.sessionKey,threadKey:E.threadKey},Pe?{anchor:Pe.anchor,anchorCaptured:Pe.captured}:{anchorCaptured:!1}),{metrics:E,width:E.width,contentHash:be?vv():void 0,measurementKey:sl()||void 0,heightCache:$e.length?$e:void 0}):null}function yv(E){var U,re;const ae=qd();if(!ae)return;const be=(function(We){const et=A.value;if(!et)return null;const He=se(et,We.root),qe=Ae.value.length,Qe=Yt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>et.offsetHeight||0),De=Math.max(0,Qe>0?Qe:qe>0?Yt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>et.scrollHeight||0):0),Ke=V_();return He+Math.max(De,Ke)})(ae);if(be==null)return;const $e=Math.max(0,E.distanceFromBottomPx),Pe=Math.max(0,be-ae.clientHeight-$e);(function(We){tl=Xd()+120,Ga=We})(Pe),ae.isViewportRoot?(re=(U=ae.doc.defaultView)==null?void 0:U.scrollTo)==null||re.call(U,0,Pe):hM(ae.root,ae.doc,Pe,{isReverseFlexScrollRoot:ue,getNormalizedScrollTop:we})}const kv=[];function K_(){if(H)for(Io!=null&&(wo?.(Io),Io=null);kv.length;){const E=kv.pop();E!=null&&window.clearTimeout(E)}}function dc(E){const U=!!Xe.value;Xe.value=null,tl=0,Ga=null,K_(),U&&E&&co(E)}function fc(){if(!Xe.value||!H||Io!=null)return;const E=()=>{Io=null;const U=Xe.value;U&&yv(U)};Io=In?In(E):null,Io==null&&E()}function G_(E,U={}){const re=Ae.value.length;return re<=0?[]:E.filter(ae=>!(!Number.isInteger(ae.index)||ae.index<0||ae.index>=re)&&!(!Number.isFinite(ae.height)||ae.height<=0)&&!(U.requireSignature&&!ae.signature)&&!(U.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var $e;const Pe=Ae.value[be.index];return!(!Pe||be.nodeType&&be.nodeType!==String(($e=Pe.type)!=null?$e:"")||be.signature&&be.signature!==Kd(be.index))})(ae))}function Z_(E){const U=Af(Ya()),re=Af(E);return U!==-1&&re!==-1&&U===re}function bv(E){var U;const re=Number(E?.width);if(Number.isFinite(re)&&re>0)return re;const ae=Number((U=E?.metrics)==null?void 0:U.width);return Number.isFinite(ae)&&ae>0?ae:null}function Y_(E){var U;return E.sessionKey===mo()&&!!lv(E.threadKey)&&((U=E.measurementKey)!=null?U:"")===sl()&&!!Z_(bv(E))&&!!(function(re){const ae=re.heightCache;return!!ae?.length&&(J_(re)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(E)}function J_(E){return!!(E.contentHash&&E.contentHash===vv())}function xL(E){return!J_(E)}let Qa=null,eu=null,Fh=null,Gd=null,Zd=null;function wv(E){var U;const re=E.map(be=>{var $e,Pe;return[be.index,Math.round(10*be.height),($e=be.nodeType)!=null?$e:"",(Pe=be.signature)!=null?Pe:""].join("")}).join(""),ae=Af(Ya());return[(U=jo())!=null?U:"",mo(),sl(),Ae.value.length,ae,E.length,hv(re)].join(":")}function X_(E=(U=>(U=o.virtualScroll)==null?void 0:U.heightCache)()){if(!wn.value||!E?.length||Ae.value.length<=0||!Z_((U=o.virtualScroll)==null?void 0:U.heightCacheWidth))return!1;var U;const re=G_(E,{requireSignature:!0});if(!re.length)return!1;const ae=wv(re);return ae===Qa?(eu="standalone",!0):(x_(re,{mode:"merge"}),qi(),Qa=ae,eu="standalone",ef(),co("restore"),!0)}function xv(E,U={}){var re,ae,be;if(!wn.value||!E||E.sessionKey!==mo()||!lv(E.threadKey)||Ae.value.length<=0)return!1;const $e=!!((re=E.heightCache)!=null&&re.length)&&!Oh(),Pe=!E.anchor||E.anchorCaptured===!1&&U.allowUncapturedAnchor!==!0?null:E.anchor,We=U.restoreAnchor===!0&&!!Pe&&!Oh()&&Number(bv(E))>0;let et=!1;if((ae=E.heightCache)!=null&&ae.length&&Y_(E)){const qe=G_(E.heightCache,{requireCompatibilityMetadata:!E.contentHash,requireSignature:xL(E)});qe.length&&(x_(qe,{mode:"merge"}),qi(),Qa=wv(qe),eu="restore",ef(),et=!0)}if($e||We)return!1;if(!U.restoreAnchor||!Pe)return et&&co("restore"),!0;const He=(function(qe,Qe){var De;const Ke=qe.anchor,ft=Ke?Ke.type==="bottom"?`bottom:${Math.round(Ke.distanceFromBottomPx)}`:`node:${Ke.nodeIndex}:${Math.round(Ke.offsetWithinNodePx)}`:"none";return[(De=jo())!=null?De:"",mo(),sl(),$h.value,Qe,ft].join(":")})(E,(be=U.restoreToken)!=null?be:"imperative");return Fh===He?(et&&co("restore"),!0):(Fh=He,(function(qe){const Qe=()=>{if(qe.type==="node")return dc(),void m_({nodeIndex:qe.nodeIndex,offsetWithinNodePx:qe.offsetWithinNodePx});if(wh(),nc.value=null,Xe.value=qe,K_(),yv(qe),H)for(const De of[0,120,280,480])kv.push(window.setTimeout(()=>{const Ke=Xe.value;Ke&&yv(Ke)},De))};(function(De){if(!sn.value)return!1;const Ke=Ae.value.length;return!(Ke<=0||(nl.value=De.type==="node"?xs(De.nodeIndex,0,Ke-1):Ke-1,Ud(),0))})(qe)?bt(Qe):Qe()})(Pe),co("restore"),!0)}function Oh(){const E=Ya();return Number.isFinite(E)&&E>0}function Q_(E){var U;return E.sessionKey===mo()&&!!lv(E.threadKey)&&(Ae.value.length<=0||!(!((U=E.heightCache)!=null&&U.length)||Oh())||!(!(E.anchor&&Number(bv(E))>0)||Oh()))}function _v(){Ot.clear();for(const E of Object.keys(oc)){const U=Number(E);Number.isInteger(U)&&U>=0&&U{let U=!1,re=null;const ae=()=>{U||(U=!0,re!=null&&window.clearTimeout(re),E())};if(In)return In(ae),void(re=window.setTimeout(ae,50));re=window.setTimeout(ae,0)})}function Sv(E,U=jo(),re=Ni.value){return mo()===E&&jo()===U&&Ni.value===re}function Cv(){return po(this,arguments,function*(E={}){var U,re,ae,be,$e;const Pe=mo(),We=jo(),et=Ni.value,He=(U=E.frames)!=null?U:2,qe=(re=E.timeoutMs)!=null?re:120,Qe=(ae=E.reason)!=null?ae:"manual",De=E.expectedSettledTokenKey,Ke=E.flushPendingTimers===!0,ft=Ja(Qe),ut=()=>un(vt({},ft),{phase:ft.final?"settling":ft.phase,stable:!1,confidence:ft.confidence==="final"?"mixed":ft.confidence,reason:Qe}),_t=()=>Sv(Pe,We,et)&&(De==null||Qd()===De);for(let jt=0;jtwindow.setTimeout(zt,jt))})(qe),!_t()||(Ke&&T_(),il(),Yd(),!_t()))return ut();const mt=fv();mt&&(dv=Pe,cv=We,((be=o.virtualScroll)==null?void 0:be.settleMode)==="manual"&&De!=null&&Nh(($e=o.virtualScroll)==null?void 0:$e.settledToken)&&Qd()===De&&(uc=rf(o.virtualScroll.settledToken)));const Ft=_t()&&mt&&U_(),Pt=Ja(Qe,Ft?"final":void 0);return Iv(Pt,!0),Pt})}let Av="content",tu=null,nu=null,Mv=0,Jd=null,pc=null,Ev=null,Tv=null;function Xd(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function tS(E){var U,re;const ae=Jd;if(!ae)return!0;const be=(re=(U=o.virtualScroll)==null?void 0:U.heightDiffThresholdPx)!=null?re:1;return Math.abs(E.totalHeight-ae.totalHeight)>be||E.sessionKey!==ae.sessionKey||E.phase!==ae.phase||E.stable!==ae.stable||E.final!==ae.final||E.threadKey!==ae.threadKey||E.nodeCount!==ae.nodeCount||E.measuredCount!==ae.measuredCount||E.width!==ae.width}function Qd(E=(U=>(U=o.virtualScroll)==null?void 0:U.settledToken)()){return ms(E)}function nS(E,U){var re,ae;return[E,U.sessionKey,(re=U.threadKey)!=null?re:"",sl(),vv(),ms((ae=o.virtualScroll)==null?void 0:ae.settledToken),Math.round(U.totalHeight),Math.round(U.width)].join("\0")}function ef(){Ev=null,Tv=null,pc=null}function _L(E){const U=E.heightCache;return U?.length?wv(U):""}function tf(E){var U,re,ae;const be=E.metrics,$e=E.anchor?(Pe=E.anchor).type==="bottom"?`bottom:${Math.round(Pe.distanceFromBottomPx)}`:`node:${Pe.nodeIndex}:${Math.round(Pe.offsetWithinNodePx)}`:"none";var Pe;return[E.sessionKey,(U=E.threadKey)!=null?U:"",(re=E.measurementKey)!=null?re:sl(),(ae=E.contentHash)!=null?ae:"",_L(E),$e,E.anchorCaptured?1:0,be.liveRange.start,be.liveRange.end,be.renderedCount,be.nodeCount,Math.round(be.totalHeight),Math.round(be.width),be.phase,be.stable?1:0].join("\0")}function Iv(E,U=!1){if(!wn.value||(function(Pe=!1){return!Pe&&ps.value&&!Us.value})(U))return;const re=U||tS(E),ae=(function(Pe,We=!1){return We||Pe.stable||Pe.phase==="final"?{state:cc(Pe,{includeHeightCache:!0})}:{state:cc(Pe)}})(E,U),be=ae.state,$e=!!(be&&(re||(function(Pe,We=!1){return!!We||tf(Pe)!==pc})(be,U)));if(re&&(D(E),Jd=E,Mv=Xd()),be&&$e&&(z(be),be.anchor&&B(be.anchor),pc=tf(be)),E.stable){const Pe=nS("settled",E);if(Pe!==Ev){Ev=Pe;const We=cc(E,{includeHeightCache:!0});We&&(z(We),pc=tf(We)),(function(et){s("render-settled",et)})(E)}}if(E.phase==="final"){const Pe=nS("final",E);if(Pe!==Tv){Tv=Pe;const We=cc(E,{includeHeightCache:!0});We&&(z(We),pc=tf(We)),(function(et){s("render-final",et)})(E)}}}function $v(){tu!=null&&(wo?.(tu),tu=null),nu!=null&&H&&(window.clearTimeout(nu),nu=null)}function oS(){tu=null,nu=null,(function(E){if(ol.size>0||$i!=null)return!0;switch(E){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(Av)&&(il(),Yd()),Iv(Ja(Av))}function co(E){var U,re;if(!wn.value||(Av=E,tu!=null||nu!=null))return;const ae=Math.max(0,(re=(U=o.virtualScroll)==null?void 0:U.emitIntervalMs)!=null?re:32),be=Math.max(0,ae-(Xd()-Mv)),$e=()=>{nu=null,tu=In?In(oS):null,tu==null&&oS()};H&&be>0?nu=window.setTimeout($e,be):$e()}function sS(){st.value+=1}function Rh(E){if(Sn.value&&E>=Cn.value){const U=Ae.value[E],re=lt.value===!0&&ct.value!==!0&&E>=Ae.value.length-2,ae=U?.type==="code_block"||U?.type==="image"||U?.type==="mermaid"||U?.type==="infographic";if(!re||ae)return!1}return!Fr.value||E=me.value&&(J.value||(J.value=!0,ev()),!__.value||!ss))return hc(E),void(U&&ql(E,!0));if(E{if(I_.delete($e),!Fr.value||Q0.value.has($e))return;const et=nn.get($e);if(!et)return;const He=fe(et),qe=et.ownerDocument||document,Qe=qe.defaultView||window,De=!He||He===qe.documentElement||He===qe.body,Ke=!De&&He?Yt("nodeVisibilityFallback.root.getBoundingClientRect",()=>He.getBoundingClientRect()):null,ft=De?0:Ke.top,ut=De?Yt("nodeVisibilityFallback.clientHeight",()=>{var mt,Ft;return(Ft=(mt=Qe.innerHeight)!=null?mt:He?.clientHeight)!=null?Ft:0}):Ke.bottom,_t=Yt("nodeVisibilityFallback.node.getBoundingClientRect",()=>et.getBoundingClientRect());_t.bottom>=ft-500&&_t.top<=ut+500&&ql($e,!0)},1800+Pe);I_.set($e,We)})(E);let be=null;be=Ze(()=>ae.isVisible.value,$e=>{if($e){Th(E),ql(E,!0),be?.(),Eh.delete(E),ic.get(E)===ae&&ic.delete(E);try{ae.destroy()}catch{}}},{immediate:!0}),Eh.set(E,be),sn.value&&dr()}function Nv(){$i=null,sc(()=>{let E=!1;for(const[U,re]of ol)ol.delete(U),Or.get(U)===re.el&&Za.get(U)===re.version&&(E=b_(U,re.height,{allowShrink:re.allowShrink})||E);return E})}function mc(){$i!=null&&(wo?.($i),$i=null),ol.clear()}function Dh(E,U){(function(re,ae,be){var $e;if(!Number.isFinite(be)||be<=0||Or.get(re)!==ae)return;const Pe=Za.get(re);if(Pe==null)return;const We=Ae.value[re],et=Mt.value&&ct.value!==!0&&!(($e=o.nodes)!=null&&$e.length)&&re>=Ae.value.length-2,He=!(We?.loading===!0||et),qe=ol.get(re),Qe=qe?qe.allowShrink&&He:He,De=qe&&!Qe?Math.max(qe.height,be):be;ol.set(re,{height:De,allowShrink:Qe,version:Pe,el:ae}),$i==null&&($i=In?In(Nv):null,$i==null&&Nv())})(E,U,w_(E,U))}function il(){for(const[E,U]of Or)U&&Dh(E,U)}function iS(){An?.disconnect(),An=null,Zn.clear()}function Lv(){for(;Sh.length;)Mh(Sh.pop())}Ze(Us,E=>{E&&co("content")},{flush:"post"}),t({getVirtualMetrics:Ja,captureVirtualState:function(E={}){var U;return cc(Ja("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:E.allowFallbackAnchor===!0,requireViewport:E.requireViewport===!0,includeEmptyState:(U=E.includeEmptyState)==null||U})},restoreVirtualState:function(E,U={}){const re=U.restoreAnchor===!0,ae=U.restoreToken==null?"imperative":String(U.restoreToken);Gd=E,Zd={restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:U.allowUncapturedAnchor===!0},!xv(E,{restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:U.allowUncapturedAnchor===!0})&&Q_(E)||(Gd=null,Zd=null)},forceMeasure:function(E="manual"){return po(this,null,function*(){yield bt(),yield eS(),il(),Yd(),yield bt();const U=Ja(E);return Iv(U,!0),U})},settle:Cv,scrollToNode:function(E,U="start"){dc(),wh();const re=Ae.value.length;if(re<=0)return;const ae=xs(E,0,re-1),be=()=>{var $e;const Pe=K7({nodeIndex:ae,offsetWithinNodePx:0}),We=q0(ae),et=qd(),He=($e=et?.clientHeight)!=null?$e:0,qe=V7();let Qe=Pe;if(U==="center")Qe=Pe-He/2+We/2;else if(U==="end")Qe=Pe-He+We;else if(U==="nearest"&&qe!=null){if(Pe>=qe&&Pe+We<=qe+He)return;Qe=Peli.value,E=>{if(!E){iS();for(const U of Ul.values())for(const re of U)Mh(re);Ul.clear(),Za.clear(),Lv(),mc()}},{immediate:!0}),Ze(ct,E=>{E&&(function(){if(H&&ct.value&&Or.size){Lv();for(const U of[80,240,640]){const re=E_(U,()=>{for(const[ae,be]of Or)be&&Dh(ae,be)},"final");re!=null&&Sh.push(re)}}})(),co(E?"final":"content")});const SL=mM(()=>co("content"),16),CL=mM(()=>co("batch"),16);Ze([()=>Ae.value.length,()=>Cn.value],()=>{Xe.value&&fc(),SL()},{flush:"post",immediate:!0}),Ze([()=>ws.start,()=>ws.end],()=>{CL()},{flush:"post"});const{cleanupBatchScheduler:AL}=(function(E){const{props:U,isClient:re,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:$e,desiredRenderedCount:Pe,datasetKey:We,batchingEnabled:et,incrementalRenderingActive:He,resolvedBatchSize:qe,resolvedInitialBatch:Qe,renderedCount:De,adaptiveBatchSize:Ke,previousRenderContext:ft,previousBatchConfig:ut,requestFrame:_t,cancelFrame:mt,hasIdleCallback:Ft,cleanupNodeVisibility:Pt,onDatasetKeyChanged:jt,onDatasetChanged:zt}=E;let qt=null,mn="raf",kn=null,Xn=0,_s=!1,hs=!1;const fr=new Set,Pr=new Set;function df(){if(re){qt!=null&&(mn==="raf"&&mt?mt(qt):mn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(qt):mn==="timeout"&&window.clearTimeout(qt),qt=null),Xn+=1;for(const Os of fr)mt&&mt(Os);for(const Os of Pr)window.clearTimeout(Os);fr.clear(),Pr.clear(),kn=null,_s=!1,hs=!1}}function Kh(){return typeof performance<"u"?performance.now():Date.now()}function _S(Os){(function(rl){var Gl;if(!He.value)return;const ll=Math.max(2,(Gl=U.renderBatchBudgetMs)!=null?Gl:6),al=Math.max(1,qe.value||1),pr=Math.max(1,Math.floor(al/4));rl>1.5*ll?Ke.value=Math.max(pr,Math.floor(.8*Ke.value)):rl<.6*ll&&Ke.value=ll)return;const al=Math.max(1,Os),pr=()=>{const yc=Kh();qt=null;const ff=kn??al;kn=null;const kc=Kh();De.value=Math.min(ll,De.value+ff),Pt(De.value),(function(zv,Gh){if(!re)return void _S(Gh);_s=!0;const MS=++Xn;bt().then(()=>{var ES;if(MS!==Xn)return;const KL=Kh(),GL=Math.max(Gh,KL-zv),TS=()=>{MS===Xn&&_S(GL)};if(_t){let su=null,bc=null,$S=!1;const NS=()=>{$S||($S=!0,su!==null&&(fr.delete(su),su=null),bc!==null&&(Pr.delete(bc),window.clearTimeout(bc),bc=null),TS())};return su=_t(()=>{NS()}),fr.add(su),bc=window.setTimeout(()=>{su!==null&&mt&&mt(su),NS()},Math.max(32,(ES=U.renderBatchIdleTimeoutMs)!=null?ES:120)),void Pr.add(bc)}const IS=window.setTimeout(()=>{Pr.delete(IS),TS()},0);Pr.add(IS)})})(yc,Kh()-kc)};if(!re||di.immediate)return void pr();const Zl=Math.max(0,(rl=U.renderBatchDelay)!=null?rl:16);if(kn=kn!=null?Math.max(kn,al):al,qt==null){if(!ae&&Ft&&window.requestIdleCallback){const yc=Math.max(0,(Gl=U.renderBatchIdleTimeoutMs)!=null?Gl:120);return mn="idle",void(qt=window.requestIdleCallback(()=>pr(),{timeout:yc}))}if(_t&&!ae)return mn="raf",void(qt=_t(()=>{Zl===0?pr():(mn="timeout",qt=window.setTimeout(()=>pr(),Zl))}));mn="timeout",qt=window.setTimeout(()=>pr(),Zl)}}function CS(Os,di={}){_s?hs=!0:Os==null?AS():SS(Os,di)}function AS(){He.value&&SS(et.value?Math.max(1,Math.round(Ke.value)):Math.max(1,qe.value))}return Ze([be,$e,We,He,qe,Qe,()=>U.renderBatchDelay],()=>{var Os;const di=$e.value,rl=ft.value,Gl=We.value,ll=!Object.is(Gl,rl.key),al=di!==rl.total,pr=ll||al;ft.value={key:Gl,total:di};const Zl=ut.value,yc=(Os=U.renderBatchDelay)!=null?Os:16,ff=Zl.batchSize!==qe.value||Zl.initial!==Qe.value||Zl.delay!==yc||Zl.enabled!==He.value;ut.value={batchSize:qe.value,initial:Qe.value,delay:yc,enabled:He.value},ll&&jt(di),(pr||ff||!He.value)&&df(),(pr||ff)&&(Ke.value=Math.max(1,qe.value||1)),pr&&zt();const kc=Pe.value;if(!di)return De.value=0,void Pt(0);if(!He.value)return De.value=kc,void Pt(De.value);const zv=ll||rl.total===0;De.value=zv||ff?Math.min(kc,Qe.value):Math.min(De.value,kc);const Gh=Math.max(1,Qe.value||qe.value||di);De.value{He.value&&(typeof di=="number"&&Os<=di||Os>De.value&&CS())}),{cleanupBatchScheduler:df}})({props:M,isClient:H,isTestEnv:Te,parsedNodesIdentity:ko,parsedNodeCount:Gn,desiredRenderedCount:Ch,datasetKey:mL,batchingEnabled:cn,incrementalRenderingActive:Sn,resolvedBatchSize:Ue,resolvedInitialBatch:rn,renderedCount:Cn,adaptiveBatchSize:Me,previousRenderContext:de,previousBatchConfig:Le,requestFrame:In,cancelFrame:wo,hasIdleCallback:Nr,cleanupNodeVisibility:uL,onDatasetKeyChanged:E=>{mc(),_h(),qi(),ef(),E>0&&xh(E)},onDatasetChanged:()=>{sn.value&&dr({immediate:!0})}});Ze([S_,sn,()=>A.value,()=>te()],([E,U])=>{if(!E)return $_(),void X0();cL(),U?dr({immediate:!0}):X0()},{flush:"post",immediate:!0}),Ze([()=>Ae.value.length,()=>sn.value],E=>po(null,[E],function*([U,re]){re&&U&&H&&(yield bt(),dr({immediate:!0}))}),{flush:"post"}),Ze(zn,E=>{E&&(function(){var U;if(qn.value&&oo.value&&lo.value&&((U=fs.value)!=null&&U[1]))return;const re=At({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=At({type:"list_item",children:[re],raw:"- Probe paragraph text"}),be=At({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});qn.value=re,oo.value=ae,lo.value=be;const $e={1:null,2:null,3:null,4:null,5:null,6:null};for(let Pe=1;Pe<=6;Pe++)$e[Pe]=At({type:"heading",level:Pe,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(Pe)} Probe heading`});fs.value=$e})()},{immediate:!0}),Ze([()=>A.value,zn],()=>{if(!zn.value)return ov(),void(Q.value=0);L_(),ov(),zn.value&&A.value&&typeof ResizeObserver<"u"&&(Vd=new ResizeObserver(()=>{L_(),nc.value&&jd(),Xe.value&&fc(),co("resize")}),Vd.observe(A.value))},{immediate:!0}),Ze([zn,ts,Ni],()=>po(null,null,function*(){if(!zn.value)return ee.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void qi();yield bt(),(function(){if(!zn.value||typeof window>"u")return ee.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void qi();const E={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},U=N_(nv(F.value),".paragraph-node");E.paragraph=Qy(F.value,U,"pre-wrap");const re=nv(W.value),ae=re?.querySelector(".paragraph-node");E.listItem=Qy(W.value,ae,"pre-wrap");const be=Yt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var Pe,We;return(We=(Pe=j.value)==null?void 0:Pe.offsetHeight)!=null?We:0}),$e=Yt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var Pe,We;return(We=(Pe=W.value)==null?void 0:Pe.offsetHeight)!=null?We:0});E.listWrapperOverhead=Math.max(0,be-$e);for(let Pe=1;Pe<=6;Pe++){const We=N_(nv(le[Pe]),`h${Pe}`);E.headings[Pe]=Qy(le[Pe],We,"pre-wrap")}ee.value=E,qi()})()}),{flush:"post",immediate:!0}),Ze(()=>Ae.value.length,()=>{sn.value&&dr({immediate:!0})}),Ze([zn,Q],()=>{qi(),sn.value&&dr({immediate:!0}),nc.value&&jd(),Xe.value&&fc(),co("resize")},{immediate:!1}),Ze(()=>Fr.value,E=>{if(E)for(const[U,re]of nn)Ph(U,re);else if(ev(),sn.value)dr({immediate:!0});else for(const[U,re]of nn)re&&ql(U,!0)},{immediate:!1}),Ze([ze,me,()=>te()],()=>{var E;(E=ss.refresh)==null||E.call(ss);for(const[U,re]of nn)Ph(U,re)},{immediate:!1}),Ze([()=>M.viewportPriority,()=>Ae.value.length,me],([E,U,re])=>{if(E!==!1){if(J.value&&(U<=200||U<=re)){J.value=!1;for(const[ae,be]of nn)Ph(ae,be)}}else J.value=!1}),Ze(()=>Cn.value,()=>{sn.value&&dr({immediate:!0})}),Ze([nl,ns,Oo,()=>Ae.value.length,sn],()=>{Ud()},{immediate:!0});let nf=null,of=!1,gc=null;function sf(){nf=null,dv=null,cv=void 0,uc=null,ef()}function Fv(){mc(),_h(),qi(),Ot.clear();const E=Ae.value.length;E>0&&xh(E),_v()}function Ov(){$v(),T_(),Jd=null,Qa=null,eu=null,Fh=null,Gd=null,Zd=null,of=!1,sf(),H_("restore"),wh(),dc()}function rf(E){var U;return[(U=jo())!=null?U:"",mo(),sl(),$h.value,Qd(E),Ae.value.length,Math.round(tc(0,Ae.value.length)),Math.round(Ya()),Ki.count,Math.round(Ki.total)].join(":")}function rS(){return po(this,null,function*(){var E,U,re,ae;const be=(E=o.virtualScroll)==null?void 0:E.settledToken,$e=Qd(be),Pe=mo(),We=jo(),et=Ni.value;if(wn.value&&((U=o.virtualScroll)==null?void 0:U.settleMode)==="manual"&&Nh(be))if(fv()){if(rf(be)!==uc&&!of){of=!0;try{const He=yield Cv({reason:"manual",expectedSettledTokenKey:$e}),qe=Qd()===$e;Sv(Pe,We,et)&&He.sessionKey===Pe&&He.threadKey===We&&qe&&He.stable&&He.phase==="final"&&(uc=rf((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{of=!1,yield bt();const He=(ae=o.virtualScroll)==null?void 0:ae.settledToken,qe=Nh(He)?rf(He):"";Sv(Pe,We,et)&&qe&&uc!==qe&&rS()}}}else co("manual")})}Ze(wn,(E,U)=>{if(E!==U){if(!E)return Ov(),void $v();Ov(),Fv(),gc=Ni.value,co("content")}},{flush:"post"}),Ze([wn,Ni],([E,U])=>{E?gc!=null?gc!==U&&(gc=U,(function(re="resize"){mc(),_h(),qi(),Ot.clear();const ae=Ae.value.length;ae>0&&xh(ae),_v(),Qa=null,eu=null,Fh=null,Jd=null,of=!1,sf(),X_(),bt(()=>{il(),nc.value&&jd(),Xe.value&&fc(),co(re)})})("resize")):gc=U:gc=null},{flush:"post",immediate:!0}),Ze([wn,()=>mo(),()=>jo()],([E])=>{E&&(Ov(),Fv(),H_("content"),co("content"))}),Ze([wn,()=>mo(),()=>jo(),Ni,()=>Ae.value.length],([E])=>{E&&(function(U="async-node"){let re=!1;for(const[ae,be]of Array.from(Rr.entries()))av(be)||(Rr.delete(ae),Ii.delete(ae),re=!0);re&&(lc(),co(U))})("async-node")},{flush:"post"}),Ze([wn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.sessionKey},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>o.indexKey,()=>G.value],([E])=>{E&&(ef(),(function(U="content"){if(!wn.value)return;const re=[],ae=Ae.value.length,be=tv(ae);for(const $e of Array.from(Ot.keys())){if($e>=ae){re.push($e);continue}if($e=ae&&Ot.delete($e);re.length&&((function($e,Pe={}){const We=Array.from($e,Number);y_(We);let et=0;if(sc(()=>(et=eL(We,Pe),et>0)),et>0)(function(He){for(const qe of He)Ot.delete(qe)})(We);else for(const He of We)Ro.delete(He)})(re,{notify:!1}),qi(),sf(),nc.value&&jd(),Xe.value&&fc(),co(U))})("content"))},{flush:"post",immediate:!0}),Ze([wn,()=>Ae.value.length,()=>mo(),()=>jo()],([E,U,re,ae],[be,$e,Pe,We])=>{E&&be&&re===Pe&&ae===We&&U!==$e&&sf()},{flush:"post"}),Ze([wn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCache},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCacheWidth},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>Ae.value.length,()=>mo(),Q],()=>{X_()},{flush:"post",immediate:!0}),Ze([wn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreAnchor},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>Ae.value.length,()=>mo(),Q],E=>po(null,[E],function*([U,re]){if(!U||!re)return;yield bt();const ae=(function(){var be;const $e=(be=o.virtualScroll)==null?void 0:be.restoreAnchor;return $e==null||$e===!1?null:$e===!0?"true":String($e)})();xv(re,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),Ze([wn,Q,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey}],([E])=>{var U;if(!E)return;const re=(U=o.virtualScroll)==null?void 0:U.restoreState;re&&Qa&&eu==="restore"&&(Y_(re)||(Fv(),Qa=null,eu=null,co("resize")))},{flush:"post"}),Ze([wn,()=>Ae.value.length,()=>mo(),Q],E=>po(null,[E],function*([U]){var re;const ae=Gd,be=Zd;U&&ae&&(yield bt(),!xv(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(re=be?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&Q_(ae)||(Gd=null,Zd=null))}),{flush:"post",immediate:!0}),Ze([wn,ct,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>mo(),()=>jo(),Ni,J0,A_,()=>Cn.value,Ch,()=>Ki.count,()=>Ki.total],([E,U,re])=>{if(!E||U!==!0||re==="manual"||!pv())return;const ae=(function(){var be;const $e=Ae.value.length;return[(be=jo())!=null?be:"",mo(),sl(),$h.value,$e,Math.round(tc(0,$e)),Math.round(Ya()),Ki.count,Math.round(Ki.total)].join(":")})();nf!==ae&&(nf=ae,Cv({reason:"final"}).then(be=>{be.stable||nf!==ae||(nf=null)}))},{flush:"post",immediate:!0}),Ze([wn,ct,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settledToken},()=>mo(),()=>jo(),Ni,J0,A_,()=>Cn.value,Ch,()=>Ae.value.length,()=>Ki.count,()=>Ki.total],()=>{rS()},{flush:"post",immediate:!0}),Ze([()=>Ae.value.length,sn,ns,Oo,()=>ws.start,()=>ws.end],([E,U,re,ae,be,$e])=>{ke.value&&Ye("virtualization",{nodes:E,virtualization:U,maxLiveNodes:re,buffer:ae,focusIndex:nl.value,scroll:U?(()=>{const Pe=pe.value||fe();return Pe?{reverse:ue(Pe),scrollTop:Math.round(Pe.scrollTop),scrollTopAbs:Math.round(Math.abs(Pe.scrollTop)),scrollHeight:Math.round(Pe.scrollHeight),clientHeight:Math.round(Pe.clientHeight)}:null})():null,liveRange:{start:be,end:$e},rendered:Cn.value})}),Ze([()=>M.customId],([E],U,re)=>{if(!E||Ei)return;const ae=(function(be,$e){return be?(rs.controllers[be]=$e,()=>{rs.controllers[be]===$e&&delete rs.controllers[be]}):()=>{}})(E,{captureRestoreAnchor:h_,restoreAnchor:m_,getAnchorDrift:G7,getReport:pL});re(()=>{ae()})},{immediate:!0}),uo(()=>{(function(){if(wn.value)try{il(),Yd();const E=Ja("manual");tS(E)&&(D(E),Jd=E,Mv=Xd());const U=cc(E,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});U&&(z(U),U.anchor&&B(U.anchor),pc=tf(U))}catch{}})(),AL(),ev(),Rt(),iS();for(const E of Ul.values())for(const U of E)Mh(U);Ul.clear(),Za.clear(),Ot.clear(),Lv(),mc(),ov(),wh(),dc(),$v(),$_(),X0()});const ML=Vf("ViewportDeferredMermaidBlockNode",nr({loader:()=>po(null,null,function*(){try{return(yield Is(()=>import("./index11-CYg1-jUl.js"),__vite__mapDeps([7,5]))).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',E),gi}}),loadingComponent:TM,delay:0}),TM),EL=Vf("ViewportDeferredInfographicBlockNode",nr({loader:()=>po(null,null,function*(){try{return(yield Is(()=>import("./index10-Bl5Wp1VK.js"),[])).default}catch(E){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',E),gi}}),loadingComponent:EM,delay:0}),EM),TL=Vf("ViewportDeferredD2BlockNode",nr(()=>po(null,null,function*(){try{return(yield Is(()=>import("./index8-CS8VA94L.js"),[])).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',E),gi}})),gi),lS={text:Fo,paragraph:Du,heading:A0,code_block:jy,list:hd,list_item:pd,blockquote:cg,table:vp,definition_list:dg,footnote:fg,footnote_reference:Ri,footnote_anchor:mp,admonition:gg,vmr_container:hg,hardbreak:Sa,link:oi,image:_a,thematic_break:pg,math_inline:Ir,math_block:e$,strong:ti,emphasis:si,strikethrough:ni,highlight:Di,insert:Ci,subscript:Si,superscript:_i,emoji:xi,checkbox:Oi,checkbox_input:Oi,inline_code:Hs,html_inline:Pi,reference:ei,html_block:gp},IL=O(()=>rv()),aS=O(()=>pM(M.codeBlockProps)),$L=O(()=>pM(M.codeBlockProps,{omit:["langs"]})),uS=O(()=>vt(vt({stream:M.codeBlockStream,darkTheme:M.codeBlockDarkTheme,lightTheme:M.codeBlockLightTheme,monacoOptions:M.codeBlockMonacoOptions,themes:M.themes,langs:h.value==="shiki"?M.langs:void 0,minWidth:M.codeBlockMinWidth,maxWidth:M.codeBlockMaxWidth},typeof Se.value=="boolean"?{showTooltips:Se.value}:{}),$L.value)),cS=O(()=>vt(un(vt({},uS.value),{langs:M.langs}),aS.value));function dS(E){return typeof E=="boolean"?E:void 0}const NL=O(()=>{const E=M.codeBlockProps||{},U={},re=dS(E.showLineNumbers);re!==void 0&&(U.showLineNumbers=re);const ae=dS(E.diffInline);ae!==void 0&&(U.diffInline=ae);const be=(function($e){const Pe=Number($e);return Number.isFinite(Pe)&&Pe>0?Pe:void 0})(E.reservedHeightPx);return be!==void 0&&(U.reservedHeightPx=be),U}),LL=O(()=>vt(vt({stream:M.codeBlockStream,darkTheme:M.codeBlockDarkTheme,lightTheme:M.codeBlockLightTheme,themes:M.themes,langs:M.langs,minWidth:M.codeBlockMinWidth,maxWidth:M.codeBlockMaxWidth},typeof Se.value=="boolean"?{showTooltips:Se.value}:{}),aS.value)),FL=O(()=>vt({},M.mermaidProps||{})),fS=O(()=>vt({},M.d2Props||{})),OL=O(()=>vt({},M.infographicProps||{})),lf=O(()=>({typewriter:f.value,fade:M.fade,customHtmlTags:nt.value.customHtmlTags})),RL=O(()=>vt(vt({},lf.value),typeof Se.value=="boolean"?{showTooltip:Se.value}:{})),PL=O(()=>vt(vt({},lf.value),typeof Se.value=="boolean"?{showTooltips:Se.value}:{})),DL=O(()=>vt(vt({},lf.value),typeof Se.value=="boolean"?{showTooltips:Se.value}:{})),BL=O(()=>vt(vt({},lf.value),typeof Se.value=="boolean"?{showTooltips:Se.value}:{}));function zL(E){return Array.isArray(E.children)&&E.children.length>0}const Bh=O(()=>fL.value.map(E=>{var U,re,ae,be,$e,Pe,We,et;let He=(function(mt){var Ft,Pt,jt,zt,qt,mn,kn;if(mt.type!=="code_block")return mt;const Xn=mt,_s=[String((Ft=Xn.language)!=null?Ft:""),String((Pt=Xn.loading)!=null?Pt:""),String((jt=Xn.diff)!=null?jt:""),String((zt=Xn.code)!=null?zt:""),String((qt=Xn.originalCode)!=null?qt:""),String((mn=Xn.updatedCode)!=null?mn:""),String((kn=Xn.raw)!=null?kn:"")].join("\0"),hs=Ho.get(Xn);if(hs&&hs.signature===_s)return hs.node;const fr=vt({},Xn);return Ho.set(Xn,{signature:_s,node:fr}),fr})(E.node);const qe=zh(He);let Qe=gS(He,qe);if((He.type==="html_block"||He.type==="html_inline")&&Qe===lS[He.type]){const mt=He,Ft=String((U=mt.tag)!=null?U:"").trim().toLowerCase()||MI(mt.content);if(Ft){const Pt=Bn.value[Ft];if(bs.value.has(Ft)&&Pt)Qe=Pt,He=un(vt({},mt),{type:Ft,tag:Ft,content:wse(mt.content,Ft)});else if(EI((re=mt.content)!=null?re:mt.raw,Ft)){const jt=String((be=(ae=mt.content)!=null?ae:mt.raw)!=null?be:"");He.type==="html_inline"?(Qe=Fo,He={type:"text",content:jt,raw:jt}):(Qe=Du,He={type:"paragraph",children:[{type:"text",content:jt,raw:jt}],raw:jt})}}}const De=He.type==="code_block"&&h.value==="pre"&&Qe===gi&&!Rv(Bn.value,qe);let Ke=vt({},(function(mt,Ft,Pt){const jt=Ft??zh(mt);if(mt.type==="code_block"){const zt=jt?Rv(Bn.value,jt):void 0;if(Pt&&h.value==="pre"&&!zt&&Pt===gi)return NL.value;if(Pt&&jt&&Pt===zt)return jt==="mermaid"?hS(mt):jt==="infographic"?mS(mt):jt==="d2"||jt==="d2lang"?fS.value:cS.value;if(Pt&&Pt===Bn.value.code_block)return cS.value;if(O_(Pt))return LL.value}return jt==="mermaid"?hS(mt):jt==="infographic"?mS(mt):jt==="d2"||jt==="d2lang"?fS.value:mt.type==="link"?RL.value:mt.type==="list"?PL.value:mt.type==="blockquote"?DL.value:mt.type==="table"?BL.value:mt.type==="code_block"?uS.value:lf.value})(He,qe,Qe));const ft=zn.value?rc.value[E.index]:null;He.type==="code_block"&&ft?.kind==="code-block"&&(Ke=un(vt({},Ke),De?{reservedHeightPx:($e=ft.height)!=null?$e:ft.contentHeight}:{estimatedHeightPx:ft.height,estimatedContentHeightPx:ft.contentHeight,estimatedDiffInline:ft.diffInline})),De||He.type!=="code_block"||qe!=="mermaid"||Kc(Ke.estimatedPreviewHeightPx)!=null||(Ke=un(vt({},Ke),{estimatedPreviewHeightPx:p1(d1(String((Pe=He.code)!=null?Pe:"")))})),De||He.type!=="code_block"||qe!=="infographic"||Kc(Ke.estimatedPreviewHeightPx)!=null||(Ke=un(vt({},Ke),{estimatedPreviewHeightPx:h1(f1(String((We=He.code)!=null?We:"")))})),He.type==="math_block"&&(Ke=un(vt({},Ke),{cacheScope:ho}));const ut=(function(mt,Ft){const Pt=String(mt.type);return!ph(Pt)&&Bn.value[Pt]===Ft})(He,Qe),_t=ut?Zw(He,ye.value):void 0;return un(vt({},E),{node:He,component:Qe,bindings:Ke,customBindings:vt(vt({},_t??{}),Ke),rendersCustomNode:ut,hasSlotChildren:zL(He),slotContent:String((et=He.content)!=null?et:""),isCodeBlock:He.type==="code_block",indexKey:`${IL.value}-${E.index}`,vnodeKey:`${hL.value}\0${E.index}\0${He.type}`})}));function zh(E){var U;return E?.type==="code_block"?String((U=E.language)!=null?U:"").trim().toLowerCase():""}function Rv(E,U){const re=U.trim().toLowerCase();if(re)for(const ae of[re,_0(re),O9(re)]){const be=ae&&E[ae];if(be)return be}}function pS(E,U,re,ae){var be,$e;const Pe=vt({},E.value);return Kc(Pe.estimatedPreviewHeightPx)==null&&(Pe.estimatedPreviewHeightPx=ae(re(String((be=U?.code)!=null?be:"")),void 0,Pe.maxHeight==="none"?null:($e=Kc(Pe.maxHeight))!=null?$e:void 0)),Pe}function hS(E){return pS(FL,E,d1,p1)}function mS(E){return pS(OL,E,f1,h1)}function gS(E,U){if(!E)return Ub;const re=Bn.value,ae=re[String(E.type)];if(E.type==="code_block"){const be=U??zh(E),$e=be?Rv(re,be):void 0;return $e||(h.value==="pre"?re.code_block||gi:be==="mermaid"?re.mermaid||ML:be==="infographic"?re.infographic||EL:be==="d2"||be==="d2lang"?re.d2||TL:ae||re.code_block||R_.value)}return ae||lS[String(E.type)]||Ub}function Pv(E){s("click",E)}function WL(E){var U;(U=E.target)!=null&&U.closest("[data-node-index]")&&s("mouseover",E)}function HL(E){var U;(U=E.target)!=null&&U.closest("[data-node-index]")&&s("mouseout",E)}function vS(E){s("mouseover",E)}function yS(E){s("mouseout",E)}const ou=q(null),ci=q(!1),af=q(null),jL=O(()=>!(M.domMode!=="minimal"||Y.value||M.fade!==!1||f.value||ci.value||je.value||sn.value||cr.value||js.value||ui.value||Object.keys(Bn.value).length!==0));let uf,vc=null,Dv=0,Wh=0,Hh=0;const kS=["code_block","admonition","table","math_block","html_block","image","thematic_break"],UL=new Set(kS),bS=[".typewriter-cursor",".height-estimation-probes",...kS.map(E=>`[data-node-type="${E}"]`),"script","style"].join(",");function wS(E){if(!E||typeof E!="object")return!1;const U=E.type;return typeof U=="string"&&UL.has(U)}function jh(E){var U,re;if(!E||typeof E!="object")return 0;const ae=E,be=(re=(U=ae.raw)!=null?U:ae.content)!=null?re:ae.code;if(typeof be=="string")return be.length;const $e=ae.children;if(Array.isArray($e))return $e.reduce((We,et)=>We+jh(et),0);const Pe=ae.items;return Array.isArray(Pe)?Pe.reduce((We,et)=>We+jh(et),0):0}function Uh(){uf&&(clearTimeout(uf),uf=void 0)}function Bv(){Dv+=1,vc!=null&&(wo?.(vc),vc=null)}function cf(){Bv(),Kl(),ou.value&&(ou.value.style.visibility="hidden")}function VL(E){var U;if(E.nodeType!==Node.TEXT_NODE||!((U=E.textContent)!=null?U:"").trim())return!1;const re=E.parentElement;return!!re&&!re.closest(bS)}function qL(E){let U=E.lastChild;for(;U;){if(VL(U))return U;if(U.nodeType===Node.ELEMENT_NODE){const re=U;if(!re.matches(bS)&&re.lastChild){U=re.lastChild;continue}}for(;U&&U!==E&&!U.previousSibling;)U=U.parentNode;if(!U||U===E)break;U=U.previousSibling}return null}function xS(){const E=Bh.value;for(let U=E.length-1;U>=0;U--){const re=E[U];if(!re||wS(re.node)||!Rh(re.index))continue;const ae=nn.get(re.index);if(!ae)continue;const be=qL(ae);if(be)return be}return null}function Kl(){af.value&&(af.value.classList.remove(IM),af.value=null)}function Vh(){if(d.value!=="simple"||!H||!ci.value||!A.value)return void Kl();const E=xS(),U=E?(function(re){var ae;const be=(ae=re.parentElement)==null?void 0:ae.closest(".text-node");return be instanceof HTMLElement?be:re.parentElement})(E):null;U!==af.value&&(Kl(),U&&(U.classList.add(IM),af.value=U))}function qh(){if(d.value!=="precise"||!H||!ci.value||vc!=null)return;const E=Dv,U=()=>{vc=null,E===Dv&&(function(){var re,ae;if(d.value!=="precise"||!(H&&ci.value&&A.value&&ou.value))return;const be=A.value,$e=ou.value;$e.style.visibility="hidden";const Pe=xS();if(!Pe)return;let We=0,et=0,He=20,qe=!1;if(Pe?.textContent){const Qe=Pe.textContent.length,De=document.createRange();De.setStart(Pe,Math.max(0,Qe-1)),De.setEnd(Pe,Qe);const Ke=typeof De.getClientRects=="function"?De.getClientRects():void 0,ft=(ae=Ke?.[Ke.length-1])!=null?ae:(re=Pe.parentElement)==null?void 0:re.getBoundingClientRect();if(ft){const ut=Yt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());We=ft.right-ut.left+be.scrollLeft,et=ft.top-ut.top+be.scrollTop,He=ft.height||He,qe=!0}De.detach()}qe&&($e.style.transform=`translate(${Math.max(0,We)}px, ${Math.max(0,et)}px)`,$e.style.height=`${He}px`,$e.style.visibility="visible")})()};In?vc=In(U):U()}return Ze([Re,()=>o.content,()=>o.nodes,()=>M.typewriter,ct],()=>po(null,null,function*(){var E,U;if(!H||Y.value||!ce.value)return;if(ct.value)return ci.value=!1,Uh(),void cf();if((E=o.nodes)!=null&&E.length)return ci.value=!1,Uh(),cf(),Wh=((U=o.content)!=null?U:"").length,void(Hh=Re.value.length);const re=(function(){var We,et;return(We=o.nodes)!=null&&We.length?o.nodes.reduce((He,qe)=>He+jh(qe),0):((et=o.content)!=null?et:"").length})(),ae=(function(){var We;return(We=o.nodes)!=null&&We.length?o.nodes.reduce((et,He)=>et+jh(He),0):Re.value.length})(),be=!wS(Ae.value[Ae.value.length-1]),$e=re>Wh,Pe=ae>Hh;if(!f.value||!be||!$e&&!Pe)return f.value&&be||(ci.value=!1,cf()),Wh=re,void(Hh=ae);Wh=re,Hh=ae,ci.value=!0,d.value==="precise"&&ou.value&&(ou.value.style.visibility="hidden"),Uh(),yield bt(),d.value==="simple"?Vh():(Kl(),qh()),uf=setTimeout(()=>{uf=void 0,ci.value=!1},3e3)}),{flush:"post",immediate:!0}),Ze(ci,E=>po(null,null,function*(){E?(yield bt(),d.value!=="simple"?(Kl(),d.value==="precise"&&qh()):Vh()):cf()}),{flush:"post"}),Ze(d,()=>po(null,null,function*(){if(H&&!Y.value&&ce.value&&ci.value){if(yield bt(),d.value==="simple")return Bv(),void Vh();Kl(),d.value!=="precise"?cf():qh()}}),{flush:"post"}),Ze([()=>Cn.value,()=>ws.start,()=>ws.end],()=>po(null,null,function*(){H&&!Y.value&&ce.value&&ci.value&&(yield bt(),d.value!=="simple"?(Kl(),d.value==="precise"&&qh()):Vh())}),{flush:"post"}),uo(()=>{Uh(),Bv(),Kl(),Wo.clear()}),(E,U)=>{const re=bO("NodeRenderer",!0);return x(Y)?(g(!0),C(Ie,{key:0},ot(Bh.value,ae=>(g(),C(Ie,{key:ae.vnodeKey},[ae.rendersCustomNode?(g(),he(as(ae.component),jn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onClick:Pv,onMouseover:vS,onMouseout:yS,onCopy:U[0]||(U[0]=be=>i(be)),onHandleArtifactClick:U[1]||(U[1]=be=>s("handleArtifactClick",be))}),{default:ve(()=>[ae.hasSlotChildren?(g(),he(re,jn({key:0,ref_for:!0},Xt.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(g(),he(re,jn({key:1,ref_for:!0},Xt.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ie("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),he(as(ae.component),jn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onClick:Pv,onMouseover:vS,onMouseout:yS,onCopy:U[2]||(U[2]=be=>i(be)),onHandleArtifactClick:U[3]||(U[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),C("div",{key:1,ref_key:"containerRef",ref:A,class:Be(["markstream-vue markdown-renderer",[{dark:M.isDark},{virtualized:sn.value},{"virtual-scroll-coordinated":Us.value},{"stable-layout":iL.value},{"typewriter-simple-cursor":ci.value&&d.value==="simple"}]]),"data-custom-id":M.customId,onClick:Pv,onMouseover:WL,onMouseout:HL},[ri.value||sn.value?(g(),C(Ie,{key:0},[ri.value?(g(),he(mpe,{key:0,width:ts.value,"flow-root":sn.value||Us.value,"paragraph-node":qn.value,"list-item-node":oo.value,"list-node":lo.value,"heading-nodes":fs.value,"set-paragraph-wrapper":rL,"set-list-item-wrapper":lL,"set-list-wrapper":aL,"set-heading-wrapper":dL},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):ie("",!0),sn.value?(g(),C("div",{key:1,class:"node-spacer",style:Ut({height:`${sv.value}px`}),"aria-hidden":"true"},null,4)):ie("",!0)],64)):ie("",!0),jL.value?(g(!0),C(Ie,{key:1},ot(Bh.value,ae=>(g(),C(Ie,{key:ae.vnodeKey},[Rh(ae.index)?(g(),he(as(ae.component),jn({key:0,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onMouseover:U[4]||(U[4]=be=>s("mouseover",be)),onMouseout:U[5]||(U[5]=be=>s("mouseout",be)),onCopy:U[6]||(U[6]=be=>i(be)),onHandleArtifactClick:U[7]||(U[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):ie("",!0)],64))),128)):(g(!0),C(Ie,{key:2},ot(Bh.value,ae=>(g(),C("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>Ph(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[Rh(ae.index)?(g(),C("div",{key:0,ref_for:!0,ref:be=>(function($e,Pe){var We;Pe||(function(Qe){const De=`${rv()}-${Qe}`;let Ke=!1;for(const ft of Array.from(Ii.keys())){const ut=Rr.get(ft);(ut?.index===Qe||ft===De||ft.startsWith(`${De}-`))&&(Ii.delete(ft),Rr.delete(ft),Ke=!0)}Ke&&(lc(),co("async-node"))})($e),ol.delete($e),(function(Qe){var De;const Ke=((De=Za.get(Qe))!=null?De:0)+1;Za.set(Qe,Ke)})($e);const et=Ul.get($e);if(et){for(const Qe of et)Mh(Qe);Ul.delete($e)}if((function(Qe){const De=Zn.get(Qe);De&&(An?.unobserve(De),gn.delete(De),Zn.delete(Qe))})($e),!Pe||!li.value)return Or.delete($e),void Za.delete($e);Or.set($e,Pe);const He=()=>{Dh($e,Pe)};queueMicrotask(He);const qe=(An||typeof ResizeObserver>"u"||(An=new ResizeObserver(Qe=>{if(Qe.length)for(const De of Qe){const Ke=gn.get(De.target),ft=Zn.get(Ke??-1);Ke!=null&&ft&&Dh(Ke,ft)}else il()})),An);if(qe&&(Zn.set($e,Pe),gn.set(Pe,$e),qe.observe(Pe)),typeof window<"u"){const Qe=((We=Ae.value[$e])==null?void 0:We.type)==="code_block"?[16,80,240,800]:ct.value?[80]:[];if(Qe.length){const De=Qe.map(Ke=>E_(Ke,He,"node-resize")).filter(Ke=>Ke!=null);De.length&&Ul.set($e,De)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(g(),he(as(ae.component),jn({key:1,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[12]||(U[12]=be=>i(be)),onHandleArtifactClick:U[13]||(U[13]=be=>s("handleArtifactClick",be))}),{default:ve(()=>[ae.hasSlotChildren?(g(),he(re,jn({key:0,ref_for:!0},Xt.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(g(),he(re,jn({key:1,ref_for:!0},Xt.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ie("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),he(as(ae.component),jn({key:2,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[14]||(U[14]=be=>i(be)),onHandleArtifactClick:U[15]||(U[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),he(Sr,{key:0,name:"fade",css:M.fade!==!1,appear:M.fade!==!1},{default:ve(()=>[ae.rendersCustomNode?(g(),he(as(ae.component),jn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[8]||(U[8]=be=>i(be)),onHandleArtifactClick:U[9]||(U[9]=be=>s("handleArtifactClick",be))}),{default:ve(()=>[ae.hasSlotChildren?(g(),he(re,jn({key:0,ref_for:!0},Xt.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(g(),he(re,jn({key:1,ref_for:!0},Xt.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ie("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),he(as(ae.component),jn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[10]||(U[10]=be=>i(be)),onHandleArtifactClick:U[11]||(U[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),C("div",{key:1,class:"node-placeholder",style:Ut({height:`${q0(ae.index)}px`})},null,4))],8,ype))),128)),ci.value&&d.value==="precise"?(g(),C("span",{key:3,ref_key:"typewriterCursorRef",ref:ou,class:"typewriter-cursor","aria-hidden":"true"},null,512)):ie("",!0),sn.value?(g(),C("div",{key:4,class:"node-spacer",style:Ut({height:`${iv.value}px`}),"aria-hidden":"true"},null,4)):ie("",!0)],42,vpe))}}})),[["__scopeId","data-v-a9489508"]]),Ai=h$;Ai.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Ai.__name,Ai.name].filter(n=>!!n));for(const n of t)e.component(n,h$)};const ux=Object.freeze(Object.defineProperty({__proto__:null,default:Ai},Symbol.toStringTag,{value:"Module"})),kpe={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},bpe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},wpe={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},xpe={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},_pe={class:"admonition-title"},Spe=["aria-expanded","aria-controls"],Cpe=["id"],gg=Vn(Ge({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=O(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const u=o.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=q(!!o.node.collapsible&&!((n=o.node.open)==null||n));function l(){o.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(g(),C("div",{class:Be(["admonition",[`admonition-${o.node.kind}`]])},[_("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),C("svg",kpe,[...c[1]||(c[1]=[_("circle",{cx:"12",cy:"12",r:"10"},null,-1),_("path",{d:"M12 16v-4"},null,-1),_("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),C("svg",bpe,[...c[2]||(c[2]=[_("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),_("path",{d:"M9 18h6"},null,-1),_("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),C("svg",wpe,[...c[3]||(c[3]=[_("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),_("path",{d:"M12 9v4"},null,-1),_("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),C("svg",xpe,[...c[4]||(c[4]=[_("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),_("path",{d:"M12 8v4"},null,-1),_("path",{d:"M12 16h.01"},null,-1)])])):ie("",!0),_("span",_pe,N(i.value),1),o.node.collapsible?(g(),C("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(g(),C("svg",{style:Ut({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...c[5]||(c[5]=[_("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,Spe)):ie("",!0)]),Fn(_("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[Z(x(Ai),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,Cpe),[[vi,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);gg.install=e=>{e.component(gg.__name,gg)};const Zb=()=>Is(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let Am=null,Mm=Zb,Em=null,$M=!1,NM=!1;function kBe(){return po(this,null,function*(){if(Am)return Am;const e=Mm;return e?e===Zb&&$M?null:Em||(Em=po(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===Zb)return e===Mm&&($M=!0,(function(o){NM||(NM=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===Mm&&(Em=null)}return e!==Mm?null:t?(Am=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),Am):null}),Em):null})}let Tm=null,m$=null,Im=null;function bBe(){return typeof m$=="function"}function wBe(){return po(this,null,function*(){if(Tm)return Tm;const e=m$;return e?Im||(Im=po(null,null,function*(){const t=yield e(),n=(function(o){var s,i,r;if(!o)return null;const l=(s=o.default)!=null?s:o,a=typeof l=="function"&&typeof((i=l.prototype)==null?void 0:i.render)=="function"?l:(r=o.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Tm=n,Tm):null}).finally(()=>{Im=null}),Im):null})}const xBe=Symbol("markstreamLanguageIconResolver"),$m=q(!1);let LM=!1;function ek(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function g$(){return!LM&&typeof window<"u"&&typeof document<"u"&&(LM=!0,$m.value=ek(),new MutationObserver(()=>{$m.value=ek()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{$m.value=ek()})),$m}const v$=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],Ape=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),Yb=[...v$].toSorted((e,t)=>t.length-e.length).join("|"),tk=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${Yb}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${Yb})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),y$=/[),.;!?]+$/;function Mpe(e){const t=e.toLowerCase();return v$.some(n=>t.endsWith(`.${n}`))}function Epe(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${Yb}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function Tpe(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(y$,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=Ape.has(i),a=Mpe(i);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(i);if(!d)return null;s=d}const u=o[2]??o[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function Ipe(e,t={}){const n=[];tk.lastIndex=0;let o;for(;(o=tk.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",r=s.indexOf(i);if(r<0)continue;const l=o[2]??o[3];let a=i+(l?s.slice(r+i.length):"");const u=a.replace(y$,""),c=a.length-u.length;a=u;const d=Tpe(a,t);if(!d)continue;const f=o.index+r,p=f+a.length;n.push({...d,start:f,end:p,text:a}),c>0&&(tk.lastIndex-=c)}return n}const $pe=12e4,Npe=6e4,Lpe=32,Fpe=3e4,FM=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function Ope(e){let t=0,n=0,o=0;FM.lastIndex=0;let s;for(;(s=FM.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=$pe||n>=Npe||t>=Lpe||o>=Fpe?"pre":"shiki",codeFenceCount:t,codeChars:n}}function Nm(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const Rpe=/\s/,Ppe=/\p{Nd}/u;function Ca(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function Dpe(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function OM(e){return e!==void 0&&Rpe.test(e)}function Sd(e){return e!==void 0&&Ppe.test(e)}function _1(e){return e!==void 0&&e>="A"&&e<="Z"}const k$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function Bpe(e,t){if(!_1(e[t-1]))return!1;let n=t-1;for(;n>0&&_1(e[n-1]);)n--;return k$.test(e.slice(n,t))||Sd(Ca(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Ca(e,t+1)??"")}function zpe(e,t){if(!_1(e[t-1]))return!1;let n=t-1;for(;n>0&&_1(e[n-1]);)n--;return k$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function Wpe(e,t){const n=e[t+1];return Sd(Ca(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&Sd(Ca(e,t+2))}const Hpe=/^[-–—,,、;;::~~(([【//]$/;function jpe(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Sd(Ca(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&Hpe.test(o)}const nk=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;function Upe(e){let t=e.replace(new RegExp(String.raw`^(?:${nk})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${nk})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${nk})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const RM=1,PM=2,DM=3,Wr=-1;function Vpe(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(Wr),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const A=[];for(let le=0;le`「」『』【】〔〕()*—–“”‘’'),u=[];for(const A of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))u.push(A.index);for(const A of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))u.push(A.index);for(const A of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(A.index===0||!/[\w~/.-]/.test(e[A.index-1]??""))&&u.push(A.index);u.sort((A,F)=>A-F);let c=-1;for(const A of u){if(AA+7&&!/[\w/?#@~.+&=%-]/.test(e[F+1]??""))break}}r.push([A,F]),c=F}const d=[];for(let A=0;A]/.test(J))continue;let X=Wr,G=Wr;for(;W"){G=W;break}if(!j&&Q==="/"&&e[W+1]===">"){G=W+1;break}if(!/\s/.test(Q)){X=W;break}for(;W"){G=W;break}if(j){X=W;break}if(ee==="/"&&e[W+1]===">"){G=W+1;break}const K=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(W));if(!K){X=W;break}W+=K[0].length;let ge=W;for(;ge`]+/.exec(e.slice(ge));if(!ze){X=ge;break}W=ge+ze[0].length}}}if(G!==Wr)d.push([A,G+1]),A=G;else if(X!==Wr){const Q=e.indexOf("<",A+1);A=(Q!==-1&&Q",A+2);X===-1?f=!1:(d.push([A,X+2]),A=X+1,W=!0)}else if(F==="!"){if(e[A+2]==="-"&&e[A+3]==="-"){if(p){const X=e.indexOf("-->",A+4);X===-1?p=!1:(d.push([A,X+3]),A=X+2,W=!0)}}else if(e.startsWith("[CDATA[",A+2)){if(h){const X=e.indexOf("]]>",A+9);X===-1?h=!1:(d.push([A,X+3]),A=X+2,W=!0)}}else if(m&&/[A-Z]/.test(e[A+2]??"")){const X=e.indexOf(">",A+3);X===-1?m=!1:(d.push([A,X+1]),A=X,W=!0)}}if(W)continue;if(F!==void 0&&/[a-zA-Z]/.test(F)){const X=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(A+1));if(X){let G=A+1+X[0].length;for(;G"&&e[G]!=="<"&&!/\s/.test(e[G]);)G++;if(e[G]===">"){d.push([A,G+1]),A=G;continue}}}if(F===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(F))continue;let j=A+1;for(;j"&&(d.push([A,j+1]),A=j)}}d.sort((A,F)=>A[0]-F[0]);const k=[];for(const A of d){const F=k.at(-1);F&&A[0]<=F[1]?F[1]=Math.max(F[1],A[1]):k.push([A[0],A[1]])}r.push(...k);const w=A=>{let F=0;for(;F=(l[F]?.[1]??0);)F++;const W=l[F];return W!==void 0&&A>=W[0]},v=A=>{let F=0;for(;F=(k[F]?.[1]??0);)F++;const W=k[F];return W!==void 0&&A>=W[0]},y=[];let b=null,S=0,I=!1;for(let A=0;A"&&(I=!1);continue}if(!(w(A)||v(A))){if(b!==null){e[A]===b&&(b=null);continue}if(y.length>0&&(e[A]==='"'||e[A]==="'")&&A>0&&/\s/.test(e[A-1]??""))b=e[A];else if(e[A]==="[")S++;else if(e[A]==="]")S>0&&e[A+1]==="("&&(y.push(A),I=e[A+2]==="<",A++),S=Math.max(0,S-1);else if(e[A]==="("&&y.length>0)y.push(-1);else if(e[A]===")"&&y.length>0){const F=y.pop();if(F!==void 0&&F>=0){const W=e.slice(F+2,A);(/\s/.exec(W)===null||W.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(W)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(W))&&r.push([F,A+1])}}}}r.sort((A,F)=>A[0]-F[0]);const T=[];for(const A of r){const F=T.at(-1);F&&A[0]<=F[1]?F[1]=Math.max(F[1],A[1]):T.push([A[0],A[1]])}const $=A=>{let F=0,W=T.length-1;for(;F<=W;){const j=F+W>>1,le=T[j];if(le===void 0)return!1;if(A=le[1])F=j+1;else return!0}return!1},L=new Uint8Array(t);{let A=-1,F=!1,W=!1,j=0;for(let le=0;le<=t;le++){const J=le0&&(X==="{"?j++:X==="}"&&j--)}}for(let A=0;A=0;A--)n[A]===DM&&(P=A),o[A]=P;const R=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,M=/[^\p{L}\p{Nd}\s]$/u,D=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,z=/(?:^|\s)[a-z]{2,}/,B=(A,F)=>{const W=Ca(e,A+1);if(W===void 0||!R.test(W))return!1;const j=o[A+1]??Wr;if(j!==Wr){const le=e.slice(A+1,j);return!(j-(A+1)===((e.codePointAt(A+1)??0)>65535?2:1))&&D.test(le)||/[,;:!?]$/.test(le)||/^[a-z]{2,}$/.test(le)?!1:(s[j]??0)-(s[A+1]??0)===0&&(i[j]??0)-(i[A+1]??0)===0}return M.test(F)||D.test(F)||z.test(F)};return(A,F=-1)=>{if(e[A]!=="$"||n[A]===RM||e[A+1]==="$"||e[A-1]==="$"&&F!==A||Bpe(e,A)||A+1>=t||OM(Ca(e,A+1)))return null;const W=o[A+1]??Wr;if(W===Wr||(s[W]??0)-(s[A+1]??0)>0||(i[W]??0)-(i[A+1]??0)>0)return null;const j=e.slice(A+1,W);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(j)||e[W+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(j)||Sd(Dpe(e,A))&&Upe(j)||Wpe(e,A)&&(B(W,j)||zpe(e,W)||/\s/.test(j)&&/\p{Nd}$/u.test(j)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(j)||!1)||e[W+1]==="$"&&!/\p{L}/u.test(j)&&M.test(j)?null:{content:j,end:W+1}}}const qpe=/^---[ \t]*(?:\r\n|\n)/,Kpe=/^---[ \t]*$/;function Gpe(e){const t=qpe.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` -`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),Kpe.test(i)){const r=e.slice(o,n);if(r==="")return{frontmatter:null,body:e};const l=s\n]*>|[^()\s]+)\)/g,Zpe=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,Ype=/^[a-zA-Z]:(?:[\\/]|%5c)/i,Jpe=/^[A-Za-z0-9._~-]$/;let zM;function Xpe(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replace(/[[\]\\]/g,"\\$&").replaceAll(` -`,"%0A").replaceAll("\r","%0D")}function Qpe(e){return e.replace(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` -`).replaceAll("%0D","\r").replaceAll("%25","%")}function ehe(e){const t=e.split("/").map(n=>{let o="";for(const s of n){const i=s.codePointAt(0);i>127||Jpe.test(s)?o+=s:o+=`%${i.toString(16).toUpperCase().padStart(2,"0")}`}return o}).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function b$(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function the(e){const t=b$(e);try{return decodeURIComponent(t)}catch{return t}}function nhe(e){const t=b$(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")||Zpe.test(t)&&!Ype.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function ok(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function w$(e){const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${Xpe(e.name)}](${ehe(t)})`}function ohe(e){const t=[];let n=0;BM.lastIndex=0;for(const o of e.matchAll(BM)){const s=o.index;ok(t,e.slice(n,s));const i=o[0],r=o[1],l=o[2],a=e[s-1]==="!"?null:nhe(l);a&&r?t.push({type:"mention",attrs:{kind:a,name:Qpe(r),path:the(l)}}):ok(t,i),n=s+i.length}return ok(t,e.slice(n)),t}function WM(e){return zM??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(zM.segment(e),({segment:t})=>t)}function x$(e){const t=WM(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?WM(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function she(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function ihe(e){return new Worker("/assets/mermaidParser.worker-Dx4jPi9z.js",{type:"module",name:e?.name})}const rhe={key:0,class:"md-frontmatter"},lhe={key:1,class:"diff-wrap"},ahe={class:"diff-bar"},uhe=["aria-label","onClick"],che={class:"diff-pre"},dhe={key:0,class:"diff-sign"},fhe={class:"diff-text"},phe="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Lm="pythinker-code://skill/",HM="md-table-wide",jM="md-table-toggle",UM="md-table-fade",VM="md-table-toggle--show",hhe="md-table-at-end",mhe=26,qM="github-light",KM="github-dark",ghe=Ge({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){ece(),pce(),nce(),gce(),tce(new she),mce(new ihe);const t=new WeakMap;function n(Fe,Ye){if(Fe.src[Fe.pos]!=="$")return!1;let it=t.get(Fe);(!it||it.src!==Fe.src)&&(it={src:Fe.src,match:Vpe(Fe.src),lastEnd:-1},t.set(Fe,it));const rt=it.match(Fe.pos,it.lastEnd);if(!rt||rt.end>Fe.posMax)return!1;if(it.lastEnd=rt.end,Ye)return Fe.pos=rt.end,!0;const gt=Fe.push("math_inline","math",0);return gt.content=rt.content,gt.markup="$",gt.raw=Fe.src.slice(Fe.pos,rt.end),gt.loading=!1,Fe.pos=rt.end,!0}function o(Fe){return Fe.set({typographer:!1}),Fe.inline.ruler.disable("math"),Fe.inline.ruler.before("escape","math",n),Fe}const{t:s}=It(),i=yn("resolveImage"),r=q(null),l=e,a=O(()=>!l.streaming),u=O(()=>Gpe(l.text??"")),c=O(()=>u.value.body),d=O(()=>Epe(c.value)),f=O(()=>l.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:Ope(c.value)),p=g$(),h=O(()=>!l.streaming),m=Es(new Map),k=new Set,w=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,v=/(]*?\bsrc=")([^"]+)(")/gi;function y(Fe){return!/^(https?:|data:|blob:)/i.test(Fe)}function b(Fe){if(!i)return;const Ye=[];for(const it of[w,v]){it.lastIndex=0;let rt;for(;(rt=it.exec(Fe))!==null;)Ye.push(rt[2]??"")}for(const it of Ye)!it||!y(it)||m.has(it)||k.has(it)||(k.add(it),i(it).then(rt=>{m.set(it,rt!==it?rt:"")}).catch(()=>{m.set(it,"")}).finally(()=>{k.delete(it)}))}function S(Fe){if(!i)return Fe;const Ye=it=>{if(!y(it))return null;const rt=m.get(it);return rt===void 0?phe:rt===""?null:rt};return Fe.replace(w,(it,rt,gt,Tt)=>{const tn=Ye(gt);return tn===null?it:`${rt}${tn}${Tt}`}).replace(v,(it,rt,gt,Tt)=>{const tn=Ye(gt);return tn===null?it:`${rt}${tn}${Tt}`})}Ze(()=>c.value,Fe=>b(Fe),{immediate:!0});function I(){if(!r.value||!l.openFile||l.streaming)return;const Fe=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Ye=[];let it=Fe.nextNode();for(;it;){const rt=it,gt=rt.parentElement;gt&&!gt.closest("a, pre, .md-file-link, svg")&&rt.data.trim().length>0&&Ye.push(rt),it=Fe.nextNode()}for(const rt of Ye){const gt=Ipe(rt.data,{aliases:d.value});if(gt.length===0||!rt.parentNode)continue;const Tt=document.createDocumentFragment();let tn=0;for(const fn of gt){fn.start>tn&&Tt.append(document.createTextNode(rt.data.slice(tn,fn.start)));const Kt=document.createElement("button");Kt.type="button",Kt.className="md-file-link",Kt.textContent=fn.text,Kt.title=fn.line?`${fn.path}:${fn.line}`:fn.path,Kt.addEventListener("click",Dn=>{Dn.preventDefault(),Dn.stopPropagation(),l.openFile?.({path:fn.path,line:fn.line})}),Tt.append(Kt),tn=fn.end}tnLm.length?"skill":Fe.startsWith("#")||Fe.startsWith("?")||Fe.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(Fe)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(Fe)?null:Fe.endsWith("/")||Fe.endsWith("\\")||/%5c$/i.test(Fe)?"folder":"file":null}function P(Fe){try{return decodeURIComponent(Fe.slice(Lm.length))}catch{return Fe.slice(Lm.length)}}function R(Fe){return Fe.replace(/%0A/g,` -`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function M(){if(!r.value||l.streaming)return;const Fe=r.value.querySelectorAll("a[href]");for(const Ye of Fe){if(Ye.dataset.mdLinkHandled==="true"||Ye.closest("svg")||Ye.querySelector("img"))continue;const it=Ye.getAttribute("href")??"",rt=L(it);if(rt===null)continue;Ye.dataset.mdLinkHandled="true",Ye.removeAttribute("title");const gt=rt==="skill"?it:T(it),Tt=R(Ye.textContent??"");Ye.classList.add("mention-pill",`mention-${rt}`),Ye.dataset.mentionKind=rt,Ye.dataset.mentionName=rt==="skill"?P(it):Tt,Ye.dataset.mentionPath=gt,(rt==="skill"||l.openFile)&&Ye.removeAttribute("href"),(rt==="skill"||rt==="file"&&l.openFile)&&(Ye.tabIndex=0,Ye.setAttribute("role","button"));const tn=x$(Tt),fn=document.createElement("span");if(fn.className="mention-pill-name",fn.textContent=tn,Ye.replaceChildren(fn),!Ye.querySelector(".mention-pill-icon")){const Kt=document.createElement("span");Kt.className="mention-pill-icon",Kt.setAttribute("aria-hidden","true"),Kt.innerHTML=rt==="skill"?yi("sparkles","sm"):rt==="folder"?yi("folder","sm"):aw(gt,Tt),Ye.prepend(Kt)}Ye.addEventListener("click",Kt=>{rt!=="skill"&&!l.openFile||(Kt.preventDefault(),Kt.stopPropagation(),rt==="file"&&l.openFile?.({path:$(T(it))}))}),rt==="file"&&l.openFile&&Ye.addEventListener("keydown",Kt=>{Kt.key!=="Enter"&&Kt.key!==" "||(Kt.preventDefault(),Kt.stopPropagation(),l.openFile?.({path:$(T(it))}))}),Se(Ye)}}function D(Fe){const Ye=Fe.dataset.mentionKind??(Fe.classList.contains("mention-skill")?"skill":Fe.classList.contains("mention-folder")?"folder":"file"),it=Fe.dataset.mentionName??Fe.querySelector(".mention-pill-name")?.textContent??"";return{kind:Ye,name:it,path:Fe.dataset.mentionPath??""}}function z(Fe,Ye){let it;return()=>{if(it===void 0){const rt=getComputedStyle(document.documentElement).getPropertyValue(Fe).trim(),gt=parseFloat(rt);it=Number.isFinite(gt)?rt.endsWith("s")?gt*1e3:gt:Ye}return it}}const B=z("--space-1-5",6),A=z("--p-mention-tip-vmargin",12),F=z("--duration-tooltip",150),W=z("--duration-fast",120),j=z("--duration-flash",1e3),le=q(null);let J=null,X=0,G=0;function Q(Fe){return le.value?.contains(Fe)??!1}function ee(){let Fe=le.value;return Fe||(Fe=document.createElement("div"),Fe.className="mention-tip",Fe.id="mention-tip",Fe.setAttribute("role","tooltip"),Fe.addEventListener("mouseenter",()=>window.clearTimeout(G)),Fe.addEventListener("mouseleave",()=>H()),Fe.addEventListener("focusin",()=>window.clearTimeout(G)),Fe.addEventListener("focusout",Ye=>{const it=Ye.relatedTarget;it instanceof Node&&(Fe.contains(it)||J?.contains(it))||te()}),document.body.append(Fe),le.value=Fe),Fe}function K(){const Fe=le.value,Ye=J;if(!Fe||!Ye)return;const it=Ye.getBoundingClientRect(),rt=B(),gt=A();let Tt=it.top-rt-Fe.offsetHeight;TtYe.name===Fe)}function Ce(Fe){const Ye=document.createElement("div");Ye.className="mention-tip-path";const it=document.createElement("div");it.className="mention-tip-path-text";const rt=Fe.split(/([/\\])/);let gt=rt.length-1;for(;gt>0&&(rt[gt]===""||rt[gt]==="/"||rt[gt]==="\\");)gt--;for(let fn=0;fn{fn.preventDefault(),fn.stopPropagation(),Zo(Fe).then(Kt=>{Kt&&(Tt.innerHTML=yi("check","sm"),window.setTimeout(()=>{Tt.innerHTML=tn},j()))})}),Ye.append(Tt),Ye}function ze(Fe){const Ye=document.createElement("div");Ye.className="mention-tip-skill";const it=document.createElement("div");it.className="mention-tip-head";const rt=document.createElement("span");if(rt.className="mention-tip-name",rt.textContent=Fe.name,it.append(rt),Fe.path&&l.openFile){const gt=document.createElement("button");gt.type="button",gt.className="mention-tip-open",gt.setAttribute("aria-label",s("mention.openSkill")),gt.innerHTML=yi("external-link","sm");const Tt=Fe.path;gt.addEventListener("click",tn=>{tn.preventDefault(),tn.stopPropagation(),te(),l.openFile?.({path:Tt})}),it.append(gt)}if(Ye.append(it),Fe.description){const gt=document.createElement("div");gt.className="mention-tip-desc",gt.textContent=Fe.description,Ye.append(gt)}return Ye}function me(Fe){const Ye=ee();J?.removeAttribute("aria-describedby"),J=Fe,Fe.setAttribute("aria-describedby",Ye.id);const it=D(Fe);Ye.replaceChildren(it.kind==="skill"?ze(ge(it.name)??{name:it.name,description:""}):Ce(it.path||it.name)),Ye.classList.remove("positioned"),K(),Ye.classList.add("positioned"),Ye.removeAttribute("inert")}function te(){window.clearTimeout(X),window.clearTimeout(G),J?.removeAttribute("aria-describedby"),J=null;const Fe=le.value;Fe?.classList.remove("positioned"),Fe?.setAttribute("inert","")}function oe(Fe){window.clearTimeout(G),window.clearTimeout(X);const Ye=le.value?.classList.contains("positioned")&&J===Fe;X=window.setTimeout(()=>{Fe.isConnected&&me(Fe)},Ye?0:F())}function H(){window.clearTimeout(X),window.clearTimeout(G),G=window.setTimeout(te,W())}function Y(Fe){const Ye=le.value;if(!(!Ye||!Ye.classList.contains("positioned")||!J)){if(Fe.key==="Escape"){Fe.target instanceof Node&&Ye.contains(Fe.target)&&J.focus(),te(),Fe.preventDefault(),Fe.stopImmediatePropagation();return}if(Fe.key==="Tab"&&Fe.target instanceof Node&&Ye.contains(Fe.target)){const it=Array.from(Ye.querySelectorAll("button")),rt=it[0],gt=it[it.length-1];(!Fe.shiftKey&&Fe.target===gt||Fe.shiftKey&&Fe.target===rt)&&(Fe.preventDefault(),J.focus(),te())}}}function ke(Fe){const Ye=Fe.target;Ye instanceof Node&&(Q(Ye)||J?.contains(Ye))||te()}function Se(Fe){Fe.addEventListener("mouseenter",()=>oe(Fe)),Fe.addEventListener("mouseleave",Ye=>{const it=Ye.relatedTarget;it instanceof Node&&Q(it)||H()}),Fe.addEventListener("focus",()=>oe(Fe)),Fe.addEventListener("blur",Ye=>{const it=Ye.relatedTarget;it instanceof Node&&Q(it)||H()})}function ye(){te()}function ne(Fe){return Fe.querySelector(`button.${jM}`)}function ce(Fe){return Fe.querySelector(`.${UM}`)}function xe(Fe){const Ye=ne(Fe);if(!Ye)return;const it=Fe.querySelector("thead tr")??Fe.querySelector("tr");if(!it)return;const rt=it.getBoundingClientRect(),gt=Fe.getBoundingClientRect().top,Tt=Math.max(2,Math.round(rt.top-gt+(rt.height-mhe)/2));Ye.style.top=`${Tt}px`,Ye.style.right=`${Tt}px`}function fe(Fe){const Ye=Fe.querySelector("table");return Ye!==null&&Ye.scrollWidth>Fe.clientWidth+1}function ue(Fe){const Ye=`translateX(${Fe.scrollLeft}px)`,it=ce(Fe);it&&(it.style.transform=Ye);const rt=ne(Fe);rt&&(rt.style.transform=Ye);const gt=Fe.scrollLeft+Fe.clientWidth>=Fe.scrollWidth-2;Fe.classList.toggle(hhe,gt)}function we(Fe){const Ye=ne(Fe);if(!Ye)return;const it=fe(Fe),rt=Fe.classList.contains(HM);Ye.classList.toggle(VM,it||rt),ce(Fe)?.classList.toggle(VM,it),xe(Fe),ue(Fe)}function se(Fe){const Ye=ne(Fe);if(Ye)return Ye;if(!Fe.closest(".a-msg .msg"))return null;const it=document.createElement("div");it.className=UM,it.setAttribute("aria-hidden","true");const rt=document.createElement("button");return rt.type="button",rt.className=jM,rt.innerHTML=yi("expand","sm"),rt.setAttribute("aria-label",s("conversation.widenTable")),rt.title=s("conversation.widenTable"),rt.addEventListener("click",gt=>{gt.preventDefault(),gt.stopPropagation(),_e(Fe)}),Fe.append(it,rt),Fe.addEventListener("scroll",()=>ue(Fe),{passive:!0}),we(Fe),rt}function _e(Fe){const Ye=Fe.classList.toggle(HM),it=ne(Fe);if(it){it.innerHTML=yi(Ye?"collapse":"expand","sm");const rt=s(Ye?"conversation.restoreTableWidth":"conversation.widenTable");it.setAttribute("aria-label",rt),it.title=rt}we(Fe),Fe.dispatchEvent(new CustomEvent("kimi-table-layout",{bubbles:!0}))}function Re(){if(!(!r.value||l.streaming))for(const Fe of r.value.querySelectorAll(".table-node-wrapper"))se(Fe)}function lt(){if(!(!r.value||l.streaming))for(const Fe of r.value.querySelectorAll(".table-node-wrapper"))we(Fe)}function ct(){te(),bt().then(()=>{I(),M(),Re()})}Ze(()=>l.text,ct),Ze(()=>l.streaming,ct);let Ct=null,Mt=null;bn(()=>{ct(),r.value&&(Ct=new MutationObserver(ct),Ct.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Mt=new ResizeObserver(lt),Mt.observe(r.value))),window.addEventListener("scroll",ye,{capture:!0}),window.addEventListener("resize",ye),document.addEventListener("pointerdown",ke,{capture:!0}),document.addEventListener("keydown",Y,{capture:!0})}),Mn(()=>{Ct?.disconnect(),Mt?.disconnect(),window.removeEventListener("scroll",ye,{capture:!0}),window.removeEventListener("resize",ye),document.removeEventListener("pointerdown",ke,{capture:!0}),document.removeEventListener("keydown",Y,{capture:!0}),te(),le.value?.remove(),le.value=null});const Bt={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Vt=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,Je=O(()=>{const Fe=S(c.value),Ye=[];let it=0;Vt.lastIndex=0;let rt;for(;(rt=Vt.exec(Fe))!==null;){const Tt=rt[1]??"",tn=Fe.slice(it,rt.index)+(Tt||"");tn.trim()&&Ye.push({kind:"md",text:tn}),Ye.push({kind:"diff",code:rt[2]??""}),it=Vt.lastIndex}const gt=Fe.slice(it);return(gt.trim()||Ye.length===0)&&Ye.push({kind:"md",text:gt}),Ye});function tt(Fe){return Fe.split(` -`).map(Ye=>Ye.startsWith("@@")?{type:"hunk",sign:"",text:Ye}:/^\+(?!\+\+)/.test(Ye)?{type:"add",sign:"+",text:Ye.slice(1)}:/^-(?!--)/.test(Ye)?{type:"del",sign:"-",text:Ye.slice(1)}:Ye.startsWith(" ")?{type:"ctx",sign:"",text:Ye.slice(1)}:{type:"ctx",sign:"",text:Ye})}const dt=q(null);function Rt(Fe,Ye){Zo(Fe).then(it=>{it&&(dt.value=Ye,setTimeout(()=>{dt.value=null},1400))})}return(Fe,Ye)=>(g(),C("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),C("pre",rhe,N(u.value.frontmatter),1)):ie("",!0),(g(!0),C(Ie,null,ot(Je.value,(it,rt)=>(g(),C(Ie,{key:rt},[it.kind==="md"?(g(),he(x(Ai),{key:0,content:it.text,"custom-markdown-it":o,mode:"chat","code-renderer":f.value.codeRenderer,"is-dark":x(p),"code-block-light-theme":qM,"code-block-dark-theme":KM,themes:[qM,KM],"code-block-props":Bt,final:a.value,"smooth-streaming":e.streaming,"batch-rendering":h.value,"defer-nodes-until-visible":!1,onCopy:x(oB)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),C("div",lhe,[_("div",ahe,[Ye[0]||(Ye[0]=_("span",{class:"diff-lang"},"diff",-1)),Z(_n,{text:x(s)("filePreview.copyCode")},{default:ve(()=>[_("button",{class:"diff-copy","aria-label":x(s)("filePreview.copyCode"),onClick:gt=>Rt(it.code,rt)},[Z(Oe,{name:dt.value===rt?"check":"copy",size:"sm"},null,8,["name"])],8,uhe)]),_:2},1032,["text"])]),_("pre",che,[_("code",null,[(g(!0),C(Ie,null,ot(tt(it.code),(gt,Tt)=>(g(),C("span",{key:Tt,class:Be(["diff-line",`diff-${gt.type}`])},[gt.type!=="hunk"?(g(),C("span",dhe,N(gt.sign),1)):ie("",!0),_("span",fhe,N(gt.text),1)],2))),128))])])]))],64))),128))],512))}}),Dl=ht(ghe,[["__scopeId","data-v-9fc85391"]]),vhe=Object.freeze(Object.defineProperty({__proto__:null,default:Dl},Symbol.toStringTag,{value:"Module"})),yhe={class:"activity-notice",role:"status"},khe={"aria-hidden":"true"},bhe={class:"an-label"},whe=Ge({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),C("div",yhe,[_("span",khe,[Z(Bo,{size:"sm"})]),_("span",bhe,N(e.label),1)]))}}),xhe=ht(whe,[["__scopeId","data-v-5e7a6420"]]);function _he(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=c=>String(c).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===o.getFullYear(),l=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(r&&l&&a)return i;const u=new Date(o);return u.setDate(o.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${i}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const She=Ge({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=It(),o=q(!1),s=O(()=>{const l=new Date(t.time);if(Number.isNaN(l.getTime()))return t.time;const a=u=>String(u).padStart(2,"0");return`${l.getFullYear()}-${a(l.getMonth()+1)}-${a(l.getDate())} ${a(l.getHours())}:${a(l.getMinutes())}`}),i=O(()=>o.value?s.value:_he(t.time,n("conversation.yesterday")));function r(){o.value=!o.value}return(l,a)=>(g(),C("button",{type:"button",class:"msg-time",onClick:St(r,["stop"])},N(i.value),1))}}),_$=ht(She,[["__scopeId","data-v-6761370d"]]);function Che(e){return e.length===1?`0${e}`:e}function Ahe(e,t){return`${String(Number(e))}:${Che(t)}`}const GM=e=>/^\d+$/.test(e);function Mhe(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,r,l]=n,a=i==="*"&&r==="*"&&l==="*",u=i==="*"&&r==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const c=/^\*\/(\d+)$/.exec(o);if(c&&s==="*"&&a)return c[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:c[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if(GM(o)&&GM(s)&&u){const f=Ahe(s,o);if(l==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(l==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const Ehe=["data-turn-id"],The={class:"cn-bubble"},Ihe={class:"cn-title"},$he={key:0,class:"cn-prompt"},Nhe={class:"cn-meta"},Lhe={key:0,class:"cn-meta-item"},Fhe={key:1,class:"cn-meta-item"},Ohe=["aria-label"],Rhe=["title"],Phe=Ge({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=It(),o=O(()=>t.cron),s=O(()=>o.value?.missedCount!==void 0),i=O(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=O(()=>{const c=o.value?.cron;return c?Mhe(c,n):""}),l=O(()=>s.value?"error":"ok"),a=O(()=>{const c=o.value;if(!c)return"";const d=[];return c.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof c.coalescedCount=="number"&&c.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:c.coalescedCount})),c.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:c.missedCount})),c.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),u=O(()=>t.text??"");return(c,d)=>(g(),C("div",{class:Be(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[_("div",The,[_("span",Ihe,N(i.value),1),u.value?(g(),C("span",$he,N(u.value),1)):ie("",!0)]),_("div",Nhe,[Z(Oe,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),r.value?(g(),C("span",Lhe,N(r.value),1)):ie("",!0),a.value?(g(),C("span",Fhe,N(a.value),1)):ie("",!0),_("span",{class:Be(["cn-status",l.value]),"aria-label":l.value},[l.value==="ok"?(g(),he(Oe,{key:0,name:"check",size:"sm"})):(g(),he(Oe,{key:1,name:"close",size:"sm"}))],10,Ohe),o.value?.jobId?(g(),C("span",{key:2,class:"cn-meta-item cn-id",title:x(n)("conversation.cron.job",{id:o.value.jobId})},N(o.value.jobId),9,Rhe)):ie("",!0),e.createdAt?(g(),he(_$,{key:3,time:e.createdAt},null,8,["time"])):ie("",!0)])],10,Ehe))}}),Dhe=ht(Phe,[["__scopeId","data-v-d3807b0f"]]),ZM=ln.clientId,Bhe="pythinker-code-web",zhe="web";function S$(){return{serverHttpUrl:Hhe(),clientId:Uhe(),clientName:Bhe,clientVersion:Vhe(),clientUiMode:zhe}}function Whe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Hhe(e){const t=Whe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Zc(e,t){return`${e}/api/v1${t.startsWith("/")?t:`/${t}`}`}function jhe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function Uhe(){const e=zo(ZM);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Qo(ZM,t),t}function Vhe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}function qhe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function Khe(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const Ghe={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function Zhe(e,t){switch(t.op){case"reset":return Yhe(e,t);case"turn.upsert":return Xhe(e,t.turn);case"step.upsert":return eme(e,t.turnId,t.step);case"frame.upsert":return nme(e,t);case"append":return sme(e,t);case"marker.upsert":return JM(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return JM(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return lme(e,t.task);case"interaction.upsert":return ame(e,t.interaction);case"attachment.upsert":return cme(e,t.attachment);case"todo.upsert":return fme(e,t.todo);case"prompt.upsert":return hme(e,t.prompt);case"meta.merge":return vme(e,t.meta);case"items.remove":return rme(e,t.ids)}}function Yhe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function YM(e,t){return{...e,kind:"turn",steps:[...t]}}function C$(e){return{kind:"turn",turnId:e,ordinal:qhe(e),state:"running",origin:{kind:"other"},steps:[]}}function Jhe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Cd(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function cx(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function E0(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function Xhe(e,t){const n=Cd(e,t.turnId);return n?Qhe(n,t)?{state:e,changed:!1}:{state:{...e,items:E0(e.items,t.turnId,o=>YM(t,o.steps))},changed:!0}:{state:{...e,items:cx(e.items,YM(t,[]))},changed:!0}}function Qhe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function eme(e,t,n){const o=Cd(e,t)??C$(t),s=o.steps.findIndex(u=>u.stepId===n.stepId);let i,r=!0;if(s>=0){const u=o.steps[s];u&&tme(u,n)?(r=!1,i=o.steps):i=o.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...o,steps:[...i]},a=Cd(e,t)?E0(e.items,t,()=>l):cx(e.items,l);return{state:{...e,items:a},changed:!0}}function tme(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function nme(e,t){const n=Cd(e,t.turnId)??C$(t.turnId),o=n.steps.find(c=>c.stepId===t.stepId)??Jhe(t.stepId,t.turnId),s=o.frames.findIndex(c=>c.frameId===t.frame.frameId);let i;if(s>=0){const c=o.frames[s];if(c!==void 0&&ome(c,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const r={...o,frames:[...i]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=Cd(e,t.turnId)?E0(e.items,t.turnId,()=>a):cx(e.items,a);return{state:{...e,items:u},changed:!0}}function ome(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function sme(e,t){if(t.target.type==="task")return ime(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Cd(e,n),r=i?.steps.find(f=>f.stepId===o),l=r?.frames.find(f=>f.frameId===s);if(!i||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=A$(l.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?c:f)};return{state:{...e,items:E0(e.items,n,()=>d)},changed:!0}}function ime(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=A$(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const r=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function A$(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function JM(e,t,n,o){if(e.items.some(i=>Jb(i)===n)){let i=!1;const r=e.items.map(l=>Jb(l)!==n||l===t?l:(i=!0,t));return i?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let r=i.length;for(let l=0;l=o){r=l;break}}return i.splice(r,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function Jb(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function rme(e,t){const n=new Set(t),o=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(Jb(l)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,r=e.interactions;if(o.length>0){const l=new Set,a=new Set(i),u=new Set;for(const c of o)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}i=a}return{state:{...e,items:s,interactions:r,pendingInteractions:i},changed:!0}}function lme(e,t){const n=e.tasks.get(t.taskId);if(n&&gme(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function ame(e,t){const n=e.interactions.get(t.interactionId);if(n&&ume(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function ume(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function cme(e,t){const n=e.attachments.get(t.attachmentId);if(n&&dme(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function dme(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function fme(e,t){const n=e.todos.get(t.todoId);if(n&&pme(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function pme(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function hme(e,t){const n=e.prompts.get(t.promptId);if(n&&mme(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function mme(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function gme(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function vme(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class yme{constructor(t){this.agentId=t}#e=Ghe;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const r=Zhe(s,i);if(r.gap){o={target:i.target,...r.gap};continue}r.changed&&(s=r.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const r of this.#t)r(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,r)=>r.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=i)continue;r.push(a)}else l>i&&r.push(a);n=r,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var XM;function pt(e,t,n){function o(l,a){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:a,constr:r,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,a);const u=r.prototype,c=Object.keys(u);for(let d=0;dn?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class md extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class M$ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(XM=globalThis).__zod_globalConfig??(XM.__zod_globalConfig={});const dx=globalThis.__zod_globalConfig;function Bl(e){return dx}function E$(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function Xb(e,t){return typeof t=="bigint"?t.toString():t}function T0(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fx(e){return e==null}function px(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function kme(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function Kp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wme=T0(()=>{if(dx.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ad(e){if(Kp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Kp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function I$(e){return Ad(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const xme=new Set(["string","number","symbol"]);function Md(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ja(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function Qt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function _me(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Sme={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Cme(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Ha(e._zod.def,{get shape(){const r={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(r[l]=n.shape[l])}return Qu(this,"shape",r),r},checks:[]});return ja(e,i)}function Ame(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Ha(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete r[l]}return Qu(this,"shape",r),r},checks:[]});return ja(e,i)}function Mme(e,t){if(!Ad(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(i,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Ha(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Qu(this,"shape",i),i}});return ja(e,s)}function Eme(e,t){if(!Ad(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ha(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Qu(this,"shape",o),o}});return ja(e,n)}function Tme(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Ha(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Qu(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ja(e,n)}function Ime(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=Ha(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Qu(this,"shape",a),a},checks:[]});return ja(t,r)}function $me(e,t,n){const o=Ha(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const r in n){if(!(r in i))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(i[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)i[r]=new e({type:"nonoptional",innerType:s[r]});return Qu(this,"shape",i),i}});return ja(t,o)}function Yc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Fm(e){return typeof e=="string"?e:e?.message}function zl(e,t,n){const o=e.message?e.message:Fm(e.inst?._zod.def?.error?.(e))??Fm(t?.error?.(e))??Fm(n.customError?.(e))??Fm(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:r,...l}=e;return l.path??(l.path=[]),l.message=o,t?.reportInput&&(l.input=r),l}function hx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gp(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const $$=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},N$=pt("$ZodError",$$),L$=pt("$ZodError",$$,{Parent:Error});function Lme(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function Fme(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const r of s.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(l=>o({issues:l},[...i,...r.path]));else if(r.code==="invalid_key")o({issues:r.issues},[...i,...r.path]);else if(r.code==="invalid_element")o({issues:r.issues},[...i,...r.path]);else{const l=[...i,...r.path];if(l.length===0)n._errors.push(t(r));else{let a=n,u=0;for(;u(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new md;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>zl(a,i,Bl())));throw T$(l,s?.callee),l}return r.value},gx=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>zl(a,i,Bl())));throw T$(l,s?.callee),l}return r.value},I0=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new md;return i.issues.length?{success:!1,error:new(e??N$)(i.issues.map(r=>zl(r,s,Bl())))}:{success:!0,data:i.value}},Ome=I0(L$),$0=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(r=>zl(r,s,Bl())))}:{success:!0,data:i.value}},Rme=$0(L$),Pme=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return mx(e)(t,n,s)},Dme=e=>(t,n,o)=>mx(e)(t,n,o),Bme=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return gx(e)(t,n,s)},zme=e=>async(t,n,o)=>gx(e)(t,n,o),Wme=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return I0(e)(t,n,s)},Hme=e=>(t,n,o)=>I0(e)(t,n,o),jme=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return $0(e)(t,n,s)},Ume=e=>async(t,n,o)=>$0(e)(t,n,o),Vme=/^[cC][0-9a-z]{6,}$/,qme=/^[0-9a-z]+$/,Kme=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gme=/^[0-9a-vA-V]{20}$/,Zme=/^[A-Za-z0-9]{27}$/,Yme=/^[a-zA-Z0-9_-]{21}$/,Jme=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xme=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,t5=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Qme=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ege="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tge(){return new RegExp(ege,"u")}const nge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ige=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rge=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,F$=/^[A-Za-z0-9_-]*$/,lge=/^https?$/,age=/^\+[1-9]\d{6,14}$/,O$="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",uge=new RegExp(`^${O$}$`);function R$(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cge(e){return new RegExp(`^${R$(e)}$`)}function dge(e){const t=R$({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${O$}T(?:${o})$`)}const fge=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pge=/^-?\d+$/,P$=/^-?\d+(?:\.\d+)?$/,hge=/^(?:true|false)$/i,mge=/^[^A-Z]*$/,gge=/^[^a-z]*$/,Mi=pt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),D$={number:"number",bigint:"bigint",object:"date"},B$=pt("$ZodCheckLessThan",(e,t)=>{Mi.init(e,t);const n=D$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Mi.init(e,t);const n=D$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vge=pt("$ZodCheckMultipleOf",(e,t)=>{Mi.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):kme(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yge=pt("$ZodCheckNumberFormat",(e,t)=>{Mi.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=Sme[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=pge)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?r.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):r.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}li&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),kge=pt("$ZodCheckMaxLength",(e,t)=>{var n;Mi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const r=hx(s);o.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),bge=pt("$ZodCheckMinLength",(e,t)=>{var n;Mi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const r=hx(s);o.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),wge=pt("$ZodCheckLengthEquals",(e,t)=>{var n;Mi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const r=hx(s),l=i>t.length;o.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),N0=pt("$ZodCheckStringFormat",(e,t)=>{var n,o;Mi.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),xge=pt("$ZodCheckRegex",(e,t)=>{N0.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_ge=pt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mge),N0.init(e,t)}),Sge=pt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=gge),N0.init(e,t)}),Cge=pt("$ZodCheckIncludes",(e,t)=>{Mi.init(e,t);const n=Md(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Age=pt("$ZodCheckStartsWith",(e,t)=>{Mi.init(e,t);const n=new RegExp(`^${Md(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Mge=pt("$ZodCheckEndsWith",(e,t)=>{Mi.init(e,t);const n=new RegExp(`.*${Md(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Ege=pt("$ZodCheckOverwrite",(e,t)=>{Mi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Tge{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` -`).filter(r=>r),s=Math.min(...o.map(r=>r.length-r.trimStart().length)),i=o.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of i)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` -`))}}const Ige={major:4,minor:4,patch:3},Co=pt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ige;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(r,l,a)=>{let u=Yc(r),c;for(const d of l){if(d._zod.def.when){if(Nme(r)||!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,p=d._zod.check(r);if(p instanceof Promise&&a?.async===!1)throw new md;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,r.issues.length!==f&&(u||(u=Yc(r,f)))});else{if(r.issues.length===f)continue;u||(u=Yc(r,f))}}return c?c.then(()=>r):r},i=(r,l,a)=>{if(Yc(r))return r.aborted=!0,r;const u=s(l,o,a);if(u instanceof Promise){if(a.async===!1)throw new md;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>i(c,r,l)):i(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new md;return a.then(u=>s(u,o,l))}return s(a,o,l)}}to(e,"~standard",()=>({validate:s=>{try{const i=Ome(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Rme(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),vx=pt("$ZodString",(e,t)=>{Co.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??fge(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),yo=pt("$ZodStringFormat",(e,t)=>{N0.init(e,t),vx.init(e,t)}),$ge=pt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xme),yo.init(e,t)}),Nge=pt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=t5(o))}else t.pattern??(t.pattern=t5());yo.init(e,t)}),Lge=pt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qme),yo.init(e,t)}),Fge=pt("$ZodURL",(e,t)=>{yo.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===lge.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Oge=pt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=tge()),yo.init(e,t)}),Rge=pt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yme),yo.init(e,t)}),Pge=pt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vme),yo.init(e,t)}),Dge=pt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=qme),yo.init(e,t)}),Bge=pt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Kme),yo.init(e,t)}),zge=pt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gme),yo.init(e,t)}),Wge=pt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zme),yo.init(e,t)}),Hge=pt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dge(t)),yo.init(e,t)}),jge=pt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=uge),yo.init(e,t)}),Uge=pt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=cge(t)),yo.init(e,t)}),Vge=pt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Jme),yo.init(e,t)}),qge=pt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=nge),yo.init(e,t),e._zod.bag.format="ipv4"}),Kge=pt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oge),yo.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Gge=pt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sge),yo.init(e,t)}),Zge=pt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ige),yo.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const r=Number(i);if(`${r}`!==i)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function W$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Yge=pt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rge),yo.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{W$(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Jge(e){if(!F$.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return W$(n)}const Xge=pt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=F$),yo.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Jge(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Qge=pt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=age),yo.init(e,t)});function e1e(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const t1e=pt("$ZodJWT",(e,t)=>{yo.init(e,t),e._zod.check=n=>{e1e(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),H$=pt("$ZodNumber",(e,t)=>{Co.init(e,t),e._zod.pattern=e._zod.bag.pattern??P$,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),n1e=pt("$ZodNumberFormat",(e,t)=>{yge.init(e,t),H$.init(e,t)}),o1e=pt("$ZodBoolean",(e,t)=>{Co.init(e,t),e._zod.pattern=hge,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),s1e=pt("$ZodUnknown",(e,t)=>{Co.init(e,t),e._zod.parse=n=>n}),i1e=pt("$ZodNever",(e,t)=>{Co.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function n5(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const r1e=pt("$ZodArray",(e,t)=>{Co.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let r=0;rn5(u,n,r))):n5(a,n,r)}return i.length?Promise.all(i).then(()=>n):n}});function S1(e,t,n,o,s,i){const r=n in o;if(e.issues.length){if(s&&i&&!r)return;t.issues.push(...Jc(n,e.issues))}if(!r&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?r&&(t.value[n]=void 0):t.value[n]=e.value}function j$(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=_me(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function U$(e,t,n,o,s,i){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||l.has(f))continue;if(u==="never"){r.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>S1(h,n,f,t,c,d))):S1(p,n,f,t,c,d)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const l1e=pt("$ZodObject",(e,t)=>{if(Co.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...l};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=T0(()=>j$(t));to(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=Kp,i=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=o.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:u[f],issues:[]},a);k instanceof Promise?c.push(k.then(w=>S1(w,l,f,u,h,m))):S1(k,l,f,u,h,m)}return i?U$(c,u,l,a,o.value,e):c.length?Promise.all(c).then(()=>l):l}}),a1e=pt("$ZodObjectJIT",(e,t)=>{l1e.init(e,t);const n=e._zod.parse,o=T0(()=>j$(t)),s=f=>{const p=new Tge(["shape","payload","ctx"]),h=o.value,m=y=>{const b=e5(y);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let w=0;for(const y of h.keys)k[y]=`key_${w++}`;p.write("const newResult = {};");for(const y of h.keys){const b=k[y],S=e5(y),I=f[y],T=I?._zod?.optin==="optional",$=I?._zod?.optout==="optional";p.write(`const ${b} = ${m(y)};`),T&&$?p.write(` - if (${b}.issues.length) { - if (${S} in input) { - payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${S}, ...iss.path] : [${S}] - }))); - } - } - - if (${b}.value === undefined) { - if (${S} in input) { - newResult[${S}] = undefined; - } - } else { - newResult[${S}] = ${b}.value; - } - - `):T?p.write(` - if (${b}.issues.length) { - payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${S}, ...iss.path] : [${S}] - }))); - } - - if (${b}.value === undefined) { - if (${S} in input) { - newResult[${S}] = undefined; - } - } else { - newResult[${S}] = ${b}.value; - } - - `):p.write(` - const ${b}_present = ${S} in input; - if (${b}.issues.length) { - payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${S}, ...iss.path] : [${S}] - }))); - } - if (!${b}_present && !${b}.issues.length) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: undefined, - path: [${S}] - }); - } - - if (${b}_present) { - if (${b}.value === undefined) { - newResult[${S}] = undefined; - } else { - newResult[${S}] = ${b}.value; - } - } - - `)}p.write("payload.value = newResult;"),p.write("return payload;");const v=p.compile();return(y,b)=>v(f,y,b)};let i;const r=Kp,l=!dx.jitless,u=l&&wme.value,c=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return r(h)?l&&u&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),c?U$([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function o5(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Yc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(r=>zl(r,o,Bl())))}),t)}const V$=pt("$ZodUnion",(e,t)=>{Co.init(e,t),to(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),to(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),to(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),to(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>px(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const r=[];for(const l of t.options){const a=l._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)r.push(a),i=!0;else{if(a.issues.length===0)return a;r.push(a)}}return i?Promise.all(r).then(l=>o5(l,o,e,s)):o5(r,o,e,s)}}),u1e=pt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,V$.init(e,t);const n=e._zod.parse;to(e._zod,"propValues",()=>{const s={};for(const i of t.options){const r=i._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const o=T0(()=>{const s=t.options,i=new Map;for(const r of s){const l=r._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const a of l){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,r)}}return i});e._zod.parse=(s,i)=>{const r=s.value;if(!Kp(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=o.value.get(r?.[t.discriminator]);return l?l._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:r,path:[t.discriminator],inst:e}),s)}}),c1e=pt("$ZodIntersection",(e,t)=>{Co.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),r=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||r instanceof Promise?Promise.all([i,r]).then(([a,u])=>s5(n,a,u)):s5(n,i,r)}});function Qb(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ad(e)&&Ad(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const r=Qb(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};s[i]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;ol.l&&l.r).map(([l])=>l);if(i.length&&s&&e.issues.push({...s,keys:i}),Yc(e))return e;const r=Qb(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const d1e=pt("$ZodRecord",(e,t)=>{Co.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Ad(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.keyType._zod.run({value:u,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>zl(p,o,Bl())),input:u,path:[u],inst:e});continue}const d=c.value,f=t.valueType._zod.run({value:s[u],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(u,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(u,f.issues)),n.value[d]=f.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const l of Reflect.ownKeys(s)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,l))continue;let a=t.keyType._zod.run({value:l,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&P$.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[l]=s[l]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>zl(d,o,Bl())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},o);c instanceof Promise?i.push(c.then(d=>{d.issues.length&&n.issues.push(...Jc(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Jc(l,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),f1e=pt("$ZodEnum",(e,t)=>{Co.init(e,t);const n=E$(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>xme.has(typeof s)).map(s=>typeof s=="string"?Md(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const r=s.value;return o.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),p1e=pt("$ZodLiteral",(e,t)=>{if(Co.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Md(o):o?Md(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),h1e=pt("$ZodTransform",(e,t)=>{Co.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new M$(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n.fallback=!0,n));if(s instanceof Promise)throw new md;return n.value=s,n.fallback=!0,n}});function i5(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const q$=pt("$ZodOptional",(e,t)=>{Co.init(e,t),e._zod.optin="optional",e._zod.optout="optional",to(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),to(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${px(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(r=>i5(r,s)):i5(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),m1e=pt("$ZodExactOptional",(e,t)=>{q$.init(e,t),to(e._zod,"values",()=>t.innerType._zod.values),to(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),g1e=pt("$ZodNullable",(e,t)=>{Co.init(e,t),to(e._zod,"optin",()=>t.innerType._zod.optin),to(e._zod,"optout",()=>t.innerType._zod.optout),to(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${px(n.source)}|null)$`):void 0}),to(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),v1e=pt("$ZodDefault",(e,t)=>{Co.init(e,t),e._zod.optin="optional",to(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>r5(i,t)):r5(s,t)}});function r5(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const y1e=pt("$ZodPrefault",(e,t)=>{Co.init(e,t),e._zod.optin="optional",to(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),k1e=pt("$ZodNonOptional",(e,t)=>{Co.init(e,t),to(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>l5(i,e)):l5(s,e)}});function l5(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const b1e=pt("$ZodCatch",(e,t)=>{Co.init(e,t),e._zod.optin="optional",to(e._zod,"optout",()=>t.innerType._zod.optout),to(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(r=>zl(r,o,Bl()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>zl(i,o,Bl()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),w1e=pt("$ZodPipe",(e,t)=>{Co.init(e,t),to(e._zod,"values",()=>t.in._zod.values),to(e._zod,"optin",()=>t.in._zod.optin),to(e._zod,"optout",()=>t.out._zod.optout),to(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(r=>Om(r,t.in,o)):Om(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>Om(i,t.out,o)):Om(s,t.out,o)}});function Om(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const x1e=pt("$ZodReadonly",(e,t)=>{Co.init(e,t),to(e._zod,"propValues",()=>t.innerType._zod.propValues),to(e._zod,"values",()=>t.innerType._zod.values),to(e._zod,"optin",()=>t.innerType?._zod?.optin),to(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(a5):a5(s)}});function a5(e){return e.value=Object.freeze(e.value),e}const _1e=pt("$ZodCustom",(e,t)=>{Mi.init(e,t),Co.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>u5(i,n,o,e));u5(s,n,o,e)}});function u5(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(Gp(s))}}var c5;class S1e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function C1e(){return new S1e}(c5=globalThis).__zod_globalRegistry??(c5.__zod_globalRegistry=C1e());const qf=globalThis.__zod_globalRegistry;function A1e(e,t){return new e({type:"string",...Qt(t)})}function M1e(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qt(t)})}function d5(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qt(t)})}function E1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qt(t)})}function T1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qt(t)})}function I1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qt(t)})}function $1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qt(t)})}function N1e(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qt(t)})}function L1e(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qt(t)})}function F1e(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qt(t)})}function O1e(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qt(t)})}function R1e(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qt(t)})}function P1e(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qt(t)})}function D1e(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qt(t)})}function B1e(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qt(t)})}function z1e(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qt(t)})}function W1e(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qt(t)})}function H1e(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qt(t)})}function j1e(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qt(t)})}function U1e(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qt(t)})}function V1e(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qt(t)})}function q1e(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qt(t)})}function K1e(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qt(t)})}function G1e(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qt(t)})}function Z1e(e,t){return new e({type:"string",format:"date",check:"string_format",...Qt(t)})}function Y1e(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qt(t)})}function J1e(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qt(t)})}function X1e(e,t){return new e({type:"number",checks:[],...Qt(t)})}function Q1e(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Qt(t)})}function e0e(e,t){return new e({type:"boolean",...Qt(t)})}function t0e(e){return new e({type:"unknown"})}function n0e(e,t){return new e({type:"never",...Qt(t)})}function f5(e,t){return new B$({check:"less_than",...Qt(t),value:e,inclusive:!1})}function sk(e,t){return new B$({check:"less_than",...Qt(t),value:e,inclusive:!0})}function p5(e,t){return new z$({check:"greater_than",...Qt(t),value:e,inclusive:!1})}function ik(e,t){return new z$({check:"greater_than",...Qt(t),value:e,inclusive:!0})}function h5(e,t){return new vge({check:"multiple_of",...Qt(t),value:e})}function K$(e,t){return new kge({check:"max_length",...Qt(t),maximum:e})}function C1(e,t){return new bge({check:"min_length",...Qt(t),minimum:e})}function G$(e,t){return new wge({check:"length_equals",...Qt(t),length:e})}function o0e(e,t){return new xge({check:"string_format",format:"regex",...Qt(t),pattern:e})}function s0e(e){return new _ge({check:"string_format",format:"lowercase",...Qt(e)})}function i0e(e){return new Sge({check:"string_format",format:"uppercase",...Qt(e)})}function r0e(e,t){return new Cge({check:"string_format",format:"includes",...Qt(t),includes:e})}function l0e(e,t){return new Age({check:"string_format",format:"starts_with",...Qt(t),prefix:e})}function a0e(e,t){return new Mge({check:"string_format",format:"ends_with",...Qt(t),suffix:e})}function Wd(e){return new Ege({check:"overwrite",tx:e})}function u0e(e){return Wd(t=>t.normalize(e))}function c0e(){return Wd(e=>e.trim())}function d0e(){return Wd(e=>e.toLowerCase())}function f0e(){return Wd(e=>e.toUpperCase())}function p0e(){return Wd(e=>bme(e))}function h0e(e,t,n){return new e({type:"array",element:t,...Qt(n)})}function m0e(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Qt(n)})}function g0e(e,t){const n=v0e(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(Gp(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Gp(i))}},e(o.value,o)),t);return n}function v0e(e,t){const n=new Mi({check:"custom",...Qt(t)});return n._zod.check=e,n}function Z$(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??qf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Jo(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const r={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,r);const l=e._zod.toJSONSchema?.();if(l)r.schema=l;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),Jo(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&Ks(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&"_prefault"in r.schema&&((o=r.schema).default??(o.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function Y$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=o.get(l);if(a&&a!==r[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(l,r[0])}}const s=r=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(r[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},i=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$ref=a};if(e.cycles==="throw")for(const r of e.seen.entries()){const l=r[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const l=r[1];if(t===r[0]){i(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id){i(r);continue}if(l.cycle){i(r);continue}if(l.count>1&&e.reused==="ref"){i(r);continue}}}function J$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=l=>{const a=e.seen.get(l);if(a.ref===null)return;const u=a.def??a.schema,c={...u},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,c),l._zod.parent===d)for(const k in u)k==="$ref"||k==="allOf"||k in c||delete u[k];if(h.$ref&&p.def)for(const k in u)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(u[k])===JSON.stringify(p.def[k])&&delete u[k]}const f=l._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:l,jsonSchema:u,path:a.path??[]})};for(const l of[...e.seen.entries()].reverse())o(l[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(l)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const r=e.external?.defs??{};for(const l of e.seen.entries()){const a=l[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,r[a.defId]=a.def)}e.external||Object.keys(r).length>0&&(e.target==="draft-2020-12"?s.$defs=r:s.definitions=r);try{const l=JSON.parse(JSON.stringify(s));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:A1(t,"input",e.processors),output:A1(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Ks(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ks(o.element,n);if(o.type==="set")return Ks(o.valueType,n);if(o.type==="lazy")return Ks(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ks(o.innerType,n);if(o.type==="intersection")return Ks(o.left,n)||Ks(o.right,n);if(o.type==="record"||o.type==="map")return Ks(o.keyType,n)||Ks(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ks(o.in,n)||Ks(o.out,n);if(o.type==="object"){for(const s in o.shape)if(Ks(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(Ks(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(Ks(s,n))return!0;return!!(o.rest&&Ks(o.rest,n))}return!1}const y0e=(e,t={})=>n=>{const o=Z$({...n,processors:t});return Jo(e,o),Y$(o,e),J$(o,e)},A1=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},r=Z$({...s??{},target:i,io:t,processors:n});return Jo(e,r),Y$(r,e),J$(r,e)},k0e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},b0e=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof r=="number"&&(s.maxLength=r),l&&(s.format=k0e[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},w0e=(e,t,n,o)=>{const s=n,{minimum:i,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number";const d=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(r??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u:typeof r=="number"&&(s.maximum=r),typeof a=="number"&&(s.multipleOf=a)},x0e=(e,t,n,o)=>{n.type="boolean"},_0e=(e,t,n,o)=>{n.not={}},S0e=(e,t,n,o)=>{},C0e=(e,t,n,o)=>{const s=e._zod.def,i=E$(s.entries);i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),n.enum=i},A0e=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const r of s.values)if(r===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(r))}else i.push(r);if(i.length!==0)if(i.length===1){const r=i[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),i.every(r=>typeof r=="boolean")&&(n.type="boolean"),i.every(r=>r===null)&&(n.type="null"),n.enum=i},M0e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},E0e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},T0e=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:r,maximum:l}=e._zod.bag;typeof r=="number"&&(s.minItems=r),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=Jo(i.element,t,{...o,path:[...o.path,"items"]})},I0e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const r=i.shape;for(const u in r)s.properties[u]=Jo(r[u],t,{...o,path:[...o.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=i.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=Jo(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},$0e=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,r=s.options.map((l,a)=>Jo(l,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=r:n.anyOf=r},N0e=(e,t,n,o)=>{const s=e._zod.def,i=Jo(s.left,t,{...o,path:[...o.path,"allOf",0]}),r=Jo(s.right,t,{...o,path:[...o.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(i)?i.allOf:[i],...l(r)?r.allOf:[r]];n.allOf=a},L0e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const r=i.keyType,a=r._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const c=Jo(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Jo(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=Jo(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},F0e=(e,t,n,o)=>{const s=e._zod.def,i=Jo(s.innerType,t,o),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},O0e=(e,t,n,o)=>{const s=e._zod.def;Jo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},R0e=(e,t,n,o)=>{const s=e._zod.def;Jo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},P0e=(e,t,n,o)=>{const s=e._zod.def;Jo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},D0e=(e,t,n,o)=>{const s=e._zod.def;Jo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let r;try{r=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=r},B0e=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),r=t.io==="input"?i?s.out:s.in:s.out;Jo(r,t,o);const l=t.seen.get(e);l.ref=r},z0e=(e,t,n,o)=>{const s=e._zod.def;Jo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},X$=(e,t,n,o)=>{const s=e._zod.def;Jo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},W0e=pt("ZodISODateTime",(e,t)=>{Hge.init(e,t),Mo.init(e,t)});function H0e(e){return G1e(W0e,e)}const j0e=pt("ZodISODate",(e,t)=>{jge.init(e,t),Mo.init(e,t)});function U0e(e){return Z1e(j0e,e)}const V0e=pt("ZodISOTime",(e,t)=>{Uge.init(e,t),Mo.init(e,t)});function q0e(e){return Y1e(V0e,e)}const K0e=pt("ZodISODuration",(e,t)=>{Vge.init(e,t),Mo.init(e,t)});function G0e(e){return J1e(K0e,e)}const Z0e=(e,t)=>{N$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Fme(e,n)},flatten:{value:n=>Lme(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Xb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Xb,2)}},isEmpty:{get(){return e.issues.length===0}}})},ur=pt("ZodError",Z0e,{Parent:Error}),Y0e=mx(ur),J0e=gx(ur),X0e=I0(ur),Q0e=$0(ur),eve=Pme(ur),tve=Dme(ur),nve=Bme(ur),ove=zme(ur),sve=Wme(ur),ive=Hme(ur),rve=jme(ur),lve=Ume(ur),m5=new WeakMap;function hh(e,t,n){const o=Object.getPrototypeOf(e);let s=m5.get(o);if(s||(s=new Set,m5.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const r=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const l=r.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}const Ao=pt("ZodType",(e,t)=>(Co.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:A1(e,"input"),output:A1(e,"output")}}),e.toJSONSchema=y0e(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Y0e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>X0e(e,n,o),e.parseAsync=async(n,o)=>J0e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Q0e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>eve(e,n,o),e.decode=(n,o)=>tve(e,n,o),e.encodeAsync=async(n,o)=>nve(e,n,o),e.decodeAsync=async(n,o)=>ove(e,n,o),e.safeEncode=(n,o)=>sve(e,n,o),e.safeDecode=(n,o)=>ive(e,n,o),e.safeEncodeAsync=async(n,o)=>rve(e,n,o),e.safeDecodeAsync=async(n,o)=>lve(e,n,o),hh(e,"ZodType",{check(...n){const o=this.def;return this.clone(Ha(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return ja(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(eye(n,o))},superRefine(n,o){return this.check(tye(n,o))},overwrite(n){return this.check(Wd(n))},optional(){return k5(this)},exactOptional(){return Wve(this)},nullable(){return b5(this)},nullish(){return k5(b5(this))},nonoptional(n){return Kve(this,n)},array(){return On(this)},or(n){return Lve([this,n])},and(n){return Rve(this,n)},transform(n){return w5(this,Bve(n))},default(n){return Uve(this,n)},prefault(n){return qve(this,n)},catch(n){return Zve(this,n)},pipe(n){return w5(this,n)},readonly(){return Xve(this)},describe(n){const o=this.clone();return qf.add(o,{description:n}),o},meta(...n){if(n.length===0)return qf.get(this);const o=this.clone();return qf.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return qf.get(e)?.description},configurable:!0}),e)),Q$=pt("_ZodString",(e,t)=>{vx.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(o,s,i)=>b0e(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,hh(e,"_ZodString",{regex(...o){return this.check(o0e(...o))},includes(...o){return this.check(r0e(...o))},startsWith(...o){return this.check(l0e(...o))},endsWith(...o){return this.check(a0e(...o))},min(...o){return this.check(C1(...o))},max(...o){return this.check(K$(...o))},length(...o){return this.check(G$(...o))},nonempty(...o){return this.check(C1(1,...o))},lowercase(o){return this.check(s0e(o))},uppercase(o){return this.check(i0e(o))},trim(){return this.check(c0e())},normalize(...o){return this.check(u0e(...o))},toLowerCase(){return this.check(d0e())},toUpperCase(){return this.check(f0e())},slugify(){return this.check(p0e())}})}),ave=pt("ZodString",(e,t)=>{vx.init(e,t),Q$.init(e,t),e.email=n=>e.check(M1e(uve,n)),e.url=n=>e.check(N1e(cve,n)),e.jwt=n=>e.check(K1e(Cve,n)),e.emoji=n=>e.check(L1e(dve,n)),e.guid=n=>e.check(d5(g5,n)),e.uuid=n=>e.check(E1e(Rm,n)),e.uuidv4=n=>e.check(T1e(Rm,n)),e.uuidv6=n=>e.check(I1e(Rm,n)),e.uuidv7=n=>e.check($1e(Rm,n)),e.nanoid=n=>e.check(F1e(fve,n)),e.guid=n=>e.check(d5(g5,n)),e.cuid=n=>e.check(O1e(pve,n)),e.cuid2=n=>e.check(R1e(hve,n)),e.ulid=n=>e.check(P1e(mve,n)),e.base64=n=>e.check(U1e(xve,n)),e.base64url=n=>e.check(V1e(_ve,n)),e.xid=n=>e.check(D1e(gve,n)),e.ksuid=n=>e.check(B1e(vve,n)),e.ipv4=n=>e.check(z1e(yve,n)),e.ipv6=n=>e.check(W1e(kve,n)),e.cidrv4=n=>e.check(H1e(bve,n)),e.cidrv6=n=>e.check(j1e(wve,n)),e.e164=n=>e.check(q1e(Sve,n)),e.datetime=n=>e.check(H0e(n)),e.date=n=>e.check(U0e(n)),e.time=n=>e.check(q0e(n)),e.duration=n=>e.check(G0e(n))});function wt(e){return A1e(ave,e)}const Mo=pt("ZodStringFormat",(e,t)=>{yo.init(e,t),Q$.init(e,t)}),uve=pt("ZodEmail",(e,t)=>{Lge.init(e,t),Mo.init(e,t)}),g5=pt("ZodGUID",(e,t)=>{$ge.init(e,t),Mo.init(e,t)}),Rm=pt("ZodUUID",(e,t)=>{Nge.init(e,t),Mo.init(e,t)}),cve=pt("ZodURL",(e,t)=>{Fge.init(e,t),Mo.init(e,t)}),dve=pt("ZodEmoji",(e,t)=>{Oge.init(e,t),Mo.init(e,t)}),fve=pt("ZodNanoID",(e,t)=>{Rge.init(e,t),Mo.init(e,t)}),pve=pt("ZodCUID",(e,t)=>{Pge.init(e,t),Mo.init(e,t)}),hve=pt("ZodCUID2",(e,t)=>{Dge.init(e,t),Mo.init(e,t)}),mve=pt("ZodULID",(e,t)=>{Bge.init(e,t),Mo.init(e,t)}),gve=pt("ZodXID",(e,t)=>{zge.init(e,t),Mo.init(e,t)}),vve=pt("ZodKSUID",(e,t)=>{Wge.init(e,t),Mo.init(e,t)}),yve=pt("ZodIPv4",(e,t)=>{qge.init(e,t),Mo.init(e,t)}),kve=pt("ZodIPv6",(e,t)=>{Kge.init(e,t),Mo.init(e,t)}),bve=pt("ZodCIDRv4",(e,t)=>{Gge.init(e,t),Mo.init(e,t)}),wve=pt("ZodCIDRv6",(e,t)=>{Zge.init(e,t),Mo.init(e,t)}),xve=pt("ZodBase64",(e,t)=>{Yge.init(e,t),Mo.init(e,t)}),_ve=pt("ZodBase64URL",(e,t)=>{Xge.init(e,t),Mo.init(e,t)}),Sve=pt("ZodE164",(e,t)=>{Qge.init(e,t),Mo.init(e,t)}),Cve=pt("ZodJWT",(e,t)=>{t1e.init(e,t),Mo.init(e,t)}),eN=pt("ZodNumber",(e,t)=>{H$.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(o,s,i)=>w0e(e,o,s),hh(e,"ZodNumber",{gt(o,s){return this.check(p5(o,s))},gte(o,s){return this.check(ik(o,s))},min(o,s){return this.check(ik(o,s))},lt(o,s){return this.check(f5(o,s))},lte(o,s){return this.check(sk(o,s))},max(o,s){return this.check(sk(o,s))},int(o){return this.check(v5(o))},safe(o){return this.check(v5(o))},positive(o){return this.check(p5(0,o))},nonnegative(o){return this.check(ik(0,o))},negative(o){return this.check(f5(0,o))},nonpositive(o){return this.check(sk(0,o))},multipleOf(o,s){return this.check(h5(o,s))},step(o,s){return this.check(h5(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Wt(e){return X1e(eN,e)}const Ave=pt("ZodNumberFormat",(e,t)=>{n1e.init(e,t),eN.init(e,t)});function v5(e){return Q1e(Ave,e)}const Mve=pt("ZodBoolean",(e,t)=>{o1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>x0e(e,n,o)});function mh(e){return e0e(Mve,e)}const Eve=pt("ZodUnknown",(e,t)=>{s1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>S0e()});function us(){return t0e(Eve)}const Tve=pt("ZodNever",(e,t)=>{i1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>_0e(e,n,o)});function Ive(e){return n0e(Tve,e)}const $ve=pt("ZodArray",(e,t)=>{r1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>T0e(e,n,o,s),e.element=t.element,hh(e,"ZodArray",{min(n,o){return this.check(C1(n,o))},nonempty(n){return this.check(C1(1,n))},max(n,o){return this.check(K$(n,o))},length(n,o){return this.check(G$(n,o))},unwrap(){return this.element}})});function On(e,t){return h0e($ve,e,t)}const Nve=pt("ZodObject",(e,t)=>{a1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>I0e(e,n,o,s),to(e,"shape",()=>t.shape),hh(e,"ZodObject",{keyof(){return vo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:us()})},loose(){return this.clone({...this._zod.def,catchall:us()})},strict(){return this.clone({...this._zod.def,catchall:Ive()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Mme(this,n)},safeExtend(n){return Eme(this,n)},merge(n){return Tme(this,n)},pick(n){return Cme(this,n)},omit(n){return Ame(this,n)},partial(...n){return Ime(nN,this,n[0])},required(...n){return $me(oN,this,n[0])}})});function $t(e,t){const n={type:"object",shape:e??{},...Qt(t)};return new Nve(n)}const tN=pt("ZodUnion",(e,t)=>{V$.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>$0e(e,n,o,s),e.options=t.options});function Lve(e,t){return new tN({type:"union",options:e,...Qt(t)})}const Fve=pt("ZodDiscriminatedUnion",(e,t)=>{tN.init(e,t),u1e.init(e,t)});function Ua(e,t,n){return new Fve({type:"union",options:t,discriminator:e,...Qt(n)})}const Ove=pt("ZodIntersection",(e,t)=>{c1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>N0e(e,n,o,s)});function Rve(e,t){return new Ove({type:"intersection",left:e,right:t})}const y5=pt("ZodRecord",(e,t)=>{d1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>L0e(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function yx(e,t,n){return!t||!t._zod?new y5({type:"record",keyType:wt(),valueType:e,...Qt(t)}):new y5({type:"record",keyType:e,valueType:t,...Qt(n)})}const e2=pt("ZodEnum",(e,t)=>{f1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(o,s,i)=>C0e(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const r of o)if(n.has(r))i[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new e2({...t,checks:[],...Qt(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const r of o)if(n.has(r))delete i[r];else throw new Error(`Key ${r} not found in enum`);return new e2({...t,checks:[],...Qt(s),entries:i})}});function vo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new e2({type:"enum",entries:n,...Qt(t)})}const Pve=pt("ZodLiteral",(e,t)=>{p1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>A0e(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function vn(e,t){return new Pve({type:"literal",values:Array.isArray(e)?e:[e],...Qt(t)})}const Dve=pt("ZodTransform",(e,t)=>{h1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>E0e(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new M$(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Gp(i,n.value,t));else{const r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Gp(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function Bve(e){return new Dve({type:"transform",transform:e})}const nN=pt("ZodOptional",(e,t)=>{q$.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>X$(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function k5(e){return new nN({type:"optional",innerType:e})}const zve=pt("ZodExactOptional",(e,t)=>{m1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>X$(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Wve(e){return new zve({type:"optional",innerType:e})}const Hve=pt("ZodNullable",(e,t)=>{g1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>F0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function b5(e){return new Hve({type:"nullable",innerType:e})}const jve=pt("ZodDefault",(e,t)=>{v1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>R0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Uve(e,t){return new jve({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():I$(t)}})}const Vve=pt("ZodPrefault",(e,t)=>{y1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>P0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function qve(e,t){return new Vve({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():I$(t)}})}const oN=pt("ZodNonOptional",(e,t)=>{k1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>O0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Kve(e,t){return new oN({type:"nonoptional",innerType:e,...Qt(t)})}const Gve=pt("ZodCatch",(e,t)=>{b1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>D0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zve(e,t){return new Gve({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Yve=pt("ZodPipe",(e,t)=>{w1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>B0e(e,n,o,s),e.in=t.in,e.out=t.out});function w5(e,t){return new Yve({type:"pipe",in:e,out:t})}const Jve=pt("ZodReadonly",(e,t)=>{x1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>z0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Xve(e){return new Jve({type:"readonly",innerType:e})}const Qve=pt("ZodCustom",(e,t)=>{_1e.init(e,t),Ao.init(e,t),e._zod.processJSONSchema=(n,o,s)=>M0e(e,n)});function eye(e,t={}){return m0e(Qve,e,t)}function tye(e,t){return g0e(e,t)}const qu=wt().min(1),kx=wt().min(1),gh=wt().min(1),Ku=wt().min(1),Hi=wt().min(1),nye=/^[A-Za-z0-9._-]{1,128}$/;function oye(e){return nye.test(e)&&e!=="."&&e!==".."}const sN=Ua("kind",[$t({kind:vn("user"),payload:us().optional()}),$t({kind:vn("cron"),taskId:Ku.optional(),payload:us().optional()}),$t({kind:vn("task"),taskId:Ku,payload:us().optional()}),$t({kind:vn("hook"),payload:us().optional()}),$t({kind:vn("compaction"),payload:us().optional()}),$t({kind:vn("side"),payload:us().optional()}),$t({kind:vn("other"),payload:us().optional()})]),sye=$t({inputTokens:Wt().optional(),outputTokens:Wt().optional(),cachedTokens:Wt().optional(),cost:Wt().optional()}),kp=$t({inputOther:Wt(),output:Wt(),inputCacheRead:Wt(),inputCacheCreation:Wt()}),iye=$t({llmFirstTokenLatencyMs:Wt().optional(),llmStreamDurationMs:Wt().optional(),llmRequestBuildMs:Wt().optional(),llmServerFirstTokenMs:Wt().optional(),llmServerDecodeMs:Wt().optional(),llmClientConsumeMs:Wt().optional()}),rye=$t({failedAttempt:Wt(),nextAttempt:Wt(),maxAttempts:Wt(),delayMs:Wt(),errorName:wt(),errorMessage:wt(),statusCode:Wt().optional()}),iN=vo(["queued","running","completed","failed","cancelled"]),lye=vo(["running","completed","interrupted","failed"]),aye=$t({kind:vn("text"),frameId:gh,role:vo(["assistant","user"]),text:wt(),attachmentIds:On(wt()).optional(),taskId:Ku.optional()}),uye=$t({kind:vn("thinking"),frameId:gh,text:wt()}),cye=$t({agentId:Hi,role:vo(["child","member"]).optional()}),dye=$t({kind:vo(["stdout","stderr","progress","status","custom"]),text:wt().optional(),percent:Wt().optional(),customKind:wt().optional(),customData:us().optional()}),fye=$t({kind:vn("tool"),frameId:gh,toolCallId:wt(),name:wt(),view:wt().optional(),state:vo(["running","done","error"]),input:us().optional(),output:us().optional(),display:us().optional(),error:wt().optional(),inputText:wt().optional(),progress:dye.optional(),taskId:Ku.optional(),approvalId:wt().optional(),todoId:wt().optional(),agentRefs:On(cye).optional()}),bx=$t({interactionId:wt(),interactionKind:vo(["approval","question"]),toolCallId:wt().optional(),state:vo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:us().optional(),response:us().optional()}),pye=$t({kind:vn("notice"),frameId:gh,level:vo(["error","warning","info"]),source:wt().optional(),message:wt(),detail:us().optional()}),rN=Ua("kind",[aye,uye,fye,pye]),lN=$t({kind:vn("step"),stepId:kx,turnId:qu,ordinal:Wt().int(),state:lye,frames:On(rN),startedAt:wt().optional(),endedAt:wt().optional(),usage:kp.optional(),finishReason:wt().optional(),timing:iye.optional(),retry:rye.optional(),endReason:wt().optional(),endMessage:wt().optional()}),aN=$t({kind:vn("turn"),turnId:qu,ordinal:Wt().int(),state:iN,origin:sN,prompt:wt().optional(),attachmentIds:On(wt()).optional(),steps:On(lN),startedAt:wt().optional(),endedAt:wt().optional(),usage:sye.optional(),durationMs:Wt().optional(),error:wt().optional()}),uN=$t({kind:vn("marker"),markerId:wt(),marker:wt(),payload:us().optional(),at:wt().optional()}),cN=$t({kind:vn("taskref"),refId:wt(),taskId:Ku,at:wt().optional()}),dN=Ua("kind",[aN,uN,cN]),wx=$t({taskId:Ku,kind:vo(["shell","subagent","tool","other"]),state:vo(["running","completed","failed","timed_out","killed","lost"]),detached:mh(),description:wt().optional(),agentId:Hi.optional(),outputTail:wt(),startedAt:wt().optional(),endedAt:wt().optional(),resultSummary:wt().optional(),error:wt().optional(),stateReason:wt().optional(),usage:kp.optional()}),fN=$t({objective:wt(),status:vo(["active","paused","blocked","complete"]),completionCriterion:wt().optional(),budgetUsed:Wt().optional(),budgetLimit:Wt().optional()}),hye=$t({plan:$t({reviewPath:wt().optional(),version:Wt().optional()}).optional(),dynamic_workflow:$t({trigger:wt().optional()}).optional()}),mye=$t({plan:$t({reviewPath:wt().optional(),version:Wt().optional()}).nullable().optional(),dynamic_workflow:$t({trigger:wt().optional()}).nullable().optional()}),gye=Ua("kind",[$t({kind:vn("idle")}),$t({kind:vn("running"),turnId:Wt(),step:Wt(),stepId:wt(),since:Wt()}),$t({kind:vn("streaming"),turnId:Wt(),step:Wt(),stepId:wt(),stream:vo(["assistant","thinking","tool_call"]),toolCallId:wt().optional(),toolName:wt().optional(),since:Wt()}),$t({kind:vn("tool_call"),turnId:Wt(),step:Wt(),toolCallId:wt(),name:wt(),since:Wt()}),$t({kind:vn("retrying"),turnId:Wt(),step:Wt(),stepId:wt(),failedAttempt:Wt(),nextAttempt:Wt(),maxAttempts:Wt(),delayMs:Wt(),errorName:wt().optional(),statusCode:Wt().optional(),since:Wt()}),$t({kind:vn("awaiting_approval"),turnId:Wt(),step:Wt().optional(),approval:us().optional(),since:Wt()}),$t({kind:vn("interrupted"),turnId:Wt(),step:Wt().optional(),reason:vo(["aborted","max_steps","error"]),message:wt().optional(),at:Wt()}),$t({kind:vn("ended"),turnId:Wt(),reason:vo(["completed","cancelled","failed","blocked"]),durationMs:Wt().optional(),at:Wt()})]),vye=$t({byModel:yx(wt(),kp).optional(),currentTurn:kp.optional(),total:kp.optional()}),yye=$t({model:wt().optional(),thinkingEffort:wt().optional(),usage:vye.optional(),contextTokens:Wt().optional(),maxContextTokens:Wt().optional(),contextUsage:Wt().optional(),permission:vo(["manual","yolo","auto"]).optional(),phase:gye.optional()}),xx=$t({goal:fN.optional(),modes:hye.optional(),activity:vo(["idle","turn","disposing","unknown"]).optional(),agent:yye.optional()}),kye=xx.extend({goal:fN.nullable().optional(),modes:mye.optional()}),L0=$t({attachmentId:wt(),mediaType:wt(),name:wt().optional(),size:Wt().optional(),source:Ua("kind",[$t({kind:vn("url"),url:wt()}),$t({kind:vn("file"),fileId:wt()}),$t({kind:vn("session_media"),fileId:wt()})]).optional(),placeholder:wt().optional()}),bye=$t({title:wt(),status:vo(["pending","in_progress","done"])}),_x=$t({todoId:wt(),items:On(bye),updatedAt:wt().optional()}),Sx=$t({promptId:wt(),status:vo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:wt().optional(),content:us().optional(),createdAt:wt(),finishedAt:wt().optional(),steeredAt:wt().optional()}),pN=$t({items:On(dN),tasks:On(wx),interactions:On(bx).default([]),attachments:On(L0).default([]),todos:On(_x).default([]),prompts:On(Sx).default([]),meta:xx,hasMoreOlder:mh().optional()}),wye=aN.omit({steps:!0}),xye=lN.omit({frames:!0}),_ye=Ua("type",[$t({type:vn("frame"),turnId:qu,stepId:kx,frameId:gh}),$t({type:vn("task"),taskId:Ku})]),Cx=Ua("op",[$t({op:vn("reset"),agentId:Hi,snapshot:pN}),$t({op:vn("turn.upsert"),turn:wye}),$t({op:vn("step.upsert"),turnId:qu,step:xye}),$t({op:vn("frame.upsert"),turnId:qu,stepId:kx,frame:rN}),$t({op:vn("append"),target:_ye,offset:Wt().int().nonnegative(),text:wt()}),$t({op:vn("marker.upsert"),item:uN,beforeTurn:Wt().int().optional()}),$t({op:vn("taskref.upsert"),item:cN,beforeTurn:Wt().int().optional()}),$t({op:vn("task.upsert"),task:wx}),$t({op:vn("interaction.upsert"),interaction:bx}),$t({op:vn("attachment.upsert"),attachment:L0}),$t({op:vn("todo.upsert"),todo:_x}),$t({op:vn("prompt.upsert"),prompt:Sx}),$t({op:vn("meta.merge"),meta:kye}),$t({op:vn("items.remove"),ids:On(wt())})]);$t({agentId:Hi,ops:On(Cx)});const Sye=vo(["off","turn","block","delta"]),Ed=Wt().int().nonnegative(),Cye=yx(wt(),Sye);$t({session_id:wt().min(1),transcript:Cye,transcript_since:yx(wt(),Ed).optional()});$t({agent_id:Hi,before_turn:wt().min(1).optional(),after_turn:wt().min(1).optional(),page_size:Wt().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),oye(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const Aye=$t({agentId:Hi,type:vo(["main","sub","independent"]).optional(),parentAgentId:Hi.optional(),label:wt().optional(),createdAt:wt().optional(),disposedAt:wt().optional()}),Mye=$t({agent_id:Hi,items:On(dN),has_more:mh(),tasks:On(wx),interactions:On(bx).default([]),attachments:On(L0).default([]),todos:On(_x).default([]),prompts:On(Sx).default([]),meta:xx,agents:On(Aye),pending_interactions:On(wt()),seq:Ed.optional()});$t({agent_id:Hi,batches:On($t({seq:Ed,ops:On(Cx)})),latest_seq:Ed,complete:mh()});const Eye=$t({turn_id:qu,ordinal:Wt().int(),state:iN,origin:sN,prompt:wt(),attachment_ids:On(wt()).optional(),started_at:wt().optional()});$t({agents:On($t({agent_id:Hi,messages:On(Eye),attachments:On(L0).default([])}))});const Tye=$t({state:vo(["pending","approved","rejected","cancelled"]),selected_option:wt().optional(),feedback:wt().optional()}),Iye=$t({tool_call_id:wt(),turn_id:qu,source:vo(["interaction","display","output"]),plan:wt(),path:wt().optional(),options:On($t({label:wt(),description:wt().optional()})).optional(),review:Tye.optional()});$t({agent_id:Hi,plans:On(Iye)});const $ye=$t({agent_id:Hi,snapshot:pN,has_more_older:mh(),seq:Ed.optional()}),Nye=$t({agent_id:Hi,ops:On(Cx),seq:Ed.optional()}),hN=$ye.extend({type:vn("transcript.reset")}),mN=Nye.extend({type:vn("transcript.ops")});Ua("type",[hN,mN]);const Lye=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],gN=500,M1=256*1024,x5=200,rk=16384,lk=500,ak=50,uk=50,Fye=6,Oye=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,Rye=/^[A-Za-z0-9+/=_-]{200,}$/;let ck=null;function $r(){if(ck!==null)return ck;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=zo(ln.debug)==="1"),ck=e,e}const Aa=[],Xc=[];let Kf=0;const xu=[];let Gf=0,Pye=1;const E1=new TextEncoder,Dye=new Set(Lye),Ax=q(0),Zf=_o(!1);function Bye(){return Aa}function zye(){Aa.length=0,Xc.length=0,Kf=0,xu.length=0,Gf=0,Ax.value++}function jl(e){if(!Zf.value){try{const t={id:Pye++,ts:Date.now(),source:e.source,kind:String(gd(e.kind)),label:String(gd(e.label)),sessionId:e.sessionId===void 0?void 0:String(gd(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:Va(e.detail)},n=JSON.stringify(t),o=E1.encode(n).byteLength;if(o>M1)return;for(Aa.push(t),Xc.push(n),Kf+=o+(Xc.length>1?1:0);Aa.length>gN||Kf>M1;){const s=Xc.shift();Aa.shift(),s!==void 0&&(Kf-=E1.encode(s).byteLength,Xc.length>0&&(Kf-=1))}}catch{return}Ax.value++}}function pu(e){if(typeof e=="string")return e.length<=x5?e:e.slice(0,x5)}function Zi(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Wye(e,t){if(Dye.has(e))try{const n={ts:Date.now(),event:e,sessionId:pu(t?.sessionId),status:pu(t?.status),operation:pu(t?.operation),seq:Zi(t?.seq),durationMs:Zi(t?.durationMs),messageCount:Zi(t?.messageCount),contentCount:Zi(t?.contentCount),mediaCount:Zi(t?.mediaCount),sessionCount:Zi(t?.sessionCount),workspaceCount:Zi(t?.workspaceCount),promptId:pu(t?.promptId),zipBytes:Zi(t?.zipBytes),errorName:pu(t?.errorName),errorCode:Zi(t?.errorCode),requestId:pu(t?.requestId),phase:pu(t?.phase),httpStatus:Zi(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Zi(t?.line),col:Zi(t?.col)},o=JSON.stringify(n),s=E1.encode(o).byteLength;if(s>M1)return;for(xu.push(o),Gf+=s+(xu.length>1?1:0);xu.length>gN||Gf>M1;){const i=xu.shift();i!==void 0&&(Gf-=E1.encode(i).byteLength,xu.length>0&&(Gf-=1))}}catch{return}}function gd(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return Rye.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>lk?`${i.slice(0,lk)}… [+${i.length-lk} chars]`:i}if(n!=="object")return String(e);if(t>=Fye)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,ak).map(r=>gd(r,t+1));return e.length>ak&&i.push(`[+${e.length-ak} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,uk))o[i]=Oye.test(i)?"[redacted]":gd(r,t+1);return s.length>uk&&(o._truncatedKeys=s.length-uk),o}function Va(e){if(e===void 0)return;const t=gd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>rk)return{_truncated:`detail JSON was ${n.length} chars; first ${rk} kept`,preview:n.slice(0,rk)}}catch{return"[unserializable detail]"}return t}function Pm(e){$r()&&jl({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:Va(e.body)}})}function Ec(e){if(!$r())return;const t=e.code!==0;jl({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:Va(e.data)}})}function oa(e){$r()&&jl({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){$r()&&jl({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:Va(t)})}function Hye(e){if(!$r())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;jl({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:Va(e)})}function jye(e){if(!$r())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,r=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);jl({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:Va(t.payload)})}const Uye={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Vye(e,t,n){$r()&&jl({source:"client",kind:`client:${e}`,label:`${Uye[e]} ${t}`,detail:Va(n)})}function bl(e,t){$r()&&jl({source:"client",kind:"client:event",label:`· ${e}`,detail:Va(t)})}function qo(e,t){Wye(e,t),jl({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let dk=!1,Dm=null;function qye(){if(dk)return()=>Dm?.();dk=!0;const e=[];try{if(typeof window<"u"){const n=s=>{qo("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;qo("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if($r())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Vye(n,i.map(Kye).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(Dm===t){for(const n of e.toReversed())n();Dm=null,dk=!1}};return Dm=t,t}function Kye(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function vN(e=Aa){if(typeof document>"u")return;const t=new Blob([Gye(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Gye(e=Aa){return e===Aa?Xc.join(` -`):e.map(t=>JSON.stringify(t)).join(` -`)}function Zye(){return xu.join(` -`)}function yN(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function t2(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function gr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:yN(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function bp(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function _5(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function Mx(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:_5(e.source)};case"video":return{type:"video",source:_5(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function n2(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(Mx),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function Yye(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function Jye(e){return{content:e.content.map(Yye),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function Xye(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function kN(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function Qye(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function eke(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(Qye),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function bN(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(eke),createdAt:e.created_at}}function tke(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function nke(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=tke(o);return{answers:t,method:e.method,note:e.note}}function vg(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function S5(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function sa(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Yi(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function wN(e){if(!e||typeof e!="object")return null;const t=e,n=sa(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:sa(t,"goalId")??sa(t,"goal_id")??"goal",objective:sa(t,"objective")??"",completionCriterion:sa(t,"completionCriterion")??sa(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:sa(t,"terminalReason")??sa(t,"terminal_reason"),budget:{tokenBudget:Yi(s,"tokenBudget")??Yi(s,"token_budget"),remainingTokens:Yi(s,"remainingTokens")??Yi(s,"remaining_tokens"),turnBudget:Yi(s,"turnBudget")??Yi(s,"turn_budget"),remainingTurns:Yi(s,"remainingTurns")??Yi(s,"remaining_turns"),wallClockBudgetMs:Yi(s,"wallClockBudgetMs")??Yi(s,"wall_clock_budget_ms"),remainingWallClockMs:Yi(s,"remainingWallClockMs")??Yi(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function oke(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:gr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:gr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:bp(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:bp(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:yN(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=wN(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:n2(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(Mx),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:kN(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:bN(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:vg(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:o2(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function ske(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function fk(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function Mf(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function xN(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function ike(e){return{provider:xN(e.provider),modelsImported:e.models_imported}}function o2(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry,raw:e.raw}}function rke(e){return e.session_id}function lke(e){return e.seq}const ake="main",uke=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function gl(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function cke(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const s2=new Map;function dke(e){return s2.get(e)}function C5(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function Zs(e,t){const n=e[t];return typeof n=="string"?n:void 0}function gu(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Ji(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function fke(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=Zs(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=Zs(t,"goalId")??Zs(t,"goal_id")??"goal",r=Zs(t,"objective")??"";return{goalId:i,objective:r,completionCriterion:Zs(t,"completionCriterion")??Zs(t,"completion_criterion"),status:s,turnsUsed:gu(t,"turnsUsed")??gu(t,"turns_used")??0,tokensUsed:gu(t,"tokensUsed")??gu(t,"tokens_used")??0,wallClockMs:gu(t,"wallClockMs")??gu(t,"wall_clock_ms")??0,terminalReason:Zs(t,"terminalReason")??Zs(t,"terminal_reason"),budget:{tokenBudget:Ji(o,"tokenBudget")??Ji(o,"token_budget"),remainingTokens:Ji(o,"remainingTokens")??Ji(o,"remaining_tokens"),turnBudget:Ji(o,"turnBudget")??Ji(o,"turn_budget"),remainingTurns:Ji(o,"remainingTurns")??Ji(o,"remaining_turns"),wallClockBudgetMs:Ji(o,"wallClockBudgetMs")??Ji(o,"wall_clock_budget_ms"),remainingWallClockMs:Ji(o,"remainingWallClockMs")??Ji(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function _u(e,t,n,o){if(typeof n!="string"||n.length===0)return null;const s=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(s.status==="completed"||s.status==="failed"||s.status==="cancelled")&&o.status==="running"?{...o,status:s.status,subagentPhase:s.subagentPhase,startedAt:s.startedAt,completedAt:s.completedAt,outputPreview:s.outputPreview,outputBytes:s.outputBytes,suspendedReason:s.suspendedReason}:o,l={...s,...r,id:n,agentId:n,sessionId:t,kind:"subagent"};return e.subagentMeta.set(n,l),l}function pke(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=Zs(t,"name")??Zs(t,"toolName")??"tool",o=$s(hke(n)),s=mke(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=Zs(n,"text");if(s)return pk(s);const i=Zs(n,"message");if(i)return pk(i)}const o=Zs(t,"message");if(o)return pk(o)}return null}function hke(e){return e.replace(/_\d+$/,"")}const A5=2e3;function pk(e){return e.length>A5?`${e.slice(0,A5)}…`:e}function mke(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return Ol(e,n)}function gke(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const c=Zs(s,"delta");if(!c)return[];const d=e.subagentMeta.get(n),f=_u(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:c,stream:"stdout",kind:"text"}),p}const r=pke(o,s);if(r===null||r.length===0)return[];const l=e.subagentMeta.get(n),a=_u(e,t,n,{status:"running",subagentPhase:"working",startedAt:l?.startedAt??new Date().toISOString()}),u=[];return a&&u.push({type:"taskCreated",sessionId:t,task:a}),u.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:r,stream:"stdout"}),u}function Ef(e){return{...e,content:e.content.map(t=>({...t}))}}function M5(e,t,n){const o={id:gl("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function vke(e,t,n,o,s,i){const r={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(r),r}function yke(e){return Array.isArray(e)?e.map(t=>Mx(t)):[]}function E5(e,t,n,o){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function kke(e,t,n,o,s,i){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function bke(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function T5(e,t){e.messages.find(n=>n.id===t)}function wke(e,t,n,o,s,i){const r={id:gl("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(r),r}function Tf(e,t){return e.messages.find(n=>n.id===t)}function I5(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function xke(){const e=new Map,t=new Set;function n(c){let d=e.get(c);return d||(d=C5(),e.set(c,d)),d}function o(c){e.set(c,C5())}function s(c){t.add(c)}function i(c,d){const f=n(c);f.currentPromptId=d}function r(c,d){o(c);const f=n(c),p=d.promptId??gl("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=M5(f,c,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:Ef(h)}]}function l(c,d,f,p){try{return u(c,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",c,h instanceof Error?h.message:h),[]}}function a(c,d){return d===void 0?"append":dc?"gap":"append"}function u(c,d,f,p){const h=n(f),m=d,k=[],w=m?.agentId;if(typeof w=="string"&&w!==ake){const v=t.has(w);if(v&&(c==="thinking.delta"||c==="assistant.delta")){const y=m?.delta??"";return y?[{type:"agentDelta",sessionId:f,agentId:w,delta:{[c==="thinking.delta"?"thinking":"text"]:y}}]:[]}if(v&&c==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:w,reason:m?.reason}];if(uke.has(c))return gke(h,f,w,c,m??{},t)}switch(c){case"session.meta.updated":{const v=m?.patch?.title??m?.title,y=m?.patch?.lastPrompt,b={};typeof v=="string"&&v.length>0&&(b.title=v),typeof y=="string"&&(b.lastPrompt=y),(b.title!==void 0||b.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,...b});break}case"prompt.submitted":{const v=m?.promptId,y=m?.userMessageId;if(!v||!y)break;const b=yke(m?.content);if(b.length===0)break;h.currentPromptId=v;const S=vke(h,f,v,y,b,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:Ef(S)});break}case"turn.started":{const v=m?.turnId,y=h.currentPromptId??gl("pr_");h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y),h.turnTextLen=0,h.turnThinkLen=0,s2.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const v=m?.turnId;let y=h.turnPromptId.get(v)??h.currentPromptId;if(y||(y=gl("pr_"),h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const S=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Tf(h,S)!==void 0){h.currentAssistantMsgId=S;break}}const b=M5(h,f,y);h.currentAssistantMsgId=b.id,k.push({type:"messageCreated",message:Ef(b)});break}case"thinking.delta":{const v=h.currentAssistantMsgId;if(!v)break;const y=m?.delta??"";if(!y)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const b=a(h.turnThinkLen,p?.offset);if(b==="skip")break;if(b==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const S=E5(h,v,"thinking",y);if(S<0)break;h.turnThinkLen+=y.length,k.push({type:"assistantDelta",sessionId:f,messageId:v,contentIndex:S,delta:{thinking:y}});break}case"assistant.delta":{const v=h.currentAssistantMsgId;if(!v)break;const y=m?.delta??"";if(!y)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const b=a(h.turnTextLen,p?.offset);if(b==="skip")break;if(b==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const S=E5(h,v,"text",y);if(S<0)break;h.turnTextLen+=y.length,k.push({type:"assistantDelta",sessionId:f,messageId:v,contentIndex:S,delta:{text:y}});break}case"tool.use":case"tool.call.started":{const v=h.currentAssistantMsgId,y=m?.turnId,b=h.turnPromptId.get(y)??h.currentPromptId;if(!v||!b)break;const S=m?.toolCallId,I=m?.name??m?.toolName??"",T=m?.args??m?.input??{};kke(h,v,S,I,T);const $=Tf(h,v);$&&$.content.length-1,h.toolStartTimes.set(S,Date.now()),$&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:$.content.map(L=>({...L})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=m?.toolCallId,y=bke(m??{});v&&y&&k.push({type:"toolOutput",sessionId:f,toolCallId:v,outputChunk:y.outputChunk,stream:y.stream});break}case"tool.result":{const v=m?.turnId;let y=h.turnPromptId.get(v)??h.currentPromptId;y||(y=gl("pr_"),h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y));const b=m?.toolCallId,S=m?.output,I=m?.isError??!1;h.toolStartTimes.get(b)??Date.now(),h.toolStartTimes.delete(b);const T=wke(h,f,b,S,I,y);k.push({type:"messageCreated",message:Ef(T)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=h.currentAssistantMsgId,y=cke(m?.usage);if(h.totalInput+=y.input,h.totalOutput+=y.output,h.totalCacheRead+=y.cacheRead,h.totalCacheCreate+=y.cacheCreate,v){T5(h,v);const b=Tf(h,v);b&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:b.content.map(S=>({...S})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:I5(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const v=h.currentAssistantMsgId,y=m?.reason??"completed",b=gu(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),v){T5(h,v);const I=Tf(h,v);I&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:I.content.map(T=>({...T})),status:y==="failed"||y==="blocked"?"error":"completed",durationMs:b})}h.turnCount++;const S=I5(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:S}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=m?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:v,reason:m?.reason??"completed"});break}case"prompt.aborted":{const v=m?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:v});break}case"turn.step.retrying":{const v=h.currentAssistantMsgId;if(v!==void 0){const y=Tf(h,v);y!==void 0&&(y.content=y.content.filter(b=>b.type!=="text"&&b.type!=="thinking"&&b.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:v,content:y.content.map(b=>({...b})),status:"pending"}),h.retryReuseMsgId=v)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const v=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",y=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;s2.set(f,{reason:v,message:y,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const v=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:gl("task_"),y={id:v,agentId:v,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(y.id,y),k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.started":{const v=_u(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});v&&k.push({type:"taskCreated",sessionId:f,task:v});break}case"subagent.suspended":{const v=_u(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0});v&&k.push({type:"taskCreated",sessionId:f,task:v});break}case"subagent.completed":{const v=typeof m?.resultSummary=="string"?m.resultSummary:void 0,y=_u(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),outputPreview:v});y&&k.push({type:"taskCreated",sessionId:f,task:y}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof m?.error=="string"?m.error:void 0,y=_u(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),outputPreview:v});y&&k.push({type:"taskCreated",sessionId:f,task:y}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const v=m?.info??{},y=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,b=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):gl("task_"),S=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:ao.global.t("tasks.defaultDescription");if(v.kind==="agent"){const T=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(T!==void 0){const $=_u(h,f,T,{description:S,backgroundTaskId:b,model:typeof v.model=="string"?v.model:void 0,thinkingEffort:typeof v.thinkingEffort=="string"?v.thinkingEffort:void 0,runInBackground:!0});$&&k.push({type:"taskCreated",sessionId:f,task:$})}else k.push({type:"taskCreated",sessionId:f,task:{id:b,sessionId:f,kind:"subagent",description:S,status:"running",createdAt:y??new Date().toISOString(),startedAt:y,subagentPhase:"queued",runInBackground:!0}});break}const I=typeof v.command=="string"?v.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:b,sessionId:f,kind:"bash",description:S,command:I,status:"running",createdAt:y??new Date().toISOString(),startedAt:y,outputPreview:I!==void 0?`$ ${I}`:void 0}});break}case"task.terminated":{const v=m?.info??{},y=v.status==="failed"||typeof v.exitCode=="number"&&v.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:y?"failed":"completed"});break}case"compaction.completed":{const v=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const v=fke(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=m?.origin,y=Zs(m??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&y){const b={id:gl("cron_"),sessionId:f,role:"user",content:[{type:"text",text:y}],createdAt:new Date().toISOString(),metadata:{origin:v}};h.messages.push(b),k.push({type:"messageCreated",message:Ef(b)})}break}}return k}return{project:l,bindNextPromptId:i,seedInFlight:r,reset:o,markSideChannelAgent:s}}const _ke=new Set(["server_hello","ack","ping","resync_required","error","pong"]),$5=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","background.task.started","background.task.terminated","cron.fired"]),Ske=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),Cke=new Set(["assistant.delta","thinking.delta"]);function Ake(e,t){if(_ke.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return Cke.has(o)?Mke(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?Ske.has(o)?{route:"protocol"}:$5.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:$5.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function Mke(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class Yf extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class pl extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function tr(e){return e instanceof Yf||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function Ex(e){return e instanceof pl||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const Ss="pythinker-web.server-credential",Eke="token",Tke=10080*60*1e3;let Jr;const i2=new Set;function Ike(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(Eke);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function r2(e){return{version:1,credential:e,expiresAt:Date.now()+Tke}}function $ke(e){return JSON.stringify(e)}function Tx(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function l2(e){globalThis.localStorage?.setItem(Ss,$ke(e))}function Nke(){try{const e=globalThis.localStorage?.getItem(Ss);if(e){const n=Tx(e);if(n===void 0){const o=r2(e);let s=!1;try{l2(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Ss)===e&&globalThis.localStorage?.removeItem(Ss),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ss)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Ss),globalThis.localStorage?.getItem(Ss)===e&&globalThis.localStorage?.removeItem(Ss);return}const t=globalThis.sessionStorage?.getItem(Ss);if(t){const n=r2(t);let o=!1;try{l2(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ss),o=!0}catch{}return o?n:void 0}return}catch{return}}function Lke(){const e=Ike();return e?(SN(e),!0):(Jr=Nke(),Jr!==void 0)}function _N(){if(Jr!==void 0){if(Jr.expiresAt<=Date.now()){Fke(Jr);return}return Jr.credential}}function Fke(e){Jr=void 0;try{globalThis.sessionStorage?.removeItem(Ss);const t=globalThis.localStorage?.getItem(Ss),n=t==null?void 0:Tx(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Ss)}catch{}}function SN(e){const t=r2(e);Jr=t;try{l2(t)}catch{}try{globalThis.sessionStorage?.removeItem(Ss)}catch{}}function Oke(){const e=Jr;Jr=void 0;try{const t=globalThis.localStorage?.getItem(Ss),o=(t==null?void 0:Tx(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Ss),globalThis.sessionStorage?.removeItem(Ss)}catch{}}function Rke(e){return i2.add(e),()=>{i2.delete(e)}}function Pke(){Oke();for(const e of i2)try{e()}catch{}}const Bc=3e4,Bm=5*6e4,CN="0123456789ABCDEFGHJKMNPQRSTVWXYZ",N5=500,AN=40101;function zm(e=Bc){try{return AbortSignal.timeout(e)}catch{return}}function Dke(e,t){let n="",o=e;for(let s=0;sCN[n%32]).join("")}function Wm(){return`${Dke(Date.now(),10)}${Bke(16)}`}function zke(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function hk(e){try{const t=await e.text();return t?t.length>N5?`${t.slice(0,N5)}...`:t:void 0}catch{return}}class MN{constructor(t,n){this.origin=t,this.identity=n}async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t){const n=Zc(this.origin,t),o=Wm(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();Pm({method:"GET",path:t,url:n,requestId:o});let r;try{r=await fetch(n,{method:"GET",headers:s,signal:zm()})}catch(a){throw oa({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new pl({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-i})}if(r.ok)return Ec({method:"GET",path:t,requestId:o,status:r.status,durationMs:Date.now()-i,code:0,msg:""}),r.blob();let l;try{l=await r.clone().json()}catch{}throw this.checkAuthRequired(r,l?.code??0),Ec({method:"GET",path:t,requestId:o,status:r.status,durationMs:Date.now()-i,code:l?.code??r.status,msg:l?.msg??r.statusText,envelopeRequestId:l?.request_id}),new Yf({code:l?.code??r.status,msg:l?.msg??r.statusText,requestId:l?.request_id??o,details:l?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async postZip(t,n,o){const s="POST",i=Zc(this.origin,t),r=Wm(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();Pm({method:s,path:t,url:i,requestId:r,body:o});let u;try{u=await fetch(i,{method:s,headers:l,body:JSON.stringify(n),signal:zm(Bm)})}catch(p){throw oa({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:p}),new pl({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:r,phase:"fetch",timeoutMs:Bm,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let p;try{p=await u.clone().json()}catch{}if(this.checkAuthRequired(u,p?.code??0),!u.ok||p!==void 0&&p.code!==0){const k=p?.code??u.status,w=p?.msg??u.statusText;throw Ec({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:k,msg:w,envelopeRequestId:p?.request_id}),new Yf({code:k,msg:w,requestId:p?.request_id??r,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw oa({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new pl({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:Bm,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await hk(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(p){throw oa({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:p}),new pl({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:Bm,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return Ec({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Zc(this.origin,t),s=Wm(),i={"X-Request-Id":s};this.addClientHeaders(i);const r=Date.now();Pm({method:"POST",path:t,url:o,requestId:s,body:zke(n)});let l;try{l=await fetch(o,{method:"POST",headers:i,body:n,signal:zm()})}catch(c){throw oa({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new pl({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw oa({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new pl({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Bc,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await hk(u),timestamp:Date.now(),durationMs:Date.now()-r})}if(Ec({method:"POST",path:t,requestId:s,status:l.status,durationMs:Date.now()-r,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(l,a.code),a.code!==0)throw new Yf({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-r});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[]){let r=Zc(this.origin,n);if(s){const p=new URLSearchParams;for(const[m,k]of Object.entries(s))k!==void 0&&p.set(m,String(k));const h=p.toString();h&&(r=`${r}?${h}`)}const l=Wm(),a={"X-Request-Id":l};this.addClientHeaders(a),o!==void 0&&(a["Content-Type"]="application/json; charset=utf-8");const u=Date.now();Pm({method:t,path:n,url:r,requestId:l,body:o});let c;try{c=await fetch(r,{method:t,headers:a,body:o!==void 0?JSON.stringify(o):void 0,signal:zm()})}catch(p){throw oa({method:t,path:n,requestId:l,phase:"fetch",durationMs:Date.now()-u,error:p}),new pl({message:`Network error calling ${t} ${n}`,cause:p,method:t,path:n,url:r,requestId:l,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-u})}let d;const f=c.clone();try{d=await c.json()}catch(p){throw oa({method:t,path:n,requestId:l,phase:"parse",durationMs:Date.now()-u,status:c.status,error:p}),new pl({message:`Failed to parse JSON response from ${t} ${n}`,cause:p,method:t,path:n,url:r,requestId:l,phase:"parse",timeoutMs:Bc,status:c.status,statusText:c.statusText,contentType:c.headers.get("content-type")??void 0,bodyPreview:await hk(f),timestamp:Date.now(),durationMs:Date.now()-u})}if(Ec({method:t,path:n,requestId:l,status:c.status,durationMs:Date.now()-u,code:d.code,msg:d.msg,envelopeRequestId:d.request_id,data:d.data}),this.checkAuthRequired(c,d.code),d.code!==0&&!i.includes(d.code))throw new Yf({code:d.code,msg:d.msg,requestId:d.request_id,details:d.details,timestamp:Date.now(),durationMs:Date.now()-u});return d.data}addClientHeaders(t){const n=_N();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===AN)&&Pke()}}const Wke="pythinker-code.bearer.",Hke=3e4;class jke{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=_N(),n=t!==void 0?[`${Wke}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));jye(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=Hm(t,n),i=this.terminalAttachments.get(s),r=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(Hm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(Hm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,Hke),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=hN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.handlers.onTranscriptReset?.(i,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(i);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(o==="transcript.ops"){const s=mN.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.handlers.onTranscriptOps?.(i,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(i);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,r=n.seq,l=Hm(s,i),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,u,r);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.handlers.onTerminalExit?.(s,i,l);break}default:{this.trackCursor(n);const s=n.type,i=Ake(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:r.seq,session_id:r.session_id,timestamp:r.timestamp,payload:r.payload,...l.volatile!==void 0?{volatile:l.volatile}:{},...l.offset!==void 0?{offset:l.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),Hye(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function Hm(e,t){return`${e}\0${t}`}function Uke(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function L5(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function Vke(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function F5(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function O5(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function mk(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function R5(e){return e==="auto_compact"||e==="manual_compact"}class qke{http;config;constructor(t){this.config=t,this.http=new MN(t.serverHttpUrl,{clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode})}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1"}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(gr),hasMore:o.has_more}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return gr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return gr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return gr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return wN(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return gr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(n2),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=Mye.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();qo("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:gr(o.session),messages:o.messages.items.map(n2),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(kN),pendingQuestions:o.pending_questions.map(bN),subagents:(o.subagents??[]).map(vg)};return qo("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw qo("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...L5(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` -`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),r=`${t}.zip`;return{blob:i.blob,fileName:Uke(i.contentDisposition,r)}}async submitPrompt(t,n){const o=Date.now();qo("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,Jye(n));return qo("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw qo("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...L5(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return gr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return gr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(gr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,Xye(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,nke(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o)).items.map(vg)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return vg(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(mk)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return mk(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return mk(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:Vke(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:F5(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:F5(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(S5)])):void 0;return{items:s.items.map(S5),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Zc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(bp)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return bp(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return bp(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(ske)}async listProviders(){return(await this.http.get("/providers")).items.map(Mf)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=Mf(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",O5(t));return Mf(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,O5(n));return{provider:Mf(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map(Mf),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return gk(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return gk(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return gk(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return fk(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return fk(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return fk(n)}async getConfig(){const t=await this.http.get("/config");return o2(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry",raw:"raw"};for(const[i,r]of Object.entries(t)){const l=o[i];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return o2(s)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model,managedProvider:t.managed_provider?{status:t.managed_provider.status}:null}}async startOAuthLogin(){const t=await this.http.post("/oauth/login",{});return t.status==="authenticated"?{flowId:t.flow_id,provider:t.provider,status:"authenticated"}:{flowId:t.flow_id,provider:t.provider,status:"pending",verificationUri:t.verification_uri,verificationUriComplete:t.verification_uri_complete,userCode:t.user_code,expiresIn:t.expires_in,interval:t.interval,expiresAt:t.expires_at}}async pollOAuthLogin(){const t=await this.http.get("/oauth/login");return t?{flowId:t.flow_id,status:t.status,resolvedAt:t.resolved_at}:null}async cancelOAuthLogin(){const t=await this.http.delete("/oauth/login");return{cancelled:t.cancelled,status:t.status}}async logout(){return{loggedOut:(await this.http.post("/oauth/logout",{})).logged_out}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Zc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=jhe(this.config.serverHttpUrl,this.config.clientId),o=xke(),s=new jke(n,this.config.clientId,{onWireEvent:i=>{const r=rke(i),l=lke(i),a=oke(i);a.type==="historyCompacted"&&!R5(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:i=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=i,d=o.project(r,u,a,{offset:c});for(const f of d){const p=u?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:p,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!R5(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:h})}},onResync:(i,r,l)=>{o.reset(i),t.onResync(i,r,l)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,r,l)=>{t.onError(i,r,l)},onTranscriptReset:(i,r,l,a)=>{t.onTranscriptReset?.(i,r,l,a)},onTranscriptOps:(i,r,l,a)=>t.onTranscriptOps?.(i,r,l,a),onTerminalOutput:(i,r,l,a)=>{t.onTerminalOutput?.(i,r,l,a)},onTerminalExit:(i,r,l)=>{t.onTerminalExit?.(i,r,l)}});return s.connect(),{subscribe(i,r){s.subscribe(i,r??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,r,l){s.subscribeTranscript(i,r,l)},unsubscribeTranscript(i,r){s.unsubscribeTranscript(i,r)},seedSnapshot(i,r){if(r.inFlightTurn===null){o.reset(i);return}const l=o.seedInFlight(i,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:i,seq:r.asOfSeq})},bindNextPromptId(i,r){o.bindNextPromptId(i,r)},abort(i,r){s.abort(i,r)},terminalAttach(i,r,l){s.terminalAttach(i,r,l)},terminalInput(i,r,l){s.terminalInput(i,r,l)},terminalResize(i,r,l,a){s.terminalResize(i,r,l,a)},terminalDetach(i,r){s.terminalDetach(i,r)},terminalClose(i,r){s.terminalClose(i,r)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function gk(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function Kke(e){const t=new MN(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(xN)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return ike(s)}}}let vk;function xt(){if(vk===void 0){const e=S$();vk=Object.assign(new qke(e),Kke(e))}return vk}const Gke=["src","controls","muted"],Zke=["aria-label"],Yke=["src","alt"],Jke=["aria-label"],Ix=Ge({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=q(t.fileId?"":t.url),o=q(null),s=q(!t.fileId);let i=null,r=0,l=!1,a=null;function u(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await xt().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(l||d!==r)return;n.value=t.url}}return Ze(()=>[t.fileId,t.url,s.value],c,{immediate:!0}),bn(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),uo(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(g(),C(Ie,{key:0},[n.value?(g(),C("video",{key:0,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,Gke)):(g(),C("span",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,Zke))],64)):n.value?(g(),C("img",{key:1,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,Yke)):(g(),C("span",{key:2,ref_key:"mediaEl",ref:o,class:Be(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,Jke))}}),Xke=["title","aria-label"],Qke={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},ebe={key:2,class:"media-thumb-badge"},tbe={key:3,class:"media-thumb-badge is-error"},nbe={key:4,class:"media-thumb-badge"},obe=["aria-label"],sbe=Ge({__name:"MediaThumb",props:{kind:{},name:{},url:{},fileId:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O(()=>n.name?n.name:n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentImage"));function r(l){const a=l.currentTarget;o("activate",a?.querySelector("img")??null)}return(l,a)=>(g(),C("span",{class:Be(["media-thumb",{"is-error":n.error,uploading:n.uploading}])},[_("button",{type:"button",class:"media-thumb-btn",title:i.value,"aria-label":i.value,onClick:r},[n.url?(g(),he(Ix,{key:0,url:n.url,kind:n.kind,alt:n.name,"file-id":n.fileId,"media-class":"media-thumb-media",controls:!1,muted:""},null,8,["url","kind","alt","file-id"])):(g(),C("span",Qke)),n.uploading?(g(),C("span",ebe,[Z(Bo,{size:"sm",label:x(s)("composer.uploading")},null,8,["label"])])):n.error?(g(),C("span",tbe,[Z(Oe,{name:"info",size:"sm"})])):n.kind==="video"?(g(),C("span",nbe,[Z(Oe,{name:"play",size:"sm"})])):ie("",!0)],8,Xke),n.removable?(g(),he(_n,{key:0,text:n.removeLabel??x(s)("composer.remove")},{default:ve(()=>[_("button",{type:"button",class:"media-thumb-rm","aria-label":n.removeLabel??x(s)("composer.remove"),onClick:a[0]||(a[0]=u=>o("remove"))},[Z(Oe,{name:"close",size:"sm"})],8,obe)]),_:1},8,["text"])):ie("",!0)],2))}}),ibe=ht(sbe,[["__scopeId","data-v-b4904b11"]]),rbe=["title","data-kind"],lbe=["aria-label"],abe={class:"att-tile"},ube={class:"att-name"},cbe={key:1,class:"att-err"},dbe=["aria-label"],fbe=Ge({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O(()=>{const d=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return d?d.toUpperCase():void 0}),r=O(()=>{const c=i.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"file-text":"file"}),l=O(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function a(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=O(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>e.kind!=="file"&&e.removable?(g(),he(ibe,{key:0,kind:e.kind,name:e.name,url:e.url,"file-id":e.fileId,uploading:e.uploading,error:e.error,removable:"","remove-label":e.removeLabel,onActivate:d[0]||(d[0]=f=>o("activate")),onRemove:d[1]||(d[1]=f=>o("remove"))},null,8,["kind","name","url","file-id","uploading","error","remove-label"])):(g(),C("span",{key:1,class:Be(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[_("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[2]||(d[2]=f=>o("activate"))},[_("span",abe,[e.kind==="image"&&e.url?(g(),he(Ix,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),he(Oe,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),he(Oe,{key:2,name:"image",size:"sm"})):(g(),he(Oe,{key:3,name:r.value,size:"sm"},null,8,["name"]))]),_("span",ube,N(l.value),1),e.uploading?(g(),he(Bo,{key:0,size:"sm",label:x(s)("composer.uploading")},null,8,["label"])):e.error?(g(),C("span",cbe,[Z(Oe,{name:"info",size:"sm"})])):ie("",!0)],8,lbe),e.removable?(g(),he(_n,{key:0,text:e.removeLabel??x(s)("composer.remove")},{default:ve(()=>[_("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??x(s)("composer.remove"),onClick:d[3]||(d[3]=f=>o("remove"))},[Z(Oe,{name:"close",size:"sm"})],8,dbe)]),_:1},8,["text"])):ie("",!0)],10,rbe))}}),a2=ht(fbe,[["__scopeId","data-v-fe5172dd"]]),pbe=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],hbe=["innerHTML"],mbe={class:"mention-pill-name"},gbe=Ge({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=q(null),o=O(()=>ohe(t.text));function s(r,l){l.kind!=="file"||!t.interactive||!t.openFile||(r.preventDefault(),r.stopPropagation(),t.openFile({path:l.path}))}function i(r){const l=window.getSelection(),a=n.value;if(!l||l.rangeCount===0||!a||!r.clipboardData)return;const u=l.getRangeAt(0);if(!u.intersectsNode(a))return;const c=u.cloneContents();for(const d of c.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(w$({kind:f,name:p,path:h})))}r.clipboardData.setData("text/plain",c.textContent??""),r.preventDefault()}return(r,l)=>(g(),C("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),C(Ie,null,ot(o.value,(a,u)=>(g(),C(Ie,{key:u},[a.type==="text"?(g(),C(Ie,{key:0},[Ve(N(a.value),1)],64)):(g(),C("span",{key:1,class:Be(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:c=>s(c,a.attrs),onKeydown:[Po(c=>s(c,a.attrs),["enter"]),Po(c=>s(c,a.attrs),["space"])]},[_("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:x(aw)(a.attrs.path,a.attrs.name)},null,8,hbe),_("span",mbe,N(x(x$)(a.attrs.name)),1)],42,pbe))],64))),128))],544))}}),vbe=["aria-expanded","title"],ybe={class:"tf-sum"},kbe=["inert"],bbe={class:"tf-body-inner"},wbe={key:1,class:"msg"},xbe=Ge({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent","openThinking"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O(()=>n.streamingTailIndex!==null),r=O(()=>n.live?n.parked?"parked":"live":"settled"),l=q(!1),a=O(()=>i.value||l.value),u=q(a.value),c=q(a.value);let d=null;Ze(a,T=>{if(T){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=yn("pinScroll",()=>{}),p=q(null);function h(){l.value=!l.value,bt(()=>{const T=p.value;T&&f(T)})}const m=q(Date.now());let k=null;function w(){k!==null&&(clearInterval(k),k=null)}Ze(r,(T,$)=>{T!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):w(),$==="live"&&T!=="live"&&(l.value=!1)},{immediate:!0}),Mn(()=>{w(),d!==null&&clearTimeout(d)});const v=O(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),y=O(()=>{if(r.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):v.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-v.value);if(v.value!==void 0)return Math.max(0,m.value-v.value)}),b=O(()=>{const T=y.value;if(T===void 0)return s("conversation.fold.workedUnknown");const $=fb(T);return $?s("conversation.fold.worked",{duration:$}):s("conversation.fold.workedUnknown")});function S(T){return n.streamingTailIndex!==null&&"sourceIndex"in T&&T.sourceIndex===n.streamingTailIndex}function I(T){if(n.streamingTailIndex===null)return!1;const $=T.items.at(-1);return $!==void 0&&$.sourceIndex===n.streamingTailIndex}return(T,$)=>e.items.length>0?(g(),C("div",{key:0,class:Be(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?ie("",!0):(g(),C("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":l.value,title:b.value,onClick:h},[_("span",ybe,N(b.value),1),Z(Oe,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,vbe)),u.value?(g(),C("div",{key:1,class:Be(["tf-body",{open:c.value}]),inert:!a.value},[_("div",bbe,[(g(!0),C(Ie,null,ot(e.items,(L,P)=>(g(),C(Ie,{key:x(s6)(L,P)},[L.kind==="thinking"?(g(),he(fw,{key:0,text:L.thinking,mobile:e.mobile,streaming:S(L),onOpen:R=>o("openThinking",L.sourceIndex)},null,8,["text","mobile","streaming","onOpen"])):L.kind==="text"&&L.text?(g(),C("div",wbe,[Z(Dl,{text:L.text,streaming:S(L),"open-file":R=>o("openFile",R)},null,8,["text","streaming","open-file"])])):L.kind==="activity-run"?(g(),he(i6,{key:2,items:L.items,mobile:e.mobile,streaming:I(L),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[0]||($[0]=R=>o("openMedia",R)),onOpenFile:$[1]||($[1]=R=>o("openFile",R)),onOpenToolDiff:$[2]||($[2]=R=>o("openToolDiff",R)),onOpenAgent:$[3]||($[3]=R=>o("openAgent",R)),onOpenThinking:$[4]||($[4]=R=>o("openThinking",R))},null,8,["items","mobile","streaming","tool-diff-panel"])):L.kind==="tool"?(g(),he(dw,{key:3,tool:L.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[5]||($[5]=R=>o("openMedia",R)),onOpenFile:$[6]||($[6]=R=>o("openFile",R)),onOpenToolDiff:$[7]||($[7]=R=>o("openToolDiff",R)),onOpenAgent:$[8]||($[8]=R=>o("openAgent",R))},null,8,["tool","mobile","tool-diff-panel"])):ie("",!0)],64))),128))])],10,kbe)):ie("",!0)],2)):ie("",!0)}}),_be=ht(xbe,[["__scopeId","data-v-4d4d6f2a"]]),Sbe={key:0,class:"ui-card__head"},Cbe={class:"ui-card__body"},Abe={key:1,class:"ui-card__foot"},Mbe=Ge({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),C("div",{class:Be(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),C("div",Sbe,[xn(t.$slots,"head",{},void 0,!0)])):ie("",!0),_("div",Cbe,[xn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),C("div",Abe,[xn(t.$slots,"foot",{},void 0,!0)])):ie("",!0)],2))}}),$x=ht(Mbe,[["__scopeId","data-v-d2cab471"]]),Ebe={class:"tf-ic"},Tbe={class:"tf-title"},Ibe={key:0,class:"tf-stats"},$be={key:0,class:"tf-add"},Nbe={key:1,class:"tf-del"},Lbe={class:"diffbar","aria-hidden":"true"},Fbe={class:"tf-list"},Obe={class:"tf-dir"},Rbe={class:"tf-base"},Pbe={key:0,class:"tf-stats"},Dbe={key:0,class:"tf-add"},Bbe={key:1,class:"tf-del"},zbe=Ge({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=It(),s=_o(!1),i=O(()=>s.value?e.changes:e.changes.slice(0,3)),r=O(()=>Math.max(0,e.changes.length-3)),l=O(()=>e.changes.reduce((k,w)=>k+w.added,0)),a=O(()=>e.changes.reduce((k,w)=>k+w.removed,0)),u=O(()=>e.changes.every(k=>!k.statsIncomplete)),c=O(()=>l.value+a.value),d=O(()=>c.value===0?1:l.value),f=O(()=>c.value===0?1:a.value);function p(k){if(!e.cwd)return k;const w=e.cwd.replaceAll("\\","/").replace(/\/$/,""),v=k.replaceAll("\\","/");return v.startsWith(`${w}/`)?v.slice(w.length+1):k}function h(k){const w=p(k).replaceAll("\\","/"),v=w.lastIndexOf("/");return v<0?{dir:"",base:w}:{dir:w.slice(0,v+1),base:w.slice(v+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,w)=>(g(),he($x,{class:"turn-files"},Ap({head:ve(()=>[_("span",Ebe,[Z(Oe,{name:"pencil",size:"sm"})]),_("span",Tbe,N(x(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),u.value&&c.value>0?(g(),C("span",Ibe,[l.value>0?(g(),C("span",$be,"+"+N(l.value),1)):ie("",!0),a.value>0?(g(),C("span",Nbe,"−"+N(a.value),1)):ie("",!0),_("span",Lbe,[_("span",{class:"seg-add",style:Ut({flexGrow:d.value})},null,4),_("span",{class:"seg-del",style:Ut({flexGrow:f.value})},null,4)])])):ie("",!0)]),default:ve(()=>[_("ul",Fbe,[(g(!0),C(Ie,null,ot(i.value,v=>(g(),C("li",{key:v.path,class:"tf-row"},[(g(),he(as(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:y=>m(v)},{default:ve(()=>[_("span",Obe,N(h(v.path).dir),1),_("span",Rbe,N(h(v.path).base),1)]),_:2},1032,["type","onClick"])),!v.statsIncomplete&&(v.added>0||v.removed>0)?(g(),C("span",Pbe,[v.added>0?(g(),C("span",Dbe,"+"+N(v.added),1)):ie("",!0),v.removed>0?(g(),C("span",Bbe,"−"+N(v.removed),1)):ie("",!0)])):ie("",!0)]))),128))])]),_:2},[r.value>0?{name:"foot",fn:ve(()=>[Z(en,{class:"tf-more",variant:"ghost",size:"sm",onClick:w[0]||(w[0]=v=>s.value=!s.value)},{default:ve(()=>[Z(Oe,{class:Be(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),Ve(" "+N(s.value?x(o)("conversation.turnFiles.showLess"):x(o)(r.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:r.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),Wbe=ht(zbe,[["__scopeId","data-v-dbd50ff6"]]),Hbe={class:"working-indicator",role:"status"},jbe={class:"wi-label"},Ube=Ge({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),C("div",Hbe,[Z(Bo,{size:"sm",label:e.label},null,8,["label"]),_("span",jbe,N(e.label),1)]))}}),Vbe=ht(Ube,[["__scopeId","data-v-496566b3"]]),Gr=q(null),vd=q(!1);function Nx(e){const t=Gr.value;!t||vd.value||(Gr.value=null,t.resolve(e))}async function qbe(){const e=Gr.value;if(!(!e||vd.value)){if(!e.action){Nx(!0);return}vd.value=!0;try{await e.action(),Gr.value===e&&(Gr.value=null),e.resolve(!0)}catch(t){Gr.value===e&&(Gr.value=null),e.reject(t)}finally{vd.value=!1}}}function Kbe(e){return vd.value?Promise.resolve(!1):(Gr.value&&Nx(!1),new Promise((t,n)=>{Gr.value={...e,resolve:t,reject:n}}))}function qa(){return{current:Gr,busy:vd,confirm:Kbe,settle:Nx,runAction:qbe}}const Gbe=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,Zbe=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,Ybe=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,P5="text/plain;charset=utf-8";function Jbe(e,t){const n=(t??"").toLowerCase();if(Gbe.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:P5;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:Zbe.test(o)?P5:Ybe.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function EN(e,t,n){const o=Jbe(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await xt().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const r=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=r;else{const l=document.createElement("a");l.href=r,l.download=t??e,l.click()}return setTimeout(()=>{URL.revokeObjectURL(r)},6e4),"previewed"}function Xbe(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const r=n!=="",l=[];for(const u of o.split("/"))!u||u==="."||(u===".."?l.length>0&&l.at(-1)!==".."?l.pop():r||l.push(u):l.push(u));const a=n+l.join("/");return s?a.toLowerCase():a}function Qbe(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function e2e(e){const t=new Map;for(const n of Fu(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=Ws(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=cw(n.tool.arg);if(!s)continue;const i=o==="write",r=i?null:uw(n.tool),l=r?e6(r):{added:0,removed:0},a=i||r===null,u=Xbe(s),c=t.get(u);if(!c){t.set(u,{path:s,...l,hasWrite:i,statsIncomplete:a,diff:r});continue}c.added+=l.added,c.removed+=l.removed,c.hasWrite||=i,c.statsIncomplete||=a,c.diff!==null&&r!==null?c.diff=[...c.diff,{type:"hunk",text:"···"},...Qbe(c.diff,r)]:c.diff=null}return[...t.values()]}const t2e={class:"chat"},n2e={key:0,class:"chat-loading"},o2e={class:"chat-loading-text"},s2e={key:1,class:"chat-empty"},i2e={key:1,class:"top-sentinel-text"},r2e={key:0,class:"u-turn"},l2e=["data-turn-id"],a2e={key:0,class:"u-atts"},u2e={key:1,class:"skill-act"},c2e={class:"skill-act-head"},d2e={key:0,class:"skill-act-args"},f2e={key:2,class:"skill-act"},p2e={class:"skill-act-head"},h2e={key:0,class:"skill-act-args"},m2e={class:"u-text"},g2e=["aria-expanded","onClick"],v2e={key:0,class:"u-meta"},y2e=["aria-label","onClick"],k2e=["aria-label","onClick"],b2e=["data-turn-id"],w2e=["onClick"],x2e={class:"cd-view"},_2e={key:1,class:"cd-label"},S2e=["data-turn-id"],C2e={key:1,class:"msg"},A2e={key:1,class:"a-msg-ft"},M2e={key:0,class:"a-duration"},E2e=["aria-label","onClick"],T2e={key:3,class:"turn-failed",role:"alert"},I2e={class:"tf-chip","aria-hidden":"true"},$2e={class:"tf-main"},N2e={class:"tf-title"},L2e=["title"],F2e={key:5,class:"sending-placeholder"},O2e={key:6,class:"q-stack"},R2e={class:"q-head"},P2e={class:"q-title"},D2e={class:"q-hint"},B2e=["onDragover","onDrop"],z2e={class:"u-bub q-bub"},W2e=["title","onDragstart"],H2e=["title","onClick"],j2e={key:0,class:"u-text q-text"},U2e={key:1,class:"q-text q-text-placeholder"},V2e={key:0,class:"q-imgs"},q2e={key:0,class:"q-file"},K2e={key:1,class:"q-tag q-tag-next"},G2e={key:2,class:"q-tag q-tag-idx"},Z2e=["aria-label","onClick"],Y2e={key:0,class:"open-unsupported",role:"status"},J2e=2500,X2e=Ge({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openThinking","openCompaction","openAgent","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=It(),{confirm:s}=qa();Mn(()=>{for(const ue of w.values())ue.disconnect();w.clear(),k.clear(),ze!==null&&(clearTimeout(ze),ze=null),X!==null&&(clearTimeout(X),X=null),W!==null&&(clearTimeout(W),W=null),Y!==null&&(clearTimeout(Y),Y=null)});const i=e,r=q(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(ue=>{ue[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&p("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}bn(a),Mn(()=>{l?.disconnect(),l=null}),Ze(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{bt().then(a)});const u=O(()=>{if(!i.turnActive||i.turns.length===0)return null;const ue=i.turns.at(-1);return ue.role==="assistant"?ue.id:null}),c=O(()=>i.working),d=O(()=>{const ue=new Map;for(const we of i.turns){if(we.role!=="assistant")continue;const se=nQ(we),{folded:_e,visible:Re}=oQ(se);ue.set(we.id,{all:se,folded:_e,visible:Re,changes:e2e(we)})}return ue}),f=O(()=>{const ue=i.turns.at(-1);if(ue?.role!=="assistant")return o("conversation.requesting");const we=d.value.get(ue.id)?.all.some(se=>se.kind==="text"?se.text.trim().length>0:!0);return o(we?"conversation.working":"conversation.requesting")}),p=n,h=q({}),m=q({}),k=new Map,w=new Map;function v(ue){const se=k.get(ue)?.querySelector(".u-text");if(!se)return;const _e=Number.parseFloat(getComputedStyle(se).lineHeight)||24;m.value[ue]=se.scrollHeight>_e*10+1}function y(ue,we){const se=we instanceof HTMLElement?we:null;if(!se){w.get(ue)?.disconnect(),w.delete(ue),k.delete(ue);return}if(k.get(ue)!==se){if(w.get(ue)?.disconnect(),k.set(ue,se),typeof ResizeObserver<"u"){const _e=new ResizeObserver(()=>v(ue));_e.observe(se.querySelector(".u-text")??se),w.set(ue,_e)}bt(()=>v(ue))}}function b(ue){h.value[ue]=!h.value[ue]}const S=q(null),I=q(null);function T(ue){return(ue.attachments?.length??0)>0}function $(ue){p("editQueued",ue)}function L(ue,we){if(S.value=ue,!we.dataTransfer)return;we.dataTransfer.effectAllowed="move",we.dataTransfer.setData("text/plain",String(ue));const se=we.currentTarget?.closest(".q-turn");se&&we.dataTransfer.setDragImage(se,24,24)}function P(ue,we){if(S.value===null)return;we.preventDefault(),we.dataTransfer&&(we.dataTransfer.dropEffect="move");const se=we.currentTarget.getBoundingClientRect(),_e=we.clientY{for(let ue=i.turns.length-1;ue>=0;ue--)if(i.turns[ue].role==="user")return i.turns[ue].id;return null});function z(ue){return ue.role==="user"&&ue.id===D.value&&!i.working&&!ue.skillActivation&&!ue.pluginCommand}function B(ue){const we=ue.compaction,se=we?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof we?.tokensBefore=="number"&&typeof we?.tokensAfter=="number"?se+o("conversation.compactedTokens",{before:Rl(we.tokensBefore),after:Rl(we.tokensAfter)}):se}const A=q(null),F=q(null);let W=null;async function j(ue){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&le(ue)}function le(ue){F.value===null&&(F.value=ue.id,p("editMessage",{text:ue.text,attachments:ue.attachments}),W=setTimeout(()=>{W=null,F.value=null},J2e))}Ze(()=>i.turns,ue=>{F.value!==null&&(ue.some(we=>we.id===F.value)||(F.value=null,W!==null&&(clearTimeout(W),W=null)))},{flush:"post"});const J=q(!1);let X=null;function G(){if(i.turns.length===0)return;const ue=[];for(const se of i.turns){if(se.role==="compaction"||se.role==="cron")continue;const _e=se.role==="user"?"User":"Assistant",Re=iQ(se);Re.trim()&&ue.push(`**${_e}** - -${Re}`)}const we=ue.join(` - ---- - -`);Zo(we).then(se=>{se&&(J.value=!0,p("copyConversationCopied"),X!==null&&clearTimeout(X),X=setTimeout(()=>{X=null,J.value=!1},2e3))}).catch(()=>{})}function Q(ue){const we=[];for(let se=ue;se>=0;se--){const _e=i.turns[se];if(!_e||_e.role!=="assistant")break;we.unshift(_e)}return we}function ee(ue){return Q(ue).map(we=>sQ(we)).filter(Boolean).join(` - -`)}function K(){for(let ue=i.turns.length-1;ue>=0;ue-=1)if(i.turns[ue]?.role==="assistant")return ee(ue);return""}function ge(){const ue=K();ue.trim()&&Zo(ue).then(we=>{we&&(J.value=!0,p("copyConversationCopied"),X!==null&&clearTimeout(X),X=setTimeout(()=>{X=null,J.value=!1},2e3))}).catch(()=>{})}t({copyConversation:G,copyFinalSummary:ge});function Ce(ue){const we=i.turns[ue];if(!we||we.role!=="assistant")return!1;const se=i.turns[ue+1];return!se||se.role!=="assistant"}let ze=null;function me(ue){const we=i.turns[ue];if(!we)return;const se=ee(ue);se.trim()&&Zo(se).then(_e=>{_e&&(A.value=we.id,ze!==null&&clearTimeout(ze),ze=setTimeout(()=>{ze=null,A.value=null},1400))}).catch(()=>{})}function te(ue){const we=ue.text;we.trim()&&Zo(we).then(se=>{se&&(A.value=ue.id,ze!==null&&clearTimeout(ze),ze=setTimeout(()=>{ze=null,A.value=null},1400))}).catch(()=>{})}function oe(ue){return{kind:ue.kind==="video"?"video":"image",url:ue.url,path:ue.name,fileId:ue.fileId}}const H=q(null);let Y=null;function ke(ue){if(ue.kind==="image"||ue.kind==="video"){p("openMedia",oe(ue));return}ue.fileId!==void 0&&EN(ue.fileId,ue.name,ue.mediaType).then(we=>{we==="unsupported"&&(H.value=ue.name??ue.fileId??"",Y!==null&&clearTimeout(Y),Y=setTimeout(()=>{Y=null,H.value=null},2400))})}function Se(ue,we){return ue.id!==u.value?!1:we.sourceIndex===Fu(ue).length-1}function ye(ue){if(ue.id!==u.value)return null;const we=Fu(ue),se=we.at(-1);if(se?.kind==="tool"&&se.tool.status==="running"){const _e=se.tool.id;if(i.approvals.some(lt=>lt.toolCallId===_e)||(i.questions??[]).some(lt=>lt.toolCallId===_e))return null}return we.length-1}function ne(ue){if(!ue.createdAt)return;const we=Date.parse(ue.createdAt);return Number.isFinite(we)?we:void 0}function ce(ue,we){if(ue.id!==u.value)return!1;const se=we.items.at(-1);return se!==void 0&&se.sourceIndex===Fu(ue).length-1}function xe(){for(let ue=i.turns.length-1;ue>=0;ue-=1){const we=i.turns[ue];if(we&&we.role==="user"&&we.text.trim().length>0)return we.text}return""}function fe(){const ue=xe();ue.length!==0&&p("continueTurn",ue)}return(ue,we)=>(g(),C(Ie,null,[_("div",t2e,[e.sessionLoading?(g(),C("div",n2e,[Z(Bo,{size:"sm"}),_("span",o2e,N(x(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),C("div",s2e)):ie("",!0),e.hasMoreMessages||e.loadingMore?(g(),C("div",{key:2,ref_key:"topSentinelRef",ref:r,class:Be(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),C("span",i2e,[Z(Bo,{size:"sm"}),Ve(" "+N(x(o)("conversation.loadingOlder")),1)])):(g(),C("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:we[0]||(we[0]=se=>p("loadOlderMessages"))},N(x(o)("conversation.loadOlder")),1))],2)):ie("",!0),(g(!0),C(Ie,null,ot(e.turns,(se,_e)=>(g(),C(Ie,{key:se.id},[se.role==="user"?(g(),C("div",r2e,[_("div",{class:Be(["u-bub turn-anchor",{undoing:F.value===se.id}]),"data-turn-id":se.id},[se.attachments&&se.attachments.length>0?(g(),C("div",a2e,[(g(!0),C(Ie,null,ot(se.attachments,(Re,lt)=>(g(),he(a2,{key:lt,kind:Re.kind,name:Re.name,url:Re.url,"file-id":Re.fileId,"media-type":Re.mediaType,size:Re.size,onActivate:ct=>ke(Re)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):ie("",!0),se.skillActivation?(g(),C("div",u2e,[_("div",c2e,[we[14]||(we[14]=_("span",{class:"skill-act-arrow"},"▶",-1)),_("span",null,N(x(o)("conversation.activatedSkill",{name:se.skillActivation.name})),1)]),se.skillActivation.args?(g(),C("div",d2e,N(se.skillActivation.args),1)):ie("",!0)])):se.pluginCommand?(g(),C("div",f2e,[_("div",p2e,[we[15]||(we[15]=_("span",{class:"skill-act-arrow"},"▶",-1)),_("span",null,"/"+N(se.pluginCommand.pluginId)+":"+N(se.pluginCommand.commandName),1)]),se.pluginCommand.args?(g(),C("div",h2e,N(se.pluginCommand.args),1)):ie("",!0)])):(g(),C("div",{key:3,ref_for:!0,ref:Re=>y(se.id,Re),class:Be(["u-text-wrap",{"is-clamped":m.value[se.id]&&!h.value[se.id]}])},[_("div",m2e,[Z(gbe,{text:se.text,"open-file":Re=>p("openFile",Re)},null,8,["text","open-file"])]),m.value[se.id]?(g(),C("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!h.value[se.id],onClick:Re=>b(se.id)},[Ve(N(x(o)(h.value[se.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),Z(Oe,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,g2e)):ie("",!0)],2))],10,l2e),se.createdAt||z(se)?(g(),C("div",v2e,[z(se)?(g(),C("div",{key:0,class:Be(["u-edit-wrap",{undoing:F.value===se.id}])},[_("button",{type:"button",class:"u-edit","aria-label":x(o)("conversation.undoTooltip"),onClick:Re=>j(se)},[Z(Oe,{name:"undo",size:"sm"})],8,y2e)],2)):ie("",!0),se.text.trim().length>0?(g(),C("button",{key:1,type:"button",class:"u-copy","aria-label":x(o)("filePreview.copy"),onClick:St(Re=>te(se),["stop"])},[A.value!==se.id?(g(),he(Oe,{key:0,name:"copy",size:"sm"})):(g(),he(Oe,{key:1,name:"check",size:"sm"}))],8,k2e)):ie("",!0),se.createdAt?(g(),he(_$,{key:2,time:se.createdAt},null,8,["time"])):ie("",!0)])):ie("",!0)])):se.role==="compaction"?(g(),C("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":se.id,role:"separator"},[we[16]||(we[16]=_("span",{class:"cd-line","aria-hidden":"true"},null,-1)),se.text?(g(),C("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Re=>p("openCompaction",{turnId:se.id})},[_("span",null,N(B(se)),1),_("span",x2e,N(x(o)("conversation.viewSummary")),1)],8,w2e)):(g(),C("span",_2e,N(B(se)),1)),we[17]||(we[17]=_("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,b2e)):se.role==="cron"?(g(),he(Dhe,{key:2,text:se.text,cron:se.cron,"turn-id":se.id,"created-at":se.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),C("div",{key:3,class:"a-msg turn-anchor","data-turn-id":se.id},[Z(_be,{items:d.value.get(se.id)?.folded??[],live:se.id===u.value,parked:se.id===u.value&&ye(se)===null,"streaming-tail-index":ye(se),"created-ms":ne(se),"duration-ms":se.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:we[1]||(we[1]=Re=>p("openMedia",Re)),onOpenFile:we[2]||(we[2]=Re=>p("openFile",Re)),onOpenToolDiff:we[3]||(we[3]=Re=>p("openToolDiff",Re)),onOpenAgent:we[4]||(we[4]=Re=>p("openAgent",Re)),onOpenThinking:Re=>p("openThinking",{turnId:se.id,blockIndex:Re})},null,8,["items","live","parked","streaming-tail-index","created-ms","duration-ms","tool-diff-panel","onOpenThinking"]),(g(!0),C(Ie,null,ot(d.value.get(se.id)?.visible??[],(Re,lt)=>(g(),C(Ie,{key:x(s6)(Re,lt)},[Re.kind==="thinking"?(g(),he(fw,{key:0,text:Re.thinking,mobile:"",streaming:Se(se,Re),onOpen:ct=>p("openThinking",{turnId:se.id,blockIndex:Re.sourceIndex})},null,8,["text","streaming","onOpen"])):Re.kind==="text"&&Re.text?(g(),C("div",C2e,[Z(Dl,{text:Re.text,streaming:Se(se,Re),"open-file":ct=>p("openFile",ct)},null,8,["text","streaming","open-file"])])):Re.kind==="activity-run"?(g(),he(i6,{key:2,items:Re.items,mobile:"",streaming:ce(se,Re),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:we[5]||(we[5]=ct=>p("openMedia",ct)),onOpenFile:we[6]||(we[6]=ct=>p("openFile",ct)),onOpenToolDiff:we[7]||(we[7]=ct=>p("openToolDiff",ct)),onOpenAgent:we[8]||(we[8]=ct=>p("openAgent",ct)),onOpenThinking:ct=>p("openThinking",{turnId:se.id,blockIndex:ct})},null,8,["items","streaming","tool-diff-panel","onOpenThinking"])):Re.kind==="tool"?(g(),he(dw,{key:3,tool:Re.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:we[9]||(we[9]=ct=>p("openMedia",ct)),onOpenFile:we[10]||(we[10]=ct=>p("openFile",ct)),onOpenToolDiff:we[11]||(we[11]=ct=>p("openToolDiff",ct)),onOpenAgent:we[12]||(we[12]=ct=>p("openAgent",ct))},null,8,["tool","tool-diff-panel"])):ie("",!0)],64))),128)),se.id!==u.value&&(d.value.get(se.id)?.changes.length??0)>0?(g(),he(Wbe,{key:0,changes:d.value.get(se.id)?.changes??[],cwd:e.cwd,onOpenDiff:Re=>p("openTurnDiff",{turnId:se.id,changes:d.value.get(se.id)?.changes??[]}),onOpenFile:we[13]||(we[13]=Re=>p("openFile",Re))},null,8,["changes","cwd","onOpenDiff"])):ie("",!0),se.id!==u.value&&Ce(_e)&&(ee(_e).trim().length>0||se.durationMs!==void 0)?(g(),C("div",A2e,[Z(_n,{text:`${se.durationMs} ms`},{default:ve(()=>[se.durationMs!==void 0?(g(),C("span",M2e,N(x(eQ)(se.durationMs)),1)):ie("",!0)]),_:2},1032,["text"]),ee(_e).trim().length>0?(g(),C("button",{key:0,class:"a-cpbtn","aria-label":x(o)("filePreview.copy"),onClick:Re=>me(_e)},[A.value!==se.id?(g(),he(Oe,{key:0,name:"copy",size:"sm"})):(g(),he(Oe,{key:1,name:"check",size:"sm"}))],8,E2e)):ie("",!0)])):ie("",!0)],8,S2e))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),C("div",T2e,[_("span",I2e,[Z(Oe,{name:"alert-triangle",size:"sm"})]),_("div",$2e,[_("span",N2e,N(e.turnErrorKind==="max_steps"?x(o)("conversation.turnFailedMaxSteps"):x(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),C("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},N(e.turnErrorMessage),9,L2e)):ie("",!0)]),Z(en,{variant:"secondary",size:"sm",onClick:fe},{default:ve(()=>[Ve(N(x(o)("conversation.turnFailedResume")),1)]),_:1})])):ie("",!0),e.compaction?(g(),he(xhe,{key:4,label:x(o)("conversation.compacting")},null,8,["label"])):ie("",!0),c.value?(g(),C("div",F2e,[Z(Vbe,{label:f.value},null,8,["label"])])):ie("",!0),e.queued.length>0?(g(),C("div",O2e,[_("div",R2e,[_("span",P2e,[Z(Oe,{name:"mail",size:"sm"}),Ve(" "+N(x(o)("composer.queueLabel"))+" · ",1),_("b",null,N(e.queued.length),1)]),_("span",D2e,N(x(o)("composer.queueAutoDrain")),1)]),(g(!0),C(Ie,null,ot(e.queued,(se,_e)=>(g(),C("div",{key:_e,class:Be(["u-turn q-turn",{"q-dragging":S.value===_e,"drop-before":I.value?.index===_e&&I.value.position==="before","drop-after":I.value?.index===_e&&I.value.position==="after"}]),onDragover:Re=>P(_e,Re),onDrop:Re=>R(_e,Re)},[_("div",z2e,[_("span",{class:"q-grip",title:x(o)("composer.queueDragTitle"),draggable:"true",onDragstart:Re=>L(_e,Re),onDragend:M},[Z(Oe,{name:"grip",size:"sm"})],40,W2e),_("button",{type:"button",class:"q-body",title:x(o)("composer.editQueued"),onClick:Re=>$(_e)},[se.text?(g(),C("span",j2e,N(se.text),1)):(g(),C("span",U2e,[Z(Oe,{name:"file",size:"sm"}),Ve(" "+N(x(o)("composer.queuedAttachments",{n:se.attachments?.length??0})),1)]))],8,H2e),T(se)?(g(),C("div",V2e,[(g(!0),C(Ie,null,ot(se.attachments,(Re,lt)=>(g(),C(Ie,{key:lt},[Re.kind==="file"?(g(),C("span",q2e,[Z(Oe,{name:"file",size:"sm"}),Ve(" "+N(Re.name??Re.fileId),1)])):(g(),he(Ix,{key:1,url:Re.url,kind:Re.kind,"file-id":Re.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):ie("",!0),_e===0?(g(),C("span",K2e,N(x(o)("composer.queueNext")),1)):(g(),C("span",G2e,"#"+N(_e+1),1)),_("button",{type:"button",class:"q-rm","aria-label":x(o)("composer.remove"),onClick:St(Re=>p("unqueue",_e),["stop"])},[Z(Oe,{name:"close",size:"sm"})],8,Z2e)])],42,B2e))),128))])):ie("",!0)]),H.value!==null?(g(),C("div",Y2e,N(x(o)("composer.attachmentOpenUnsupported",{name:H.value})),1)):ie("",!0)],64))}}),Lx=ht(X2e,[["__scopeId","data-v-7bc1c6a8"]]),Q2e={class:"ch-id"},ewe={key:0,class:"ch-ws"},twe={key:1,class:"ch-sep"},nwe=["onKeydown"],owe={class:"ch-ses"},swe={key:0,class:"ch-pill ch-sync-pill"},iwe={key:0,class:"ch-ahead"},rwe={key:1,class:"ch-behind"},lwe={key:1,class:"ch-pill ch-diff-pill"},awe={key:0,class:"ch-add"},uwe={key:1,class:"ch-del"},cwe={class:"ch-pill ch-pr pr-merged ch-done-pill"},dwe=Ge({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,i=O(()=>o.ahead??0),r=O(()=>o.behind??0),l=O(()=>o.gitDiffStats?.totalAdditions??0),a=O(()=>o.gitDiffStats?.totalDeletions??0),u=O(()=>l.value>0||a.value>0),c={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(J){return J.trim().toLowerCase().replaceAll("_","-")}function f(J){const X=d(J);return c[X]?`pr-${X}`:"pr-unknown"}function p(J){return n(c[d(J)]??"header.prStatusUnknown")}const h=q(!1),m=q(null),k=q(null),w=q({});function v(J){const X=J.target;k.value?.el?.contains(X)||m.value?.el?.contains(X)||S()}function y(){S()}async function b(J){if(J.stopPropagation(),h.value){S();return}h.value=!0,document.addEventListener("mousedown",v),window.addEventListener("resize",y),await bt();const X=m.value?.el,G=k.value?.el;if(!X||!G)return;const Q=X.getBoundingClientRect(),ee=4,K=8,ge=G.offsetWidth,Ce=G.offsetHeight;let ze=Q.bottom+ee;ze+Ce>window.innerHeight-K&&(ze=Math.max(K,Q.top-Ce-ee));let me=Q.left;me+ge>window.innerWidth-K&&(me=Math.max(K,Q.right-ge)),w.value={top:`${Math.round(ze)}px`,left:`${Math.round(me)}px`}}function S(){h.value=!1,document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)}Mn(()=>{document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)});function I(){s("copyAll"),S()}function T(){s("copyFinalSummary"),S()}const $=q(!1);function L(){o.sessionId&&Zo(o.sessionId).then(J=>{J&&($.value=!0,setTimeout(()=>{$.value=!1},1200))})}const P=q(!1),R=q(""),M=q(null);async function D(){if(S(),!!o.sessionId){P.value=!0,R.value=o.sessionTitle??"",await bt();try{M.value?.focus(),M.value?.select()}catch{}}}function z(){const J=R.value.trim();J&&o.sessionId&&J!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,J),P.value=!1}function B(){P.value=!1}function A(){o.sessionId&&(S(),s("forkSession",o.sessionId))}function F(){o.sessionId&&(S(),s("exportSession",o.sessionId))}function W(){o.sessionId&&(S(),s("togglePin",o.sessionId))}function j(){o.sessionId&&(S(),s("archiveSession",o.sessionId))}function le(){o.sessionId&&(S(),s("restoreSession",o.sessionId))}return(J,X)=>(g(),C("header",{class:Be(["chat-header",{"macos-desktop":x(ld)}])},[_("div",Q2e,[e.workspaceName?(g(),C("span",ewe,N(e.workspaceName),1)):ie("",!0),e.workspaceName&&e.sessionTitle?(g(),C("span",twe,"/")):ie("",!0),P.value?Fn((g(),C("input",{key:2,ref_key:"renameInputRef",ref:M,"onUpdate:modelValue":X[0]||(X[0]=G=>R.value=G),class:"ch-rename",type:"text",onKeydown:[Po(St(z,["stop"]),["enter"]),Po(St(B,["stop"]),["esc"])],onBlur:z,onClick:X[1]||(X[1]=St(()=>{},["stop"]))},null,40,nwe)),[[ks,R.value]]):e.sessionTitle?(g(),he(_n,{key:3,text:e.sessionTitle},{default:ve(()=>[_("span",owe,N(e.sessionTitle),1)]),_:1},8,["text"])):ie("",!0)]),Z(Jt,{ref_key:"kebabRef",ref:m,class:Be(["ch-act-more",{open:h.value}]),label:x(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:X[2]||(X[2]=St(G=>b(G),["stop"]))},{default:ve(()=>[Z(Oe,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),he(Cr,{key:0,ref_key:"menuRef",ref:k,class:"ch-menu",style:Ut(w.value),onClick:X[3]||(X[3]=St(()=>{},["stop"]))},{default:ve(()=>[Z(hn,{onClick:I},{default:ve(()=>[Z(Oe,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),Ve(" "+N(e.copied?x(n)("header.copied"):x(n)("header.copyAll")),1)]),_:1}),Z(hn,{onClick:T},{default:ve(()=>[Z(Oe,{name:"file-text",size:"sm"}),Ve(" "+N(x(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),C(Ie,{key:0},[Z(hn,{separator:""}),Z(hn,{onClick:L},{default:ve(()=>[Z(Oe,{name:$.value?"check":"copy",size:"sm"},null,8,["name"]),Ve(" "+N($.value?x(n)("header.copied"):x(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?ie("",!0):(g(),he(hn,{key:0,onClick:W},{default:ve(()=>[Z(Oe,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),Ve(" "+N(e.pinned?x(n)("header.unpinSession"):x(n)("header.pinSession")),1)]),_:1})),Z(hn,{onClick:D},{default:ve(()=>[Z(Oe,{name:"pencil",size:"sm"}),Ve(" "+N(x(n)("header.renameSession")),1)]),_:1}),Z(hn,{onClick:A},{default:ve(()=>[Z(Oe,{name:"git-fork",size:"sm"}),Ve(" "+N(x(n)("header.forkSession")),1)]),_:1}),Z(hn,{onClick:F},{default:ve(()=>[Z(Oe,{name:"download",size:"sm"}),Ve(" "+N(x(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),he(hn,{key:1,onClick:le},{default:ve(()=>[Z(Oe,{name:"undo",size:"sm"}),Ve(" "+N(x(n)("header.reopenSession")),1)]),_:1})):(g(),he(hn,{key:2,onClick:j},{default:ve(()=>[Z(Oe,{name:"archive",size:"sm"}),Ve(" "+N(x(n)("header.markSessionDone")),1)]),_:1}))],64)):ie("",!0)]),_:1},8,["style"])):ie("",!0),X[6]||(X[6]=_("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),C("button",{key:1,type:"button",class:"ch-git",onClick:X[4]||(X[4]=G=>s("openChanges"))},[_("span",{class:Be(["ch-branch",{"ch-detached":!e.branch}])},N(e.branch||x(n)("header.detached")),3),i.value>0||r.value>0?(g(),C("span",swe,[i.value>0?(g(),C("span",iwe,"↑"+N(i.value),1)):ie("",!0),r.value>0?(g(),C("span",rwe,"↓"+N(r.value),1)):ie("",!0)])):ie("",!0),u.value?(g(),C("span",lwe,[l.value>0?(g(),C("span",awe,"+"+N(l.value),1)):ie("",!0),a.value>0?(g(),C("span",uwe,"-"+N(a.value),1)):ie("",!0)])):ie("",!0)])):ie("",!0),e.pr?(g(),C("button",{key:2,type:"button",class:Be(["ch-pill ch-pr",f(e.pr.state)]),onClick:X[5]||(X[5]=G=>e.pr&&s("openPr",e.pr.url))},[Z(Oe,{name:"git-pull-request",size:"sm"}),_("span",null,"PR #"+N(e.pr.number)+" · "+N(p(e.pr.state)),1)],2)):ie("",!0),e.sessionId&&e.sessionDone?(g(),C(Ie,{key:3},[_("span",cwe,[Z(Oe,{name:"circle-check",size:"sm"}),_("span",null,N(x(n)("header.sessionDone")),1)]),Z(en,{variant:"secondary",size:"sm",onClick:le},{default:ve(()=>[Z(Oe,{name:"undo",size:"sm"}),Ve(" "+N(x(n)("header.reopenSession")),1)]),_:1})],64)):ie("",!0)],2))}}),fwe=ht(dwe,[["__scopeId","data-v-a0c7719c"]]),pwe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],D5=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function hwe(e){if(e<=255)return pwe[e];let t=0,n=D5.length-1;for(;t<=n;){const o=t+n>>1,s=D5[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function mwe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let u=0;u=55296&&c<=56319&&u+1=56320&&h<=57343&&(d=(c-55296<<10)+(h-56320)+65536,f=2)}const p=hwe(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c0?n[u-1]:l,f=c0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function wwe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):e}let yk=null,xwe;function _we(){return yk===null&&(yk=new Intl.Segmenter(xwe,{granularity:"word"})),yk}const Swe=/\p{Script=Arabic}/u,Ka=/\p{M}/u,Fx=/\p{Nd}/u;function B5(e){return Swe.test(e)}function z5(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Qr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(z5(s))return!0;t++;continue}}if(z5(n))return!0}}return!1}function Cwe(e){const t=vh(e);return t!==null&&(Ox.has(t)||Gu.has(t))}const Awe=new Set([" "," ","⁠","\uFEFF"]),Mwe=new Set(["-","‐","–","—"]);function Ewe(e){const t=vh(e);return t!==null&&Awe.has(t)}function Twe(e){const t=vh(e);return t!==null&&Mwe.has(t)}function TN(e,t){return Ewe(e)?!1:t?!(Cwe(e)||Twe(e)):!0}const Ox=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),F0=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Rx=new Set(["'","’"]),Gu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Iwe=new Set([":",".","،","؛"]),$we=new Set(["၏"]),Nwe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Lwe(e){if(Px(e))return!0;let t=!1;for(const n of e){if(Gu.has(n)||R0(n)){t=!0;continue}if(!(t&&Ka.test(n)))return!1}return t}function Fwe(e){for(const t of e)if(!Ox.has(t)&&!Gu.has(t))return!1;return e.length>0}function Owe(e){if(Px(e))return!0;for(const t of e)if(!F0.has(t)&&!Rx.has(t)&&!Ka.test(t)&&!R0(t))return!1;return e.length>0}function Px(e){let t=!1;for(const n of e)if(!(n==="\\"||Ka.test(n))){if(F0.has(n)||Gu.has(n)||Rx.has(n)){t=!0;continue}return!1}return t}function O0(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function vh(e){if(e.length===0)return null;const t=O0(e,e.length);return e.slice(t)}function Rwe(e){for(const t of e)if(!Ka.test(t))return t;return null}function Pwe(e){for(let t=e.length;t>0;){const n=O0(e,t),o=e.slice(n,t);if(!Ka.test(o))return o;t=n}return null}const Dwe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Bwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function R0(e){const t=e.codePointAt(0);return t!==void 0&&Bwe(t,Dwe)}function zwe(e){const t=Pwe(e);return t!==null&&R0(t)}function Wwe(e){const t=Rwe(e);return t!==null&&Fx.test(t)}function Hwe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Ka.test(o)){n--;continue}if(F0.has(o)||Rx.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function jwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function W5(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function H5(e,t){return e&&t!==null&&Iwe.has(t)}function Uwe(e){const t=vh(e);return t!==null&&$we.has(t)}function Vwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function u2(e){let t=e.length;for(;t>0;){const n=O0(e,t),o=e.slice(n,t);if(Nwe.has(o))return!0;if(!Gu.has(o))return!1;t=n}return!1}function qwe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Kwe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Ar(e){return e.length===1?e[0]:e.join("")}function Gwe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Ar(n)}function Zwe(e,t,n,o){if(!Kwe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=qwe(c,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){r.push(c),u+=c.length;continue}i!==null&&s.push({text:Ar(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length}return i!==null&&s.push({text:Ar(r),isWordLike:a,kind:i,start:l}),s}function c2(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Ywe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Jwe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:Ywe.test(n)&&t+1=e.len||c2(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c0&&(t.push(Ar(a)),n.push(!0),o.push("text"),s.push(u),i=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const txe=new Set([":","-","/","×",",",".","+","–","—"]),nxe=/[\p{P}\p{S}\p{Co}]/u,oxe=/\p{Emoji_Presentation}/u,sxe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function ixe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function IN(e){const t=e.charCodeAt(0);return t<128?ixe(t):!sxe.has(e)&&!oxe.test(e)&&nxe.test(e)}function j5(e){let t=!1;for(const n of e)if(!Ka.test(n)){if(!IN(n))return!1;t=!0}return t}function rxe(e){for(let t=e.length;t>0;){const n=O0(e,t),o=e.slice(n,t);if(Ka.test(o)){t=n;continue}return IN(o)||R0(o)}return!1}function lxe(e,t,n,o){const s=!t&&j5(e),i=!o&&j5(n),r=zwe(e),l=(t||r)&&rxe(e);return!s&&!i&&!l||Qr(e)||Qr(n)?!1:(t||s||r)&&(o||i)}function $N(e){for(const t of e)if(Fx.test(t))return!0;return!1}function T1(e){if(e.length===0)return!1;for(const t of e)if(!(Fx.test(t)||txe.has(t)))return!1;return!0}function axe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(Ar(u)),n.push(d),o.push("text"),s.push(e.starts[i]),i=c;continue}}t.push(r),n.push(a),o.push(l),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function cxe(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let u=0;u0&&a[B]==="text"&&P&&f[B]&&h[B]||$&&s>0&&a[B]==="text"&&Fwe(T.text)&&f[B]||$&&s>0&&a[B]==="text"&&m[B]?A():$&&s>0&&a[B]==="text"&&T.isWordLike&&R&&k[B]?(A(),l[B]=!0):L!==null&&s>0&&a[B]==="text"&&c[B]===L?d[B]=(d[B]??1)+1:$&&!T.isWordLike&&s>0&&a[B]==="text"&&!f[B]&&(Lwe(T.text)||T.text==="-"&&l[B])?A():(i[s]=T.text,r[s]=[T.text],l[s]=T.isWordLike,a[s]=T.kind,u[s]=T.start,c[s]=L,d[s]=L===null?0:1,f[s]=P,p[s]=R,h[s]=D,m[s]=z,k[s]=H5(R,M),s++)}for(let I=0;Inull);let v=-1;for(let I=s-1;I>=0;I--){const T=i[I];if(T.length!==0){if(a[I]==="text"&&!l[I]&&v>=0&&a[v]==="text"&&(Owe(T)||T==="-"&&Wwe(i[v]))){const $=w[v]??[];$.push(T),w[v]=$,u[v]=u[I],i[I]="";continue}v=I}}for(let I=0;I=0&&!TN(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Qr(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),r.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:r}}function gxe(e,t,n="normal",o="normal"){const s=kwe(n),i=s.mode==="pre-wrap"?wwe(e):bwe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=pxe(i,t,s),l=o==="keep-all"?mxe(i,r,t.breakKeepAllAfterPunctuation):r;return{normalized:i,chunks:hxe(l,s),...l}}let $c=null;const U5=new Map;let Nc=null;const vxe=96,yxe=/\p{Emoji_Presentation}/u,kxe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let kk=null;const V5=new Map;function Dx(){if($c!==null)return $c;if(typeof OffscreenCanvas<"u")return $c=new OffscreenCanvas(1,1).getContext("2d"),$c;if(typeof document<"u")return $c=document.createElement("canvas").getContext("2d"),$c;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function bxe(e){let t=U5.get(e);return t||(t=new Map,U5.set(e,t)),t}function ka(e,t){let n=t.get(e);return n===void 0&&(n={width:Dx().measureText(e).width,containsCJK:Qr(e)},t.set(e,n)),n}function P0(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function wxe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function NN(){return kk===null&&(kk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),kk}function xxe(e){return yxe.test(e)||e.includes("️")}function _xe(e){return kxe.test(e)}function Sxe(e,t){let n=V5.get(e);if(n!==void 0)return n;const o=Dx();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const r=i.getBoundingClientRect().width;document.body.removeChild(i),s-r>.5&&(n=s-r)}return V5.set(e,n),n}function Cxe(e){let t=0;const n=NN();for(const o of n.segment(e))xxe(o.segment)&&t++;return t}function Axe(e,t){return t.emojiCount===void 0&&(t.emojiCount=Cxe(e)),t.emojiCount}function Tu(e,t,n){return n===0?t.width:t.width-Axe(e,t)*n}function Mxe(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=NN(),r=[];for(const c of i.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=ka(d,n);c.push(Tu(d,f,o))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>vxe){const c=[];let d=null,f=0;for(const p of r){const h=ka(p,n),m=Tu(p,h,o);if(d===null)c.push(m);else{const k=d+p,w=ka(k,n);c.push(Tu(k,w,o)-f)}d=p,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=ka(a,n),f=Tu(a,d,o);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function Exe(e,t){const n=Dx();n.font=e;const o=bxe(e),s=wxe(e),i=t?Sxe(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function Txe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function LN(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function FN(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Bx(e,t){return t===0?0:e+t}function Nxe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Lxe(e,t,n,o,s){const i=t==="tab"?s+Nxe(e,n):e.lineEndFitAdvances[n];return Bx(o,i)}function q5(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return Bx(o,s)}function K5(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return Bx(o,i)}function Fxe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Oxe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function I1(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const r=e.kinds[i];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Pxe(e,t,n,o,s,i){return t+Rxe(e,n,o,s,i)}function Dxe(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r}=e;if(o.length===0)return 0;const a=P0().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,p=0,h=0,m=0,k=0,w=-1,v=0;function y(){w=-1,v=0}function b(P=m,R=k,M=d){c++,n?.(M,p,h,P,R),d=0,f=!1,y()}function S(P,R){f=!0,p=P,h=0,m=P+1,k=0,d=R}function I(P,R,M){f=!0,p=P,h=R,m=P,k=R+1,d=M}function T(P,R){if(!f){S(P,R);return}d+=R,m=P+1,k=0}function $(P,R){const M=i[P],D=r[P]??null;let z=D===null?-1:I1(D,0,R+1),B=-1,A=0,F=R;for(;Fu){if(D!==null&&B>R){b(P,B,A),F=B,z=I1(D,z,F+1),B=-1,A=0;continue}b(),I(P,F,W)}else d+=W,m=P,k=F+1;const j=F+1;D!==null&&D[z]===j&&(B=j,A=d,z++),F++}f&&m===P&&k===M.length&&(m=P+1,k=0)}let L=0;for(;L=o.length));){const P=o[L],R=s[L],M=LN(R);if(!f){P>u&&i[L]!==null?$(L,0):S(L,P),M&&(w=L+1,v=d-P),L++;continue}if(d+P>u){if(M){T(L,P),b(L+1,0,d-P),L++;continue}if(w>=0){if(m>w||m===w&&k>0){b();continue}b(w,0,v);continue}if(P>u&&i[L]!==null){b(),$(L,0),L++;continue}b();continue}T(L,P),M&&(w=L+1,v=d-P),L++}return f&&b(),c}function Bxe(e,t,n){if(e.simpleLineWalkFastPath)return Dxe(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(o.length===0||a.length===0)return 0;const u=P0(),c=u.lineFitEpsilon,d=t+c;let f=0,p=0,h=!1,m=0,k=0,w=0,v=0,y=-1,b=0,S=0,I=null;function T(){y=-1,b=0,S=0,I=null}function $(){return I==="soft-hyphen"&&y===w&&v===0?S:p}function L(A=w,F=v,W){f++,n!==void 0&&n(Pxe(e,W??$(),m,k,A,F),m,k,A,F),p=0,h=!1,T()}function P(A,F){h=!0,m=A,k=0,w=A+1,v=0,p=F}function R(A,F,W){h=!0,m=A,k=F,w=A,v=F+1,p=W}function M(A,F){if(!h){P(A,F);return}p+=F,w=A+1,v=0}function D(A,F,W,j,le,J){if(!F)return;const X=q5(e,A,W,le),G=K5(e,A,W,le,j);y=W+1,b=p-J+X,S=p-J+G,I=A}function z(A,F){const W=i[A],j=r[A]??null;let le=j===null?-1:I1(j,0,F+1),J=-1,X=0,G=F;for(;Gd){if(j!==null&&J>F){L(A,J,X),G=J,le=I1(j,le,G+1),J=-1,X=0;continue}L(),R(A,G,Q)}else p=ge,w=A,v=G+1}const ee=G+1;j!==null&&j[le]===ee&&(J=ee,X=p,le++),G++}h&&w===A&&v===W.length&&(w=A+1,v=0)}function B(A){f++,n?.(0,A.startSegmentIndex,0,A.consumedEndSegmentIndex,0),T()}for(let A=0;A=F.endSegmentIndex));){const j=s[W],le=LN(j),J=$xe(e,h,W),X=j==="tab"?Ixe(p+J,e.tabStopAdvance):o[W],G=J+X,Q=Lxe(e,j,W,J,X);if(j==="soft-hyphen"){h&&(w=W+1,v=0,y=W+1,b=p+l,S=p+l,I=j),W++;continue}if(!h){Q>d&&i[W]!==null?z(W,0):P(W,X),D(j,le,W,X,J,G),W++;continue}if(p+Q>d){const K=p+q5(e,j,W,J),ge=p+K5(e,j,W,J,X);if(I==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&b<=d){L(y,0,S);continue}if(le&&K<=d){M(W,G),L(W+1,0,ge),W++;continue}if(y>=0&&b<=d){if(w>y||w===y&&v>0){L();continue}const Ce=y;L(Ce,0,S),W=Ce;continue}if(Q>d&&i[W]!==null){L(),z(W,0),W++;continue}L();continue}M(W,G),D(j,le,W,X,J,G),W++}if(h){const j=y===F.consumedEndSegmentIndex?S:p;L(F.consumedEndSegmentIndex,0,j)}}return f}let bk=null;function zx(){return bk===null&&(bk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),bk}function zxe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function Wxe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,p){o=[d],s=f,i=p,r=u2(d),l=F0.has(d)}function c(d,f){o.push(d),i=i||f;const p=u2(d);d.length===1&&Gu.has(d)?r=r||p:r=p,l=!1}for(const d of zx().segment(e)){const f=d.segment,p=Qr(f);if(o.length===0){u(f,d.index,p);continue}if(l||Ox.has(f)||Gu.has(f)||t.carryCJKAfterClosingQuote&&p&&r){c(f,p);continue}if(!i&&!p){c(f,p);continue}a(),u(f,d.index,p)}return a(),n}function Hxe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(a,u){const c=t[a].start,d=u=0&&!TN(t[a-1].text,n)&&l(a),s<0&&(s=a),i=i||Qr(u.text)}return l(t.length),o}function G5(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=zx();for(const s of o.segment(e))n++;return n}function jxe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Uxe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of zx().segment(e))n++,jxe(o.segment)&&t.push(n);return t.length===0?null:t}function Vxe(e,t,n){return t>1?e+(t-1)*n:e}function qxe(e,t,n,o,s){const i=P0(),{cache:r,emojiCorrection:l}=Exe(t,_xe(e.normalized)),a=Tu("-",ka("-",r),l)+(s===0?0:s*2),c=Tu(" ",ka(" ",r),l)*8,d=s!==0;if(e.len===0)return zxe();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const w=n?[]:null,v=[],y=[],b=[],S=n?[]:null,I=Array.from({length:e.len});function T(R,M,D,z,B,A,F,W,j){B!=="text"&&B!=="space"&&B!=="zero-width-break"&&(k=!1),f.push(M),p.push(D),h.push(z),m.push(B),w?.push(A),v.push(F),y.push(W),d&&b.push(j),S!==null&&S.push(R)}function $(R,M,D,z,B){const A=ka(R,r),F=d?G5(R,M):0,W=Vxe(Tu(R,A,l),F,s),j=M==="space"||M==="preserved-space"||M==="zero-width-break"?0:W,le=j===0?0:j+(F>0?s:0),J=M==="space"||M==="zero-width-break"?0:W;if(B&&z&&R.length>1){let X="sum-graphemes";s!==0?X="segment-prefixes":T1(R)?X="pair-context":i.preferPrefixWidthsForBreakableRuns&&(X="segment-prefixes");const G=Mxe(R,A,r,l,X),Q=G===null||o==="keep-all"?null:Uxe(R);T(R,W,le,J,M,D,G,Q,F);return}T(R,W,le,J,M,D,null,null,F)}for(let R=0;R{n>t&&(t=n)}),t}function Jxe(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let r=0;r=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function Y5(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of Xxe(t)){const r=Math.max(0,Math.min(s,e.length)),l=Math.max(r,Math.min(i,e.length));l<=r||(r>o&&n.push({text:e.slice(o,r),hit:!1}),n.push({text:e.slice(r,l),hit:!0}),o=l)}return o0?n:[{text:e,hit:!1}]}function J5(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function Qxe(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let r=0;r0,l.value=v.scrollTop+v.clientHeight{const v={},y="var(--menu-scroll-fade)";let b;return r.value&&l.value?b=`linear-gradient(to bottom, transparent 0, black ${y}, black calc(100% - ${y}), transparent 100%)`:r.value?b=`linear-gradient(to bottom, transparent, black ${y})`:l.value&&(b=`linear-gradient(to top, transparent, black ${y})`),b&&(v.maskImage=b,v.WebkitMaskImage=b),u.value&&(v.maxHeight=u.value),Object.keys(v).length>0?v:void 0}),f=O(()=>{const v=a.value;return v?{top:`${v.top}px`,height:`${v.height}px`}:void 0});function p(){const v=t.value,y=n.value,b=v?.offsetParent;if(!v||!y||!b)return;const S=getComputedStyle(v),I=If(v,"--space-2",8),T=(parseFloat(S.paddingTop)||0)+(parseFloat(S.paddingBottom)||0),$=If(y,o,Number.POSITIVE_INFINITY),L=window.visualViewport?.offsetTop??0,P=b.getBoundingClientRect().top-L-I-T;u.value=`${Math.max(Math.floor(Math.min($,P)),0)}px`,bt(c)}function h(){const v=n.value;if(!v)return;const y=v.querySelectorAll('[role="option"]')[s?.value??-1];if(!y)return;const b=v.getBoundingClientRect(),S=y.getBoundingClientRect(),I=S.top-b.top+v.scrollTop,T=I+S.height;Iv.scrollTop+v.clientHeight&&(v.scrollTop=T-v.clientHeight)}let m=null;function k(v){const y=n.value,b=a.value;if(!y||!b)return;v.preventDefault(),m?.();const S=v.pointerId;(v.target instanceof Element?v.target:null)?.setPointerCapture?.(S);const T=If(y,"--menu-scrollbar-track-inset",0),$=y.clientHeight-T*2-b.height,L=y.scrollHeight-y.clientHeight,P=v.clientY,R=y.scrollTop,M=B=>{B.pointerId!==S||$<=0||(y.scrollTop=R+(B.clientY-P)/$*L)},D=B=>{B.pointerId===S&&m?.()};m=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),m=null},window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)}let w=null;return bn(()=>{if(typeof ResizeObserver=="function"&&n.value){w=new ResizeObserver(y=>{for(const b of y)b.target===n.value?c():p()}),w.observe(n.value);const v=t.value?.offsetParent;v&&w.observe(v)}window.addEventListener("resize",p),window.visualViewport?.addEventListener("resize",p),window.visualViewport?.addEventListener("scroll",p),p(),c()}),Mn(()=>{w?.disconnect(),w=null,m?.(),window.removeEventListener("resize",p),window.visualViewport?.removeEventListener("resize",p),window.visualViewport?.removeEventListener("scroll",p)}),Ze(()=>[s?.value,i?.value],()=>{bt(()=>{c(),h()})}),{atTop:r,atBottom:l,thumb:a,scrollStyle:d,thumbStyle:f,onScroll:c,onThumbPointerDown:k}}const t_e={key:0,class:"slash-empty",role:"status"},n_e=["id","aria-selected","onMouseenter","onMousedown"],o_e={class:"slash-name"},s_e={key:0,class:"slash-match"},i_e={class:"slash-desc"},r_e={key:0,class:"slash-desc-match"},l_e=Ge({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=q(null),r=q(null),l=O(()=>n.activeIndex),a=O(()=>n.items),{thumb:u,scrollStyle:c,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=ON({menuEl:i,scrollEl:r,maxHeightVar:"--p-slash-menu-h",activeIndex:l,refreshKey:a}),h=O(()=>n.items.map((m,k)=>{const w=m.isSkill?m.desc:s(m.desc),v=n.ranges[k]??e_e(n.query,m.name,w);return{item:m,namePieces:Y5(m.name,v.name),desc:w,descPieces:Y5(w,v.desc)}}));return(m,k)=>(g(),C("div",{ref_key:"menuEl",ref:i,class:"slash-menu","data-menu-frame":""},[n.items.length===0?(g(),C("div",t_e,N(x(s)("composer.noCommands")),1)):ie("",!0),_("div",{ref_key:"scrollEl",ref:r,class:"slash-scroll",role:"listbox",style:Ut(x(c)),onScroll:k[0]||(k[0]=(...w)=>x(f)&&x(f)(...w))},[(g(!0),C(Ie,null,ot(h.value,(w,v)=>(g(),C("div",{id:`composer-slash-option-${v}`,key:`${w.item.name}-${v}`,class:Be(["slash-item",{active:v===n.activeIndex}]),role:"option","aria-selected":v===n.activeIndex,onMouseenter:y=>o("hover",v),onMousedown:St(y=>o("select",w.item),["prevent"])},[_("span",o_e,[(g(!0),C(Ie,null,ot(w.namePieces,(y,b)=>(g(),C(Ie,{key:b},[y.hit?(g(),C("span",s_e,N(y.text),1)):(g(),C(Ie,{key:1},[Ve(N(y.text),1)],64))],64))),128))]),_("span",i_e,[(g(!0),C(Ie,null,ot(w.descPieces,(y,b)=>(g(),C(Ie,{key:b},[y.hit?(g(),C("span",r_e,N(y.text),1)):(g(),C(Ie,{key:1},[Ve(N(y.text),1)],64))],64))),128))])],42,n_e))),128))],36),x(u)&&n.items.length>0?(g(),C("div",{key:1,class:"scroll-thumb",style:Ut(x(d)),onPointerdown:k[1]||(k[1]=(...w)=>x(p)&&x(p)(...w))},null,36)):ie("",!0)],512))}}),a_e=ht(l_e,[["__scopeId","data-v-d671dff5"]]),u_e={key:0,class:"mention-state dim",role:"status"},c_e={key:1,class:"mention-state dim",role:"status"},d_e=["id","aria-selected","onMouseenter","onMousedown"],f_e=["innerHTML"],p_e={class:"mention-name"},h_e={key:0,class:"mention-hit"},m_e={class:"mention-meta"},g_e=["innerHTML"],v_e={class:"mention-name"},y_e={key:0,class:"mention-hit"},k_e={key:0,class:"mention-meta"},b_e={key:0,class:"mention-hit"},w_e=Ge({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=q(null),r=q(null),l=O(()=>n.activeIndex),a=O(()=>n.items),{thumb:u,scrollStyle:c,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=ON({menuEl:i,scrollEl:r,maxHeightVar:"--p-mention-menu-h",activeIndex:l,refreshKey:a});function h(y){const b=y.endsWith("/")?y.slice(0,-1):y,S=b.lastIndexOf("/");return S===-1?"":b.slice(0,S)}function m(y){const b=y.file.path.endsWith("/")?y.file.path.slice(0,-1):y.file.path;return wk(y.file.name,y.file.matchPositions,Math.max(0,b.length-y.file.name.length))}function k(y){return wk(h(y.file.path),y.file.matchPositions,0)}function w(y){return wk(y.skill.name,y.matchPositions,0)}function v(y){return y.kind==="skill"?`skill:${y.skill.name}`:y.file.path}return(y,b)=>(g(),C("div",{ref_key:"menuEl",ref:i,class:"mention-menu","data-menu-frame":""},[n.loading&&n.items.length===0?(g(),C("div",u_e,N(x(s)("mention.searching")),1)):n.items.length===0?(g(),C("div",c_e,N(x(s)("mention.noMatch")),1)):ie("",!0),n.loading&&n.items.length>0?(g(),he(Bo,{key:2,class:"mention-spin",size:"sm",label:x(s)("mention.searching")},null,8,["label"])):ie("",!0),_("div",{ref_key:"scrollEl",ref:r,class:"mention-scroll",role:"listbox",style:Ut(x(c)),onScroll:b[0]||(b[0]=(...S)=>x(f)&&x(f)(...S))},[(g(!0),C(Ie,null,ot(n.items,(S,I)=>(g(),C("div",{id:`composer-mention-option-${I}`,key:v(S),class:Be(["mention-item",{active:I===n.activeIndex,stale:n.stale&&S.kind!=="skill"}]),role:"option","aria-selected":I===n.activeIndex,onMouseenter:T=>o("hover",I),onMousedown:St(T=>o("select",S),["prevent"])},[S.kind==="skill"?(g(),C(Ie,{key:0},[_("span",{class:"mention-icon",innerHTML:x(yi)("sparkles","sm"),"aria-hidden":"true"},null,8,f_e),_("span",p_e,[(g(!0),C(Ie,null,ot(w(S),(T,$)=>(g(),C(Ie,{key:$},[T.hit?(g(),C("span",h_e,N(T.text),1)):(g(),C(Ie,{key:1},[Ve(N(T.text),1)],64))],64))),128))]),_("span",m_e,N(S.skill.description),1)],64)):(g(),C(Ie,{key:1},[_("span",{class:"mention-icon",innerHTML:x(aw)(S.file.path,S.file.name),"aria-hidden":"true"},null,8,g_e),_("span",v_e,[(g(!0),C(Ie,null,ot(m(S),(T,$)=>(g(),C(Ie,{key:$},[T.hit?(g(),C("span",y_e,N(T.text),1)):(g(),C(Ie,{key:1},[Ve(N(T.text),1)],64))],64))),128))]),h(S.file.path)?(g(),C("span",k_e,[(g(!0),C(Ie,null,ot(k(S),(T,$)=>(g(),C(Ie,{key:$},[T.hit?(g(),C("span",b_e,N(T.text),1)):(g(),C(Ie,{key:1},[Ve(N(T.text),1)],64))],64))),128))])):ie("",!0)],64))],42,d_e))),128))],36),x(u)&&n.items.length>0?(g(),C("div",{key:3,class:"scroll-thumb",style:Ut(x(d)),onPointerdown:b[1]||(b[1]=(...S)=>x(p)&&x(p)(...S))},null,36)):ie("",!0)],512))}}),x_e=ht(w_e,[["__scopeId","data-v-1db50d1d"]]),RN=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/auto",desc:"commands.auto.desc"},{name:"/yolo",desc:"commands.yolo.desc"},{name:"/thinking",desc:"commands.thinking.desc"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function __e(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const $1="skill:";function S_e(e){return e.startsWith($1)?e.slice($1.length):e}function PN(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${$1}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...RN,...t]}function C_e(e,t=RN){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let r=0;return i===n?r=3:i.startsWith(n)?r=2:i.includes(n)&&(r=1),{item:o,index:s,score:r}}).filter(({score:o})=>o>0).sort((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function D0(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function DN(e){return e?.supportEfforts??[]}function A_e(e){return e[Math.floor(e.length/2)]}function Zp(e){if(D0(e)==="unsupported")return"off";const t=DN(e);return t.length>0?e?.defaultEffort??A_e(t):"on"}function yh(e){const t=DN(e),n=D0(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function Yp(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function M_e(e){return e!=="off"}function E_e(e,t){return yh(e).includes(t)}function Wx(e,t){return t==="off"?"off":t==="on"?Zp(e):t}function N1(e,t){return t??Zp(e)}function T_e(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function I_e(e,t,n){return!n||e===void 0?t:Zp(e)}const L1=100;function $_e(e){const t=Rd(ln.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>L1?n.slice(-L1):n,s={[e]:o};return za(ln.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function N_e(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=q($_e(s())),r=O(()=>i.value[s()??""]??[]);let l=-1,a="";function u(w){const v=s();if(l=-1,!v)return;const y=w.trim();if(!y)return;const b=i.value[v]??[];if(b.at(-1)===y)return;const S=[...b,y],I=S.length>L1?S.slice(-L1):S;i.value={...i.value,[v]:I},za(ln.inputHistory,i.value)}function c(){const w=n.value;return w?(w.selectionStart??0)===0:!1}function d(w){t.value=w,bt(()=>{const v=n.value;if(!v)return;o();const y=w.length;v.setSelectionRange(y,y)})}function f(){const w=r.value;if(w.length!==0){if(l===-1)a=t.value,l=w.length-1;else if(l>0)l-=1;else return;d(w[l])}}function p(){if(l===-1)return;const w=r.value;l0}return Ze(s,()=>{l=-1}),{push:u,caretAtTextStart:c,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function L_e(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:r,clearDraft:l}=e,a=q(!1),u=q([]),c=q(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(u.value=C_e(p,PN(s())),c.value=0,a.value=u.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,bt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",l?.(),r(p.name),i(p.name)}return{open:a,items:u,active:c,update:d,select:f}}function F_e(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:r}=e,l=q(!1),a=q([]),u=q(0),c=q(!1),d=q(!1);let f=null,p=0;function h(){const w=t.value,v=n.value?.selectionStart??w.length;let y=v-1;for(;y>=0&&!/\s/.test(w[y]);)y--;y++;const b=w.slice(y,v);return b.startsWith("@")?{token:b.slice(1),start:y,end:v}:null}function m(){const w=h(),v=s(),y=i?.();if(!w||!v&&!y){l.value=!1,d.value=!1;return}const b=w.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const S=++p;c.value=!0,l.value=!0,u.value=0,a.value.length>0&&(d.value=!0);try{const[I,T]=await Promise.all([v?v(b).catch(()=>[]):Promise.resolve([]),y?y(b).catch(()=>[]):Promise.resolve([])]);if(S!==p)return;a.value=[...I.map($=>({kind:$.path.endsWith("/")?"folder":"file",file:{...$,matchPositions:Z5(b,$.path)}})),...T.map($=>({kind:"skill",skill:$,matchPositions:Z5(b,$.name)}))]}catch{S===p&&(a.value=[])}finally{S===p&&(c.value=!1,d.value=!1)}},200)}function k(w){const v=h();if(!v)return;if(l.value=!1,w.kind==="skill"){r?.(w.skill.name);return}const y=t.value,b=w.file.name||w.file.path.split(/[\\/]/).findLast(Boolean)||w.file.path,S=w$({kind:w.kind,name:b,path:w.file.path});t.value=`${y.slice(0,v.start)}${S} ${y.slice(v.end)}`,bt(()=>{const I=n.value;if(!I)return;const T=v.start+S.length+1;I.setSelectionRange(T,T),I.focus(),o()})}return{open:l,items:a,active:u,loading:c,stale:d,update:m,select:k}}function O_e(e){const{sessionId:t}=e;function n(u){return zo(e4(u))??""}function o(u,c){const d=e4(u);c?Qo(d,c):Hu(d)}const s=q(n(t())),i=q(null);function r(){const u=i.value;u&&(u.style.height="auto",u.style.height=`${u.scrollHeight}px`)}Ze(s,u=>{bt(r),o(t(),u)}),Ze(t,(u,c)=>{u!==c&&(o(c,s.value),s.value=n(u),bt(r))});function l(u){s.value=u,bt(()=>{const c=i.value;if(!c)return;c.focus();const d=u.length;c.setSelectionRange(d,d),r()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:r,loadForEdit:l,clearDraft:a}}function R_e(e){const{uploadImage:t,sessionId:n}=e,o=q({}),s=O(()=>o.value[n()??""]??[]),i=q(null),r=q(null),l=q(!1);let a=0;function u(){return`att_${++a}`}function c(F,W){o.value={...o.value,[F]:W}}function d(F){if(F.previewUrl!==void 0)try{URL.revokeObjectURL(F.previewUrl)}catch{}}function f(F){return F.startsWith("image/")?"image":F.startsWith("video/")?"video":"file"}async function p(F){const W=t();if(!W)return;const j=n()??"";if(F.length!==0)for(const le of F){const J=f(le.type),X=u(),G=J==="file"?void 0:URL.createObjectURL(le),Q={localId:X,name:le.name,kind:J,previewUrl:G,mediaType:le.type||"application/octet-stream",size:le.size,uploading:!0};c(j,[...o.value[j]??[],Q]),W(le,le.name).then(ee=>{const K=o.value[j]??[];c(j,K.map(ge=>ge.localId===X?{...ge,uploading:!1,fileId:ee?.fileId,mediaType:ee?.mediaType??ge.mediaType,error:ee===null}:ge))}).catch(()=>{const ee=o.value[j]??[];c(j,ee.map(K=>K.localId===X?{...K,uploading:!1,error:!0}:K))})}}function h(F){const W=n()??"",j=o.value[W]??[],le=j.find(J=>J.localId===F);i.value?.localId===F&&(i.value=null),le&&d(le),c(W,j.filter(J=>J.localId!==F))}function m(F){i.value=F}function k(){i.value=null}function w(){r.value?.click()}function v(F){const W=F.target,j=Array.from(W.files??[]);p(j),W.value=""}function y(F){if(!t())return;const W=F.clipboardData;if(!W)return;const j=[],le=new Set,J=(X,G)=>{const Q=`${X.size}:${X.type}:${G}`;if(le.has(Q))return;le.add(Q);const ee=X.type.split("/")[1]??"png",K=G.includes(".")?G:`paste-${Date.now()}.${ee}`;j.push(X instanceof File?X:new File([X],K,{type:X.type}))};for(const X of Array.from(W.items))if(X.kind==="file"){const G=X.getAsFile();G&&J(G,G.name||`paste-${Date.now()}.${X.type.split("/")[1]??"png"}`)}for(const X of Array.from(W.files))J(X,X.name);j.length!==0&&(F.preventDefault(),p(j))}let b=0;function S(F){!t()||!Array.from(F.dataTransfer?.items??[]).some(j=>j.kind==="file")||(F.preventDefault(),F.stopPropagation(),l.value=!0)}function I(){l.value=!1}function T(F){if(b=0,l.value=!1,!t())return;F.preventDefault(),F.stopPropagation();const W=Array.from(F.dataTransfer?.files??[]);p(W)}function $(F){return Array.from(F.dataTransfer?.items??[]).some(W=>W.kind==="file")}function L(F){!t()||!$(F)||(F.preventDefault(),b+=1,l.value=!0)}function P(F){!t()||!$(F)||F.preventDefault()}function R(F){!t()||!$(F)||(b=Math.max(0,b-1),b===0&&(l.value=!1))}function M(F){if(b=0,l.value=!1,!t())return;F.preventDefault();const W=Array.from(F.dataTransfer?.files??[]);p(W)}function D(){const F=n()??"";for(const W of o.value[F]??[])d(W);c(F,[])}function z(F,W,j){const le=o.value[F]??[];le.some(J=>J.localId===W)&&c(F,le.map(J=>J.localId===W?{...J,...j}:J))}function B(F){return fetch(F).then(W=>{if(!W.ok)throw new Error(`fetch failed: ${W.status}`);return W.blob()})}function A(F){const W=n()??"";for(const j of o.value[W]??[])d(j);c(W,[]);for(const j of F){const le=u(),J=/^data:/i.test(j.url),X=/^blob:/i.test(j.url),G=j.name??j.kind;if(j.fileId){const Q={localId:le,name:G,kind:j.kind,previewUrl:j.kind==="file"?void 0:j.url,uploading:!1,fileId:j.fileId};c(W,[...o.value[W]??[],Q]),j.kind!=="file"&&!J&&!X&&xt().getFileBlob(j.fileId).then(ee=>{const K=URL.createObjectURL(ee);if(!(o.value[W]??[]).some(Ce=>Ce.localId===le)){URL.revokeObjectURL(K);return}z(W,le,{previewUrl:K})}).catch(()=>{})}else{if(!j.url)continue;const Q=t();if(!Q)continue;const ee={localId:le,name:G,kind:j.kind,previewUrl:j.url,uploading:!0};c(W,[...o.value[W]??[],ee]),B(j.url).then(K=>{const ge=G.includes(".")?G:`${G}.${K.type.split("/")[1]??"bin"}`;return Q(K,ge)}).then(K=>{if(K===null){const ge=o.value[W]??[];c(W,ge.filter(Ce=>Ce.localId!==le));return}z(W,le,{uploading:!1,fileId:K.fileId})}).catch(()=>{const K=o.value[W]??[];c(W,K.filter(ge=>ge.localId!==le))})}}}return Ze(n,()=>{i.value=null}),bn(()=>{document.addEventListener("paste",y),document.addEventListener("dragenter",L),document.addEventListener("dragover",P),document.addEventListener("dragleave",R),document.addEventListener("drop",M)}),Mn(()=>{document.removeEventListener("paste",y),document.removeEventListener("dragenter",L),document.removeEventListener("dragover",P),document.removeEventListener("dragleave",R),document.removeEventListener("drop",M);for(const F of Object.values(o.value))for(const W of F)d(W);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:r,isDragOver:l,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:w,handleFileInputChange:v,handleDragOver:S,handleDragLeave:I,handleDrop:T,clearAfterSubmit:D,loadAttachments:A}}const P_e={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},D_e=["stroke-dasharray","stroke-dashoffset"],xk=7,B_e=Ge({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*xk;return(o,s)=>(g(),C("svg",P_e,[_("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:xk,fill:"none","stroke-width":"2.5"}),_("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:xk,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,D_e)]))}}),z_e=ht(B_e,[["__scopeId","data-v-97f3cf66"]]),W_e=["aria-selected","onClick"],H_e=Ge({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),C("div",{class:Be(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),C(Ie,null,ot(e.options,i=>(g(),C("button",{key:i.value,class:Be(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:r=>n("update:modelValue",i.value)},N(i.label),11,W_e))),128))],2))}}),Bs=ht(H_e,[["__scopeId","data-v-bffb3dae"]]),_k=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],BN=6e4;function j_e(e=Date.now()){const t=Math.floor(e/BN)%_k.length;return _k[t]??_k[0]}function U_e(e=Date.now()){return`${j_e(e)}…`}const Sl=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],Bu=80,V_e=["aria-label"],q_e=Ge({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=Sl.length*Bu,n=Bu/2,o=e,s=q(Date.now());let i;bn(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},BN))}),Mn(()=>{i!==void 0&&clearInterval(i)});const r=O(()=>o.label??U_e(s.value));function l(a){return{"--spinner-frame-delay":`${a*Bu-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,u)=>(g(),C("span",{class:Be(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":r.value,role:"img"},[(g(!0),C(Ie,null,ot(x(Sl),(c,d)=>(g(),C("span",{key:c,class:"activity-frame",style:Ut(l(d)),"aria-hidden":"true"},N(c),5))),128))],10,V_e))}}),Sk=ht(q_e,[["__scopeId","data-v-c12d8332"]]),K_e=["disabled"],G_e={key:0,class:"leading"},Z_e={class:"label"},Y_e={key:1,class:"count"},J_e={key:2,class:"trailing"},X_e=Ge({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),C("button",{type:"button",class:Be(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),C("span",G_e,[xn(t.$slots,"leading",{},void 0,!0)])):ie("",!0),_("span",Z_e,[xn(t.$slots,"label",{},()=>[xn(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),C("span",Y_e,N(e.count),1)):ie("",!0),t.$slots.trailing?(g(),C("span",J_e,[xn(t.$slots,"trailing",{},void 0,!0)])):ie("",!0)],10,K_e))}}),Lc=ht(X_e,[["__scopeId","data-v-261bf74a"]]),Q_e=["aria-checked","disabled"],eSe=Ge({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(r){n.disabled||r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),s())}return(r,l)=>(g(),C("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...l[0]||(l[0]=[_("span",{class:"track","aria-hidden":"true"},null,-1),_("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,Q_e))}}),X5=ht(eSe,[["__scopeId","data-v-169237c7"]]);function tSe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const nSe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function xr(e){const t=e.replaceAll("\\","/"),n=nSe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function oSe(e,t){const n=xr(t.cwd);return e.find(o=>xr(o.root)===n)?.id??t.workspaceId??t.cwd}function sSe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(xr)),r=new Map;for(const d of t){const f=xr(d.root);i.has(f)||r.has(f)||r.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=xr(f);i.has(p)||r.has(p)||r.set(p,{id:d.workspaceId??f,root:f,name:tSe(f),sessionCount:0})}const l=new Map;for(const d of n){const f=oSe(t,d);l.set(f,(l.get(f)??0)+1)}const a=[];for(const d of t){const f=xr(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const u=[...r.keys()].filter(d=>!a.includes(d));u.sort((d,f)=>r.get(d).root.localeCompare(r.get(f).root));const c=[];for(const d of[...a,...u]){const f=r.get(d),p=l.get(f.id)??l.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);c.push({...f,sessionCount:h})}return c}function iSe(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(r=>r.id)),s=new Set(t.filter(r=>r.role==="user").map(r=>r.id)),i=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||o.has(r.id)||r.role==="user"&&r.promptId!==void 0&&s.has(r.promptId))});return i.length>0?[...i,...t]:t}function Q5(e,t){const n=new Set(e.map(a=>a.id)),o=t.filter(a=>a.kind==="subagent"&&!n.has(a.id));if(o.length===0)return e;const s=new Map(e.map(a=>[a.id,a])),i=new Set,r=o.map(a=>{const u=a.backgroundTaskId!==void 0?s.get(a.backgroundTaskId):void 0;if(u===void 0)return a;i.add(u.id);const c=a.status==="running"&&u.status!=="running";return{...a,status:a.status==="running"?u.status:a.status,subagentPhase:c?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":a.subagentPhase,agentId:a.agentId??u.agentId,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort,completedAt:a.completedAt??u.completedAt,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes}});return[...e.filter(a=>!i.has(a.id)),...r]}function rSe(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),o=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);return l?{...r,outputLines:l.outputLines,text:l.text}:r}),i=t.filter(r=>!o.has(r.id));return i.length===0?s:[...s,...i]}function lSe(e){const t=new Map,n=new Set;function o(i){const r=t.get(i);if(r!==void 0)return r;const l=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,l),l}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const aSe=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function uSe(e){return aSe.has(e.type)}const cSe=50,dSe=100,d2=32*1024,fSe={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,cSe)},cancelTask(e){clearTimeout(e)}};function pSe(e,t,n={}){const o=n.scheduler??fSe,s=Math.max(1,Math.floor(n.maxItemsPerSlice??dSe)),i=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>i.length-r,f=()=>{u+=1,l!==null&&(o.cancelFrame(l),l=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{r===i.length?(i.length=0,r=0):r>=1024&&(i.splice(0,r),r=0)};let h;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,v=()=>{w===u&&h()};l=o.requestFrame(v),a=o.requestTask(v)};h=()=>{f();let w=0;for(;!c&&w{if(!c){if(t(w)){const v=i.length>r?i.at(-1):void 0,y=v===void 0?void 0:n.coalesce?.(v,w);y===void 0?i.push(w):i[i.length-1]=y,m();return}if(d()===0){e(w);return}i.push(w),h()}});return k.flush=()=>{if(!c){for(f();!c&&r{if(c||d()===0)return;let v=r;for(let y=r;y{c||(c=!0,f(),i.length=0,r=0)},k}function f2(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function hSe(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=f2(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=d2)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[r-1])&&/[\uDC00-\uDFFF]/u.test(o.value[r])&&(r-=1);const l=o.value.slice(i,r);s.push({appEvent:{...t,delta:o.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=r}return s}function mSe(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=f2(e.appEvent),i=f2(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>d2)return;const r=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}const zN=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],WN=new Set(["blue","mono"]),HN=new Set(["light","dark","system"]),jN=14,gSe=12,vSe=20,ySe={small:12,medium:14,large:16,xlarge:18};function kSe(){const e=zo(ln.accent);return e&&WN.has(e)?e:"blue"}function bSe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function wSe(){const e=zo(ln.colorScheme);return e&&HN.has(e)?e:"system"}function xSe(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function Hx(e){return Number.isFinite(e)?Math.min(vSe,Math.max(gSe,Math.round(e))):jN}function jx(e){const t=Hx(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function UN(e){return ySe[e]}function _Se(){const e=zo(ln.uiFontSize);return e===null?jN:Hx(Number(e))}function SSe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=jx(e))}const Ux=q(wSe()),Vx=q(kSe()),qx=q(_Se());Ze(Ux,xSe,{immediate:!0});Ze(Vx,bSe,{immediate:!0});Ze(qx,SSe,{immediate:!0});function CSe(e){HN.has(e)&&(Ux.value=e,Qo(ln.colorScheme,e))}function ASe(e){WN.has(e)&&(Vx.value=e,Qo(ln.accent,e))}function MSe(e){const t=Hx(e);qx.value=t,Qo(ln.uiFontSize,String(t))}const ESe=600,TSe=250,B0=250,ISe=1e3,$Se=160,F1=q(!1);let Su=[],Iu=null,O1=-B0;function NSe(){Su=[],O1=-B0,F1.value=!1,Iu!==null&&(clearTimeout(Iu),Iu=null)}function LSe(){F1.value=!0,Iu!==null&&clearTimeout(Iu),Iu=setTimeout(()=>{Iu=null,Su=[],O1=-B0,F1.value=!1},ISe)}function FSe(e){if(e<=0)return;const t=Date.now();Su.push({time:t,chars:e});const n=t-ESe;if(Su=Su.filter(l=>l.time>=n),t-O1l+a.chars,0)/s*1e3>=$Se&&LSe()}function Kx(){return{colorScheme:Ux,accent:Vx,uiFontSize:qx,fastMoon:F1,setColorScheme:CSe,setAccent:ASe,setUiFontSize:MSe,resetFastMoon:NSe,recordMoonDelta:FSe}}function OSe(e,t,n){return e==="idle"&&!t&&!n}function Gx(e,t){const n=zo(e);return n===null?t:n==="1"}const Zx=q(Gx(ln.notifyOnComplete,!0)),Yx=q(Gx(ln.notifyOnQuestion,!1)),Jx=q(Gx(ln.notifyOnApproval,!1)),Xx=q(typeof Notification<"u"?Notification.permission:"denied"),RSe="/favicon.ico";async function Qx(e,t,n){if(!n){e.value=!1,Qo(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}Xx.value=o,o==="granted"&&(e.value=!0,Qo(t,"1"))}function PSe(e){return Qx(Zx,ln.notifyOnComplete,e)}function DSe(e){return Qx(Yx,ln.notifyOnQuestion,e)}function BSe(e){return Qx(Jx,ln.notifyOnApproval,e)}function e_(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function zSe(e){return{title:ao.global.t("settings.notifyTitle"),body:e_(e,ao.global.t("settings.notifyFallback"))}}function WSe(e,t){return{title:ao.global.t("settings.notifyQuestionTitle"),body:e_(t,e,ao.global.t("settings.notifyQuestionFallback"))}}function HSe(e,t){return{title:ao.global.t("settings.notifyApprovalTitle"),body:e_(t,e,ao.global.t("settings.notifyApprovalFallback"))}}function t_(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{Xx.value=i,i==="granted"&&e8(t,n,o)});return}e8(t,n,o)}}function e8(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:RSe});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function jSe(e,t){t_(Zx.value,t,zSe(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function USe(e){t_(Yx.value,e,WSe(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function VSe(e){t_(Jx.value,e,HSe(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function qSe(){return{notifyOnComplete:Zx,notifyOnQuestion:Yx,notifyOnApproval:Jx,notifyPermission:Xx,setNotifyOnComplete:PSe,setNotifyOnQuestion:DSe,setNotifyOnApproval:BSe,maybeNotifyCompletion:jSe,maybeNotifyQuestion:USe,maybeNotifyApproval:VSe}}function KSe(){return zo(ln.soundOnComplete)==="1"}const Hd=q(KSe());function GSe(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Ck=null;function VN(){const e=GSe();if(!e)return null;if(Ck===null)try{Ck=new e}catch{return null}return Ck}function qN(){if(!Hd.value)return;const e=VN();e!==null&&e.state==="suspended"&&e.resume().then(()=>{bl("sound: audio context resumed",{state:e.state})},t=>{bl("sound: audio context resume rejected",{error:String(t)})})}let t8=!1;function ZSe(){if(t8||typeof window>"u")return;t8=!0;const e=()=>{qN()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}ZSe();function YSe(e){Hd.value=e,Qo(ln.soundOnComplete,e?"1":"0"),e&&qN()}function n8(e,t,n,o,s){const i=e.createOscillator(),r=e.createGain();i.type="sine",i.frequency.value=t,i.connect(r),r.connect(e.destination);const l=e.currentTime+n;r.gain.setValueAtTime(1e-4,l),r.gain.exponentialRampToValueAtTime(s,l+.01),r.gain.exponentialRampToValueAtTime(1e-4,l+o),i.start(l),i.stop(l+o+.02)}function n_(){const e=VN();if(e===null){bl("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){bl("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{bl("sound: context resumed for next time",{state:e.state})},t=>{bl("sound: resume rejected",{error:String(t)})});return}try{n8(e,880,0,.16,.18),n8(e,1320,.1,.22,.16),bl("sound: chime scheduled",{state:e.state})}catch(t){bl("sound: failed to play",{error:String(t)})}}function JSe(){Hd.value&&n_()}function XSe(){Hd.value&&n_()}function QSe(){Hd.value&&n_()}function eCe(){return{soundOnComplete:Hd,setSoundOnComplete:YSe,maybePlayCompletionSound:JSe,maybePlayQuestionSound:XSe,maybePlayApprovalSound:QSe}}const tCe=1e3,nCe=4096,o8=32*1024;function oCe(e,t){let n=null,o;const s=new Set;async function i(f){try{const h=await xt().listTasks(f);e.tasksBySession={...e.tasksBySession,[f]:Q5(h,e.tasksBySession[f]??[])},await r(f,h)}catch{}}async function r(f,p){if(e.activeSessionId!==f)return;const h=p??e.tasksBySession[f]??[],m=xt(),k=new Map;if(await Promise.all(h.map(async v=>{if((v.status==="completed"||v.status==="failed"||v.status==="cancelled")&&!s.has(v.id)&&!((v.outputLines?.length??0)>0))try{const b=await m.getTask(f,v.id,{withOutput:!0,outputBytes:o8});b.outputPreview!==void 0&&k.set(v.id,{preview:b.outputPreview,bytes:b.outputBytes}),s.add(v.id)}catch{}})),k.size===0)return;const w=e.tasksBySession[f]??[];e.tasksBySession={...e.tasksBySession,[f]:w.map(v=>{const y=k.get(v.id)??(v.backgroundTaskId!==void 0?k.get(v.backgroundTaskId):void 0);return y?{...v,outputPreview:y.preview,outputBytes:y.bytes}:v})}}async function l(f){if(e.activeSessionId!==f)return;const p=xt();let h;try{h=await p.listTasks(f)}catch{return}const m=new Map;await Promise.all(h.map(async y=>{const b=y.status==="running",S=y.status==="completed"||y.status==="failed"||y.status==="cancelled";if(!(!b&&!S)&&!(S&&(s.has(y.id)||(y.outputLines?.length??0)>0)))try{const I=await p.getTask(f,y.id,{withOutput:!0,outputBytes:b?nCe:o8});I.outputPreview!==void 0&&m.set(y.id,{preview:I.outputPreview,bytes:I.outputBytes}),S&&s.add(y.id)}catch{}}));const k=e.tasksBySession[f]??[],w=new Map(k.map(y=>[y.id,y])),v=h.map(y=>{const b=w.get(y.id),S=m.get(y.id);return{...y,outputLines:b?.outputLines,text:b?.text,outputPreview:S?.preview??b?.outputPreview,outputBytes:S?.bytes??b?.outputBytes}});e.tasksBySession={...e.tasksBySession,[f]:Q5(v,k)}}function a(f){n!==null&&o===f||(u(),o=f,l(f),n=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===f?l(f):u())},tCe))}function u(){n!==null&&(clearInterval(n),n=null),o=void 0,s.clear()}const c=q(0);let d=null;return Ze(()=>t.value.some(f=>f.status==="running"),f=>{f&&d===null?d=setInterval(()=>{c.value=(c.value+1)%Number.MAX_SAFE_INTEGER},1e3):!f&&d!==null&&(clearInterval(d),d=null)},{immediate:!0}),Ze(()=>{const f=e.activeSessionId;if(!f)return{sid:void 0,hasRunning:!1};const p=e.tasksBySession[f]??[];return{sid:f,hasRunning:p.some(h=>h.status==="running")}},({sid:f,hasRunning:p},h,m)=>{let k;p&&f!==void 0?a(f):f!==void 0?k=setTimeout(()=>{(e.tasksBySession[f]??[]).some(v=>v.status==="running")||u()},1500):u(),m(()=>{k!==void 0&&clearTimeout(k)})},{deep:!0,immediate:!0}),{taskClock:O(()=>c.value),loadTasksForSession:i}}function sCe(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function iCe(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` -`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&sCe(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const r=i.charAt(0),l=i.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:o}),o+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const p2="/sessions/";function s8(e){const{pathname:t}=e;if(!t.startsWith(p2))return;const n=t.slice(p2.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function rCe(e){return e===void 0||e.length===0?"/":`${p2}${encodeURIComponent(e)}`}const lCe=50,h2=5,aCe=40402,uCe=40410,cCe=40902,dCe=2e3;function Ak(e){return tr(e)&&e.code===cCe}const fCe=40904;function pCe(e){return tr(e)&&e.code===fCe}const hu=Es({}),jm=Es({}),Mk=Es({}),Hr=Es(new Set),z0=new Map,Zu=new Map,R1=new Map;let hCe=0;const vu=new Map,mCe=3;let i8=0;function gCe(){return i8+=1,`${Date.now().toString(36)}-${i8}`}function vCe(e){return{generation:z0.get(e)??0,pending:(Zu.get(e)?.size??0)>0}}function m2(e){const t=++hCe;z0.set(e,t);const n=Zu.get(e)??new Set;return n.add(t),Zu.set(e,n),t}function g2(e,t){const n=Zu.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Zu.delete(e);const o=R1.get(e);R1.delete(e),o?.()}function yCe(e){z0.delete(e),Zu.delete(e),R1.delete(e),vu.delete(e)}function kCe(e,t){return!t.pending&&t.generation===(z0.get(e)??0)}function bCe(e,t){if((Zu.get(e)?.size??0)===0){t();return}R1.set(e,t)}function wCe(e,t){const{t:n}=ao.global,{confirm:o}=qa(),{taskPoller:s,sideChat:i,modelProvider:r,pushOperationFailure:l,activity:a,sessionsKnownEmpty:u,setSessions:c,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:w,getEventConn:v,syncSessionFromSnapshot:y,reopenSession:b,hasLoadedMessages:S,refreshSessionStatus:I,refreshSessionGoal:T,persistSessionProfile:$,mergedWorkspaces:L,workspacesView:P,status:R,workspaceIdForSession:M,savePermissionToStorage:D,savePlanModeToStorage:z,saveDynamicWorkflowModeToStorage:B,saveGoalModeToStorage:A,draftModes:F,saveUnread:W,saveActiveWorkspaceToStorage:j,saveHiddenWorkspacesToStorage:le,goalErrorMessage:J,resetFastMoon:X,initialized:G,connectIssue:Q,selectedDiffPath:ee,fileDiffLines:K,fileDiffLoading:ge}=t;let Ce=!1;async function ze(de){if(e.messagesLoadingMoreBySession[de])return;const Me=e.messagesBySession[de];if(!Me||Me.length===0)return;const Le=Me[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[de]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[de]:!1};try{const je=await xt().listMessages(de,{beforeId:Le,pageSize:lCe}),at=[...je.items].toReversed();k(de,yt=>[...at,...yt]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[de]:je.hasMore}}catch(je){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[de]:!0},l("loadOlderMessages",je,{sessionId:de})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[de]:!1}}}function me(de){s.loadTasksForSession(de),H(de),I(de),T(de),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,de)||r.loadSkillsForSession(de)}async function te(de){const Me=e.activeSessionId;if(Me){ee.value=de,K.value=[],ge.value=!0;try{const je=await xt().getFileDiff(Me,de);if(ee.value!==de)return;K.value=iCe(je.diff)}catch(Le){ee.value===de&&(K.value=[]),console.warn("[loadFileDiff] diff unavailable for",de,Le)}finally{ee.value===de&&(ge.value=!1)}}}function oe(){ee.value=null,K.value=[],ge.value=!1}async function H(de){try{const Le=await xt().getGitStatus(de);e.gitStatusBySession={...e.gitStatusBySession,[de]:Le}}catch{}}async function Y(){try{const Me=await xt().getAuth();return e.authReady=Me.ready,e.defaultModel=Me.defaultModel,e.managedProviderStatus=Me.managedProvider?.status??null,Q.value=null,"proceed"}catch(de){return tr(de)&&(de.code===401||de.code===AN)?(Q.value=null,"server-auth-required"):(Q.value=(de instanceof Error?de.message:String(de)).slice(0,140),"retry")}}async function ke(){let de=!0;for(;;){const Me=await Y();if(Me!=="retry")return Me;de&&(Q.value=null,de=!1),await new Promise(Le=>{setTimeout(Le,dCe)})}}async function Se(){try{const de=xt();e.config=await de.getConfig()}catch{}}async function ye(de){try{const Le=await xt().setConfig(de);return e.config=Le,e.defaultModel=Le.defaultModel??null,!0}catch(Me){return l("setConfig",Me),!1}}const ne=100,ce=30,xe=720*60*1e3;async function fe(){const de=xt(),Me=[];let Le,je;for(;;){let at;try{at=await de.listSessions({pageSize:ne,beforeId:Le,excludeEmpty:!0})}catch(yt){if(Me.length===0)throw yt;je=yt;break}if(Me.push(...at.items),!at.hasMore||at.items.length===0)break;Le=at.items.at(-1).id}return{sessions:Me,error:je}}function ue(de){const Me=new Map(e.sessions.map(Le=>[Le.id,Le.usage]));c(de.map(Le=>{const je=Me.get(Le.id);return je!==void 0&&t2(Le.usage)&&!t2(je)?{...Le,usage:je}:Le}))}function we(de){const Me=[...de],Le=new Set(Me.map(je=>je.id));for(const je of e.sessions)Le.has(je.id)||(Me.push(je),Le.add(je.id));return Me.sort((je,at)=>new Date(at.updatedAt).getTime()-new Date(je.updatedAt).getTime()),Me}async function se(de){const Me=xt(),Le=[],je=Date.now(),at=gn=>je-new Date(gn.updatedAt).getTime();let yt,Gt=!1,nn=!0,Zn;for(;;){let gn;try{gn=await Me.listSessions({workspaceId:de,pageSize:h2,beforeId:yt,excludeEmpty:!0})}catch(Ot){if(nn)throw Ot;Zn=Ot,Gt=!0;break}if(Gt=gn.hasMore,gn.items.length===0)break;const An=gn.items.at(-1),Ho=at(An)>=xe;if(!nn&&Ho){const Ot=gn.items.findIndex(pn=>at(pn)>=xe),Zt=Ot>=0?Ot+1:gn.items.length;Le.push(...gn.items.slice(0,Zt)),Gt=gn.hasMore||Ztse(Ot.id))),Le=[],je=new Set,at=new Map,yt=new Set;let Gt;for(let Ot=0;Otyt.has(Ot.id)).map(Ot=>Ot.root)),Zn=new Set(de.map(Ot=>Ot.id));for(const Ot of e.sessions)!(Ot.workspaceId!==void 0&&Zn.has(Ot.workspaceId)?yt.has(Ot.workspaceId):nn.has(Ot.cwd)||yt.has(M(Ot)))||je.has(Ot.id)||(Le.push(Ot),je.add(Ot.id));const gn={},An={},Ho={};for(const{id:Ot}of de){const Zt=at.get(Ot);if(Zt===void 0){const pn=e.sessionsHasMoreByWorkspace[Ot],Yn=e.sessionsCursorByWorkspace[Ot],Jn=e.sessionsInitialCountByWorkspace[Ot];pn!==void 0&&(gn[Ot]=pn),Yn!==void 0&&(An[Ot]=Yn),Jn!==void 0&&(Ho[Ot]=Jn);continue}gn[Ot]=Zt.hasMore,An[Ot]=Zt.items.length>0?Zt.items.at(-1).id:void 0,Ho[Ot]=Math.max(Zt.items.length,h2)}return e.sessionsHasMoreByWorkspace=gn,e.sessionsCursorByWorkspace=An,e.sessionsInitialCountByWorkspace=Ho,e.sessionsFullyLoaded=!1,Le.sort((Ot,Zt)=>new Date(Zt.updatedAt).getTime()-new Date(Ot.updatedAt).getTime()),yt.size>0&&l("load",Gt),Le}async function Re(de){if(e.sessionsLoadingMoreByWorkspace[de]||e.sessionsHasMoreByWorkspace[de]===!1)return;const Me=e.sessionsCursorByWorkspace[de];if(Me!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[de]:!0};try{const Le=await xt().listSessions({workspaceId:de,pageSize:ce,beforeId:Me,excludeEmpty:!0}),je=new Set(e.sessions.map(yt=>yt.id)),at=Le.items.filter(yt=>!je.has(yt.id));at.length>0&&c([...e.sessions,...at]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[de]:Le.items.length>0?Le.items.at(-1).id:Me},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[de]:Le.hasMore}}catch(Le){l("loadMoreSessions",Le)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[de]:!1}}}}async function lt(){if(e.sessionsFullyLoaded)return;const de=await fe().catch(je=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",je),null));if(de===null)return;const Me=de.error===void 0?de.sessions:we(de.sessions);if(ue(Me),e.sessionsFullyLoaded=de.error===void 0,de.error!==void 0)return;const Le={};for(const je of e.workspaces)Le[je.id]=!1;e.sessionsHasMoreByWorkspace=Le}async function ct(){const de=await xt().getMeta().catch(()=>null);de!==null&&(e.serverVersion=de.serverVersion,e.availableOpenInApps=de.openInApps,e.dangerousBypassAuth=de.dangerousBypassAuth,e.backend=de.backend)}async function Ct(){const de=Date.now();let Me="accepted";qo("app:load:start"),e.loading=!0;const Le=!G.value;let je=!0;try{if(Le&&await ke()==="server-auth-required"){je=!1,Me="auth-required";return}const at=xt();await Promise.all([at.getHealth().catch(()=>null),ct(),r.loadModels()]),Le||await Y(),await Se(),await Mt();const yt=await _e(),Gt=yt??e.sessions;yt!==void 0&&ue(yt);const nn=Gt[0],Zn=e.activeWorkspaceId;!(Zn!==null&&L.value.some(Ho=>Ho.id===Zn))&&nn&&Vt(M(nn)),Wo();const An=typeof window<"u"?s8(window.location):void 0;!e.activeSessionId&&An!==void 0&&(e.sessions.some(Ot=>Ot.id===An)||await Dn(An))&&await ho(An,{urlMode:"replace"}),!e.activeSessionId&&Gt.length>0&&await ho(Gt[0].id,{urlMode:"replace"})}catch(at){Me="failed",l("load",at)}finally{e.loading=!1,je&&(G.value=!0),qo("app:load:complete",{status:Me,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-de})}}async function Mt(){try{const de=xt(),[Me,Le]=await Promise.all([de.listWorkspaces().catch(()=>[]),de.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=Bt(Me),e.fsHome=Le.home||null,e.recentRoots=Le.recentRoots}catch{}}function Bt(de){const Me=am();return Object.keys(Me).length===0?de:de.map(Le=>{const je=Me[Le.root];return je!==void 0?{...Le,name:je}:Le})}function Vt(de){e.activeWorkspaceId=de,j(de)}function Je(de){Vt(de);const Me=e.sessions.filter(Le=>M(Le)===de);if(Me.length>0){const Le=Me[0];Le&&Le.id!==e.activeSessionId&&ho(Le.id)}else m(void 0),Kt(void 0,"push")}function tt(de){const Me=am()[de.root],Le=Me!==void 0?{...de,name:Me}:de,je=xr(Le.root);e.hiddenWorkspaceRoots.some(Gt=>xr(Gt)===je)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(Gt=>xr(Gt)!==je),le(e.hiddenWorkspaceRoots));const at=e.workspaces.findIndex(Gt=>Gt.id===Le.id||Gt.root===Le.root);if(at===-1){e.workspaces=[Le,...e.workspaces];return}const yt=[...e.workspaces];yt[at]=Le,e.workspaces=yt}function dt(de){if(de.type==="workspaceCreated"||de.type==="workspaceUpdated"){tt(de.workspace);return}const Me=e.workspaces.find(je=>je.id===de.workspaceId)?.root??de.root;if(Me&&!e.hiddenWorkspaceRoots.includes(Me)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Me],le(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(je=>je.id!==de.workspaceId&&je.root!==Me),e.activeWorkspaceId===de.workspaceId||e.activeWorkspaceId===Me){const je=P.value[0]?.id??null;if(e.activeWorkspaceId=je,je)j(je);else try{Hu(ln.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,oe(),Kt(void 0,"replace")}}function Rt(){m(void 0),Kt(void 0,"push")}function Fe(de){Vt(de),Rt(),oe()}async function Ye(de){const Me=L.value.find(An=>An.id===de);if(!Me)return null;const Le=e.thinking,je=xt();let at,yt=Me.root;try{const An=await je.addWorkspace({root:Me.root});at=An.id,yt=An.root,tt(An)}catch{}const Gt=r.draftModel.value??void 0,nn=await je.createSession({workspaceId:at,cwd:yt,model:Gt});r.draftModel.value=null;const Zn=Gt!==void 0&&(!nn.model||nn.model.length===0)?{...nn,model:Gt}:nn;f(Zn),Vt(nn.workspaceId??at??de),await ho(nn.id);const gn=nn.id;return Le!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[gn]:Le}),F.planMode&&(e.planModeBySession={...e.planModeBySession,[gn]:!0},z()),F.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[gn]:!0},B()),F.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[gn]:!0},A()),F.planMode=!1,F.dynamicWorkflowMode=!1,F.goalMode=!1,gn}async function it(de,Me,Le){if(!Hr.has(de)){Hr.add(de);try{const je=await Ye(de);if(!je)return;await Bn(je,Me,Le)}catch(je){l("startSessionAndSendPrompt",je)}finally{Hr.delete(de)}}}async function rt(de,Me,Le){if(!Hr.has(de)){Hr.add(de);try{const je=await Ye(de);if(!je)return;const at=e.planModeBySession[je]??!1,yt=e.dynamicWorkflowModeBySession[je]??!1,Gt=e.sessions.find(gn=>gn.id===je),nn=(Gt?.model&&Gt.model.length>0?Gt.model:e.defaultModel)??void 0;if(!await $({model:nn,planMode:at,dynamicWorkflowMode:yt,permissionMode:e.permission},je))return;await r.activateSkill(Me,Le,je)}catch(je){l("startSessionAndActivateSkill",je)}finally{Hr.delete(de)}}}async function gt(de,Me){if(!Hr.has(de)){Hr.add(de);try{const Le=await Ye(de);if(!Le)return;await i.openSideChatOn(Le,Me)}catch(Le){l("startSessionAndOpenSideChat",Le)}finally{Hr.delete(de)}}}async function Tt(de){const Me=de.trim();if(!Me)return!1;const Le=xt();try{const je=await Le.addWorkspace({root:Me});return tt(je),Fe(je.id),!0}catch(je){return console.warn("[pythinker-web] addWorkspaceByPath failed for",Me,je),!1}}async function tn(de){try{return await xt().browseFs(de)}catch{return{path:"",parent:null,entries:[]}}}async function fn(){try{return await xt().getFsHome()}catch{return{home:"",recentRoots:[]}}}function Kt(de,Me){if(Me==="none"||typeof window>"u"||!window.history)return;const Le=rCe(de);if(window.location.pathname!==Le)try{Me==="push"?window.history.pushState(null,"",Le):window.history.replaceState(null,"",Le)}catch{}}async function Dn(de){try{const Me=await xt().getSession(de);return e.sessions.some(Le=>Le.id===Me.id)||p(Me),!0}catch{return!1}}function Yt(){const de=s8(window.location);if(de===void 0){m(void 0);return}if(de!==e.activeSessionId){if(e.sessions.some(Me=>Me.id===de)){ho(de,{urlMode:"none"});return}(async()=>{if(await Dn(de)){await ho(de,{urlMode:"none"});return}const Me=e.sessions[0];Me?await ho(Me.id,{urlMode:"replace"}):(m(void 0),Kt(void 0,"replace"))})()}}let Eo=!1;function Wo(){Eo||typeof window>"u"||(Eo=!0,window.addEventListener("popstate",Yt))}async function ho(de,Me){const Le=S(de),je=!Le&&u.has(de);u.delete(de);try{Kt(de,Me?.urlMode??"push"),e.sessionLoading=!Le&&!je,m(de),X(),e.unreadBySession[de]&&(e.unreadBySession={...e.unreadBySession,[de]:!1},W({[de]:!1})),oe();const at=e.sessions.find(yt=>yt.id===de);if(at){const yt=M(at);e.activeWorkspaceId!==yt&&Vt(yt)}if(Le){if(await b(de)==="not-found")return}else if(await y(de)==="not-found")return;me(de)}catch(at){l("selectSession",at,{sessionId:de})}finally{e.activeSessionId===de&&(e.sessionLoading=!1)}}async function Bn(de,Me,Le){const je=m2(de);e.inFlightBySession={...e.inFlightBySession,[de]:!0};const at=w();try{const yt=xt(),Gt=[];Me&&Gt.push({type:"text",text:Me});for(const pn of Le??[])pn.kind==="video"?Gt.push({type:"video",source:{kind:"file",fileId:pn.fileId}}):pn.kind==="file"?Gt.push({type:"file",fileId:pn.fileId,name:pn.name??"",mediaType:pn.mediaType||"application/octet-stream",size:pn.size??0}):Gt.push({type:"image",source:{kind:"file",fileId:pn.fileId}});if(Gt.length===0)return e.inFlightBySession={...e.inFlightBySession,[de]:!1},"rejected";const nn={id:at,sessionId:de,role:"user",content:Gt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(de,pn=>[...pn,nn]);const Zn=e.sessions.find(pn=>pn.id===de),gn=(Zn?.model&&Zn.model.length>0?Zn.model:e.defaultModel)??void 0,An=e.planModeBySession[de]??!1,Ho=e.dynamicWorkflowModeBySession[de]??!1,Ot=e.goalModeBySession[de]??!1;if(Ot&&Me)try{await yt.updateSession(de,{goalObjective:Me.trim()})}catch(pn){return l("createGoal",pn,{sessionId:de}),e.inFlightBySession={...e.inFlightBySession,[de]:!1},k(de,Yn=>Yn.some(Jn=>Jn.id===at)?Yn.filter(Jn=>Jn.id!==at):Yn),"rejected"}const Zt=await yt.submitPrompt(de,{content:Gt,model:gn,thinking:await r.resolveThinkingForPrompt(de,gn)??e.thinking,permissionMode:e.permission,planMode:An,dynamicWorkflowMode:Ho});return Ot&&(e.goalModeBySession={...e.goalModeBySession,[de]:!1},A()),e.promptIdBySession={...e.promptIdBySession,[de]:Zt.promptId},k(de,pn=>{const Yn=pn.findIndex(is=>is.id===at);if(Yn===-1)return pn;const Jn=[...pn];return Jn[Yn]={...Jn[Yn],promptId:Jn[Yn].promptId??Zt.promptId},Jn}),v()?.bindNextPromptId(de,Zt.promptId),"ok"}catch(yt){return e.inFlightBySession={...e.inFlightBySession,[de]:!1},k(de,Gt=>Gt.some(nn=>nn.id===at)?Gt.filter(nn=>nn.id!==at):Gt),l("sendPrompt",yt,{sessionId:de}),tr(yt)?"rejected":"uncertain"}finally{g2(de,je)}}async function bs(de,Me){const Le=e.activeSessionId;if(Le){if(a.value!=="idle"||e.inFlightBySession[Le]){kt(de,Me);return}if((e.queuedBySession[Le]?.length??0)>0){kt(de,Me),Nt(Le);return}await Bn(Le,de,Me)}}async function nt(de,Me){const Le=e.activeSessionId;if(!Le)return;const je=e.queuedBySession[Le]??[],at=[],yt=[];for(const Zt of je){const pn=Zt.text.trim();pn&&at.push(pn),Zt.attachments?.length&&yt.push(...Zt.attachments)}const Gt=de.trim();if(Gt&&at.push(Gt),Me?.length&&yt.push(...Me),at.length===0&&yt.length===0)return;je.length>0&&(e.queuedBySession={...e.queuedBySession,[Le]:[]});const nn=at.join(` - -`),Zn=()=>{if(je.length===0)return;const Zt=e.queuedBySession[Le]??[];e.queuedBySession={...e.queuedBySession,[Le]:[...je,...Zt]}};if(a.value==="idle"&&!e.inFlightBySession[Le]){await Bn(Le,nn,yt)==="rejected"&&Zn();return}const gn=[];nn&&gn.push({type:"text",text:nn});for(const Zt of yt)Zt.kind==="video"?gn.push({type:"video",source:{kind:"file",fileId:Zt.fileId}}):Zt.kind==="file"?gn.push({type:"file",fileId:Zt.fileId,name:Zt.name??"",mediaType:Zt.mediaType||"application/octet-stream",size:Zt.size??0}):gn.push({type:"image",source:{kind:"file",fileId:Zt.fileId}});const An=w(),Ho={id:An,sessionId:Le,role:"user",content:gn,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(Le,Zt=>[...Zt,Ho]);const Ot=m2(Le);try{const Zt=xt(),pn=e.sessions.find(is=>is.id===Le),Yn=(pn?.model&&pn.model.length>0?pn.model:e.defaultModel)??void 0,Jn=await Zt.submitPrompt(Le,{content:gn,model:Yn,thinking:await r.resolveThinkingForPrompt(Le,Yn)??e.thinking,permissionMode:e.permission,planMode:e.planModeBySession[Le]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[Le]??!1});if(k(Le,is=>{const Ro=is.findIndex(Lr=>Lr.id===An);if(Ro===-1)return is;const Vs=[...is];return Vs[Ro]={...Vs[Ro],promptId:Vs[Ro].promptId??Jn.promptId},Vs}),Jn.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[Le]:Jn.promptId},v()?.bindNextPromptId(Le,Jn.promptId);return}try{await Zt.steerPrompts(Le,[Jn.promptId])}catch{}}catch(Zt){k(Le,pn=>pn.filter(Yn=>Yn.id!==An)),tr(Zt)&&Zn(),l("steer",Zt,{sessionId:Le})}finally{g2(Le,Ot)}}async function Ae(de,Me){try{const je=await xt().uploadFile({file:de,name:Me});return{fileId:je.id,name:je.name,mediaType:je.mediaType}}catch(Le){return l("uploadImage",Le),null}}function kt(de,Me){const Le=e.activeSessionId;if(!Le)return;const je=e.queuedBySession[Le]??[],at={text:de,attachments:Me,id:gCe()};e.queuedBySession={...e.queuedBySession,[Le]:[...je,at]}}function Nt(de){const[Me,...Le]=e.queuedBySession[de]??[];Me!==void 0&&(e.queuedBySession={...e.queuedBySession,[de]:Le},Bn(de,Me.text,Me.attachments).then(je=>{if(je==="ok"){vu.delete(de);return}if(je==="uncertain"){vu.delete(de);return}if(!e.sessions.some(Zn=>Zn.id===de)){vu.delete(de);return}const at=Me.id??Me.text,yt=vu.get(de),Gt=yt!==void 0&&yt.key===at?yt.count+1:1;if(Gt>=mCe){vu.delete(de),(e.queuedBySession[de]?.length??0)>0&&Nt(de);return}vu.set(de,{key:at,count:Gt});const nn=e.queuedBySession[de]??[];e.queuedBySession={...e.queuedBySession,[de]:[Me,...nn]}}))}function Xt(de,Me){const Le=e.inFlightBySession[de]===!0;if(e.inFlightBySession={...e.inFlightBySession,[de]:!1},e.promptIdBySession[de]!==void 0){const at={...e.promptIdBySession};delete at[de],e.promptIdBySession=at}return de===e.activeSessionId&&X(),(Le||Me?.turnWasActive===!0||(e.turnActiveBySession[de]??!1))&&Nt(de),Le}function ko(de,Me){Me.inFlightTurn!==null&&Me.busy||Xt(de)}async function Gn(){const de=e.activeSessionId;if(!de)return;const Me=e.sessions.find(at=>at.id===de);let Le=e.promptIdBySession[de];if(Le===void 0){const at=Me?.currentPromptId;at!==void 0&&at.length>0&&!at.startsWith("pr_")&&(Le=at)}const je=xt();if(Le!==void 0)try{if((await je.abortPrompt(de,Le)).aborted)return;const yt={...e.promptIdBySession};delete yt[de],e.promptIdBySession=yt}catch(at){if(tr(at)&&at.code===aCe){const yt={...e.promptIdBySession};delete yt[de],e.promptIdBySession=yt}else{l("abortCurrentPrompt",at,{sessionId:de});return}}try{await je.abortSession(de)}catch(at){l("abortCurrentPrompt",at,{sessionId:de})}}function qn(de,Me){const Le=e.approvalsBySession[de]??[];e.approvalsBySession={...e.approvalsBySession,[de]:Le.filter(je=>je.approvalId!==Me)}}function oo(de,Me){const Le=e.questionsBySession[de]??[];e.questionsBySession={...e.questionsBySession,[de]:Le.filter(je=>je.questionId!==Me)}}async function lo(de,Me){const Le=e.activeSessionId;if(Le&&!jm[de]){jm[de]=!0;try{const je=xt(),at={decision:Me.decision,scope:Me.scope,feedback:Me.feedback,selectedLabel:Me.selectedLabel};await je.respondApproval(Le,de,at),qn(Le,de)}catch(je){Ak(je)?qn(Le,de):l("respondApproval",je,{sessionId:Le})}finally{delete jm[de]}}}async function fs(de,Me){const Le=e.activeSessionId;if(Le&&!hu[de]){hu[de]="answer";try{await xt().respondQuestion(Le,de,Me),oo(Le,de)}catch(je){Ak(je)?oo(Le,de):l("respondQuestion",je,{sessionId:Le})}finally{delete hu[de]}}}async function Ei(de){const Me=e.activeSessionId;if(Me&&!hu[de]){hu[de]="dismiss";try{await xt().dismissQuestion(Me,de),oo(Me,de)}catch(Le){Ak(Le)?oo(Me,de):l("dismissQuestion",Le,{sessionId:Me})}finally{delete hu[de]}}}async function Ns(de){const Me=e.activeSessionId;if(Me&&!Mk[de]){Mk[de]=!0;try{const Le=xt(),je=(e.tasksBySession[Me]??[]).find(yt=>yt.id===de)?.backgroundTaskId;await Le.cancelTask(Me,je??de);const at=e.tasksBySession[Me]??[];e.tasksBySession={...e.tasksBySession,[Me]:at.map(yt=>yt.id===de?{...yt,status:"cancelled"}:yt)}}catch(Le){pCe(Le)||l("cancelTask",Le,{sessionId:Me})}finally{delete Mk[de]}}}function Ls(de){const Me=e.activeSessionId;Me?(e.planModeBySession={...e.planModeBySession,[Me]:de},z(),$({planMode:de})):F.planMode=de}function js(){const de=e.activeSessionId,Me=de?e.planModeBySession[de]??!1:F.planMode;Ls(!Me)}function ii(de){const Me=e.activeSessionId;Me?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[Me]:de},B(),$({dynamicWorkflowMode:de})):F.dynamicWorkflowMode=de}async function ps(){const de=e.activeSessionId,Le=!(de?e.dynamicWorkflowModeBySession[de]??!1:F.dynamicWorkflowMode);Le&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||ii(Le)}function cr(de){const Me=e.activeSessionId;Me?(e.goalModeBySession={...e.goalModeBySession,[Me]:de},A()):F.goalMode=de}function Vi(){const de=e.activeSessionId,Me=de?e.goalModeBySession[de]??!1:F.goalMode;cr(!Me)}async function wn(de){const Me=de.trim();if(!Me||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:Me}),variant:"primary"}))return;let Le=e.activeSessionId;if(!Le){const je=e.activeWorkspaceId,at=je&&P.value.some(yt=>yt.id===je)?je:P.value[0]?.id??null;if(!at)return;try{Le=await Ye(at)??void 0}catch(yt){l("createGoal",yt);return}if(!Le)return}try{await xt().updateSession(Le,{goalObjective:Me})}catch(je){l("createGoal",je,{sessionId:Le,message:J(je)});return}e.goalModeBySession[Le]&&(e.goalModeBySession={...e.goalModeBySession,[Le]:!1},A()),e.activeSessionId===Le?await bs(Me):await Bn(Le,Me)}function Us(de){const Me=e.activeSessionId;Me&&Promise.resolve(xt().updateSession(Me,{goalControl:de})).catch(Le=>{l("controlGoal",Le,{sessionId:Me,message:J(Le)})})}function zn(de){e.permission=de,D(de),$({permissionMode:de})}function ri(de){const Me=[...e.warnings];Me.splice(de,1),e.warnings=Me}async function Fs(de,Me){try{await xt().updateSession(de,{title:Me}),d(de,je=>({...je,title:Me}))}catch(Le){l("renameSession",Le,{sessionId:de})}}async function Ti(de){try{const Le=await xt().generateSessionTitle(de,{force:!0,source:"digest"});return Le.title.length>0?Le.title:null}catch(Me){return console.warn("[pythinker-web] generateSessionTitle failed for",de,Me),null}}async function ts(de,Me){const Le=e.workspaces.find(at=>at.id===de)?.root,je=()=>{e.workspaces=e.workspaces.map(at=>at.id===de?{...at,name:Me}:at)};try{if(await xt().updateWorkspace(de,{name:Me}),Le!==void 0){const at=am();Le in at&&(delete at[Le],t4(at))}je()}catch(at){if(Le!==void 0&&tr(at)&&at.code===uCe){t4({...am(),[Le]:Me}),je();return}l("renameWorkspace",at)}}async function To(de){const Me=e.workspaces.find(yt=>yt.id===de)?.root??L.value.find(yt=>yt.id===de)?.root??de,Le=e.activeSessionId?e.sessions.find(yt=>yt.id===e.activeSessionId):void 0,je=e.activeWorkspaceId===de||e.activeWorkspaceId===Me,at=!!(Le&&(Le.cwd===Me||Le.workspaceId===de||M(Le)===de));Me&&!e.hiddenWorkspaceRoots.includes(Me)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Me],le(e.hiddenWorkspaceRoots));try{await xt().deleteWorkspace(de)}catch(yt){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",de,yt)}if(e.workspaces=e.workspaces.filter(yt=>yt.id!==de&&yt.root!==Me),je||at){const yt=P.value[0]?.id??null;if(e.activeWorkspaceId=yt,yt)j(yt);else try{Hu(ln.activeWorkspace)}catch{}}(je||at)&&(m(void 0),e.sessionLoading=!1,oe(),Kt(void 0,"replace"))}async function ns(de){try{await xt().archiveSession(de),h(de),i.clearSideChatForSession(de);const{[de]:Le,...je}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=je,e.activeSessionId===de){const at=e.sessions[0];at?await ho(at.id,{urlMode:"replace"}):(m(void 0),Kt(void 0,"replace"))}}catch(Me){l("archiveSession",Me,{sessionId:de})}}async function Oo(de){if(Ce)return!1;const Me=de??e.activeSessionId;if(!Me){const je=n("commands.export.noSession");return qo("export:failed",{status:"no-session"}),l("exportSession",new Error(je),{message:je}),!1}Ce=!0;const Le=Date.now();qo("export:start",{sessionId:Me});try{const je=Zye(),{blob:at,fileName:yt}=await xt().exportSession(Me,je);if(typeof document>"u")throw new Error("Document is unavailable");const Gt=URL.createObjectURL(at);let nn;try{nn=document.createElement("a"),nn.href=Gt,nn.download=yt,document.body.append(nn),nn.click()}finally{nn?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(Gt)}catch{}},0)}return qo("export:accepted",{sessionId:Me,status:"accepted",zipBytes:at.size,durationMs:Date.now()-Le}),!0}catch(je){const at=typeof je=="object"&&je!==null?je:void 0;return qo("export:failed",{sessionId:Me,status:"failed",durationMs:Date.now()-Le,errorName:typeof at?.name=="string"?at.name:typeof je,errorCode:typeof at?.code=="number"?at.code:void 0,requestId:typeof at?.requestId=="string"?at.requestId:void 0,phase:typeof at?.phase=="string"?at.phase:void 0,httpStatus:typeof at?.status=="number"?at.status:void 0}),l("exportSession",je,{sessionId:Me}),!1}finally{Ce=!1}}async function sn(de){try{const Me=await xt().restoreSession(de);return f(Me),!0}catch(Me){return l("restoreSession",Me,{sessionId:de}),!1}}function li(de){return xt().listSessions({archivedOnly:!0,beforeId:de?.beforeId,pageSize:de?.pageSize??50})}async function os(){try{await xt().logout(),await Y(),await Ct()}catch(de){l("logout",de)}}function bo(de){const Me=e.activeSessionId;Me&&xt().compactSession(Me,de).catch(Le=>{l("compact",Le,{sessionId:Me})})}async function ai(de){const Me=de??e.activeSessionId;if(Me)try{const Le=await xt().forkSession(Me);f(Le),await ho(Le.id)}catch(Le){l("fork",Le,{sessionId:Me})}}async function ui(de=1){const Me=e.activeSessionId;if(!Me)return null;const Le=(()=>{const je=e.messagesBySession[Me]??[];for(let at=je.length-1;at>=0;at--){const yt=je[at];if(yt.role==="user"&&!(yt.metadata?.origin&&yt.metadata.origin.kind!=="user"))return yt.content.filter(Gt=>Gt.type==="text").map(Gt=>Gt.text).join(` -`)}return null})();try{return await xt().undoSession(Me,de),await y(Me),Le}catch(je){return l("undo",je,{sessionId:Me}),null}}function ss(de){const Me=e.activeSessionId;if(!Me)return;const Le=e.queuedBySession[Me]??[];if(de<0||de>=Le.length)return;const je=[...Le];je.splice(de,1),e.queuedBySession={...e.queuedBySession,[Me]:je}}function In(de,Me){const Le=e.activeSessionId;if(!Le)return;const je=e.queuedBySession[Le]??[];if(de===Me||de<0||de>=je.length||Me<0||Me>=je.length)return;const at=[...je],[yt]=at.splice(de,1);yt!==void 0&&(at.splice(Me,0,yt),e.queuedBySession={...e.queuedBySession,[Le]:at})}async function wo(de){const Me=e.activeSessionId;if(!Me)return[];try{return(await xt().listDirectory(Me,{path:de,includeGitStatus:!0})).items}catch{return[]}}async function Nr(de){const Me=e.activeSessionId;if(!Me)return null;try{const je=await xt().readFile(Me,{path:de});return{path:je.path,content:je.content,encoding:je.encoding,mime:je.mime,languageId:je.languageId,isBinary:je.isBinary,size:je.size,lineCount:je.lineCount}}catch(Le){return console.warn("[pythinker-web] readFileContent failed for",de,Le),null}}const Te=10485760;function Ne(de){const Me=e.activeSessionId;return Me?xt().getFileDownloadUrl(Me,de):null}async function Ue(de,Me){const Le=e.activeSessionId;if(!Le)return!1;try{return await xt().openFile(Le,{path:de,line:Me}),!0}catch(je){return l("openFile",je,{sessionId:Le}),!1}}async function rn(de){const Me=e.activeSessionId;if(!Me)return;const Le=R.value.cwd||".";try{await xt().openInApp(Me,de,Le)}catch(je){l("openInApp",je,{sessionId:Me})}}async function cn(de){const Me=e.activeSessionId;if(!Me)return!1;try{return await xt().revealFile(Me,{path:de}),!0}catch(Le){return l("revealFile",Le,{sessionId:Me}),!1}}async function Sn(de){if(/^(https?:|data:|blob:)/i.test(de))return de;const Me=e.activeSessionId;if(!Me)return de;let Le=de;if(Le.startsWith("/")){const je=e.sessions.find(at=>at.id===Me)?.cwd;if(je&&(Le===je||Le.startsWith(je.endsWith("/")?je:`${je}/`))){if(Le=Le.slice(je.length).replace(/^\//,""),!Le)return de}else return de}try{const at=await xt().readFile(Me,{path:Le,length:Te});return!at.isBinary||at.encoding!=="base64"||at.truncated?de:`data:${at.mime};base64,${at.content}`}catch{return de}}async function Cn(de){const Me=e.sessions.find(je=>je.id===e.activeSessionId),Le=Me===void 0?e.activeWorkspaceId:M(Me);if(!Le)return[];try{return(await xt().searchFiles(Le,{query:de,limit:20})).items.map(yt=>({path:yt.path,name:yt.name}))}catch{return[]}}return{loadFileDiff:te,clearFileDiff:oe,loadGitStatus:H,checkAuth:Y,loadConfig:Se,updateConfig:ye,listAllSessionsGlobal:fe,load:Ct,refreshServerMeta:ct,loadWorkspaces:Mt,loadMoreSessions:Re,loadAllSessions:lt,selectWorkspace:Vt,openWorkspace:Je,upsertWorkspacePreserveOrder:tt,applyWorkspaceEvent:dt,clearActiveSession:Rt,openWorkspaceDraft:Fe,startSessionAndSendPrompt:it,startSessionAndActivateSkill:rt,startSessionAndOpenSideChat:gt,addWorkspaceByPath:Tt,browseFs:tn,getFsHome:fn,writeSessionUrl:Kt,fetchSessionIntoList:Dn,onSessionRoutePopState:Yt,bindSessionRoute:Wo,selectSession:ho,submitPromptInternal:Bn,finishPromptLocal:Xt,localTurnStartState:vCe,isLocalTurnSnapshotCurrent:kCe,afterLocalTurnStartsSettle:bCe,handleSessionSnapshot:ko,sendPrompt:bs,steerPrompt:nt,uploadImage:Ae,enqueue:kt,unqueue:ss,reorderQueue:In,abortCurrentPrompt:Gn,respondApproval:lo,respondQuestion:fs,dismissQuestion:Ei,pendingQuestionActions:hu,pendingApprovalActions:jm,cancelTask:Ns,setPlanMode:Ls,togglePlanMode:js,setDynamicWorkflowMode:ii,toggleDynamicWorkflowMode:ps,setGoalMode:cr,toggleGoalMode:Vi,createGoal:wn,controlGoal:Us,setPermission:zn,dismissWarning:ri,renameSession:Fs,generateSessionTitle:Ti,renameWorkspace:ts,deleteWorkspace:To,archiveSession:ns,exportSession:Oo,restoreSession:sn,loadArchivedSessions:li,logout:os,compact:bo,forkSession:ai,undo:ui,listDir:wo,readFileContent:Nr,getFileDownloadUrl:Ne,openWorkspaceFile:Ue,openInApp:rn,revealWorkspaceFile:cn,resolveImageUrl:Sn,searchFiles:Cn,loadOlderMessages:ze,refreshSessionSidecars:me,isStartingFirstPrompt:()=>Hr.size>0}}const KN=ln.starredModels,r8=new Error("profile persist failed");function xCe(){try{const e=zo(KN);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function _Ce(e){try{Qo(KN,JSON.stringify(e))}catch{}}function SCe(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:r,updateSessionMessages:l}=t,a=q([]),u=q(xCe()),c=q({}),d=q({}),f=q([]),p=q([]),h=q(null);function m(G){if(!(G==null||G.length===0))return a.value.find(Q=>Q.id===G)??a.value.find(Q=>Q.model===G)}function k(){const G=e.activeSessionId?e.sessions.find(ee=>ee.id===e.activeSessionId):void 0,Q=G===void 0?h.value??e.defaultModel:G.model||e.defaultModel;return m(Q)?.id??Q??void 0}function w(G){if(G===void 0)return;const Q=m(G);return Q===void 0?void 0:Zp(Q)}function v(G,Q){const ee=G==null?void 0:e.thinkingBySession[G];return ee!==void 0&&E_e(Q,ee)?ee:Zp(Q)}function y(G,Q){if(Q===void 0)return;const ee=m(Q);return ee===void 0?void 0:v(G,ee)}async function b(G,Q){return G!=null&&e.thinkingBySession[G]===void 0&&await o(G),y(G,Q)}function S(G){e.thinking=G;const Q=e.activeSessionId;return G!==void 0&&Q!==null&&Q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Q]:G}),G}Ze([()=>e.activeSessionId,()=>k(),()=>{const G=e.activeSessionId;return G==null?void 0:e.thinkingBySession[G]}],()=>{const G=m(k());G!==void 0&&(e.thinking=v(e.activeSessionId,G))});function I(G){xt().setConfig({thinking:T_e(G,m(k())?.supportEfforts)}).catch(Q=>n("setConfig",Q))}async function T(G){try{const ee=await xt().listSkills(G);c.value={...c.value,[G]:ee}}catch{}}async function $(G){try{const ee=await xt().listSkillsForWorkspace(G);d.value={...d.value,[G]:ee}}catch{}}async function L(){try{const G=xt();a.value=await G.listModels();const Q=m(k());Q!==void 0&&(e.thinking=v(e.activeSessionId,Q))}catch(G){n("loadModels",G)}}async function P(){try{const G=xt();f.value=await G.listProviders()}catch(G){n("loadProviders",G)}}async function R(){try{const G=xt();p.value=await G.listCatalogProviders()}catch(G){n("loadCatalogProviders",G)}}async function M(G){const Q=e.activeSessionId,ee=m(G),K=e.thinking,ge=Q?e.sessions.find(me=>me.id===Q)?.model:void 0,Ce=k()!==(ee?.id??G),ze=I_e(ee,K,Ce);if(!Q)return h.value=G,e.thinking=ze,ze!==K&&ze!==void 0&&I(ze),!0;r(Q,me=>({...me,model:G})),ze!==K&&(e.thinking=ze,ze!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Q]:ze}));try{await xt().updateSession(Q,{model:G,thinking:ze!==K?ze:void 0})}catch(me){return r(Q,te=>({...te,model:ge??te.model})),ze!==K&&(e.thinking=K,K!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Q]:K})),n("setModel",me,{sessionId:Q}),!1}return ze!==K&&ze!==void 0&&I(ze),await o(Q),!0}function D(G){const Q=new Set(u.value);Q.has(G)?Q.delete(G):Q.add(G),u.value=Array.from(Q),_Ce(u.value)}async function z(G,Q,ee){const K=ee??e.activeSessionId;if(!K)return;const ge=i.value==="idle"&&!e.inFlightBySession[K],Ce=`msg_skill_opt_${Date.now().toString(36)}`,ze=ge?m2(K):void 0;if(ge){e.inFlightBySession={...e.inFlightBySession,[K]:!0};const me={id:Ce,sessionId:K,role:"user",content:[{type:"text",text:`/${G}${Q?` ${Q}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:G,skillArgs:Q}}};l(K,te=>[...te,me])}try{const me=e.sessions.find(H=>H.id===K)?.model,te=(me&&me.length>0?me:e.defaultModel)??void 0;if(!await s({thinking:await b(K,te)??e.thinking},K))throw r8;await xt().activateSkill(K,G,Q)}catch(me){ge&&(e.inFlightBySession={...e.inFlightBySession,[K]:!1},l(K,te=>te.filter(oe=>oe.id!==Ce))),me!==r8&&n("activateSkill",me,{sessionId:K})}finally{ze!==void 0&&g2(K,ze)}}async function B(G){try{await xt().importCatalogProvider(G),await Promise.all([P(),L()])}catch(Q){n("importCatalogProvider",Q)}}async function A(G){try{await xt().deleteProvider(G),await Promise.all([P(),L()])}catch(Q){n("deleteProvider",Q)}}async function F(G){try{const Q=await xt().refreshProvider(G);for(const ee of Q.failed)n("refreshProvider",new Error(ee.reason),{message:ee.provider});await Promise.all([P(),L()])}catch(Q){n("refreshProvider",Q)}}async function W(){try{const G=await xt().refreshAllProviders();for(const Q of G.failed)n("refreshAllProviders",new Error(Q.reason),{message:Q.provider});await Promise.all([P(),L()])}catch(G){n("refreshAllProviders",G)}}async function j(){try{return await xt().startOAuthLogin()}catch{return null}}async function le(){try{return await xt().pollOAuthLogin()}catch(G){return console.warn("[pythinker-web] pollOAuthLogin failed",G),null}}async function J(){try{await xt().cancelOAuthLogin()}catch{}}function X(G){const Q=S(G);s({thinking:Q}),Q!==void 0&&I(Q)}return{models:a,starredModelIds:u,providers:f,catalogProviders:p,draftModel:h,skillsBySession:c,skillsByWorkspace:d,loadSkillsForSession:T,loadSkillsForWorkspace:$,loadModels:L,loadProviders:P,loadCatalogProviders:R,setModel:M,thinkingLevelForModelId:w,thinkingLevelForSessionId:y,resolveThinkingForPrompt:b,toggleStarModel:D,activateSkill:z,importCatalogProvider:B,addProvider:G=>B({catalogId:G.type,apiKey:G.apiKey,baseUrl:G.baseUrl}),deleteProvider:A,refreshProvider:F,refreshAllProviders:W,startOAuthLogin:j,pollOAuthLogin:le,cancelOAuthLogin:J,setThinking:X}}const GN="pythinkerWeb.compaction",CCe=/^read[_-]?media(?:file)?$/i,ACe=/^data:([^;]+);base64,(.*)$/s,MCe=/^<(image|video|audio)\s+path="([^"]+)">$/,ECe=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,TCe=/Mime type:\s*([^.\s]+)/i,ICe=/Size:\s*(\d+)\s*bytes/i,$Ce=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,NCe="Image compressed to fit model limits:",LCe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function FCe(e){return e.includes(NCe)?e.replace(LCe,""):e}function OCe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function RCe(e){const t=ECe.exec(e.trim());return t?{kind:t[1],path:OCe(t[2])}:null}const ZN=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,PCe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function DCe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return ZN.test(o)?o:void 0}const BCe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function zCe(e){const t=BCe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=PCe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&ZN.test(o)?o:void 0}}function WCe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function HCe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function jCe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function UCe(e,t){if(!CCe.test(e))return;const n=HCe(t);if(n===null)return;let o,s,i,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=MCe.exec(p);h&&(s=h[1],o=h[2]);const m=TCe.exec(p);m?.[1]&&(i=m[1]);const k=ICe.exec(p);k?.[1]&&(r=Number(k[1]));const w=$Ce.exec(p);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=jCe(d);f&&(a=f)}if(a===null)return;const u=ACe.exec(a.url);return u?.[1]&&(i=u[1]),u?.[2]&&(r=WCe(u[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function VCe(e){if(e!=null){if(typeof e=="string")return e.split(` -`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` -`));else if(n&&typeof n=="object"){const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` -`)):o.type==="think"&&typeof o.think=="string"?t.push(...o.think.split(` -`)):o.type==="image_url"||o.type==="image"?t.push("[image]"):typeof o.type=="string"?t.push(`[${o.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function qCe(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.subagentPhase??(e.status==="completed"?"completed":e.status==="failed"?"failed":"working"),status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,dynamicWorkflowIndex:e.dynamicWorkflowIndex}}function KCe(e,t){const n=e.split(` -`),o=t.split(` -`),s=[];return n.forEach((i,r)=>{s.push({kind:"rem",gutter:String(r+1),text:`- ${i}`})}),o.forEach((i,r)=>{s.push({kind:"add",gutter:String(r+1),text:`+ ${i}`})}),s}function GCe(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:KCe(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const r=i??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:o,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function ZCe(e){const t=` -`,n=` -`,o=e.indexOf(t),s=e.lastIndexOf(n);return o>=0&&s>=o+t.length?e.slice(o+t.length,s):YCe(e)}function YCe(e){const t=e.split(` -`);return t.length>=2&&t[0]?.startsWith(""?t.slice(1,-1).join(` -`):e}function JCe(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function XCe(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` -`);return ZCe(t)}function QCe(e,t){const n=e.metadata?.origin??{},o=XCe(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function e4e(e,t,n){const{text:o,cron:s}=QCe(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function t4e(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function n4e(e){return e.metadata?.origin?.kind==="compaction_summary"}function o4e(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function s4e(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function i4e(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function r4e(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function o_(e,t,n,o=!0,s={}){const i=[];let r=1;const l=new Map;for(const p of t)l.set(p.toolCallId,p);let a=null;function u(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;my.kind==="tool"&&y.tool.id===w.id);v&&v.kind==="tool"&&(v.tool=w)}i.push({id:h.id,role:"assistant",no:r++,text:h.textParts.join(` -`),thinking:h.thinkingParts.length>0?h.thinkingParts.join(` -`):void 0,tools:h.tools.length>0?h.tools:void 0,blocks:h.blocks.length>0?h.blocks:void 0,approval:h.approval,approvalId:h.approvalId,durationMs:h.durationMs})}function c(p,h){for(const m of h)if(m.type==="text"){if(m.text){p.textParts.push(m.text);const k=p.blocks.at(-1);k&&k.kind==="text"?k.text+=` -`+m.text:p.blocks.push({kind:"text",text:m.text})}}else if(m.type==="thinking"){if(m.thinking){p.thinkingParts.push(m.thinking);const k=p.blocks.at(-1);k&&k.kind==="thinking"?k.thinking+=` -`+m.thinking:p.blocks.push({kind:"thinking",thinking:m.thinking})}}else if(m.type==="toolUse"){const k=l.get(m.toolCallId),w={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(w),p.blocks.push({kind:"tool",tool:w}),k&&(p.approval=GCe(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(w=>w.id===m.toolCallId);if(k!==-1){const w=p.tools[k],v={...w,status:m.isError?"error":"ok",output:VCe(m.output),media:m.isError?void 0:UCe(w.name,m.output)};v.name==="ExitPlanMode"&&!v.planPath&&(v.planPath=s4e(v.output)),p.tools[k]=v;const y=p.blocks.find(b=>b.kind==="tool"&&b.tool.id===m.toolCallId);y&&y.kind==="tool"&&(y.tool=v)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(b=>b.id===m.toolCallId);if(k===-1)continue;const w=p.tools[k];if(w.output!==void 0)continue;const v={...w,output:m.outputLines};p.tools[k]=v;const y=p.blocks.find(b=>b.kind==="tool"&&b.tool.id===m.toolCallId);y&&y.kind==="tool"&&(y.tool=v)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(n4e(p)){u();const v=p.metadata?.[GN];i.push({id:p.id,role:"compaction",no:r,text:p.content.filter(y=>y.type==="text").map(y=>y.text).join(` -`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}});continue}if(p.role==="user"){const v=JCe(p);if(u(),v!==void 0){i.push(e4e(p,r++,v));continue}if(!t4e(p))continue;const y=p.metadata?.origin,b=y?.kind==="skill_activation"&&y?.trigger==="user-slash",S=y?.kind==="plugin_command"&&y?.trigger==="user-slash",I=[],T=[];for(const $ of p.content){if($.type==="text")if(b)I.push(y.skillArgs??"");else if(S)I.push(y.commandArgs??"");else{const P=RCe($.text);if(P&&(P.kind==="video"||P.kind==="image")&&n){const D=DCe(P.path);if(D){T.push({url:n(D),kind:P.kind,fileId:D});continue}}const R=zCe($.text);if(R){T.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size});continue}const M=FCe($.text);if(M!==$.text&&M.trim().length===0)continue;I.push(M)}const L=f($);if(L){T.push({url:L.url,kind:L.kind,name:$.type==="file"?$.name:void 0,fileId:L.fileId});continue}$.type==="file"&&n&&T.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}i.push({id:p.id,role:"user",no:r++,text:I.join(` -`),attachments:T.length>0?T:void 0,skillActivation:b?{name:y.skillName,args:y.skillArgs}:void 0,pluginCommand:S?{pluginId:y.pluginId,commandName:y.commandName,args:y.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&c(a,p.content);continue}const h=p.promptId;o4e(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(u(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const w=i4e(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(v=>r4e(v,w))){d(k,p.content);continue}k.foldedSigs.push(w),c(k,p.content)}return u(!0),i}function l4e(e,t){const{pushOperationFailure:n,nextOptimisticMsgId:o,connectEventsIfNeeded:s,getEventConn:i,resolveThinkingForPrompt:r}=t,l=q({}),a=O(()=>{const P=e.activeSessionId;if(!P)return null;const R=l.value[P];return R?{parentId:P,agentId:R.agentId}:null}),u=O(()=>a.value?.parentId??null),c=O(()=>a.value!==null),d=O(()=>{const P=a.value;return P?!!e.sideChatSendingByAgent[P.agentId]:!1}),f=O(()=>{const P=a.value;return P?e.sideChatSendingByAgent[P.agentId]?!0:(e.tasksBySession[P.parentId]??[]).some(R=>R.id===P.agentId&&R.status==="running"):!1}),p=O(()=>{const P=a.value;if(!P)return[];const R=e.sideChatMessagesByAgent[P.agentId]??[];return o_(R,[],M=>xt().getFileUrl(M),f.value)});function h(P,R){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[P]:R(e.sideChatMessagesByAgent[P]??[])}}function m(P,R){h(P,M=>[...M,R])}function k(P){h(P,R=>{const M=[...R].reverse().findIndex(z=>z.role==="user");if(M===-1)return R;const D=R.length-1-M;return R.filter((z,B)=>B!==D)})}function w(P,R){h(P,M=>{const D=[...M];for(let z=D.length-1;z>=0;z-=1){const B=D[z];if(B.role==="user")return D[z]={...B,promptId:B.promptId??R},D}return M})}function v(P,R,M){M&&h(P,D=>{const z=D.at(-1);if(z?.role==="assistant"){const B=z.content[0],A=B?.type==="text"?B.text:"";return[...D.slice(0,-1),{...z,content:[{type:"text",text:`${A}${M}`}]}]}return[...D,{id:o(),sessionId:R,role:"assistant",content:[{type:"text",text:M}],createdAt:new Date().toISOString()}]})}function y(P,R,M){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[P]:!1},!M)return;const z=(e.sideChatMessagesByAgent[P]??[]).at(-1);(z?.role==="assistant"&&z.content[0]?.type==="text"?z.content[0].text:"").trim().length>0||v(P,R,M)}async function b(P){const R=e.activeSessionId;R&&await S(R,P)}async function S(P,R){if(!l.value[P]){let M;try{({agentId:M}=await xt().startBtw(P))}catch(D){n("openSideChat",D,{sessionId:P});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[M]:e.sideChatMessagesByAgent[M]??[]},l.value={...l.value,[P]:{agentId:M}},s(),i()?.markSideChannelAgent(M)}R&&R.trim()&&await I(P,R.trim())}async function I(P,R){const M=l.value[P],D=R.trim();if(!M||!D)return;const z=P,B=M.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[B]:!0};const A={id:o(),sessionId:z,role:"user",content:[{type:"text",text:D}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(B,A);try{const F=e.sessions.find(le=>le.id===z),W=(F?.model&&F.model.length>0?F.model:e.defaultModel)??void 0,j=await xt().submitPrompt(z,{content:[{type:"text",text:D}],agentId:B,model:W,thinking:await r(z,W)??e.thinking,permissionMode:e.permission,planMode:e.planModeBySession[z]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[z]??!1});w(B,j.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[z]:[...e.sideChatUserMessageIdsBySession[z]??[],j.userMessageId]}}catch(F){n("sendSideChatPrompt",F,{sessionId:z}),k(B),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[B]:!1}}}function T(){const P=e.activeSessionId;if(!P)return;const{[P]:R,...M}=l.value;l.value=M}async function $(P){const R=a.value;R&&await I(R.parentId,P)}function L(P){if(!l.value[P])return;const{[P]:R,...M}=l.value;l.value=M}return{sideChatTargetBySession:l,sideChatSessionId:u,sideChatVisible:c,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:v,finishSideChatAgent:y,openSideChat:b,openSideChatOn:S,closeSideChat:T,sendSideChatPrompt:$,clearSideChatForSession:L}}const l8=20;class a4e{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new yme(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:l8}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:l8});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:u4e(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function u4e(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=Khe(s);n.has(i)||(n.add(i),o.push(s))}return o}function a8(e,t){return`${e}\0${t}`}function c4e(e){const t=new Map,n=new Map,o=new Map;function s(c){c.version.value+=1}function i(c,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(c,d,f),o.set(c,d))}function r(c,d){const f=a8(c,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new a4e(c,d,k=>e.api.getSessionTranscript(c,{...k,agentId:d}),()=>s(h),()=>void l(h)),version:_o(0)},t.set(f,h),h}async function l(c){try{await c.channel.refresh(),n.get(c.channel.sessionId)===c.channel.agentId&&i(c.channel.sessionId,c.channel.agentId,c.channel.seq)}catch{n.get(c.channel.sessionId)===c.channel.agentId&&i(c.channel.sessionId,c.channel.agentId)}}function a(c,d){e.connectEventsIfNeeded(),n.set(c,d);const f=r(c,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(c,d,f.channel.seq):l(f),f}function u(c,d){if(n.get(c)!==d)return;n.delete(c);const f=o.get(c);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(c,[f]),o.delete(c))}return{getEntry(c,d){return t.get(a8(c,d))},activate:a,deactivate:u,receiveReset(c,d,f,p){if(n.get(c)!==d)return;r(c,d).channel.receiveReset(f,p)},applyOps(c,d,f,p){return n.get(c)!==d?!0:r(c,d).channel.applyOps(f,p)},forgetSession(c){const d=n.get(c);d!==void 0&&u(c,d);for(const f of t.keys())f.startsWith(`${c}\0`)&&t.delete(f)}}}const d4e="pythinkerWeb.optimisticUserMessage",u8="Sub Agent";function f4e(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function p4e(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function h4e(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Ek(e){return e.role==="user"&&e.metadata?.[d4e]===!0}function m4e(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function g4e(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function v4e(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const y4e=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function c8(e){let t="",n=0;for(const o of e.content)o.type==="text"?y4e.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function k4e(e,t){const n=c8(e),o=c8(t);return n.text===o.text&&n.media===o.media}function b4e(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ek(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ek(s)&&g4e(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Ek(s)&&k4e(s,t))return o}return-1}function w4e(e,t,n){let o=!1;const s=e.map(i=>{let r=!1;const l=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(o=!0,{...i,content:l}):i});return o?s:e}const x4e={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function _4e(e){const t=ao.global.t,n=[],o=(r,l)=>{typeof l=="number"||typeof l=="boolean"?n.push({label:r,value:String(l)}):typeof l=="string"&&l.length>0&&n.push({label:r,value:l})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||o(r,l);const i=(e.code!==void 0?x4e[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function S4e(e,t,n){const o=p4e(e);switch(h4e(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:r,...l}=o.compactionBySession;if(o.compactionBySession=l,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],u=`compaction_${s}_${n.seq}`;if(!a.some(c=>c.id===u)){const c={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:u,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[GN]:c}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const r=o.messagesBySession[s]??[];if(!r.some(a=>a.id===t.message.id||v4e(a,t.message))){if(t.message.role==="user"&&!m4e(t.message)){const a=b4e(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,metadata:{...t.message.metadata,...c.metadata}},o.messagesBySession[s]=u;break}}o.messagesBySession[s]=[...r,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(r=>r.id!==t.messageId?r:{...r,content:t.content,durationMs:t.durationMs??r.durationMs});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(r=>{if(r.id!==t.messageId)return r;const l=[...r.content],a=t.contentIndex;for(;l.length<=a;)l.push({type:"text",text:""});const u=l[a];let c;return t.delta.text!==void 0?u.type==="text"?c={type:"text",text:u.text+t.delta.text}:c={type:"text",text:t.delta.text}:t.delta.thinking!==void 0?u.type==="thinking"?c={type:"thinking",thinking:u.thinking+t.delta.thinking,signature:u.signature}:c={type:"thinking",thinking:t.delta.thinking}:c=u,l[a]=c,{...r,content:l}});break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=w4e(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const l=t.approval.display;l?.kind==="plan_review"&&typeof l.plan=="string"&&l.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:l.plan,path:typeof l.path=="string"?l.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,r=o.approvalsBySession[s]??[];o.approvalsBySession[s]=r.filter(l=>l.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(l=>l.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,r=o.questionsBySession[s]??[];o.questionsBySession[s]=r.filter(l=>l.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],r=i.findIndex(l=>l.id===t.task.id);if(r===-1)o.tasksBySession[s]=[...i,t.task];else{const l=[...i],a=i[r],u=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued";l[r]={...t.task,outputLines:u?t.task.outputLines:a.outputLines,text:u?t.task.text:a.text,description:t.task.description===u8&&a.description!==u8?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=l}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(r=>{if(r.id!==t.taskId)return r;if(r.kind==="subagent"&&t.kind==="text")return{...r,text:(r.text??"")+t.outputChunk};const l=r.outputLines??[];if(l.at(-1)===t.outputChunk)return r;const a=[...l,t.outputChunk];return{...r,outputLines:r.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(r=>r.id!==t.taskId?r:{...r,status:t.status,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,_4e(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${ao.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function C4e(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function A4e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||Ws(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const r=i?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:C4e(a.status)}]:[]})}}return[]}const M4e=["queued","working","suspended","completed","failed","cancelled"];function YN(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function E4e(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function T4e(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,phase:YN(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((r,l)=>r.dynamicWorkflowIndex-l.dynamicWorkflowIndex||r.id.localeCompare(l.id)),i=E4e();for(const r of s)i[r.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function I4e(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of M4e)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function $4e(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,phase:YN(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const vl=Kx(),qr=qSe(),Jp=eCe(),JN=ln.permission,XN=ln.activeWorkspace,QN=ln.planMode,e7=ln.planArmed,t7=ln.dynamicWorkflowMode,n7=ln.goalMode,d8=40401,o7=ln.onboarded;Hu(ln.codeFont);Hu(ln.theme);Hu(ln.thinking);function N4e(){try{const e=zo(JN);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function L4e(e){try{Qo(JN,e)}catch{}}function Um(e){const t=zo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function W0(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);Qo(e,JSON.stringify(n))}catch{}}function s7(){W0(QN,Ee.planModeBySession)}function F4e(){W0(e7,Ee.planArmedBySession)}function i7(){W0(t7,Ee.dynamicWorkflowModeBySession)}function r7(){W0(n7,Ee.goalModeBySession)}function O4e(){try{return zo(XN)}catch{return null}}const l7=ln.hiddenWorkspaces;function R4e(){try{const e=zo(l7);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function P4e(e){try{Qo(l7,JSON.stringify(e))}catch{}}function D4e(e){try{Qo(XN,e)}catch{}}function B4e(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const Ee=Es({...f4e(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",workspaceName:"pythinker-web",connection:"disconnected",permission:N4e(),thinking:void 0,thinkingBySession:{},planModeBySession:Um(QN),planArmedBySession:Um(e7),dynamicWorkflowModeBySession:Um(t7),goalModeBySession:Um(n7),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:iw(),authReady:!1,defaultModel:null,managedProviderStatus:null,workspaces:[],activeWorkspaceId:O4e(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:R4e(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),kh=Es({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function a7(e){Ee.sessions=e}function H0(e,t){Ee.sessions=Ee.sessions.map(n=>n.id===e?t(n):n)}function z4e(e){Ee.sessions=[e,...Ee.sessions.filter(t=>t.id!==e.id)]}function W4e(e){Ee.sessions=[...Ee.sessions,e]}function H4e(e){Ee.sessions=Ee.sessions.filter(t=>t.id!==e)}function u7(){const e=Ee.activeSessionId;e&&Ee.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Ee.unreadBySession={...Ee.unreadBySession,[e]:!1},rw({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===ln.unread&&(Ee.unreadBySession=iw(),u7())});function v2(){if(Bi===null||!Bi.health().stale)return;qo("ws:stale-reconnect",{sessionId:Ee.activeSessionId,status:"stale"}),bl("ws: stale socket on focus, reconnecting",{activeSessionId:Ee.activeSessionId}),Bi.reconnect();const e=Ee.activeSessionId;e&&B1.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(u7(),v2())});typeof window<"u"&&(window.addEventListener("focus",v2),window.addEventListener("online",v2));function s_(e){Ee.activeSessionId=e}function j4e(e){Ee.messagesBySession=e}function U4e(e,t){Ee.messagesBySession={...Ee.messagesBySession,[e]:t}}function c7(e,t){Ee.messagesBySession={...Ee.messagesBySession,[e]:t(Ee.messagesBySession[e]??[])}}function V4e(e){const{[e]:t,...n}=Ee.messagesBySession;Ee.messagesBySession=n}function d7(e){Bi?.unsubscribe(e),m3e(e),P1.discard(({meta:t})=>t.sessionId===e),H4e(e),V4e(e),delete Ee.approvalsBySession[e],delete Ee.questionsBySession[e],delete Ee.tasksBySession[e],delete Ee.goalBySession[e],delete Ee.gitStatusBySession[e],delete Ee.lastSeqBySession[e],delete Ee.compactionBySession[e],delete Ee.messagesLoadingMoreBySession[e],delete Ee.messagesHasMoreBySession[e],delete Ee.messagesLoadMoreErrorBySession[e],delete k2[e],D1.delete(e),yg.delete(e),x7.delete(e),yCe(e),delete Ee.queuedBySession[e],delete Ee.promptIdBySession[e],delete Ee.inFlightBySession[e],delete Ee.turnActiveBySession[e],delete Ee.planModeBySession[e],delete Ee.planArmedBySession[e],delete Ee.dynamicWorkflowModeBySession[e],delete Ee.goalModeBySession[e],delete Ee.thinkingBySession[e],s7(),F4e(),i7(),r7()}const f7=q(null),p7=q([]),h7=q(!1),m7=q(!1),g7=q(null);async function bh(e){let t;try{t=await xt().getSessionStatus(e)}catch{return}H0(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),Ee.dynamicWorkflowModeBySession={...Ee.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},Ee.planModeBySession={...Ee.planModeBySession,[e]:t.planMode},t.thinkingEffort.length>0&&(Ee.thinkingBySession={...Ee.thinkingBySession,[e]:t.thinkingEffort})}async function q4e(e){const t=Ee.goalVersionBySession[e]??0;let n;try{n=await xt().getSessionGoal(e)}catch{return}if((Ee.goalVersionBySession[e]??0)!==t)return;const o={...Ee.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,Ee.goalBySession=o}function v7(e,t){const n=t??Ee.activeSessionId;return n?Promise.resolve(xt().updateSession(n,e)).then(()=>bh(n)).then(()=>!0).catch(o=>(ec("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const y7=ln.conversationToc;function K4e(){try{const e=zo(y7);return e===null?!0:e==="true"}catch{return!0}}function G4e(e){try{Qo(y7,e?"true":"false")}catch{}}const k7=q(K4e());function Z4e(e){k7.value=e,G4e(e)}function Y4e(e){try{return zo(e)??""}catch{return""}}const b7=q(Y4e(o7)==="1");function J4e(e){b7.value=e;try{Qo(o7,e?"1":"0")}catch{}}let Bi=null;const y2=c4e({api:xt(),connectEventsIfNeeded:i_,getEventConnection:()=>Bi});let f8=0;function w7(){return f8+=1,`msg_opt_${Date.now().toString(36)}_${f8}`}function X4e(e,t,n){const o={sessions:Ee.sessions,activeSessionId:Ee.activeSessionId,messagesBySession:Ee.messagesBySession,approvalsBySession:Ee.approvalsBySession,planReviewByToolCallId:Ee.planReviewByToolCallId,questionsBySession:Ee.questionsBySession,tasksBySession:Ee.tasksBySession,goalBySession:Ee.goalBySession,goalVersionBySession:Ee.goalVersionBySession,lastSeqBySession:Ee.lastSeqBySession,turnActiveBySession:Ee.turnActiveBySession,compactionBySession:Ee.compactionBySession,config:Ee.config,warnings:Ee.warnings},s=S4e(o,e,{sessionId:t,seq:n});a7(s.sessions),s_(s.activeSessionId),j4e(s.messagesBySession),Ee.approvalsBySession=s.approvalsBySession,Ee.planReviewByToolCallId=s.planReviewByToolCallId,Ee.questionsBySession=s.questionsBySession,Ee.tasksBySession=s.tasksBySession,Ee.goalBySession=s.goalBySession,Ee.goalVersionBySession=s.goalVersionBySession,Ee.lastSeqBySession=s.lastSeqBySession,Ee.turnActiveBySession=s.turnActiveBySession,Ee.compactionBySession=s.compactionBySession,Ee.config=s.config??null,Ee.warnings=s.warnings,e.type==="configChanged"&&(Ee.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(so.loadModels(),so.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(Ee.dynamicWorkflowModeBySession={...Ee.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(Ee.planModeBySession={...Ee.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(Ee.thinkingBySession={...Ee.thinkingBySession,[e.sessionId]:e.thinking}))}function Q4e(e,t){const n=Ee.lastSeqBySession[t.sessionId]??0,o=Ee.turnActiveBySession[t.sessionId]??!1;X4e(e,t.sessionId,t.seq);const s=Ys.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,r=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Ys.appendSideChatAssistantText(i,r,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Ys.finishSideChatAgent(i,r):e.type==="taskProgress"&&e.taskId===i?Ys.appendSideChatAssistantText(i,r,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Ys.finishSideChatAgent(i,r,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;Ee.promptIdBySession[i]!==e.message.promptId&&(Ee.promptIdBySession={...Ee.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===Ee.activeSessionId&&vl.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;FAe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&LAe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Ee.promptIdBySession[e.sessionId]===e.promptId&&Lt.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&OAe(e.sessionId,e.question),e.type==="approvalRequested"&&RAe(e.sessionId,e.approval)}const P1=pSe(({appEvent:e,meta:t})=>Q4e(e,t),({appEvent:e})=>uSe(e),{coalesce:mSe});function i_(){if(Bi!==null||typeof WebSocket>"u")return;qo("ws:connection",{status:"connecting"}),Ee.connection="connecting",Bi=xt().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Lt.applyWorkspaceEvent(t);return}for(const o of hSe({appEvent:t,meta:n}))P1(o)},onResync(t,n,o){qo("ws:resync",{sessionId:t,status:"required",seq:n}),P1.flush(),D1.add(t),B1.request(t)},onError(t,n,o){qo("ws:error",{status:"failed",errorCode:t,fatal:o}),r_({severity:"error",title:ao.global.t("warnings.wsTitle"),message:n,details:[xo("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){qo("ws:connection",{status:t?"connected":"disconnected"}),Ee.connected=t,Ee.connection=t?"connected":"disconnected",t&&(l3e(),Lt.refreshServerMeta())},onTranscriptReset(t,n,o,s){y2.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return y2.applyOps(t,n,o,s)}})}const k2={},D1=new Set,yg=new Set,x7=new Set;function e3e(e){return tr(e)&&e.code===d8?!0:typeof e=="object"&&e!==null&&e.code===d8}function xo(e,t){if(!(t==null||t===""))return{label:ao.global.t(`warnings.details.${e}`),value:_7(t)}}function _7(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function t3e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function n3e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function o3e(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function s3e(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function p8(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function i3e(e,t,n){const o=Ex(t),s=tr(t),i=o||s?t.timestamp:void 0,r=o||s?t.durationMs:void 0,l=[xo("operation",e),xo("sessionId",n??Ee.activeSessionId),xo("connection",Ee.connection),xo("timestamp",s3e(i??Date.now()))];return o?l.push(xo("duration",p8(r)),xo("request",`${t.method} ${t.path}`),xo("endpoint",t.url),xo("requestId",t.requestId),xo("phase",t.phase),xo("timeout",`${t.timeoutMs}ms`),xo("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),xo("contentType",t.contentType),xo("responsePreview",t.bodyPreview),xo("cause",t.cause)):s?l.push(xo("duration",p8(r)),xo("code",t.code),xo("requestId",t.requestId),xo("message",t.message),xo("details",t.details)):l.push(xo("errorName",t3e(t)),xo("message",n3e(t)??_7(t)),xo("stack",o3e(t))),l.filter(a=>a!==void 0)}function r3e(e,t,n={}){const o=Ex(t),s=tr(t),i=n.title??(o?ao.global.t("warnings.daemonNetworkTitle"):s?ao.global.t("warnings.daemonApiTitle"):ao.global.t("warnings.operationFailedTitle")),r=n.message??(o?ao.global.t("warnings.daemonNetworkMessage"):s?t.message:ao.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:r,details:i3e(e,t,n.sessionId)}}function r_(e){Ee.warnings=[...Ee.warnings,e]}function l3e(){const e=ao.global.t("warnings.wsTitle"),t=Ee.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==Ee.warnings.length&&(Ee.warnings=t)}function ec(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=tr(t),s=Ex(t);qo("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),r_(r3e(e,t,n))}const a3e={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function u3e(e){if(!tr(e))return;const t=a3e[e.code];return t?ao.global.t(t):void 0}async function c3e(e){if(d7(e),Ee.activeSessionId!==e)return;const t=Ee.sessions[0];t?await Lt.selectSession(t.id,{urlMode:"replace"}):(s_(void 0),Ee.sessionLoading=!1,Lt.writeSessionUrl(void 0,"replace"))}const h8=new Set;async function d3e(e){if(!h8.has(e)){h8.add(e);try{const t=await xt().getSessionWarnings(e),n=ao.global.t("warnings.noteLabel");for(const o of t)r_(`${n}: ${o.message}`)}catch{}}}async function l_(e){const t=Lt.localTurnStartState(e);try{const o=await xt().getSessionSnapshot(e);if(!Ee.sessions.some(a=>a.id===e))return"ok";P1.flush();const s=Ee.lastSeqBySession[e]??0,i=k2[e];if(!(D1.has(e)||z1.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return yg.delete(e)||(yg.add(e),B1.request(e)),"ok";if(!Lt.isLocalTurnSnapshotCurrent(e,t))return Lt.afterLocalTurnStartsSettle(e,()=>{B1.request(e)}),"ok";const l=t2(o.session.usage);H0(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:l?a.usage:o.session.usage})),U4e(e,iSe(Ee.messagesBySession[e]??[],o.messages)),Ee.tasksBySession={...Ee.tasksBySession,[e]:rSe(o.subagents,Ee.tasksBySession[e]??[])},Ee.messagesHasMoreBySession={...Ee.messagesHasMoreBySession,[e]:o.hasMoreMessages},Ee.approvalsBySession={...Ee.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const u=a.display;u?.kind==="plan_review"&&typeof u.plan=="string"&&u.plan.length>0&&(Ee.planReviewByToolCallId={...Ee.planReviewByToolCallId,[a.toolCallId]:{plan:u.plan,path:typeof u.path=="string"?u.path:void 0}})}Ee.questionsBySession={...Ee.questionsBySession,[e]:o.pendingQuestions},Ee.lastSeqBySession={...Ee.lastSeqBySession,[e]:o.asOfSeq},k2[e]=o.epoch,D1.delete(e),yg.delete(e),Lt.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={...Ee.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],Ee.turnActiveBySession=a}return i_(),Bi&&(Bi.seedSnapshot(e,o),Bi.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),h3e(e)),z1.delete(e),l&&bh(e),d3e(e),"ok"}catch(n){return e3e(n)?(await c3e(e),"not-found"):(ec("getSessionSnapshot",n,{title:ao.global.t("warnings.sessionSnapshotTitle"),message:ao.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const B1=lSe(l_);function f3e(e){return Object.prototype.hasOwnProperty.call(Ee.messagesBySession,e)}const p3e=4,yl=[],z1=new Set;function h3e(e){const t=yl.indexOf(e);for(t!==-1&&yl.splice(t,1),yl.unshift(e);yl.length>p3e;){let n=-1;for(let s=yl.length-1;s>=0;s--)if(yl[s]!==Ee.activeSessionId){n=s;break}if(n===-1)break;const[o]=yl.splice(n,1);if(o===void 0)break;Bi?.unsubscribe(o),z1.add(o)}}function m3e(e){const t=yl.indexOf(e);t!==-1&&yl.splice(t,1),z1.delete(e)}async function g3e(e){return l_(e)}function a_(e,t){return(Ee.inFlightBySession[e]??!1)||(Ee.turnActiveBySession[e]??!1)||(t??Ee.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function u_(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return ao.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const v3e=3e4,Xp=q(0);let Tk=null;function y3e(){Tk===null&&(Tk=setInterval(()=>{Xp.value=(Xp.value+1)%Number.MAX_SAFE_INTEGER},v3e),Tk.unref?.())}function k3e(e,t){const n=e.split(` -`),o=t.split(` -`),s=[];return n.forEach((i,r)=>{s.push({kind:"rem",gutter:String(r+1),text:`- ${i}`})}),o.forEach((i,r)=>{s.push({kind:"add",gutter:String(r+1),text:`+ ${i}`})}),s}function b3e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:k3e(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const r=i??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:o,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function w3e(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}function x3e(e){const t=Ee.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const r=i.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(i.toolCallId,l)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const l=n.get(i.toolCallId);if(l)return l}}}function _3e(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(o/1e3),a=Math.floor(l/60),u=l%60;n=ao.global.t("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const l=Math.round(o/1e3);n=ao.global.t("tasks.timingDone",{sec:l})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??x3e(e),r=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:r,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const S3e=O(()=>{const e=Ee.sessions.find(n=>n.id===Ee.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:Ee.workspaceName,branch:t}}),C3e=O(()=>(Xp.value,Ee.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:u_(e.updatedAt),busy:a_(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),A3e=O(()=>Ee.activeSessionId??""),M3e=O(()=>{const e=Ee.activeSessionId;if(e)return so.skillsBySession.value[e]??[];const t=U0.value;return t?so.skillsByWorkspace.value[t]??[]:[]}),Jf=q({}),b2=q([]),w2=q(!1),ga=q([]),x2=q(!1),zc=q({}),E3e=O(()=>{const e=Ee.activeSessionId;return e?zc.value[e]??{}:{}});async function T3e(e){Jf.value={...Jf.value,[e]:!0};try{await so.loadSkillsForSession(e)}finally{Jf.value={...Jf.value,[e]:!1}}}async function I3e(){w2.value=!0;try{b2.value=await xt().listConnectors()}catch{b2.value=[]}finally{w2.value=!1}}async function S7(){x2.value=!0;try{ga.value=await xt().listPlugins()}catch{ga.value=[]}finally{x2.value=!1}}async function $3e(e,t){const n=ga.value.find(o=>o.id===e)?.enabled;ga.value=ga.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await xt().setPluginEnabled(e,t)}catch(o){n!==void 0&&(ga.value=ga.value.map(s=>s.id===e?{...s,enabled:n}:s)),ec("setPluginEnabled",o);return}await S7()}async function N3e(e){await Promise.all([T3e(e),I3e(),S7()])}async function L3e(e){const t=Ee.activeSessionId;if(!t)return;const n=zc.value[t]??{};zc.value={...zc.value,[t]:{...n,...e}};try{await xt().updateSession(t,e)}catch(o){throw zc.value={...zc.value,[t]:n},ec("updateCapabilities",o,{sessionId:t}),o}}const c_=O(()=>{const e=Ee.activeSessionId;return e?Ee.inFlightBySession[e]??!1:!1}),F3e=O(()=>Lt.isStartingFirstPrompt()),Ys=l4e(Ee,{pushOperationFailure:ec,nextOptimisticMsgId:w7,connectEventsIfNeeded:i_,getEventConn:()=>Bi,resolveThinkingForPrompt:(e,t)=>so.resolveThinkingForPrompt(e,t)}),Td=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=Ys.sideChatTargetBySession.value[e]?.agentId;return(Ee.tasksBySession[e]??[]).filter(n=>n.id!==t)}),C7=oCe(Ee,Td),O3e=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=new Set(Ee.sideChatUserMessageIdsBySession[e]??[]),n=(Ee.messagesBySession[e]??[]).filter(s=>!t.has(s.id)),o=Ee.approvalsBySession[e]??[];return o_(n,o,s=>xt().getFileUrl(s),j0.value,Ee.planReviewByToolCallId)}),j0=O(()=>{const e=Ee.activeSessionId;return e?(Ee.turnActiveBySession[e]??!1)||(Ee.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),R3e=O(()=>c_.value||j0.value),m8=new Map,P3e=O(()=>{C7.taskClock.value;const e=Td.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=Ee.activeSessionId??"__draft__",n=m8.get(t)??{indexes:new Map,next:1};m8.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return Td.value.map(o=>{const s=_3e(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),D3e=O(()=>{const e=Ee.activeSessionId;if(!e)return{};const t={};for(const n of Ee.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=Ee.planReviewByToolCallId[o.toolCallId],r=i?.plan??(typeof s.plan=="string"?s.plan:void 0),l=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:r,path:l}}return t}),A7=O(()=>T4e(Td.value)),B3e=O(()=>$4e(Td.value)),Wc=O(()=>{const e=Ee.activeSessionId;return e?Ee.goalBySession[e]??null:null}),z3e=O(()=>{const e=Ee.activeSessionId;return e?A4e(Ee.messagesBySession[e]??[]):[]}),W3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.compactionBySession[e]??null:null}),H3e=O(()=>Ee.connection),j3e=O(()=>Ee.loading),U3e=O(()=>Ee.sessionLoading),V3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesLoadingMoreBySession[e]??!1:!1}),q3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesHasMoreBySession[e]??!1:!1}),K3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesLoadMoreErrorBySession[e]??!1:!1}),G3e=O(()=>Ee.serverVersion),Z3e=O(()=>Ee.backend),Y3e=O(()=>Ee.dangerousBypassAuth);function J3e(){Ee.dangerousBypassAuth=!1}const X3e=O(()=>Ee.permission),Q3e=O(()=>Ee.thinking),M7=O(()=>{const e=Ee.activeSessionId;return e?Ee.planModeBySession[e]??!1:kh.planMode}),eAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.planArmedBySession[e]??!1:kh.planMode}),tAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.dynamicWorkflowModeBySession[e]??!1:kh.dynamicWorkflowMode}),nAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.goalModeBySession[e]??!1:kh.goalMode}),oAe=O(()=>{const e=I4e(A7.value);return{plan:M7.value,goal:Wc.value&&Wc.value.status!=="complete"?{status:Wc.value.status,turnsUsed:Wc.value.turnsUsed,elapsedMs:Wc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),sAe=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=xt();return(Ee.queuedBySession[e]??[]).map(n=>({text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),iAe=O(()=>Ee.warnings),rAe=O(()=>{const e=Ee.activeSessionId;return e?(Ee.questionsBySession[e]??[]).map(w3e):[]}),lAe=O(()=>{const e=Ee.activeSessionId;return e?(Ee.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:b3e(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),d_=O(()=>{const e=Ee.activeSessionId;return e?(Ee.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Ee.questionsBySession[e]??[]).length>0?"awaiting-question":c_.value||j0.value?"running":"idle":"idle"}),so=SCe(Ee,{pushOperationFailure:ec,refreshSessionStatus:bh,persistSessionProfile:v7,activity:d_,updateSession:H0,updateSessionMessages:c7}),_2=O(()=>{const e=Ee.activeSessionId;if(!e)return null;const t=Ee.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),aAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.gitStatusBySession[e]?.pullRequest??null:null}),uAe=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=Ee.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),cAe=O(()=>{const e=Ee.activeSessionId;if(!e)return null;const t=Ee.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),E7=O(()=>{const e=Ee.sessions.find(r=>r.id===Ee.activeSessionId),t=_2.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?so.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??Ee.defaultModel)??"—",s=so.models.value.find(r=>r.id===o)??so.models.value.find(r=>r.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:Ee.permission,branch:t,cwd:e?.cwd??"",isGitRepo:_2.value!==null}}),dAe=O(()=>p7.value),fAe=O(()=>Ee.sessions.find(t=>t.id===Ee.activeSessionId)?.usage.totalCostUsd??0),pAe=O(()=>Ee.authReady),hAe=O(()=>Ee.defaultModel),mAe=O(()=>Ee.managedProviderStatus),gAe=O(()=>Ee.config),vAe=O(()=>{const e=Ee.activeSessionId;if(!e)return{};const t=Ee.gitStatusBySession[e];return t?{...t.entries}:{}});function Id(e){const t=xr(e.cwd);return Ee.workspaces.find(n=>xr(n.root)===t)?.id??e.workspaceId??e.cwd}const f_=O(()=>sSe({workspaces:Ee.workspaces,sessions:Ee.sessions,hiddenWorkspaceRoots:Ee.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Ee.sessionsHasMoreByWorkspace})),W1=q(rB()),$d=q(lB()==="manual"?"manual":"recent");function yAe(e){const t=Rd(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Zr=q(yAe(ln.pinnedSessions)),kg=q(zo(ln.pinnedCollapsed)==="true");function kAe(e){Zr.value=Zr.value.includes(e)?Zr.value.filter(t=>t!==e):[...Zr.value,e],za(ln.pinnedSessions,Zr.value)}function bAe(e){const t=new Set(Zr.value),n=e.filter(o=>t.has(o));Zr.value=[...n,...Zr.value.filter(o=>!n.includes(o))],za(ln.pinnedSessions,Zr.value)}function wAe(){kg.value=!kg.value,Qo(ln.pinnedCollapsed,String(kg.value))}Ze(()=>[f_.value.map(e=>e.id).join("\0"),Ee.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=aB(n,W1.value);o!==null&&(W1.value=o,WT(o))});const Yu=O(()=>{const e=f_.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:B4e(t.root,Ee.fsHome),sessionCount:t.sessionCount}));if($d.value==="recent"){const t=new Map;for(const n of Ee.sessions){if(n.parentSessionId)continue;const o=Id(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return dB(e,t)}return uB(e,W1.value)}),U0=O(()=>{const e=Ee.activeWorkspaceId,t=Yu.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ze(U0,e=>{e&&(Object.prototype.hasOwnProperty.call(so.skillsByWorkspace.value,e)||so.loadSkillsForWorkspace(e))},{immediate:!0});const xAe=O(()=>{const e=U0.value;return e?Yu.value.find(t=>t.id===e)??null:null}),_Ae=O(()=>{Xp.value;const e=new Set(Yu.value.map(n=>n.id)),t=new Map(Yu.value.map(n=>[n.id,n.name]));return Ee.sessions.filter(n=>!n.parentSessionId&&e.has(Id(n))).map(n=>{const o=Id(n);return{id:n.id,title:n.title,time:u_(n.updatedAt),busy:a_(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),SAe=O(()=>{Xp.value;const e=new Map;for(const t of Ee.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Id(t),o={id:t.id,title:t.title,time:u_(t.updatedAt),busy:a_(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return Yu.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:Ee.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:Ee.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:Ee.sessionsInitialCountByWorkspace[t.id]??h2}))});function CAe(e){W1.value=e,WT(e),$d.value!=="manual"&&($d.value="manual",HT("manual"))}function AAe(e){$d.value!==e&&($d.value=e,HT(e))}const T7=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(Ee.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),MAe=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(Ee.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),EAe=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.unreadBySession))n&&(e[t]=!0);return e}),TAe=O(()=>{const e={},t=T7.value;for(const n of Ee.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Id(n);e[s]=(e[s]??0)+o}return e}),IAe=O(()=>Ee.recentRoots),$Ae=O(()=>Ee.availableOpenInApps),Lt=wCe(Ee,{taskPoller:C7,sideChat:Ys,modelProvider:so,pushOperationFailure:ec,activity:d_,sessionsKnownEmpty:x7,setSessions:a7,updateSession:H0,upsertSessionFront:z4e,appendSession:W4e,forgetSession:d7,setActiveSessionId:s_,updateSessionMessages:c7,nextOptimisticMsgId:w7,getEventConn:()=>Bi,syncSessionFromSnapshot:l_,reopenSession:g3e,hasLoadedMessages:f3e,refreshSessionStatus:bh,refreshSessionGoal:q4e,persistSessionProfile:v7,mergedWorkspaces:f_,workspacesView:Yu,status:E7,workspaceIdForSession:Id,savePermissionToStorage:L4e,savePlanModeToStorage:s7,saveDynamicWorkflowModeToStorage:i7,saveGoalModeToStorage:r7,draftModes:kh,saveUnread:rw,saveActiveWorkspaceToStorage:D4e,saveHiddenWorkspacesToStorage:P4e,goalErrorMessage:u3e,resetFastMoon:vl.resetFastMoon,initialized:m7,connectIssue:g7,selectedDiffPath:f7,fileDiffLines:p7,fileDiffLoading:h7});function NAe(e,t){const n=Ee.sessions.find(o=>o.id===e);return n?Lt.renameSession(e,GT(t,n.title)):Promise.resolve()}function p_(e){return e===Ee.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function LAe(e){if(Ee.turnActiveBySession[e]){const t={...Ee.turnActiveBySession};delete t[e],Ee.turnActiveBySession=t}Ee.inFlightBySession[e]&&(Ee.inFlightBySession={...Ee.inFlightBySession,[e]:!1})}function FAe(e,t,n){const o=Ee.promptIdBySession[e];Lt.finishPromptLocal(e,{turnWasActive:n}),e===Ee.activeSessionId?(Lt.loadGitStatus(e),bh(e)):t==="idle"&&(Ee.unreadBySession={...Ee.unreadBySession,[e]:!0},rw({[e]:!0}));const s=(Ee.approvalsBySession[e]??[]).length>0,i=(Ee.questionsBySession[e]??[]).length>0;OSe(t,s,i)&&qr.maybeNotifyCompletion(e,{isUserWatching:p_(e),sessionTitle:Ee.sessions.find(r=>r.id===e)?.title??"",promptId:o,onClick:()=>{Lt.selectSession(e)}}),t==="idle"&&Jp.maybePlayCompletionSound()}function OAe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;qr.maybeNotifyQuestion({isUserWatching:p_(e),sessionTitle:Ee.sessions.find(r=>r.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{Lt.selectSession(e)}}),Jp.maybePlayQuestionSound()}function RAe(e,t){qr.maybeNotifyApproval({isUserWatching:p_(e),sessionTitle:Ee.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Lt.selectSession(e)}}),Jp.maybePlayApprovalSound()}function V0(){return y3e(),{workspace:S3e,sessions:C3e,activeSessionId:A3e,workspacesView:Yu,workspaceSortMode:$d,pinnedSessionIds:Zr,pinnedCollapsed:kg,visibleWorkspace:xAe,activeWorkspaceId:U0,sessionsForView:_Ae,workspaceGroups:SAe,attentionBySession:T7,pendingBySession:MAe,attentionByWorkspace:TAe,unreadBySession:EAe,recentRoots:IAe,turns:O3e,tasks:P3e,activeAppTasks:Td,auxiliaryTranscripts:y2,todos:z3e,goal:Wc,dynamicWorkflows:A7,dynamicWorkflowMembersByToolCallId:B3e,activationBadges:oAe,compaction:W3e,status:E7,sessionCost:fAe,fileDiff:dAe,selectedDiffPath:f7,fileDiffLoading:h7,changes:uAe,gitInfo:_2,gitDiffStats:cAe,activePullRequest:aAe,changesByPath:vAe,pendingApprovals:lAe,availableOpenInApps:$Ae,connection:H3e,loading:j3e,sessionLoading:U3e,loadingMoreMessages:V3e,hasMoreMessages:q3e,loadMoreMessagesError:K3e,serverVersion:G3e,backend:Z3e,dangerousBypassAuth:Y3e,clearDangerousBypassAuth:J3e,initialized:m7,connectIssue:g7,permission:X3e,thinking:Q3e,planMode:M7,planArmed:eAe,sessionPlans:D3e,dynamicWorkflowMode:tAe,goalMode:nAe,queued:sAe,warnings:iAe,questions:rAe,activity:d_,turnActive:j0,inFlight:c_,working:R3e,isStartingFirstPrompt:F3e,fastMoon:vl.fastMoon,models:so.models,starredModelIds:so.starredModelIds,providers:so.providers,uiFontSize:vl.uiFontSize,setUiFontSize:vl.setUiFontSize,conversationToc:k7,setConversationToc:Z4e,colorScheme:vl.colorScheme,setColorScheme:vl.setColorScheme,accent:vl.accent,setAccent:vl.setAccent,notifyOnComplete:qr.notifyOnComplete,notifyOnQuestion:qr.notifyOnQuestion,notifyOnApproval:qr.notifyOnApproval,notifyPermission:qr.notifyPermission,setNotifyOnComplete:qr.setNotifyOnComplete,setNotifyOnQuestion:qr.setNotifyOnQuestion,setNotifyOnApproval:qr.setNotifyOnApproval,soundOnComplete:Jp.soundOnComplete,setSoundOnComplete:Jp.setSoundOnComplete,onboarded:b7,setOnboarded:J4e,load:Lt.load,selectSession:Lt.selectSession,clearActiveSession:Lt.clearActiveSession,loadOlderMessages:Lt.loadOlderMessages,loadWorkspaces:Lt.loadWorkspaces,loadMoreSessions:Lt.loadMoreSessions,loadAllSessions:Lt.loadAllSessions,selectWorkspace:Lt.selectWorkspace,openWorkspace:Lt.openWorkspace,openWorkspaceDraft:Lt.openWorkspaceDraft,startSessionAndSendPrompt:Lt.startSessionAndSendPrompt,startSessionAndActivateSkill:Lt.startSessionAndActivateSkill,startSessionAndOpenSideChat:Lt.startSessionAndOpenSideChat,addWorkspaceByPath:Lt.addWorkspaceByPath,browseFs:Lt.browseFs,getFsHome:Lt.getFsHome,sendPrompt:Lt.sendPrompt,steerPrompt:Lt.steerPrompt,sideChatVisible:Ys.sideChatVisible,sideChatSessionId:Ys.sideChatSessionId,sideChatTurns:Ys.sideChatTurns,sideChatRunning:Ys.sideChatRunning,sideChatSending:Ys.sideChatSending,openSideChat:Ys.openSideChat,closeSideChat:Ys.closeSideChat,sendSideChatPrompt:Ys.sendSideChatPrompt,uploadImage:Lt.uploadImage,abortCurrentPrompt:Lt.abortCurrentPrompt,respondApproval:Lt.respondApproval,respondQuestion:Lt.respondQuestion,dismissQuestion:Lt.dismissQuestion,pendingQuestionActions:Lt.pendingQuestionActions,pendingApprovalActions:Lt.pendingApprovalActions,cancelTask:Lt.cancelTask,setPermission:Lt.setPermission,setThinking:so.setThinking,setPlanMode:Lt.setPlanMode,togglePlanMode:Lt.togglePlanMode,setDynamicWorkflowMode:Lt.setDynamicWorkflowMode,toggleDynamicWorkflowMode:Lt.toggleDynamicWorkflowMode,setGoalMode:Lt.setGoalMode,toggleGoalMode:Lt.toggleGoalMode,createGoal:Lt.createGoal,controlGoal:Lt.controlGoal,enqueue:Lt.enqueue,dismissWarning:Lt.dismissWarning,renameSession:Lt.renameSession,renameWorkspace:Lt.renameWorkspace,deleteWorkspace:Lt.deleteWorkspace,reorderWorkspaces:CAe,setWorkspaceSortMode:AAe,togglePinnedSession:kAe,reorderPinnedSessions:bAe,togglePinnedCollapsed:wAe,setSessionEmoji:NAe,archiveSession:Lt.archiveSession,exportSession:Lt.exportSession,restoreSession:Lt.restoreSession,loadArchivedSessions:Lt.loadArchivedSessions,compact:Lt.compact,forkSession:Lt.forkSession,generateSessionTitle:Lt.generateSessionTitle,undo:Lt.undo,unqueue:Lt.unqueue,reorderQueue:Lt.reorderQueue,searchFiles:Lt.searchFiles,loadGitStatus:Lt.loadGitStatus,loadFileDiff:Lt.loadFileDiff,clearFileDiff:Lt.clearFileDiff,listDir:Lt.listDir,readFileContent:Lt.readFileContent,getFileDownloadUrl:Lt.getFileDownloadUrl,openWorkspaceFile:Lt.openWorkspaceFile,openInApp:Lt.openInApp,revealWorkspaceFile:Lt.revealWorkspaceFile,resolveImageUrl:Lt.resolveImageUrl,getFileUrl:e=>xt().getFileUrl(e),loadModels:so.loadModels,loadProviders:so.loadProviders,skills:M3e,skillsLoadingBySession:Jf,connectors:b2,connectorsLoading:w2,plugins:ga,pluginsLoading:x2,activeSessionCapabilities:E3e,loadCapabilityData:N3e,updateCapabilities:L3e,setPluginEnabled:$3e,activateSkill:so.activateSkill,setModel:so.setModel,toggleStarModel:so.toggleStarModel,addProvider:so.addProvider,deleteProvider:so.deleteProvider,refreshProvider:so.refreshProvider,refreshAllProviders:so.refreshAllProviders,authReady:pAe,defaultModel:hAe,managedProviderStatus:mAe,config:gAe,updateConfig:Lt.updateConfig,checkAuth:Lt.checkAuth,startOAuthLogin:so.startOAuthLogin,pollOAuthLogin:so.pollOAuthLogin,cancelOAuthLogin:so.cancelOAuthLogin,logout:Lt.logout}}const PAe=["aria-expanded","aria-label"],DAe={class:"capability-trigger-label"},BAe={class:"capability-panel"},zAe={class:"capability-viewport"},WAe={class:"capability-view"},HAe={key:1,class:"capability-group"},jAe={class:"capability-group-title"},UAe={class:"capability-caption"},VAe={key:0,class:"capability-loading"},qAe={class:"capability-view capability-view-secondary"},KAe={class:"capability-caption"},GAe={key:0,class:"capability-loading"},ZAe={class:"capability-caption"},YAe={key:0,class:"capability-loading"},JAe=Ge({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=It(),s=V0(),i=q(null),r=q(null),l=q(!1),a=q("root"),u=q([]),c=O(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=O(()=>{const z=n.sessionId;return z?s.skillsLoadingBySession.value[z]===!0:!1}),f=O(()=>s.connectors.value),p=O(()=>s.connectorsLoading.value),h=O(()=>s.plugins.value),m=O(()=>s.pluginsLoading.value),k=O(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),w=O(()=>d.value||c.value.length>0),v=O(()=>p.value||f.value.length>0),y=O(()=>m.value||h.value.length>0),b=O(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),S=O(()=>{switch(a.value){case"skills":return c.value.length;case"plugins":return h.value.length;case"root":return 0}});function I(){u.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(z=>z.id)}Ze([()=>n.sessionId,f,k],I,{immediate:!0}),Ze([c,d,h,m],()=>{a.value==="skills"&&!d.value&&c.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function T(){if(l.value=!l.value,!l.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:T});function $(){l.value=!1,a.value="root"}const L={tools:Promise.resolve(),mcpServers:Promise.resolve()},P={tools:0,mcpServers:0};function R(z,B,A){const F=++P[z],W=n.sessionId,j=L[z].then(async()=>{if(n.sessionId===W)try{await s.updateCapabilities({[z]:[...B.value]})}catch{F===P[z]&&n.sessionId===W&&(B.value=A)}});return L[z]=j,j}function M(z,B){const A=[...u.value],F=new Set(A);return B?F.add(z):F.delete(z),u.value=[...F],R("mcpServers",u,A)}function D(z,B){s.setPluginEnabled(z,B)}return(z,B)=>(g(),C("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?ie("",!0):(g(),C("button",{key:0,ref_key:"triggerRef",ref:r,type:"button",class:Be(["capability-trigger",{open:l.value}]),"aria-expanded":l.value,"aria-haspopup":"dialog","aria-label":x(o)("capabilityMenu.triggerLabel"),onClick:St(T,["stop"])},[B[5]||(B[5]=K2('',1)),_("span",DAe,N(x(o)("capabilityMenu.trigger")),1)],10,PAe)),Z(JT,{anchor:n.triggerless?i.value:r.value,open:l.value,label:x(o)("capabilityMenu.triggerLabel"),onClose:$},{default:ve(()=>[_("div",BAe,[_("div",zAe,[_("div",{class:Be(["capability-track",{"is-drilled":a.value!=="root"}])},[_("div",WAe,[w.value?(g(),he(Lc,{key:0,count:c.value.length,onClick:B[0]||(B[0]=A=>a.value="skills")},{label:ve(()=>[Ve(N(x(o)("capabilityMenu.skills.title")),1)]),trailing:ve(()=>[...B[6]||(B[6]=[_("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):ie("",!0),v.value?(g(),C("div",HAe,[_("div",jAe,N(x(o)("capabilityMenu.mcp.title")),1),_("p",UAe,N(x(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),C("div",VAe,[Z(Sk,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Ie,{key:1},ot(f.value,A=>(g(),he(Lc,{key:A.id,class:"mcp-row",selected:u.value.includes(A.id),title:A.name,onClick:F=>void M(A.id,!u.value.includes(A.id))},{label:ve(()=>[Ve(N(A.name),1)]),trailing:ve(()=>[Z(X5,{"model-value":u.value.includes(A.id),"aria-label":x(o)("capabilityMenu.mcp.toggle",{name:A.name}),onClick:B[1]||(B[1]=St(()=>{},["stop"])),"onUpdate:modelValue":F=>void M(A.id,F)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):ie("",!0),y.value?(g(),he(Lc,{key:2,count:h.value.length,onClick:B[2]||(B[2]=A=>a.value="plugins")},{label:ve(()=>[Ve(N(x(o)("capabilityMenu.plugins.title")),1)]),trailing:ve(()=>[...B[7]||(B[7]=[_("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):ie("",!0)]),_("div",qAe,[a.value!=="root"?(g(),he(Lc,{key:0,class:"capability-back",count:S.value,onClick:B[3]||(B[3]=A=>a.value="root")},{leading:ve(()=>[...B[8]||(B[8]=[_("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ve(()=>[Ve(N(b.value||x(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):ie("",!0),a.value==="skills"?(g(),C(Ie,{key:1},[_("p",KAe,N(x(o)("capabilityMenu.skills.caption")),1),d.value?(g(),C("div",GAe,[Z(Sk,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Ie,{key:1},ot(c.value,A=>(g(),he(Lc,{key:A.name,class:"skill-row",disabled:"",title:A.description},{label:ve(()=>[Ve(N(A.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),C(Ie,{key:2},[_("p",ZAe,N(x(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),C("div",YAe,[Z(Sk,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Ie,{key:1},ot(h.value,A=>(g(),he(Lc,{key:A.id,class:"plugin-row",selected:A.enabled,title:A.displayName,onClick:F=>D(A.id,!A.enabled)},{label:ve(()=>[Ve(N(A.displayName),1)]),trailing:ve(()=>[Z(X5,{"model-value":A.enabled,"aria-label":x(o)("capabilityMenu.plugins.toggle",{name:A.displayName}),onClick:B[4]||(B[4]=St(()=>{},["stop"])),"onUpdate:modelValue":F=>D(A.id,F)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):ie("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),XAe=ht(JAe,[["__scopeId","data-v-ff3a96c4"]]),QAe={class:"att-lightbox-card"},eMe=["src"],tMe=["src","alt"],nMe={class:"att-lightbox-name"},oMe={class:"composer-card"},sMe={key:0,class:"att-strip"},iMe={class:"att-scroll-content"},rMe={key:1,class:"att-row"},lMe={key:0,class:"att-more"},aMe={class:"cin-wrap"},uMe=["onClick"],cMe={class:"am-icon"},dMe={class:"am-name"},fMe={key:0,class:"am-desc"},pMe={class:"input-row"},hMe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],mMe=["aria-label"],gMe={class:"toolbar-left"},vMe=["aria-label","onKeydown"],yMe={class:"perm-pill-label"},kMe=["onClick"],bMe={class:"pd-info"},wMe={class:"pd-desc"},xMe={class:"pd-check"},_Me={key:1,class:"workflow-chip"},SMe={class:"workflow-label"},CMe={class:"toolbar-right"},AMe=["aria-label"],MMe=["aria-expanded"],EMe={class:"mp-name"},TMe={key:0,class:"think-suffix"},IMe=["aria-label"],$Me=["aria-label","disabled"],NMe={class:"md-list"},LMe={key:0,class:"md-section"},FMe=["onClick"],OMe={class:"md-check"},RMe={class:"md-name"},PMe={class:"md-provider"},DMe={key:1,class:"md-divider"},BMe={key:2,class:"md-section"},zMe=["onClick"],WMe={class:"md-check"},HMe={class:"md-name"},jMe={key:0,class:"md-divider"},UMe={class:"md-thinking"},VMe={class:"md-name"},qMe={key:0,class:"md-note"},KMe={key:2,class:"md-note"},GMe={class:"md-cache-note"},ZMe={class:"md-check md-more-icon"},YMe={class:"md-name"},JMe={class:"drop-card"},g8=36,XMe=Ge({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=O(()=>o.starting?r("composer.starting"):o.running?r("composer.placeholderRunning"):o.goalMode?r("status.goalPlaceholder"):o.planArmed||o.planMode?r("status.planPlaceholder"):r("composer.placeholder")),i=n,{t:r,locale:l}=It(),{text:a,textareaRef:u,autosize:c,loadForEdit:d,clearDraft:f}=O_e({sessionId:()=>o.sessionId});function p(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function h(){if(Us.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const m=q(!1);function k(){m.value=!m.value,bt(()=>{c(),b(),u.value?.focus()})}function w(){m.value&&(m.value=!1,bt(c))}function v(V){if(typeof getComputedStyle>"u")return g8;const pe=Number.parseFloat(getComputedStyle(V).minHeight);return Number.isFinite(pe)&&pe>0?pe:g8}const y=q(!1);function b(){const V=u.value;y.value=!!V&&V.scrollHeight>v(V)}Ze(a,()=>{bt(b)}),Ze(()=>o.sessionId,()=>{m.value=!1,I.value=!1,R.value=!1});const S=N_e({text:a,textareaRef:u,autosize:c,sessionId:()=>o.sessionId}),{open:I,items:T,active:$,update:L,select:P}=L_e({text:a,textareaRef:u,autosize:c,skills:()=>o.skills,emitCommand:V=>{if(V==="/plan"){p();return}if(V==="/goal"){h();return}i("command",V)},historyPush:V=>S.push(V),clearDraft:f}),{open:R,items:M,active:D,loading:z,update:B,select:A}=F_e({text:a,textareaRef:u,autosize:c,searchFiles:()=>o.searchFiles});function F(){S.resetBrowsing(),L(),B()}const{attachments:W,previewAttachment:j,fileInputRef:le,isDragOver:J,removeAttachment:X,openAttachmentPreview:G,closeAttachmentPreview:Q,openFilePicker:ee,handleFileInputChange:K,handleDragOver:ge,handleDragLeave:Ce,handleDrop:ze,clearAfterSubmit:me,loadAttachments:te}=R_e({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function oe(){const V=W.value.map(pe=>pe.localId);for(const pe of V)X(pe)}const H=O(()=>W.value.filter(V=>V.kind!=="file")),Y=O(()=>W.value.filter(V=>V.kind==="file")),ke=q(null),Se=q(null),ye=q(!1);let ne=null;function ce(){const V=ke.value;ye.value=V!==null&&V.scrollHeight>V.clientHeight+1}Ze(ke,V=>{ne?.disconnect(),ne=null,V&&typeof ResizeObserver=="function"&&(ne=new ResizeObserver(ce),ne.observe(V)),ce()},{immediate:!0}),Ze(W,()=>void bt(ce),{deep:!0}),Ze(()=>[H.value.length,Y.value.length],([V,pe],[Xe,on])=>{V<=Xe&&pe<=on||bt(()=>{const Io=ke.value;Io&&(Io.scrollTop=V>Xe&&Se.value?Se.value.offsetHeight-Io.clientHeight:Io.scrollHeight)})}),bn(()=>{a.value&&bt(()=>{c(),b()})}),Mn(()=>{document.removeEventListener("click",nt,!0),ne?.disconnect(),ai?.disconnect(),ts?.disconnect(),Mt()});function xe(){u.value?.focus({preventScroll:!0})}function fe(V){te(V)}const ue=O(()=>I.value||R.value||rt.value||gt.value||sn.value),we=O(()=>a.value.trim().length===0&&W.value.length===0);t({loadForEdit:d,loadAttachmentsForEdit:fe,focus:xe,anyPopupOpen:ue,isEmpty:we});function se(V){return{fileId:V.fileId,kind:V.kind,name:V.name,mediaType:V.mediaType,size:V.size}}function _e(V){if(V.kind==="file"){V.fileId!==void 0&&EN(V.fileId,V.name,V.mediaType);return}G(V)}function Re(){const V=a.value.trim();if(W.value.some(on=>on.uploading))return;const pe=W.value.filter(on=>!on.uploading&&!on.error&&on.fileId);if(!V&&pe.length===0)return;if(S.push(V),V==="/plan"){a.value="",f(),I.value=!1,w(),p();return}if(V==="/goal"){a.value="",f(),I.value=!1,w(),h();return}if(V){const on=__e(V),Io=on?PN(o.skills).some(tl=>tl.name===on.cmd||tl.name===`/${$1}${on.cmd.slice(1)}`):!1;if(on&&Io){a.value="",f(),I.value=!1,w(),i("command",on.arg?`${on.cmd} ${on.arg}`:on.cmd);return}}const Xe={text:V,attachments:pe.map(on=>se(on))};j.value=null,me(),a.value="",f(),I.value=!1,R.value=!1,w(),i("submit",Xe)}function lt(){if(!o.running||W.value.some(on=>on.uploading))return;const V=a.value.trim(),pe=W.value.filter(on=>!on.uploading&&!on.error&&on.fileId);if(!V&&pe.length===0&&o.queued.length===0)return;const Xe={text:V,attachments:pe.map(on=>se(on))};me(),S.push(V),a.value="",f(),I.value=!1,R.value=!1,w(),i("steer",Xe)}let ct=!1,Ct=null;function Mt(){Ct!==null&&(clearTimeout(Ct),Ct=null)}function Bt(){Mt(),ct=!0}function Vt(){Mt(),Ct=setTimeout(()=>{Ct=null,ct=!1},0)}function Je(V){return ct||V.isComposing||V.keyCode===229}function tt(V){if(!Je(V)){if(zn.value&&V.key==="Backspace"&&!V.shiftKey&&!V.altKey&&!V.metaKey&&!V.ctrlKey){const pe=u.value;if(pe&&pe.selectionStart===0&&pe.selectionEnd===0){V.preventDefault(),To();return}}if(V.key==="Escape"){if(sn.value){V.preventDefault(),In();return}if(rt.value){V.preventDefault(),Wo();return}if(gt.value){V.preventDefault(),Bn();return}}if(I.value){if(V.key==="Escape"){V.preventDefault(),I.value=!1;return}if(V.key==="Tab"&&T.value.length===0){I.value=!1;return}if(V.key==="ArrowDown"){V.preventDefault(),$.value=($.value+1)%T.value.length;return}if(V.key==="ArrowUp"){V.preventDefault(),$.value=($.value-1+T.value.length)%T.value.length;return}if(V.key==="Enter"||V.key==="Tab"){V.preventDefault();const pe=T.value[$.value];pe&&P(pe);return}}if(R.value&&!z.value){if(V.key==="ArrowDown"){V.preventDefault(),D.value=(D.value+1)%Math.max(1,M.value.length);return}if(V.key==="ArrowUp"){V.preventDefault(),D.value=(D.value-1+Math.max(1,M.value.length))%Math.max(1,M.value.length);return}if(V.key==="Enter"||V.key==="Tab"){V.preventDefault();const pe=M.value[D.value];pe&&A(pe);return}if(V.key==="Escape"){V.preventDefault(),R.value=!1;return}}if(V.key==="s"&&(V.ctrlKey||V.metaKey)&&!V.shiftKey&&!V.altKey){o.running&&(V.preventDefault(),lt());return}if(!m.value&&!I.value&&!R.value&&!V.shiftKey&&!V.altKey&&!V.metaKey&&!V.ctrlKey){const pe=S.isBrowsing();if(V.key==="ArrowUp"&&S.hasHistory()&&(pe||S.caretAtTextStart())){V.preventDefault(),S.recallOlder(),I.value=!1;return}if(V.key==="ArrowDown"&&pe){V.preventDefault(),S.recallNewer(),I.value=!1;return}}if(V.key==="Enter"&&!V.shiftKey){if(m.value&&!(V.metaKey||V.ctrlKey))return;V.preventDefault(),Re()}}}const dt=O(()=>r("composer.send")),Rt=O(()=>!!o.uploadImage),Fe=O(()=>!W.value.some(V=>V.uploading)&&(a.value.trim()!==""||W.value.some(V=>!V.error&&V.fileId))),Ye=O(()=>{if(I.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),it=O(()=>{if(I.value&&T.value.length>0)return`composer-slash-option-${$.value}`;if(R.value&&M.value.length>0)return`composer-mention-option-${D.value}`}),rt=q(!1),gt=q(!1),Tt=q(null),tn=q(null),fn=q(null),Kt=q(null),Dn=q(""),Yt=q("");function Eo(){rt.value=!rt.value,rt.value&&(kt(),gt.value=!1,In(),I.value=!1,R.value=!1,document.addEventListener("click",nt,!0))}function Wo(){rt.value=!1,bs()}function ho(){gt.value=!gt.value,gt.value&&(Ae(),rt.value=!1,In(),I.value=!1,R.value=!1,document.addEventListener("click",nt,!0))}function Bn(){gt.value=!1,bs()}function bs(){!rt.value&&!gt.value&&!sn.value&&document.removeEventListener("click",nt,!0)}function nt(V){const pe=V.target;Tt.value?.contains(pe)||li.value?.contains(pe)||(Wo(),Bn(),In())}function Ae(){const V=tn.value,pe=Tt.value;Dn.value=V&&pe?`${Math.round(V.getBoundingClientRect().left-pe.getBoundingClientRect().left)}px`:""}function kt(){const V=fn.value,pe=Tt.value;Yt.value=V&&pe?`${Math.round(pe.getBoundingClientRect().right-V.getBoundingClientRect().right)}px`:""}const Nt=O(()=>{const V=o.status?.ctxMax??0;return V<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/V*100)))}),Xt=O(()=>{const V=Rl(o.status?.ctxUsed??0),pe=Rl(o.status?.ctxMax??0);return r("status.ctxTooltip",{used:V,max:pe,pct:Nt.value})}),ko=O(()=>Nt.value>=80),Gn=O(()=>o.models?.find(V=>V.id===o.status?.modelId)),qn=O(()=>D0(Gn.value)),oo=O(()=>yh(Gn.value)),lo=O(()=>N1(Gn.value,o.thinking)),fs=O(()=>oo.value.includes(lo.value)?lo.value:""),Ei=O(()=>M_e(lo.value)),Ns=O(()=>qn.value==="unsupported"||oo.value.length<=1),Ls=O(()=>{if(!Ei.value)return"";const V=(Gn.value?.supportEfforts?.length??0)>0,pe=lo.value;return V&&pe!=="on"?r("composer.thinkingSuffixEffort",{level:pe}):r("composer.thinkingSuffix")});function js(V){Ns.value||i("setThinking",Wx(Gn.value,V))}function ii(V){return V==="on"?r("status.thinkingOn"):V==="off"?r("status.thinkingOff"):Yp(V)}const ps=O(()=>oo.value.map(V=>({value:V,label:ii(V)}))),cr=O(()=>o.planArmed===!0||o.planMode===!0),Vi=O(()=>o.workflowActive===!0),wn=O(()=>o.goal?.status??o.activationBadges?.goal?.status??null),Us=O(()=>wn.value!==null&&wn.value!=="complete"),zn=O(()=>o.goalMode?"goal":o.planArmed?"plan":null),ri=q(null),Fs=q(""),Ti=O(()=>Fs.value?{textIndent:Fs.value}:void 0);let ts=null;function To(){zn.value==="goal"?i("toggleGoal"):zn.value==="plan"&&i("togglePlan")}function ns(){const V=ri.value;Fs.value=V?`calc(${V.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ze(zn,async V=>{if(ts?.disconnect(),ts=null,!V){Fs.value="";return}await bt(),ns(),typeof ResizeObserver=="function"&&ri.value&&(ts=new ResizeObserver(ns),ts.observe(ri.value))},{immediate:!0});const Oo=q(null),sn=q(!1),li=q(null),os=q(null),bo=q(null);let ai=null;const ui=O(()=>{const V=[];return Rt.value&&V.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Ne}),V.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Ue},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:rn},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:cn}),V});function ss(){const V=os.value;if(!V||V.scrollHeight<=V.clientHeight+1){bo.value=null;return}const pe=getComputedStyle(V),Xe=Number.parseFloat(pe.getPropertyValue("--menu-scrollbar-track-inset"))||0,on=Number.parseFloat(pe.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Io=V.clientHeight-Xe*2,tl=Math.max(on,V.clientHeight/V.scrollHeight*Io),Ga=V.scrollHeight-V.clientHeight;bo.value={top:V.offsetTop+Xe+V.scrollTop/Ga*(Io-tl),height:tl}}Ze(sn,async V=>{ai?.disconnect(),ai=null,bo.value=null,V&&(await bt(),ss(),typeof ResizeObserver=="function"&&os.value&&(ai=new ResizeObserver(ss),ai.observe(os.value)))});function In(){sn.value=!1,bs()}function wo(){if(sn.value){In();return}Wo(),Bn(),I.value=!1,R.value=!1,sn.value=!0,document.addEventListener("click",nt,!0),bt(()=>li.value?.querySelector(".am-row")?.focus())}function Nr(V){V.action(),u.value?.focus()}function Te(V){if(V.key==="Escape"){V.preventDefault(),In(),u.value?.focus();return}if(V.key==="Tab"){In();return}if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;V.preventDefault();const pe=Array.from(li.value?.querySelectorAll(".am-row")??[]);if(pe.length===0)return;const Xe=pe.indexOf(document.activeElement),on=V.key==="ArrowDown"?(Xe+1)%pe.length:(Xe-1+pe.length)%pe.length;pe[on]?.focus()}function Ne(){In(),ee()}function Ue(){In(),Oo.value?.toggleOpen()}function rn(){In(),o.goalMode||h()}function cn(){In(),cr.value||p()}const Sn=[{mode:"manual",icon:"hand",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],Cn=q(null),de=q("");function Me(V){const pe={};return V&&(pe["--composer-menu-desc-width"]=V),pe}const Le=O(()=>{const V=Me(de.value);return Dn.value&&(V.left=Dn.value),V}),je=O(()=>{const V={};return Yt.value&&(V.right=Yt.value),V});let at=null;function yt(V){const pe=Number.parseFloat(V);return Number.isFinite(pe)?pe:0}function Gt(V){return`${V.fontStyle||"normal"} ${V.fontWeight||"400"} ${V.fontSize} ${V.fontFamily}`}function nn(V){return V.letterSpacing==="normal"?0:yt(V.letterSpacing)}function Zn(V,pe){if(!V)return 0;const Xe=Zxe(V,Gt(pe),{letterSpacing:nn(pe)});return Yxe(Xe)}function gn(){const V=Cn.value?.querySelector(".pd-desc");if(!V)return;const pe=getComputedStyle(V),Xe=Math.max(0,...Sn.map(on=>Zn(r(on.descKey),pe)));de.value=Xe>0?`${Math.ceil(Xe)}px`:""}function An(){typeof window>"u"||(at!==null&&window.cancelAnimationFrame(at),bt(()=>{at=window.requestAnimationFrame(()=>{at=null,gn()})}))}Ze(l,An,{immediate:!0}),bn(()=>{An(),document.fonts?.ready.then(An)}),Mn(()=>{at!==null&&(window.cancelAnimationFrame(at),at=null)});function Ho(V){i("setPermission",V),Bn()}const Ot=O(()=>Sn.find(V=>V.mode===o.status?.permission)),Zt=O(()=>Ot.value?r(Ot.value.labelKey):""),pn=O(()=>Ot.value?.icon??"hand"),Yn=O(()=>Gn.value?.provider??""),Jn=O(()=>!Yn.value||!o.models?.length?[]:o.models.filter(V=>V.provider===Yn.value)),is=O(()=>new Set(o.starredIds??[]));function Ro(V){return is.value.has(V)}const Vs=O(()=>o.models?.length?o.models.filter(V=>Ro(V.id)&&V.provider!==Yn.value):[]);Ze(rt,async V=>{if(!V)return;await bt(),(Kt.value?.querySelector(".md-row.is-current")??Kt.value?.querySelector(".md-row"))?.focus()});function Lr(V){if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;const pe=Array.from(Kt.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(pe.length===0)return;V.preventDefault();const Xe=pe.indexOf(document.activeElement),on=V.key==="ArrowDown"?(Xe+1)%pe.length:(Xe-1+pe.length)%pe.length;pe[on]?.focus()}function st(V){i("selectModel",V),Wo()}return(V,pe)=>(g(),C("div",{class:Be(["composer",{"drag-over":x(J),expanded:m.value}]),onDragover:pe[17]||(pe[17]=(...Xe)=>x(ge)&&x(ge)(...Xe)),onDragleave:pe[18]||(pe[18]=(...Xe)=>x(Ce)&&x(Ce)(...Xe)),onDrop:pe[19]||(pe[19]=(...Xe)=>x(ze)&&x(ze)(...Xe))},[x(j)?(g(),C("div",{key:0,class:"att-lightbox",onClick:pe[1]||(pe[1]=St((...Xe)=>x(Q)&&x(Q)(...Xe),["self"]))},[_("div",QAe,[Z(_n,{text:x(r)("model.close")},{default:ve(()=>[_("button",{type:"button",class:"att-lightbox-close",onClick:pe[0]||(pe[0]=(...Xe)=>x(Q)&&x(Q)(...Xe))},"✕")]),_:1},8,["text"]),x(j).kind==="video"?(g(),C("video",{key:0,class:"att-lightbox-media",src:x(j).previewUrl,controls:"",playsinline:""},null,8,eMe)):(g(),C("img",{key:1,class:"att-lightbox-media",src:x(j).previewUrl,alt:x(j).name},null,8,tMe)),_("div",nMe,N(x(j).name),1)])])):ie("",!0),_("div",oMe,[x(W).length>0?(g(),C("div",sMe,[_("div",{ref_key:"attachmentScrollRef",ref:ke,class:Be(["att-scroll",{"is-overflowing":ye.value}])},[_("div",iMe,[H.value.length>0?(g(),C("div",{key:0,ref_key:"attachmentMediaRowRef",ref:Se,class:"att-row att-row-media"},[(g(!0),C(Ie,null,ot(H.value,Xe=>(g(),he(a2,{key:Xe.localId,kind:Xe.kind,name:Xe.name,url:Xe.previewUrl,"file-id":Xe.fileId,"media-type":Xe.mediaType,size:Xe.size,uploading:Xe.uploading,error:Xe.error,removable:"","remove-label":x(r)("composer.removeNamed",{name:Xe.name}),onActivate:on=>_e(Xe),onRemove:on=>x(X)(Xe.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):ie("",!0),Y.value.length>0?(g(),C("div",rMe,[(g(!0),C(Ie,null,ot(Y.value,Xe=>(g(),he(a2,{key:Xe.localId,kind:"file",name:Xe.name,"media-type":Xe.mediaType,size:Xe.size,uploading:Xe.uploading,error:Xe.error,removable:"","remove-label":x(r)("composer.removeNamed",{name:Xe.name}),onActivate:on=>_e(Xe),onRemove:on=>x(X)(Xe.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):ie("",!0)])],2),ye.value?(g(),C("span",lMe,N(x(r)("composer.attachmentCount",{n:x(W).length})),1)):ie("",!0),x(W).length>=2?(g(),he(_n,{key:1,text:x(r)("composer.clearAll")},{default:ve(()=>[Z(Jt,{class:"att-clear",size:"sm",label:x(r)("composer.clearAll"),onClick:oe},{default:ve(()=>[Z(Oe,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):ie("",!0)])):ie("",!0),_("div",aMe,[x(I)?(g(),he(a_e,{key:0,id:"composer-slash-menu",items:x(T),"active-index":x($),onSelect:x(P),onHover:pe[2]||(pe[2]=Xe=>$.value=Xe)},null,8,["items","active-index","onSelect"])):ie("",!0),x(R)?(g(),he(x_e,{key:1,id:"composer-mention-menu",items:x(M),"active-index":x(D),loading:x(z),onSelect:x(A),onHover:pe[3]||(pe[3]=Xe=>D.value=Xe)},null,8,["items","active-index","loading","onSelect"])):ie("",!0),Z(Sr,{name:"composer-menu-pop"},{default:ve(()=>[sn.value?(g(),C("div",{key:0,ref_key:"modesMenuRef",ref:li,class:"add-menu",onClick:pe[5]||(pe[5]=St(()=>{},["stop"])),onKeydown:Te},[_("div",{ref_key:"addMenuScrollRef",ref:os,class:"am-scroll",role:"menu",onScroll:ss},[(g(!0),C(Ie,null,ot(ui.value,Xe=>(g(),C("button",{key:Xe.id,type:"button",class:"am-row",role:"menuitem",onMousedown:pe[4]||(pe[4]=St(()=>{},["prevent"])),onClick:on=>Nr(Xe)},[_("span",cMe,[Z(Oe,{name:Xe.icon,size:"sm"},null,8,["name"])]),_("span",dMe,N(x(r)(Xe.nameKey)),1),Xe.descKey?(g(),C("span",fMe,N(x(r)(Xe.descKey)),1)):ie("",!0)],40,uMe))),128))],544),bo.value?(g(),C("div",{key:0,class:"scroll-thumb",style:Ut({top:`${bo.value.top}px`,height:`${bo.value.height}px`})},null,4)):ie("",!0)],544)):ie("",!0)]),_:1}),_("div",pMe,[zn.value?(g(),C("span",{key:0,ref_key:"workModePillRef",ref:ri,class:"wm-pill"},[Z(Oe,{name:zn.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),_("span",null,N(zn.value==="goal"?x(r)("status.goalLabel"):x(r)("status.planLabel")),1),Z(Jt,{class:"wm-x",size:"sm",label:x(r)("status.workModeDismiss"),onMousedown:pe[6]||(pe[6]=St(()=>{},["prevent"])),onClick:To},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):ie("",!0),Fn(_("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":pe[7]||(pe[7]=Xe=>Do(a)?a.value=Xe:null),class:"ph",style:Ut(Ti.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!Ye.value,"aria-controls":Ye.value,"aria-activedescendant":it.value,onKeydown:tt,onCompositionstart:Bt,onCompositionend:Vt,onInput:F,onBlur:pe[8]||(pe[8]=Xe=>{I.value=!1,R.value=!1})},null,44,hMe),[[ks,x(a)]]),Z(_n,{text:m.value?x(r)("composer.collapseTitle"):x(r)("composer.expandTitle")},{default:ve(()=>[m.value||y.value?(g(),C("button",{key:0,class:"expand-btn",type:"button","aria-label":m.value?x(r)("composer.collapseTitle"):x(r)("composer.expandTitle"),onClick:k},[m.value?(g(),he(Oe,{key:0,name:"collapse",size:"sm"})):(g(),he(Oe,{key:1,name:"expand",size:"sm"}))],8,mMe)):ie("",!0)]),_:1},8,["text"])])]),Rt.value?(g(),C("input",{key:1,ref_key:"fileInputRef",ref:le,type:"file",multiple:"",class:"file-input-hidden",onChange:pe[9]||(pe[9]=(...Xe)=>x(K)&&x(K)(...Xe))},null,544)):ie("",!0),_("div",{ref_key:"toolbarRef",ref:Tt,class:"toolbar"},[_("div",{ref_key:"menuMeasureRef",ref:Cn,class:"menu-measure","aria-hidden":"true"},[...pe[20]||(pe[20]=[_("span",{class:"pd-desc"},null,-1)])],512),_("div",gMe,[Z(Jt,{size:"md",class:"composer-attach",label:x(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":sn.value,onMousedown:pe[10]||(pe[10]=St(()=>{},["prevent"])),onClick:St(wo,["stop"])},{default:ve(()=>[Z(Oe,{name:"plus"})]),_:1},8,["label","aria-expanded"]),Z(XAe,{ref_key:"capMenuRef",ref:Oo,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),C("span",{key:0,ref_key:"permissionPillRef",ref:tn,class:Be(["perm-pill",["perm-"+e.status.permission,{open:gt.value}]]),role:"button",tabindex:"0","aria-label":Zt.value,onClick:St(ho,["stop"]),onKeydown:[Po(ho,["enter"]),Po(St(ho,["prevent"]),["space"])]},[Z(Oe,{class:"perm-pill-icon",name:pn.value,size:"md"},null,8,["name"]),_("span",yMe,N(Zt.value),1)],42,vMe)):ie("",!0),Z(Sr,{name:"composer-menu-pop"},{default:ve(()=>[gt.value&&e.status?(g(),C("div",{key:0,class:"perm-dropdown",style:Ut(Le.value),role:"menu",onClick:pe[11]||(pe[11]=St(()=>{},["stop"]))},[(g(),C(Ie,null,ot(Sn,Xe=>_("button",{key:Xe.mode,class:Be(["pd-row",{"is-current":Xe.mode===e.status.permission}]),role:"menuitem",onClick:on=>Ho(Xe.mode)},[_("span",{class:"pd-icon",style:Ut({color:Xe.color})},[Z(Oe,{name:Xe.icon,size:"md"},null,8,["name"])],4),_("span",bMe,[_("span",{class:"pd-name",style:Ut({color:Xe.color})},N(x(r)(Xe.labelKey)),5),_("span",wMe,N(x(r)(Xe.descKey)),1)]),_("span",xMe,[Xe.mode===e.status.permission?(g(),he(Oe,{key:0,name:"check",size:"sm"})):ie("",!0)])],10,kMe)),64))],4)):ie("",!0)]),_:1}),Vi.value?(g(),C("span",_Me,[Z(Oe,{class:"workflow-ic",name:"sparkles",size:"md"}),_("span",SMe,N(x(r)("status.dynamicWorkflowLabel")),1)])):ie("",!0)]),_("div",CMe,[ko.value?(g(),C("button",{key:0,class:"compact-chip",onClick:pe[12]||(pe[12]=St(Xe=>i("compact"),["stop"]))},"/compact")):ie("",!0),Z(_n,{text:Xt.value},{default:ve(()=>[e.status&&!e.hideContext?(g(),C("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Xt.value},[Z(z_e,{pct:Nt.value},null,8,["pct"])],8,AMe)):ie("",!0)]),_:1},8,["text"]),e.status?(g(),C("button",{key:1,ref_key:"modelPillRef",ref:fn,type:"button",class:Be(["model-pill",{open:rt.value}]),"aria-haspopup":"menu","aria-expanded":rt.value,onClick:St(Eo,["stop"])},[_("span",EMe,N(e.status.model),1),Ls.value?(g(),C("span",TMe,N(Ls.value),1)):ie("",!0),Z(Oe,{class:"cv",name:"chevron-down",size:"sm"})],10,MMe)):ie("",!0),e.working?(g(),he(_n,{key:2,text:x(r)("composer.interruptTitle")},{default:ve(()=>[_("button",{class:"stop","aria-label":x(r)("composer.interrupt"),onClick:pe[13]||(pe[13]=Xe=>i("interrupt"))},[Z(Oe,{name:"stop",size:"sm"})],8,IMe)]),_:1},8,["text"])):ie("",!0),_("button",{class:Be(["send",{"is-starting":e.starting}]),"aria-label":dt.value,disabled:e.starting||!Fe.value,onClick:pe[14]||(pe[14]=Xe=>Re())},[e.starting?(g(),he(Bo,{key:0,size:"sm"})):(g(),he(Oe,{key:1,name:"send",size:"sm"}))],10,$Me)]),Z(Sr,{name:"composer-menu-pop"},{default:ve(()=>[rt.value&&e.status?(g(),C("div",{key:0,ref_key:"modelDropdownRef",ref:Kt,class:"model-dropdown",style:Ut(je.value),role:"menu",onClick:pe[16]||(pe[16]=St(()=>{},["stop"])),onKeydown:Lr},[_("div",NMe,[Vs.value.length>0?(g(),C("div",LMe,N(x(r)("status.starredModels")),1)):ie("",!0),(g(!0),C(Ie,null,ot(Vs.value,Xe=>(g(),C("button",{key:Xe.id,class:Be(["md-row",{"is-current":Xe.id===e.status.modelId}]),role:"menuitem",onClick:on=>st(Xe.id)},[_("span",OMe,[Xe.id===e.status.modelId?(g(),he(Oe,{key:0,name:"check",size:"sm"})):ie("",!0)]),_("span",RMe,N(Xe.displayName??Xe.model),1),_("span",PMe,N(Xe.provider),1),Z(Oe,{class:"md-star",name:"star",size:"sm"})],10,FMe))),128)),Vs.value.length>0?(g(),C("div",DMe)):ie("",!0),Jn.value.length>0?(g(),C("div",BMe,N(Yn.value),1)):ie("",!0),(g(!0),C(Ie,null,ot(Jn.value,Xe=>(g(),C("button",{key:Xe.id,class:Be(["md-row",{"is-current":Xe.id===e.status.modelId}]),role:"menuitem",onClick:on=>st(Xe.id)},[_("span",WMe,[Xe.id===e.status.modelId?(g(),he(Oe,{key:0,name:"check",size:"sm"})):ie("",!0)]),_("span",HMe,N(Xe.displayName??Xe.model),1),Ro(Xe.id)?(g(),he(Oe,{key:0,class:"md-star",name:"star",size:"sm"})):ie("",!0)],10,zMe))),128))]),Jn.value.length>0?(g(),C("div",jMe)):ie("",!0),_("div",UMe,[_("span",VMe,N(x(r)("status.thinkingLabel")),1),qn.value==="unsupported"?(g(),C("span",qMe,N(x(r)("status.modeNotSupported")),1)):oo.value.length>1?(g(),he(Bs,{key:1,"model-value":fs.value,options:ps.value,size:"xs","onUpdate:modelValue":js},null,8,["model-value","options"])):(g(),C("span",KMe,N(ii(oo.value[0]??lo.value)),1))]),pe[21]||(pe[21]=_("div",{class:"md-divider"},null,-1)),_("div",GMe,N(x(r)("status.cacheNote")),1),pe[22]||(pe[22]=_("div",{class:"md-divider"},null,-1)),_("button",{class:"md-row md-row-more",role:"menuitem",onClick:pe[15]||(pe[15]=Xe=>{Wo(),i("pickModel")})},[_("span",ZMe,[Z(Oe,{name:"list",size:"sm"})]),_("span",YMe,N(x(r)("status.moreModels")),1),Z(Oe,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):ie("",!0)]),_:1})],512)]),_("div",{class:Be(["drop-overlay",{show:x(J)}]),"aria-hidden":"true"},[_("div",JMe,[Z(Oe,{name:"file-plus",size:"lg"}),_("span",null,N(x(r)("composer.dropToAttach")),1)])],2)],34))}}),I7=ht(XMe,[["__scopeId","data-v-6d6e98cb"]]),QMe={class:"ah"},e5e={class:"akind"},t5e={class:"apath"},n5e={class:"ah-path"},o5e={class:"dg"},s5e={class:"dc"},i5e={key:2,class:"body-shell"},r5e={class:"shell-cmd"},l5e={key:0,class:"shell-cwd"},a5e={key:1,class:"shell-danger"},u5e={class:"file-bar"},c5e={class:"file-lang"},d5e={class:"file-ln"},f5e={class:"file-text"},p5e={key:4,class:"body-chip"},h5e={class:"chip-label"},m5e={class:"chip-value"},g5e={key:0,class:"chip-detail"},v5e={key:5,class:"body-chip"},y5e={key:0,class:"chip-label"},k5e={class:"chip-value"},b5e={key:6,class:"body-chip"},w5e={class:"chip-label"},x5e={class:"chip-value"},_5e={key:0,class:"chip-detail"},S5e={key:7,class:"body-chip"},C5e={class:"chip-label"},A5e={class:"chip-value"},M5e={key:0,class:"chip-detail"},E5e={key:8,class:"body-todo"},T5e={class:"todo-glyph"},I5e={key:10,class:"body-generic"},$5e={class:"gen-text"},N5e={key:11,class:"feedback-wrap"},L5e=["placeholder"],F5e={class:"feedback-hint"},O5e={key:0,class:"plan-actions"},R5e={key:1,class:"abtn"},P5e=.4,D5e=Ge({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O(()=>{const oe=n.block;return oe.kind!=="plan_review"?null:{plan:oe.plan,path:oe.path,options:oe.options??[]}}),r=q(!1),l=q(!1),a=O(()=>["plan_review","diff","file"].includes(n.block.kind)),u=q(null),c=q(null),d=q(null),f=q({top:!1,bottom:!1}),p=q({top:!1,bottom:!1}),h=q({top:!1,bottom:!1});function m(oe){return H=>{const Y=H.currentTarget;Y instanceof HTMLElement&&(oe.value={top:Y.scrollTop>0,bottom:Y.scrollTop+Y.clientHeight{const{top:H,bottom:Y}=oe.value;if(!H&&!Y)return;const ke="var(--menu-scroll-fade)",Se=H&&Y?`linear-gradient(to bottom, transparent 0, black ${ke}, black calc(100% - ${ke}), transparent 100%)`:H?`linear-gradient(to bottom, transparent, black ${ke})`:`linear-gradient(to top, transparent, black ${ke})`;return{maskImage:Se,WebkitMaskImage:Se}})}const b=y(f),S=y(p),I=y(h);function T(){const oe=[[u.value,f],[c.value,p],[d.value,h]];for(const[H,Y]of oe)H&&(Y.value={top:H.scrollTop>0,bottom:H.scrollTop+H.clientHeightvoid bt(T)),Ze(r,()=>void bt(T)),Ze(()=>n.block,()=>void bt(T));const $=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function L(){const oe=$.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${oe}`)}const P=q(!1),R=q(""),M=q(null);function D(){const oe=M.value;if(!oe)return;oe.style.height="auto";const Y=(window.visualViewport?.height??window.innerHeight)*P5e,ke=Math.min(oe.scrollHeight,Y);oe.style.height=`${ke}px`,oe.style.overflowY=oe.scrollHeight>Y?"auto":"hidden"}let z=null,B=0;function A(){if(z?.disconnect(),z=null,typeof ResizeObserver>"u")return;const oe=M.value;oe&&(z=new ResizeObserver(H=>{const Y=H[0]?.contentRect.width??0;Y!==B&&(B=Y,D())}),z.observe(oe))}Ze(R,()=>void bt(D)),Ze(P,oe=>{if(!oe){z?.disconnect(),z=null;return}bt(()=>{D(),A()})}),Ze(r,oe=>{oe||bt(D)});const{uiFontSize:F}=Kx();Ze(F,()=>void bt(D));function W(){n.busy||(P.value=!0,R.value="",setTimeout(()=>M.value?.focus(),0))}function j(){if(n.busy)return;const oe=R.value.trim();i.value?G("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:oe||void 0}):G("feedback",{decision:"rejected",feedback:oe||void 0}),P.value=!1,R.value=""}function le(){P.value=!1,R.value=""}function J(oe){oe.key==="Enter"&&!oe.shiftKey?(oe.preventDefault(),j()):oe.key==="Escape"&&(oe.preventDefault(),le())}const X=q(null);Ze(()=>n.busy,oe=>{oe||(X.value=null)});function G(oe,H){n.busy||(X.value=oe,o("decide",H))}function Q(){G("approve",{decision:"approved"})}function ee(){G("approveSession",{decision:"approved",scope:"session"})}function K(){G("reject",{decision:"rejected"})}function ge(){G("approvePlan",{decision:"approved"})}function Ce(oe){G(`option:${oe}`,{decision:"approved",selectedLabel:oe})}function ze(){n.busy||W()}function me(){G("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function te(oe){const H=(document.activeElement?.tagName??"").toLowerCase();if(H==="input"||H==="textarea"||n.busy||r.value)return;const Y=i.value;if(Y){if(Y.options.length===0){oe.key==="1"?(oe.preventDefault(),ge()):oe.key==="2"?(oe.preventDefault(),ze()):oe.key==="3"&&(oe.preventDefault(),me());return}oe.key==="1"&&Y.options[0]?(oe.preventDefault(),Ce(Y.options[0].label)):oe.key==="2"&&Y.options[1]?(oe.preventDefault(),Ce(Y.options[1].label)):oe.key==="3"&&Y.options[2]&&(oe.preventDefault(),Ce(Y.options[2].label));return}oe.key==="1"?(oe.preventDefault(),Q()):oe.key==="2"?(oe.preventDefault(),ee()):oe.key==="3"?(oe.preventDefault(),K()):oe.key==="4"&&(oe.preventDefault(),W())}return bn(()=>{document.addEventListener("keydown",te),window.addEventListener("resize",D),window.visualViewport?.addEventListener("resize",D)}),Mn(()=>{document.removeEventListener("keydown",te),window.removeEventListener("resize",D),window.visualViewport?.removeEventListener("resize",D),z?.disconnect(),z=null}),(oe,H)=>(g(),he($x,{class:Be(["appr",{minimized:r.value}])},Ap({head:ve(()=>[_("div",QMe,[H[6]||(H[6]=_("span",{class:"ah-ic"},"!",-1)),_("span",e5e,N(L()),1),_("span",t5e,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),C(Ie,{key:0},[Ve(N(e.block.path),1)],64)):e.block.kind==="shell"?(g(),C(Ie,{key:1},[Ve(N(e.block.command),1)],64)):e.block.kind==="url"?(g(),C(Ie,{key:2},[Ve(N(e.block.url),1)],64)):e.block.kind==="search"?(g(),C(Ie,{key:3},[Ve(N(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),C(Ie,{key:4},[Ve(N(e.block.name),1)],64)):e.block.kind==="generic"?(g(),C(Ie,{key:5},[Ve(N(e.block.summary),1)],64)):ie("",!0)]),e.agentName&&!r.value?(g(),he(br,{key:0,variant:"neutral",size:"sm"},{default:ve(()=>[Ve(N(x(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):ie("",!0),r.value?ie("",!0):(g(),he(br,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ve(()=>[Ve(N(x(s)("approval.required")),1)]),_:1})),a.value&&!r.value?(g(),he(Jt,{key:2,class:"aexpand",size:"sm",label:l.value?x(s)("approval.collapsePlan"):x(s)("approval.expandPlan"),tooltip:l.value?x(s)("approval.collapsePlan"):x(s)("approval.expandPlan"),onClick:H[0]||(H[0]=Y=>l.value=!l.value)},{default:ve(()=>[Z(Oe,{name:l.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):ie("",!0),Z(Jt,{class:"amin",size:"sm",label:r.value?x(s)("question.expand"):x(s)("question.minimize"),onClick:H[1]||(H[1]=Y=>r.value=!r.value)},{default:ve(()=>[r.value?(g(),he(Oe,{key:0,name:"chevron-up",size:"md"})):(g(),he(Oe,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[r.value?void 0:{name:"default",fn:ve(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),he(_n,{key:0,text:e.block.path},{default:ve(()=>[_("div",n5e,N(e.block.path),1)]),_:1},8,["text"])):ie("",!0),e.block.kind==="diff"?(g(),C("div",{key:1,ref_key:"diffBodyRef",ref:u,class:Be(["diff",{expanded:l.value}]),style:Ut(x(b)),onScroll:H[2]||(H[2]=(...Y)=>x(k)&&x(k)(...Y))},[(g(!0),C(Ie,null,ot(e.block.diff,(Y,ke)=>(g(),C("div",{key:ke,class:Be(["dl",Y.kind==="add"?"add":Y.kind==="rem"?"del":""])},[_("span",o5e,N(Y.gutter),1),_("span",s5e,N(Y.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),C("div",i5e,[_("div",r5e,[H[7]||(H[7]=_("span",{class:"shell-dollar"},"$",-1)),Ve(" "+N(e.block.command),1)]),e.block.cwd?(g(),C("div",l5e,"cwd: "+N(e.block.cwd),1)):ie("",!0),e.block.danger?(g(),C("div",a5e,N(x(s)("approval.danger",{detail:e.block.danger})),1)):ie("",!0)])):e.block.kind==="file"?(g(),C("div",{key:3,class:Be(["body-file",{expanded:l.value}])},[_("div",u5e,[_("span",c5e,N(e.block.language??""),1)]),_("div",{class:"file-content",ref_key:"fileBodyRef",ref:c,style:Ut(x(S)),onScroll:H[3]||(H[3]=(...Y)=>x(w)&&x(w)(...Y))},[(g(!0),C(Ie,null,ot(e.block.content.split(` -`),(Y,ke)=>(g(),C("div",{key:ke,class:"file-line"},[_("span",d5e,N(ke+1),1),_("span",f5e,N(Y),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),C("div",p5e,[_("span",h5e,N(e.block.op),1),_("span",m5e,N(e.block.path),1),e.block.detail?(g(),C("span",g5e,N(e.block.detail),1)):ie("",!0)])):e.block.kind==="url"?(g(),C("div",v5e,[e.block.method?(g(),C("span",y5e,N(e.block.method),1)):ie("",!0),_("span",k5e,N(e.block.url),1)])):e.block.kind==="search"?(g(),C("div",b5e,[_("span",w5e,N(x(s)("approval.searchQueryLabel")),1),_("span",x5e,N(e.block.query),1),e.block.scope?(g(),C("span",_5e,N(x(s)("approval.searchScope",{scope:e.block.scope})),1)):ie("",!0)])):e.block.kind==="invocation"?(g(),C("div",S5e,[_("span",C5e,N(e.block.kind2),1),_("span",A5e,N(e.block.name),1),e.block.description?(g(),C("span",M5e,N(e.block.description),1)):ie("",!0)])):e.block.kind==="todo"?(g(),C("div",E5e,[(g(!0),C(Ie,null,ot(e.block.items,(Y,ke)=>(g(),C("div",{key:ke,class:"todo-item"},[_("span",T5e,N(Y.status==="done"||Y.status==="completed"?"✓":"○"),1),_("span",{class:Be(["todo-title",{"todo-done":Y.status==="done"||Y.status==="completed"}])},N(Y.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),C("div",{key:9,ref_key:"planBodyRef",ref:d,class:Be(["body-plan",{expanded:l.value}]),style:Ut(x(I)),onScroll:H[4]||(H[4]=(...Y)=>x(v)&&x(v)(...Y))},[Z(Dl,{text:e.block.plan},null,8,["text"])],38)):(g(),C("div",I5e,[_("span",$5e,N(e.block.summary),1)])),P.value?(g(),C("div",N5e,[Fn(_("textarea",{ref_key:"feedbackRef",ref:M,"onUpdate:modelValue":H[5]||(H[5]=Y=>R.value=Y),class:"feedback-ta",placeholder:x(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:J},null,40,L5e),[[ks,R.value]]),_("div",F5e,N(x(s)("approval.feedbackHint")),1)])):ie("",!0)]),key:"0"},r.value?void 0:{name:"foot",fn:ve(()=>[i.value?(g(),C("div",O5e,[i.value.options.length>0?(g(!0),C(Ie,{key:0},ot(i.value.options,(Y,ke)=>(g(),he(_n,{key:ke,text:Y.description},{default:ve(()=>[Z(en,{class:"kbtn",size:"sm",variant:"primary",loading:X.value===`option:${Y.label}`,disabled:e.busy,onClick:Se=>Ce(Y.label)},{default:ve(()=>[Ve(N(Y.label),1),Z(dl,{class:"k",keys:[String(ke+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),he(en,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:X.value==="approvePlan",disabled:e.busy,onClick:ge},{default:ve(()=>[Ve(N(x(s)("approval.approvePlan")),1),Z(dl,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),Z(en,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:ze},{default:ve(()=>[Ve(N(x(s)("approval.revise")),1),i.value.options.length===0?(g(),he(dl,{key:0,class:"k",keys:["2"]})):ie("",!0)]),_:1},8,["disabled"]),Z(en,{class:"kbtn",size:"sm",variant:"danger-soft",loading:X.value==="rejectAndExit",disabled:e.busy,onClick:me},{default:ve(()=>[Ve(N(x(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),he(dl,{key:0,class:"k",keys:["3"]})):ie("",!0)]),_:1},8,["loading","disabled"])])):(g(),C("div",R5e,[Z(en,{class:"kbtn",size:"sm",variant:"primary",loading:X.value==="approve",disabled:e.busy,onClick:Q},{default:ve(()=>[Ve(N(x(s)("approval.approve")),1),Z(dl,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),Z(en,{class:"kbtn",size:"sm",variant:"secondary",loading:X.value==="approveSession",disabled:e.busy,onClick:ee},{default:ve(()=>[Ve(N(x(s)("approval.approveSession")),1),Z(dl,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),Z(en,{class:"kbtn",size:"sm",variant:"secondary",loading:X.value==="reject",disabled:e.busy,onClick:K},{default:ve(()=>[Ve(N(x(s)("approval.reject")),1),Z(dl,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),Z(en,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:W},{default:ve(()=>[Ve(N(x(s)("approval.feedback")),1),Z(dl,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),B5e=ht(D5e,[["__scopeId","data-v-1c39b16f"]]),z5e={class:"goal-panel"},W5e={key:0,class:"goal-criterion"},H5e={class:"goal-criterion-label"},j5e=Ge({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=It();return(n,o)=>(g(),C("div",z5e,[Z(Dl,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),C("div",W5e,[_("div",H5e,[Z(Oe,{name:"check-list",size:"md"}),_("span",null,N(x(t)("status.goalDoneWhen")),1)]),Z(Dl,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):ie("",!0)]))}}),U5e=ht(j5e,[["__scopeId","data-v-81a928ba"]]),V5e={class:"plan-panel"},q5e={key:0,class:"plan-review-row"},K5e={class:"plan-review-label"},G5e={key:1,class:"plan-review-row plan-review-feedback"},Z5e={class:"plan-review-label"},Y5e={key:3,class:"plan-path-only"},J5e={class:"plan-path-hint"},X5e={key:4,class:"plan-empty"},Q5e=Ge({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=It();return(o,s)=>(g(),C("div",V5e,[e.plan?.selectedOption?(g(),C("div",q5e,[_("span",K5e,N(x(n)("tools.plan.selectedOption")),1),_("span",null,N(e.plan.selectedOption),1)])):ie("",!0),e.plan?.feedback?(g(),C("div",G5e,[_("span",Z5e,N(x(n)("tools.plan.feedback")),1),_("span",null,N(e.plan.feedback),1)])):ie("",!0),e.plan?.plan?(g(),he(Dl,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),C("div",Y5e,[_("span",J5e,N(x(n)("tools.plan.pathOnlyHint")),1),Z(en,{class:"plan-path",variant:"ghost",size:"sm",onClick:s[0]||(s[0]=i=>t.openFile?.({path:e.plan.path}))},{default:ve(()=>[Ve(N(e.plan.path),1)]),_:1})])):(g(),C("div",X5e,[Z(Oe,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),_("span",null,N(x(n)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),e8e=ht(Q5e,[["__scopeId","data-v-bc8a415c"]]),t8e={class:"qh"},n8e={class:"qtitle"},o8e={key:0,class:"qstep"},s8e={key:1,class:"qmin-peek"},i8e={class:"qbody"},r8e=["aria-label"],l8e=["aria-selected","aria-label","onClick"],a8e={class:"qstep-num"},u8e={key:1,class:"qheader-chip"},c8e={class:"qtext"},d8e={class:"qopts"},f8e=["onClick"],p8e={class:"qopt-key"},h8e={class:"qopt-glyph"},m8e={key:0,class:"chk"},g8e={key:1,class:"rad"},v8e={class:"qopt-text"},y8e={class:"qopt-label"},k8e={key:0,class:"qopt-desc"},b8e={class:"qopt-glyph"},w8e={key:0,class:"chk"},x8e={key:1,class:"rad"},_8e={class:"qopt-label"},S8e=["placeholder"],C8e={class:"qfoot"},A8e=Ge({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=It(),s=t,i=q(0),r=q(!1),l=O(()=>n.question.questions[i.value]),a=O(()=>n.question.questions.length);function u(){i.value>0&&i.value--}function c(){i.value=0&&A0:F.kind==="multiWithOther"?F.optionIds.length>0||F.otherText.trim().length>0:F.kind==="other"?F.text.trim().length>0:!0:!1}function p(){return f(l.value.id)}const h=q({});function m(A){return A.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${A.label} ${A.description??""}`.toLowerCase())}function k(){const A={...h.value};let F=!1;for(const W of n.question.questions){if(A[W.id])continue;const j=W.options.filter(m);j.length!==0&&(A[W.id]=W.multiSelect?{kind:"multi",optionIds:j.map(le=>le.id)}:{kind:"single",optionId:j[0].id},F=!0)}F&&(h.value=A)}Ze(()=>n.question.questionId,()=>{i.value=0,r.value=!1,h.value={},y.value={}}),Ze(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function w(A,F){const W=h.value[A];if(W&&W.kind==="single"&&W.optionId===F){const j={...h.value};delete j[A],h.value=j}else h.value={...h.value,[A]:{kind:"single",optionId:F}}}function v(A,F){const W=h.value[A],j=W&&(W.kind==="multi"||W.kind==="multiWithOther")?W.kind==="multi"?[...W.optionIds]:[...W.optionIds]:[],le=j.indexOf(F);le>=0?j.splice(le,1):j.push(F);const J=h.value[A],X=J&&J.kind==="multiWithOther"?J.otherText:"";X?h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:j,otherText:X}}:h.value={...h.value,[A]:{kind:"multi",optionIds:j}}}const y=q({}),b=q(null);function S(A){const F=n.question.questions.find(j=>j.id===A),W=y.value[A]??"";if(F.multiSelect){const j=h.value[A],le=j&&(j.kind==="multi"||j.kind==="multiWithOther")?j.kind==="multi"?[...j.optionIds]:[...j.optionIds]:[];h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:le,otherText:W}}}else h.value={...h.value,[A]:{kind:"other",text:W}}}function I(A){S(A),bt(()=>b.value?.focus())}function T(A,F){const W=h.value[A];return W?W.kind==="single"?W.optionId===F:W.kind==="multi"||W.kind==="multiWithOther"?W.optionIds.includes(F):!1:!1}function $(A){const F=h.value[A];return!!(F&&(F.kind==="other"||F.kind==="multiWithOther"))}function L(){return n.question.questions.every(A=>f(A.id))}const P=O(()=>n.busyKind==="answer"),R=O(()=>n.busyKind==="dismiss"),M=O(()=>!!n.busyKind);function D(){if(M.value||!L())return;const A={answers:h.value,method:"click"};s("answer",n.question.questionId,A)}function z(){M.value||s("dismiss",n.question.questionId)}function B(A){const F=(document.activeElement?.tagName??"").toLowerCase(),W=F==="input"||F==="textarea";if(M.value)return;if(A.key==="Enter"){if(A.preventDefault(),r.value)return;i.value=1&&j<=9){A.preventDefault();const le=l.value,J=j-1,X=le.options[J];X&&(le.multiSelect?v(le.id,X.id):w(le.id,X.id))}}return bn(()=>document.addEventListener("keydown",B)),Mn(()=>document.removeEventListener("keydown",B)),(A,F)=>(g(),he($x,{class:Be(["qcard",{minimized:r.value}])},Ap({head:ve(()=>[_("div",t8e,[F[5]||(F[5]=_("span",{class:"qh-ic"},"?",-1)),_("span",n8e,N(x(o)("question.title")),1),a.value>1&&!r.value?(g(),C("span",o8e,N(x(o)("question.step",{current:i.value+1,total:a.value})),1)):ie("",!0),r.value?(g(),C("span",s8e,N(l.value.question),1)):ie("",!0),Z(Jt,{class:"qmin",size:"sm",label:r.value?x(o)("question.expand"):x(o)("question.minimize"),onClick:F[0]||(F[0]=W=>r.value=!r.value)},{default:ve(()=>[r.value?(g(),he(Oe,{key:0,name:"chevron-up",size:"md"})):(g(),he(Oe,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[r.value?void 0:{name:"default",fn:ve(()=>[_("div",i8e,[a.value>1?(g(),C("div",{key:0,class:"qsteps",role:"tablist","aria-label":x(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),C(Ie,null,ot(n.question.questions,(W,j)=>(g(),C("button",{key:W.id,type:"button",class:Be(["qstep-dot",{active:j===i.value,answered:f(W.id)}]),"aria-selected":j===i.value,"aria-label":x(o)("question.step",{current:j+1,total:a.value}),onClick:le=>d(j)},[_("span",a8e,N(j+1),1)],10,l8e))),128))],8,r8e)):ie("",!0),l.value.header?(g(),C("div",u8e,[Z(br,{variant:"neutral",size:"sm"},{default:ve(()=>[Ve(N(l.value.header),1)]),_:1})])):ie("",!0),_("div",c8e,N(l.value.question),1),l.value.body?(g(),he(Dl,{key:2,text:l.value.body,class:"qmdbody"},null,8,["text"])):ie("",!0),_("div",d8e,[(g(!0),C(Ie,null,ot(l.value.options,(W,j)=>(g(),C("label",{key:W.id,class:Be(["qopt",{selected:T(l.value.id,W.id)}]),onClick:St(le=>l.value.multiSelect?v(l.value.id,W.id):w(l.value.id,W.id),["prevent"])},[_("span",p8e,N(j+1),1),_("span",h8e,[l.value.multiSelect?(g(),C("span",m8e,N(T(l.value.id,W.id)?"■":"□"),1)):(g(),C("span",g8e,N(T(l.value.id,W.id)?"●":"○"),1))]),_("span",v8e,[_("span",y8e,N(W.label),1),W.description?(g(),C("span",k8e,N(W.description),1)):ie("",!0)])],10,f8e))),128)),l.value.allowOther?(g(),C("label",{key:0,class:Be(["qopt",{selected:$(l.value.id)}]),onClick:F[4]||(F[4]=St(W=>I(l.value.id),["prevent"]))},[F[6]||(F[6]=_("span",{class:"qopt-key"},null,-1)),_("span",b8e,[l.value.multiSelect?(g(),C("span",w8e,N($(l.value.id)?"■":"□"),1)):(g(),C("span",x8e,N($(l.value.id)?"●":"○"),1))]),_("span",_8e,N(l.value.otherLabel??x(o)("question.otherDefault")),1),Fn(_("input",{ref_key:"otherInputEl",ref:b,"onUpdate:modelValue":F[1]||(F[1]=W=>y.value[l.value.id]=W),class:"other-input",type:"text",placeholder:l.value.otherLabel??x(o)("question.otherDefault"),onInput:F[2]||(F[2]=W=>S(l.value.id)),onFocus:F[3]||(F[3]=W=>S(l.value.id))},null,40,S8e),[[ks,y.value[l.value.id]]])],2)):ie("",!0)])])]),key:"0"},r.value?void 0:{name:"foot",fn:ve(()=>[_("div",C8e,[i.value[Ve(N(x(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),he(en,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!L(),loading:P.value,onClick:D},{default:ve(()=>[Ve(N(x(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),he(en,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||M.value,onClick:u},{default:ve(()=>[Ve(N(x(o)("question.back")),1)]),_:1},8,["disabled"])):ie("",!0),Z(en,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:R.value,disabled:M.value,onClick:z},{default:ve(()=>[Ve(N(x(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),M8e=ht(A8e,[["__scopeId","data-v-29d475ec"]]),E8e=Ge({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),C("span",{class:Be(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},N(n[t.status]),3))}}),H1=ht(E8e,[["__scopeId","data-v-f870866a"]]),T8e={key:0,class:"sg-empty"},I8e={key:1,class:"sg-grid"},$8e=["aria-label","onClick"],N8e={class:"sg-top"},L8e={class:"sg-num"},F8e={class:"sg-name"},O8e={key:1,class:"sg-desc"},R8e={class:"sg-foot"},P8e={key:0,class:"sg-model"},D8e={class:"sg-status"},B8e={class:"sg-state"},z8e={key:0,class:"sg-time"},W8e=Ge({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=It();function s(c){return c}function i(c){return c==="running"?"tasks.emptyRunning":c==="done"?"tasks.emptyDone":c==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function r(c){const{model:d,thinkingEffort:f}=c;return[d,f?Yp(f):void 0].filter(Boolean).join(" · ")||void 0}function l(c){const d=c.state;return o(d==="done"?"tasks.stateDone":d==="fail"?"tasks.stateFail":d==="cancelled"?"tasks.stateCancelled":"tasks.running")}function a(c,d){return String(c.dynamicWorkflowIndex??d+1).padStart(2,"0")}function u(c){return!!(c.agentId||c.output?.length)}return(c,d)=>e.tasks.length===0?(g(),C("div",T8e,N(x(o)(i(e.filter))),1)):(g(),C("div",I8e,[(g(!0),C(Ie,null,ot(e.tasks,(f,p)=>(g(),C("article",{key:f.id,class:Be(["sg-card",[`s-${f.state}`,{openable:u(f)}]])},[u(f)?(g(),C("button",{key:0,class:"sg-open",type:"button","aria-label":f.name,onClick:h=>n("open",f.agentId??f.id)},null,8,$8e)):ie("",!0),_("div",N8e,[_("span",L8e,N(a(f,p)),1),_("span",F8e,N(f.name),1)]),f.meta?(g(),C("div",O8e,N(f.meta),1)):ie("",!0),_("div",R8e,[r(f)?(g(),C("div",P8e,[_("span",null,N(r(f)),1)])):ie("",!0),_("div",D8e,[_("span",B8e,[f.state==="run"?(g(),he(H1,{key:0,status:"run"})):f.state==="done"?(g(),he(Oe,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),he(Oe,{key:2,name:"close",size:"sm"})),Ve(" "+N(l(f)),1)]),f.timing?(g(),C("span",z8e,[Z(Oe,{name:"clock",size:"sm"}),Ve(" "+N(f.timing),1)])):ie("",!0)])]),f.state==="run"?(g(),he(Jt,{key:2,class:"sg-cancel",size:"sm",label:x(o)("tasks.stop"),onClick:St(h=>n("cancel",f.id),["stop"])},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):ie("",!0)],2))),128))]))}}),H8e=ht(W8e,[["__scopeId","data-v-b4cfb2fc"]]),j8e={class:"taskspane"},U8e={class:"tp-list"},V8e={key:0,class:"tp-empty"},q8e={class:"tp-main"},K8e=["aria-label","onClick"],G8e=["aria-label"],Z8e={class:"tp-name"},Y8e={key:1,class:"tp-meta"},J8e={key:2,class:"tp-model"},X8e={key:3,class:"tp-model"},Q8e={key:4,class:"tp-time"},eEe=Ge({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=It();function s(d){return d}function i(d){return d==="running"?"tasks.emptyRunning":d==="done"?"tasks.emptyDone":d==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function r(d){return d.kind==="subagent"||!!(d.output?.length||d.meta)}function l(d){r(d)&&n("open",d.agentId??d.id)}function a(d){const f=d.state;return o(f==="done"?"tasks.stateDone":f==="fail"?"tasks.stateFail":f==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(d){return d.kind==="subagent"?d.model:void 0}function c(d){const f=d.thinkingEffort;return d.kind==="subagent"&&f?Yp(f):void 0}return(d,f)=>(g(),C("div",j8e,[_("div",U8e,[e.tasks.length===0?(g(),C("div",V8e,N(x(o)(i(e.filter))),1)):(g(!0),C(Ie,{key:1},ot(e.tasks,p=>(g(),C("div",{key:p.id,class:Be(["tp-row",{fail:p.state==="fail",expandable:r(p)}])},[_("div",q8e,[r(p)?(g(),C("button",{key:0,class:"tp-open",type:"button","aria-label":p.name,onClick:h=>l(p)},null,8,K8e)):ie("",!0),_("span",{class:"tp-glyph",role:"img","aria-label":a(p)},[p.state==="run"?(g(),he(H1,{key:0,status:"run"})):p.state==="done"?(g(),he(Oe,{key:1,class:"tp-done",name:"check",size:"sm"})):p.state==="cancelled"?(g(),he(Oe,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),he(Oe,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,G8e),_("span",Z8e,N(p.name),1),p.meta?(g(),C("span",Y8e,N(p.meta),1)):ie("",!0),u(p)?(g(),C("span",J8e,N(u(p)),1)):ie("",!0),c(p)?(g(),C("span",X8e,N(c(p)),1)):ie("",!0),p.timing?(g(),C("span",Q8e,N(p.timing),1)):ie("",!0),p.state==="run"?(g(),he(Jt,{key:5,class:"tp-stop",size:"sm",label:x(o)("tasks.stop"),onClick:St(h=>n("cancel",p.id),["stop"])},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):ie("",!0),r(p)?(g(),he(Oe,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):ie("",!0)])],2))),128))])]))}}),tEe=ht(eEe,[["__scopeId","data-v-ac309aaa"]]),nEe={class:"todo-card"},oEe={key:0,class:"tc-empty"},sEe={class:"tc-name"},iEe=Ge({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=It();return(n,o)=>(g(),C("div",nEe,[e.todos.length===0?(g(),C("div",oEe,[Z(Oe,{class:"tc-empty-ico",name:"list",size:"lg"}),_("span",null,N(x(t)("tasks.emptyTodo")),1)])):(g(!0),C(Ie,{key:1},ot(e.todos,(s,i)=>(g(),C("div",{key:i,class:Be(["tc-row",`s-${s.status}`])},[_("span",{class:Be(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),he(Oe,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),he(Bo,{key:1,class:"tc-spin",size:"sm"})):ie("",!0)],2),_("span",sEe,N(s.title),1)],2))),128))]))}}),rEe=ht(iEe,[["__scopeId","data-v-4e4d0054"]]),lEe=["disabled","aria-pressed"],aEe=Ge({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),C("button",{key:0,class:Be(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[xn(t.$slots,"default",{},void 0,!0)],10,lEe)):(g(),C("span",{key:1,class:Be(["ui-pill",{"is-active":e.active}])},[xn(t.$slots,"default",{},void 0,!0)],2))}}),$7=ht(aEe,[["__scopeId","data-v-0fb1a50d"]]),uEe={class:"fc-label"},cEe=Ge({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=O(()=>n.options.find(P=>P.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=q(null),l=q(!1);let a=0,u=null;async function c(){const P=r.value?.closest(".dock-work-head");if(!P)return;const R=P.querySelector(".wp-head-tab"),M=getComputedStyle(P),D=(Number.parseFloat(M.columnGap)||0)*2,z=P.clientWidth-Number.parseFloat(M.paddingLeft)-Number.parseFloat(M.paddingRight)-D,B=R?.scrollWidth??0;if(!l.value){const F=r.value?.querySelector(".ui-seg");F&&F.offsetWidth>0&&(a=F.offsetWidth)}const A=B+a>z;if(l.value=A,!A){await bt();const F=r.value?.querySelector(".ui-seg");F&&F.offsetWidth>0&&(a=F.offsetWidth),l.value=B+a>z}}const d=q(!1),f=q(null),p=q(null),h=q({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){w();return}d.value=!0,await bt(),v(),y(),window.addEventListener("mousedown",I,!0),window.addEventListener("keydown",T,!0),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0)}function w(P){d.value=!1,window.removeEventListener("mousedown",I,!0),window.removeEventListener("keydown",T,!0),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0),P?.refocus&&m()?.focus()}function v(){const P=m();if(!P)return;const R=P.getBoundingClientRect(),M=p.value?.offsetHeight??0,D=getComputedStyle(document.documentElement),z=Number.parseFloat(D.getPropertyValue("--space-2"))||0,B=Number.parseFloat(D.getPropertyValue("--space-1"))||0,A=p.value?.offsetWidth??0,F=Math.min(R.left,Math.max(z,window.innerWidth-A-z));R.bottom+B+M<=window.innerHeight-z?h.value={left:`${F}px`,top:`${R.bottom+B}px`}:h.value={left:`${F}px`,bottom:`${window.innerHeight-R.top+B}px`}}function y(){const P=p.value;if(!P)return;(P.querySelector(".ui-menu-item.is-active")??P.querySelector(".ui-menu-item"))?.focus()}function b(){d.value||k()}function S(P){const R=P.relatedTarget;R&&(p.value?.contains(R)||m()?.contains(R))||w()}function I(P){const R=P.target;if(R){if(p.value?.contains(R)){P.stopImmediatePropagation();return}m()?.contains(R)||w()}}function T(P){P.key==="Escape"&&(P.preventDefault(),P.stopImmediatePropagation(),w({refocus:!0}))}function $(P){if(P.key!=="ArrowDown"&&P.key!=="ArrowUp")return;P.preventDefault();const R=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if(R.length===0)return;const M=R.indexOf(document.activeElement),D=P.key==="ArrowDown"?(M+1)%R.length:(M-1+R.length)%R.length;R[D]?.focus()}function L(P){o("update:modelValue",P),w({refocus:!0})}return bn(()=>{const P=r.value?.closest(".dock-work-head");!P||typeof ResizeObserver!="function"||(u=new ResizeObserver(()=>void c()),u.observe(P),c())}),Ze(l,P=>{!P&&d.value&&w()}),Ze(()=>n.options,async()=>{a=0,await bt(),await c()},{flush:"post"}),uo(()=>{u?.disconnect(),d.value&&w()}),(P,R)=>(g(),C("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(g(),C(Ie,{key:0},[Z($7,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[Po(St(b,["prevent"]),["down"]),Po(St(b,["prevent"]),["up"])],onFocusout:S},{default:ve(()=>[s.value?.icon?(g(),he(Oe,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):ie("",!0),_("span",null,N(s.value?.label),1),Z(Oe,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),he(Wl,{to:"body"},[d.value?(g(),C("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:Ut(h.value),onKeydown:$,onFocusout:S},[Z(Cr,null,{default:ve(()=>[(g(!0),C(Ie,null,ot(e.options,M=>(g(),he(hn,{key:M.value,role:"menuitemradio",active:M.value===e.modelValue,"aria-checked":M.value===e.modelValue,size:x(i),onClick:D=>L(M.value)},{default:ve(()=>[M.icon?(g(),he(Oe,{key:0,name:M.icon,size:"sm","data-icon":M.icon},null,8,["name","data-icon"])):ie("",!0),_("span",uEe,N(M.label),1),M.value===e.modelValue?(g(),he(Oe,{key:1,class:"fc-check",name:"check",size:"sm"})):ie("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):ie("",!0)]))],64)):(g(),he(Bs,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":R[0]||(R[0]=M=>o("update:modelValue",M))},null,8,["model-value","options"]))],512))}}),v8=ht(cEe,[["__scopeId","data-v-658870b5"]]),dEe={class:"wp-head-tab"},fEe={key:0,class:"wp-head-meta"},pEe={key:0,class:"wp-head-actions"},hEe=Ge({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),C(Ie,null,[_("span",dEe,[Z(Oe,{name:e.icon,size:"md"},null,8,["name"]),_("span",null,N(e.title),1),e.meta?(g(),C("span",fEe,N(e.meta),1)):ie("",!0)]),t.$slots.actions?(g(),C("span",pEe,[xn(t.$slots,"actions",{},void 0,!0)])):ie("",!0)],64))}}),$f=ht(hEe,[["__scopeId","data-v-408c4b07"]]),Nf=Ge({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),he($7,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ve(()=>[Z(Oe,{name:e.icon,size:"md"},null,8,["name"]),_("span",null,[xn(t.$slots,"default")]),xn(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),mEe={class:"dock-work-head"},gEe={key:0,class:"dock-workbar"},vEe={class:"dw-running"},yEe={class:"dw-running"},kEe={class:"dw-count"},bEe=Ge({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=It(),{confirm:r,current:l}=qa(),a=q(null),u=q(null),c=q(null),d=q(null),f=q(!1),p=q(!1),h=q("50% 100%"),m=q("active"),k=q("active"),w=O(()=>Object.values(o.sessionPlans??{}).at(-1)),v=O(()=>a.value?.anyPopupOpen??!1),y=O(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),b=O(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),S=O(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),I=O(()=>{const J=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),X=Math.floor(J/3600),G=Math.floor(J%3600/60);return X?`${X}${i("status.timeUnitHour")} ${G}${i("status.timeUnitMinute")}`:G?`${G}${i("status.timeUnitMinute")} ${J%60}${i("status.timeUnitSecond")}`:`${J}${i("status.timeUnitSecond")}`}),T=O(()=>o.bashTasks.some(J=>J.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function $(J,X){if(X==="all")return J;if(X==="running")return J.filter(ee=>ee.state==="run");if(X==="done")return J.filter(ee=>ee.state!=="run");const G=J.filter(ee=>ee.state==="run"),Q=J.filter(ee=>ee.state!=="run").toSorted((ee,K)=>Date.parse(K.completedAt??K.createdAt??"")-Date.parse(ee.completedAt??ee.createdAt??"")).slice(0,5);return[...G,...Q]}const L=O(()=>$(o.bashTasks,m.value)),P=O(()=>$(o.subagentTasks,k.value));function R(J,X){const G=X.currentTarget,Q=u.value;if(G&&Q){const ee=G.getBoundingClientRect(),K=Q.getBoundingClientRect();h.value=`${ee.left+ee.width/2-K.left}px 100%`}s("toggle-dock-panel",J)}function M(){p.value=(d.value?.scrollTop??0)>0}function D(J){if(!o.dockPanel)return;const X=J.target;!X||c.value?.contains(X)||X.closest(".ui-pill")||s("close-dock-panel")}function z(J){o.dockPanel&&(J.key!=="Escape"||J.repeat||J.isComposing||J.defaultPrevented||v.value||l.value||o.overlayOpen||(J.preventDefault(),J.stopImmediatePropagation(),s("close-dock-panel")))}async function B(){await r({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function A(){const J=u.value;if(!J)return;document.documentElement.style.setProperty("--dock-h",`${J.offsetHeight}px`);const X=Number.parseFloat(getComputedStyle(J).getPropertyValue("--p-bp-sm"))||640;f.value=J.offsetWidth{document.addEventListener("mousedown",D,!0),document.addEventListener("keydown",z,!0),typeof ResizeObserver=="function"&&u.value&&(F=new ResizeObserver(()=>{A(),M()}),F.observe(u.value),A())}),Mn(()=>{document.removeEventListener("mousedown",D,!0),document.removeEventListener("keydown",z,!0),F?.disconnect()}),Ze(()=>o.dockPanel,()=>{p.value=!1,bt(M)});function W(J){return a.value?.loadForEdit(J)??!1}function j(J){a.value?.loadAttachmentsForEdit(J)}function le(){a.value?.focus()}return t({loadForEdit:W,loadAttachmentsForEdit:j,focus:le,anyPopupOpen:v,isEmpty:O(()=>a.value?.isEmpty??!0)}),(J,X)=>(g(),C("div",{ref_key:"dockRef",ref:u,class:Be(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":v.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:X[35]||(X[35]=St(()=>{},["stop"]))},[Z(Sr,{name:"dock-panel"},{default:ve(()=>[e.dockPanel?(g(),C("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:c,class:Be(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:Ut({transformOrigin:h.value})},[_("div",mEe,[e.dockPanel==="bash"?(g(),he($f,{key:0,icon:"terminal",title:T.value,meta:`${e.bashRunning} ${x(i)("tasks.running")}`},{actions:ve(()=>[Z(v8,{modelValue:m.value,"onUpdate:modelValue":X[0]||(X[0]=G=>m.value=G),options:y.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),he($f,{key:1,icon:"sparkles",title:x(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${x(i)("tasks.running")}`},{actions:ve(()=>[Z(v8,{modelValue:k.value,"onUpdate:modelValue":X[1]||(X[1]=G=>k.value=G),options:y.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),he($f,{key:2,icon:b.value?"check-list":"list",title:x(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),he($f,{key:3,icon:"target",title:x(i)("status.goalLabel"),meta:I.value},{actions:ve(()=>[e.goal?.status==="active"?(g(),he(Jt,{key:0,size:"sm",label:x(i)("status.goalPause"),onClick:X[2]||(X[2]=G=>s("controlGoal","pause"))},{default:ve(()=>[Z(Oe,{name:"pause",size:"sm"})]),_:1},8,["label"])):ie("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),he(Jt,{key:1,size:"sm",label:x(i)("status.goalResume"),onClick:X[3]||(X[3]=G=>s("controlGoal","resume"))},{default:ve(()=>[Z(Oe,{name:"play",size:"sm"})]),_:1},8,["label"])):ie("",!0),Z(Jt,{size:"sm",label:x(i)("status.goalCancel"),onClick:B},{default:ve(()=>[Z(Oe,{name:"power",size:"sm"})]),_:1},8,["label"]),Z(Jt,{size:"sm",label:x(i)("tasks.closePanel"),onClick:X[4]||(X[4]=G=>s("close-dock-panel"))},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),he($f,{key:4,icon:"file-edit",title:x(i)("status.planLabel"),meta:w.value?.reviewState?x(i)(`tools.plan.review.${w.value.reviewState}`):""},{actions:ve(()=>[w.value?.path?(g(),he(Jt,{key:0,size:"sm",label:x(i)("tasks.openPanel"),onClick:X[5]||(X[5]=G=>e.openFile?.({path:w.value.path,content:w.value.plan}))},{default:ve(()=>[Z(Oe,{name:"external-link",size:"sm"})]),_:1},8,["label"])):ie("",!0),e.planArmed||e.planMode?(g(),he(Jt,{key:1,size:"sm",label:x(i)("status.workModeDismiss"),onClick:X[6]||(X[6]=G=>s("togglePlan"))},{default:ve(()=>[Z(Oe,{name:"power",size:"sm"})]),_:1},8,["label"])):ie("",!0),Z(Jt,{size:"sm",label:x(i)("tasks.closePanel"),onClick:X[7]||(X[7]=G=>s("close-dock-panel"))},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),_("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:M},[e.dockPanel==="bash"?(g(),he(tEe,{key:0,tasks:L.value,filter:m.value,onCancel:X[8]||(X[8]=G=>s("cancelTask",G)),onOpen:X[9]||(X[9]=G=>s("openAgent",G))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),he(H8e,{key:1,tasks:P.value,filter:k.value,onCancel:X[10]||(X[10]=G=>s("cancelTask",G)),onOpen:X[11]||(X[11]=G=>s("openAgent",G))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),he(rEe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),he(U5e,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),he(e8e,{key:4,plan:w.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"]))],544)],6)):ie("",!0)]),_:1}),e.hasDockWork||e.planMode||w.value?(g(),C("div",gEe,[e.goal?(g(),he(Nf,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${x(i)("status.goalLabel")} ${S.value}`,onClick:X[12]||(X[12]=G=>R("goal",G))},{meta:ve(()=>[_("span",{class:Be(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},N(S.value),3)]),default:ve(()=>[Ve(N(x(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):ie("",!0),e.planMode||w.value?(g(),he(Nf,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:x(i)("status.planLabel"),onClick:X[13]||(X[13]=G=>R("plan",G))},{default:ve(()=>[Ve(N(x(i)("status.planLabel")),1)]),_:1},8,["active","label"])):ie("",!0),e.bashTasks.length?(g(),he(Nf,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:T.value,onClick:X[14]||(X[14]=G=>R("bash",G))},Ap({default:ve(()=>[Ve(N(T.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ve(()=>[_("span",vEe,[Z(H1,{status:"run"}),Ve(N(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):ie("",!0),e.subagentTasks.length?(g(),he(Nf,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:x(i)("tasks.dockSubagent"),onClick:X[15]||(X[15]=G=>R("subagent",G))},Ap({default:ve(()=>[Ve(N(x(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ve(()=>[_("span",yEe,[Z(H1,{status:"run"}),Ve(N(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):ie("",!0),e.todos?.length?(g(),he(Nf,{key:4,icon:b.value?"check-list":"list",active:e.dockPanel==="todos",label:x(i)("tasks.todoProgressTitle"),onClick:X[16]||(X[16]=G=>R("todos",G))},{meta:ve(()=>[_("span",kEe,N(e.todoDoneCount)+"/"+N(e.todos?.length),1)]),default:ve(()=>[Ve(N(x(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):ie("",!0)])):ie("",!0),e.pendingQuestion?(g(),he(M8e,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:X[17]||(X[17]=(G,Q)=>s("answer",G,Q)),onDismiss:X[18]||(X[18]=G=>s("dismiss",G))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),he(B5e,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:X[19]||(X[19]=G=>s("approval",e.pendingApproval.approvalId,G))},null,8,["block","agent-name","busy"])):(g(),he(I7,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:X[20]||(X[20]=G=>s("submit",G)),onSteer:X[21]||(X[21]=G=>s("steer",G)),onCommand:X[22]||(X[22]=G=>s("command",G)),onInterrupt:X[23]||(X[23]=G=>s("interrupt")),onSetPermission:X[24]||(X[24]=G=>s("setPermission",G)),onSetThinking:X[25]||(X[25]=G=>s("setThinking",G)),onTogglePlan:X[26]||(X[26]=G=>s("togglePlan")),onToggleGoal:X[27]||(X[27]=G=>s("toggleGoal")),onOpenBtw:X[28]||(X[28]=G=>s("openBtw")),onCreateGoal:X[29]||(X[29]=G=>s("createGoal",G)),onControlGoal:X[30]||(X[30]=G=>s("controlGoal",G)),onFocusGoal:X[31]||(X[31]=G=>s("focusGoal")),onCompact:X[32]||(X[32]=G=>s("compact")),onPickModel:X[33]||(X[33]=G=>s("pickModel")),onSelectModel:X[34]||(X[34]=G=>s("selectModel",G))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),wEe=ht(bEe,[["__scopeId","data-v-5ab582a5"]]),xEe=["aria-label","aria-hidden"],_Ee={class:"toc-scroll"},SEe=["onClick"],CEe={class:"toc-label"},AEe=240,MEe=Ge({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=q(null),r=q(!0);let l=null;function a(){const c=i.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,p=d.getBoundingClientRect().right;r.value=p-f>=AEe}const u=O(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Ze(u,c=>{l?.disconnect(),l=null,c&&bt(()=>{const d=i.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),uo(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(g(),C("nav",{key:0,ref_key:"navRef",ref:i,class:Be(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":x(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[_("div",_Ee,[(g(!0),C(Ie,null,ot(e.items,f=>(g(),C("button",{key:f.id,type:"button",class:Be(["toc-row",{active:e.activeTurnId===f.id}]),onClick:p=>o("select",f.id)},[d[0]||(d[0]=_("span",{class:"toc-bar"},null,-1)),_("span",CEe,N(f.title),1)],10,SEe))),128))])],10,xEe)):ie("",!0)}}),EEe=ht(MEe,[["__scopeId","data-v-f846d889"]]),y8="script, style, noscript, template, [inert], .top-sentinel",N7="pythinker-transcript-search",S2="pythinker-transcript-search-current",TEe=1e3;function IEe(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function $Ee(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,l)=>l)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let r=0;rk8(u.text)),o=[];let s="";for(let u=0;u0&&e[u].gapBefore&&(s+="\0"),o[u]=s.length,s+=n[u].folded;const i=LEe(k8(t).folded);if(i===null)return;const r=new RegExp(i,"g");function l(u){let c=0,d=o.length-1,f=0;for(;c<=d;){const p=c+d>>1;o[p]<=u?(f=p,c=p+1):d=p-1}return f}let a;for(;;){const u=r.exec(s);if(u===null)return;const c=u.index,d=c+u[0].length-1,f=l(c),p=l(d),h=n[f].map[c-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const OEe=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),REe=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function PEe(e,t){const n=t.get(e);if(n!==void 0)return n;const o=OEe.has(e.tagName)||!REe.has(getComputedStyle(e).display);return t.set(e,o),o}function DEe(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!PEe(o,n);)o=o.parentElement;return o??t}function BEe(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const u=a;return u.matches(y8)?n.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(y8)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,r=[];let l=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){l=!0;continue}const u=a.nodeValue??"";if(u.length===0)continue;const c=a.parentElement;if(c===null)continue;let d=i.get(c);d===void 0&&(d=IEe(getComputedStyle(c).whiteSpace),i.set(c,d));let{text:f,map:p}=$Ee(u,d);if(f.length===0)continue;const h=DEe(a,e,s),m=r.at(-1),k=l||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(r.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),l=!1)}return r}function zEe(e,t){if(t.length===0)return[];const n=BEe(e),o=[];for(const s of FEe(n,t)){const i=n[s.startSegment],r=n[s.endSegment],l=e.ownerDocument.createRange();l.setStart(i.node,i.whitespaceMap[s.startOffset]),l.setEnd(r.node,r.whitespaceMap[s.endOffset-1]+1),o.push(l)}return o}function WEe(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of zEe(e,t))if(n(s)){if(o.length>=TEe)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function L7(){return globalThis.CSS?.highlights??null}function b8(e,t){const n=L7(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){bg();return}const s=new o;for(const r of e)s.add(r);n.set(N7,s);const i=e[t];if(i){const r=new o;r.add(i),n.set(S2,r)}else n.delete(S2)}function bg(){const e=L7();e?.delete(N7),e?.delete(S2)}const HEe={class:"tsearch-main"},jEe=["placeholder"],UEe=["inert"],VEe={class:"tsearch-foot"},qEe={class:"tsearch-count","aria-live":"polite"},KEe={class:"tsearch-rings"},GEe=Ge({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=Gm("input"),r=_o(""),l=_o(!1),a=_o([]),u=_o(0),c=_o(!1),d=_o(!1),f=_o([]),p=O(()=>a.value.length),h=O(()=>r.value.trim()!==""),m=O(()=>{if(l.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const W={current:u.value+1,total:p.value};return c.value?s("conversation.search.resultsCapped",W):s("conversation.search.results",W)});let k=null,w=null,v=null,y=null,b=null;function S(){return n.pane.querySelector(".chat")}function I(){const W=a.value[u.value];if(!W){f.value=[];return}const j=n.pane.getBoundingClientRect();f.value=Array.from(W.getClientRects(),le=>({top:`${le.top-j.top+n.pane.scrollTop}px`,left:`${le.left-j.left}px`,width:`${le.width}px`,height:`${le.height}px`}))}function T(){f.value.length!==0&&(v!==null&&clearTimeout(v),v=setTimeout(()=>{v=null,I()},120))}function $(W){const j=n.pane.getBoundingClientRect().top,le=W.findIndex(J=>{const X=J.getClientRects(),G=X[X.length-1];return G!==void 0&&G.bottom>=j});return le===-1?0:le}function L(){const W=a.value[u.value];b8(a.value,u.value),(W?.startContainer instanceof Element?W.startContainer:W?.startContainer.parentElement)?.scrollIntoView({block:"center"}),I()}function P(W="first"){k!==null&&(clearTimeout(k),k=null),l.value=!1;const j=S(),le=r.value.trim();if(!j||le===""){a.value=[],c.value=!1,u.value=0,bg(),I();return}const J=a.value[u.value],X=J?.startContainer,G=J?.startOffset,Q=WEe(j,le);if(a.value=Q.ranges,c.value=Q.truncated,Q.ranges.length===0){u.value=0,bg(),I();return}if(W!==!1){const K=$(Q.ranges);u.value=W==="backward"?(K-1+Q.ranges.length)%Q.ranges.length:K,L();return}const ee=Q.ranges.findIndex(K=>K.startContainer===X&&K.startOffset===G);u.value=ee>=0?ee:$(Q.ranges),b8(Q.ranges,u.value),I()}function R(){if(k!==null&&clearTimeout(k),r.value.trim()===""){l.value=!1,P();return}l.value=!0,k=setTimeout(()=>P(),150)}function M(W){p.value!==0&&(u.value=(u.value+W+p.value)%p.value,L())}function D(W){if(!(W.key!=="Enter"||d.value||W.isComposing)){if(W.preventDefault(),k!==null){P(W.shiftKey?"backward":"first");return}M(W.shiftKey?-1:1)}}function z(W){W.key!=="Escape"||d.value||W.isComposing||(W.preventDefault(),W.stopPropagation(),o("close"))}function B(W){return W instanceof Element&&(W.classList.contains("tsearch-rings")||W.closest(".tsearch-rings")!==null)}function A(W){if(W.type==="attributes"&&W.target===n.pane||B(W.target))return!0;if(W.type!=="childList")return!1;const j=[...W.addedNodes,...W.removedNodes];return j.length>0&&j.every(B)}function F(W){r.value.trim()===""||W.every(A)||k!==null||(w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,k===null&&P(!1)},150))}return bn(()=>{if(bt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(y=new MutationObserver(F),y.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",T,{passive:!0}),window.addEventListener("resize",T,{passive:!0}),typeof ResizeObserver=="function"){b=new ResizeObserver(I),b.observe(n.pane);const W=n.pane.querySelector(".content-wrap");W&&b.observe(W)}}),Mn(()=>{k!==null&&clearTimeout(k),w!==null&&clearTimeout(w),v!==null&&clearTimeout(v),y?.disconnect(),b?.disconnect(),n.pane.removeEventListener("scroll",T),window.removeEventListener("resize",T),bg()}),(W,j)=>(g(),C("div",{class:Be(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:z},[_("div",HEe,[Z(Oe,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Fn(_("input",{ref:"input","onUpdate:modelValue":j[0]||(j[0]=le=>r.value=le),type:"text",class:"tsearch-input",placeholder:x(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:R,onKeydown:D,onCompositionstart:j[1]||(j[1]=le=>d.value=!0),onCompositionend:j[2]||(j[2]=le=>d.value=!1)},null,40,jEe),[[ks,r.value]]),l.value?(g(),he(Bo,{key:0,class:"tsearch-spin",size:"sm",label:x(s)("conversation.search.searching")},null,8,["label"])):ie("",!0),j[6]||(j[6]=_("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),Z(Jt,{class:"tsearch-close",size:"sm",label:x(s)("conversation.search.close"),onClick:j[3]||(j[3]=le=>o("close"))},{default:ve(()=>[Z(Oe,{name:"close"})]),_:1},8,["label"])]),_("div",{class:Be(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[_("div",VEe,[Z(Jt,{size:"sm",label:x(s)("conversation.search.previous"),disabled:p.value===0,onClick:j[4]||(j[4]=le=>M(-1))},{default:ve(()=>[Z(Oe,{name:"arrow-up"})]),_:1},8,["label","disabled"]),Z(Jt,{size:"sm",label:x(s)("conversation.search.next"),disabled:p.value===0,onClick:j[5]||(j[5]=le=>M(1))},{default:ve(()=>[Z(Oe,{name:"arrow-down"})]),_:1},8,["label","disabled"]),_("span",qEe,N(m.value),1)])],10,UEe),(g(),he(Wl,{to:e.pane},[_("div",KEe,[(g(!0),C(Ie,null,ot(f.value,(le,J)=>(g(),C("div",{key:J,class:"tsearch-ring",style:Ut(le)},null,4))),128))])],8,["to"]))],34))}}),ZEe=ht(GEe,[["__scopeId","data-v-d7187e08"]]),YEe=5;function JEe(e,t,n,o=YEe){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(r=>r.id===t);i&&(s[o-1]=i)}return s}const XEe={key:0,class:"recent"},QEe={class:"recent-caption"},eTe=["onClick"],tTe={class:"recent-title"},nTe={class:"recent-time"},oTe={class:"recent-foot"},sTe=Ge({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=It();return(s,i)=>e.sessions.length?(g(),C("section",XEe,[_("h2",QEe,N(x(o)("sessions.recentSessions")),1),(g(!0),C(Ie,null,ot(e.sessions,r=>(g(),C("button",{key:r.id,type:"button",class:"recent-row",onClick:l=>n("select",r.id)},[_("span",{class:Be(["recent-ico",r.archived?"recent-ico--done":"recent-ico--open"])},[Z(Oe,{name:r.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),_("span",tTe,N(r.title),1),_("span",nTe,N(r.time),1)],8,eTe))),128)),_("div",oTe,[Z(_n,{text:x(o)("conversation.sessionAdminTooltip")},{default:ve(()=>[_("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=r=>n("openSessionAdmin"))},[Ve(N(x(o)("conversation.viewMoreSessions"))+" ",1),Z(Oe,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):ie("",!0)}}),iTe=ht(sTe,[["__scopeId","data-v-cd5a729d"]]),rTe={class:"empty-hint"},lTe={key:0,class:"empty-hint-text"},aTe={key:1,class:"ws-pick"},uTe={class:"ws-pick-name"},cTe={key:1,class:"ws-pick-menu"},dTe=["onClick"],fTe={class:"ws-pick-item-name"},pTe={class:"ws-pick-item-path"},hTe=["aria-label"],mTe={key:0,class:"abort-toast",role:"status","aria-live":"polite"},gTe={class:"abort-toast-text"},vTe=48,Ik=80,w8=1e3,yTe=420,kTe=3e3,bTe=Ge({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","setPermission","setThinking","togglePlan","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openThinking","openCompaction","openAgent","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","continueTurn","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=It(),s=e,i=n,r=q(!1),l=q(!1),a=O(()=>s.workspaces?.find(Ne=>Ne.id===s.activeWorkspaceId)?.name??s.workspaceName??""),u=O(()=>(s.workspaces?.length??0)>0),c=O(()=>JEe(s.workspaces??[],s.activeWorkspaceId,l.value)),d=O(()=>(s.workspaces?.length??0)-c.value.length);Ze(r,Te=>{Te||(l.value=!1)});function f(Te){r.value=!1,Te!==s.activeWorkspaceId&&i("selectWorkspace",Te)}Hu(ln.contentAlign);const p=q(null),h=q(null),m=q(null),k=q(!1);let w=null;function v(Te,Ne){const Ue=m.value??h.value;return!Ue||Ue.loadForEdit(Te)===!1?!1:(Ue.loadAttachmentsForEdit(Ne??[]),!0)}function y(){k.value=!0,w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,k.value=!1},2e3)}function b(){s.goal&&(M.value="goal")}const S=O(()=>s.tasks.filter(Te=>Te.kind==="bash"||Te.kind==="tool"&&!Te.id.startsWith("question-"))),I=O(()=>s.tasks.filter(Te=>Te.kind==="subagent"&&Te.runInBackground)),T=O(()=>S.value.filter(Te=>Te.state==="run").length),$=O(()=>I.value.filter(Te=>Te.state==="run").length);function L(Te){const Ne=s.tasks,Ue=Ne.find(cn=>cn.id===Te)??Ne.find(cn=>cn.parentToolCallId===Te);if(Ue)return Ue.id;const rn=Ne.filter(cn=>cn.kind==="subagent"&&!cn.parentToolCallId);if(rn.length===1)return rn[0].id}Wn("resolveAgentTaskId",L),Wn("resolvePlan",Te=>s.sessionPlans?.[Te]),Wn("pinScroll",Yt);const P=O(()=>(s.todos??[]).filter(Te=>Te.status==="done").length),R=O(()=>s.goal!==null&&s.goal!==void 0||S.value.length>0||I.value.length>0||(s.todos?.length??0)>0),M=q(null),D=O(()=>s.gitInfo?s.changes?.length??0:0);function z(Te){M.value=M.value===Te?null:Te}function B(){M.value=null}Ze([M,()=>s.goal,S,I,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(M.value==="goal"&&!s.goal||M.value==="bash"&&S.value.length===0||M.value==="subagent"&&I.value.length===0||M.value==="todos"&&(s.todos?.length??0)===0||M.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&B()});function A(Te){if(Te.role==="compaction")return o("conversation.compactedPlain");if(Te.role==="user"){if(Te.skillActivation)return`/${Te.skillActivation.name}`;if(Te.pluginCommand)return`/${Te.pluginCommand.pluginId}:${Te.pluginCommand.commandName}`;const Ue=Te.text.trim().replaceAll(/\s+/g," ");return Ue.length>0?Ue:"user"}const Ne=(Te.text||Te.thinking||"").trim().replaceAll(/\s+/g," ");return Ne.length>0?Ne:(Te.tools?.length??0)>0?`${Te.tools.length} tools`:"pythinker"}const F=O(()=>s.turns.filter(Te=>Te.role==="user").map((Te,Ne)=>({id:Te.id,role:Te.role,no:Ne+1,title:A(Te)}))),W=q(null);function j(){const Te=Ce.value;if(!Te)return;const Ne=Te.querySelectorAll(".turn-anchor[data-turn-id]");if(Ne.length===0)return;const Ue=F.value;if(Ue.length===0)return;const rn=new Set(Ue.map(de=>de.id));if(fe()<=Ik){W.value=Ue[Ue.length-1].id;return}const cn=Te.getBoundingClientRect(),Sn=cn.height/2;let Cn=null;Ne.forEach(de=>{const Me=de.dataset.turnId;if(!Me||!rn.has(Me))return;de.getBoundingClientRect().top-cn.top<=Sn&&(Cn=Me)}),W.value=Cn??Ue[0].id}const le=q(!1);let J=0;function X(){J||(J=rt(()=>{J=0,G()}))}function G(){const Te=Ce.value,Ne=!s.mobile&&s.conversationToc&&Te?Te.closest(".con")?.querySelector(".conversation-toc"):null,Ue=Ne?.querySelector(".toc-bar");let rn=!1;if(Te&&Ne&&Ue){const cn=Ue.getBoundingClientRect(),Sn=Ne.getBoundingClientRect(),Cn=cn.left+cn.width/2;rn=Array.from(Te.querySelectorAll(".table-node-wrapper")).some(de=>{const Me=de.getBoundingClientRect();return Me.left<=Cn&&Cn<=Me.right&&Me.topSn.top})}le.value!==rn&&(le.value=rn)}const Q=O(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),ee=O(()=>{const Te=Q.value;if(Te)return s.pendingQuestionActions?.[Te.questionId]}),K=O(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),ge=O(()=>{const Te=K.value;return Te?!!s.pendingApprovalActions?.[Te.approvalId]:!1}),Ce=q(null),ze=q(!1),me=q(null),te=q(0),oe=q(0),H=O(()=>({"--panes-scrollbar-width":`${te.value}px`})),Y=O(()=>({"--chat-dock-height":`${oe.value+vTe}px`}));function ke(Te){return Te instanceof HTMLElement?Te:Te&&"$el"in Te&&Te.$el instanceof HTMLElement?Te.$el:null}function Se(){const Te=Ce.value;te.value=Te?Math.max(0,Te.offsetWidth-Te.clientWidth):0,oe.value=me.value?.offsetHeight??0}function ye(Te){const Ne=ke(Te);Ce.value=Ne,Ne&&Oo()}function ne(Te){const Ne=ke(Te);me.value=Ne??null,Te&&"loadForEdit"in Te&&typeof Te.loadForEdit=="function"&&"focus"in Te&&typeof Te.focus=="function"?m.value={loadForEdit:Te.loadForEdit.bind(Te),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Te&&typeof Te.loadAttachmentsForEdit=="function"?Te.loadAttachmentsForEdit.bind(Te):()=>{},focus:Te.focus.bind(Te)}:m.value=null,ns()}const ce=q(!0),xe=q(!1);function fe(){const Te=Ce.value;return Te?Te.scrollHeight-Te.scrollTop-Te.clientHeight:0}let ue=0,we=0,se=0,_e=0,Re=0,lt=0;function ct(){return Date.now()1?(ce.value=!1,xe.value=!0):Ue<=Ik&&Ne>ue+1&&(ce.value=!0,xe.value=!1),ue=Ne,j()}function Mt(Te=!1){const Ne=Ce.value;ce.value=!0,xe.value=!1,Ne&&(!Te&&performance.now()<_e||(Te&&typeof Ne.scrollTo=="function"?(se=performance.now(),_e=performance.now()+yTe,Ne.scrollTo({top:Ne.scrollHeight,behavior:"smooth"})):Ne.scrollTop=Ne.scrollHeight,ue=Ne.scrollTop))}function Bt(Te,Ne){return(Ne.closest("[inert]")?.closest(".tool-group")??Ne).getBoundingClientRect().top-Te.getBoundingClientRect().top+Te.scrollTop}function Vt(Te,Ne){const Ue=Array.from(Te.querySelectorAll(".turn-anchor[data-turn-id], [data-scroll-anchor-id]")).map(Sn=>({node:Sn,top:Bt(Te,Sn)})),rn=Ue.findIndex(Sn=>Sn.top>=Ne),cn=rn<0?Math.max(0,Ue.length-1):rn;return Ue.slice(cn,cn+2).flatMap(Sn=>{const Cn=Sn.node.dataset.scrollAnchorId,de=Cn??Sn.node.dataset.turnId;return de?[{kind:Cn?"tool":"turn",id:de,top:Sn.top}]:[]})}const Je=new Map;function tt(Te,Ne){for(const Ue of Ne.anchors){const rn=Ue.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",cn=Te.querySelector(`[${rn}="${Fe(Ue.id)}"]`);if(cn)return Bt(Te,cn)-Ue.top}return Te.scrollHeight-Ne.oldHeight}function dt(Te,Ne,Ue=Te.scrollTop){return Te.scrollTop=Ue+tt(Te,Ne),ue=Te.scrollTop,Te.scrollTop}async function Rt(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||js.value||!s.hasMoreMessages)return;const Te=s.sessionId,Ne=Ce.value,Ue=Ne?.scrollTop??0,rn={anchors:Ne?Vt(Ne,Ue):[],oldHeight:Ne?.scrollHeight??0};ii(Te,!0),cr();try{if(await bt(),await s.loadOlderMessages(Te),await bt(),s.sessionId!==Te){Je.set(Te,rn);return}const cn=Ce.value;if(!cn)return;dt(cn,rn),Je.delete(Te)}finally{ii(Te,!1)}}function Fe(Te){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Te):Te.replaceAll(/["\\]/g,"\\$&")}function Ye(Te){const Ne=Ce.value;if(!Ne)return;const Ue=Ne.querySelector(`.turn-anchor[data-turn-id="${Fe(Te)}"]`);Ue&&(Vi(),ce.value=!1,xe.value=fe()>Ik,Ue.scrollIntoView({behavior:"smooth",block:"center"}))}function it(){const Te=Ce.value;if(!Te)return"none";const Ne=Te.firstElementChild,Ue=Ne instanceof HTMLElement?Ne.offsetHeight:0,rn=me.value?.offsetHeight??0;return`${Te.scrollHeight}:${Te.clientHeight}:${Ue}:${rn}`}function rt(Te){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Te):setTimeout(Te,16)}function gt(Te){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Te):clearTimeout(Te)}let Tt=0,tn=0,fn=null,Kt=0;function Dn(){return performance.now(){if(tn=0,performance.now()>=Tt||!fn){fn=null;return}const cn=fn.getBoundingClientRect().top-Kt;cn&&(Ue.scrollTop+=cn),tn=rt(rn)};tn=rt(rn)}function Eo(Te=36){if(!ce.value&&!ct())return;const Ne=++lt;let Ue="",rn=0,cn=0;Re&&(gt(Re),Re=0);const Sn=()=>{if(Re=0,Ne!==lt||!ce.value&&!ct())return;Mt(!1);const Cn=it();rn=Cn===Ue?rn+1:0,Ue=Cn,cn++,rn<3&&cn0&&Ne.length>=Te.length&&Te.firstId!==Ne.firstId&&Te.lastId===Ne.lastId&&Te.lastTextLen===Ne.lastTextLen&&Te.lastThinkingLen===Ne.lastThinkingLen&&Te.lastToolsLen===Ne.lastToolsLen&&Te.approvalIds===Ne.approvalIds}const ho=O(()=>{const Te=(s.approvals??[]).map(Sn=>Sn.approvalId).join(","),Ne=s.turns,Ue=Ne.at(-1),rn=Ue?.thinking?.length??0,cn=Ue?.tools?.reduce((Sn,Cn)=>Sn+Cn.name.length+(Cn.arg?.length??0)+(Cn.output?.join("").length??0),0)??0;return{length:Ne.length,firstId:Ne[0]?.id??"",lastId:Ue?.id??"",lastTextLen:Ue?.text.length??0,lastThinkingLen:rn,lastToolsLen:cn,approvalIds:Te}});Ze(ho,async(Te,Ne)=>{if(js.value&&Wo(Ne,Te)){j();return}await bt(),ce.value||ct()?Mt(Te.length{ns()}),Ze(()=>s.mobile,async()=>{await bt(),Se()});const Bn=new Map;Ze(()=>s.fileReloadKey,async(Te,Ne)=>{const Ue=Ce.value;Ne&&Ue&&Bn.set(String(Ne),{top:Ue.scrollTop,following:ce.value}),Vi(),await bt();const rn=Ce.value,cn=Te?Bn.get(String(Te)):void 0;if(cn&&rn){const Sn=Je.get(String(Te)),Cn=Sn?dt(rn,Sn,cn.top):cn.top;Sn&&Je.delete(String(Te)),ce.value=cn.following,rn.scrollTop=Cn,ue=rn.scrollTop,xe.value=!cn.following&&fe()>1,cn.following&&Eo()}else ce.value=!0,ue=0,Mt(!1),Eo();j()}),Ze(()=>s.sessionLoading,async(Te,Ne)=>{Te||!Ne||(ce.value=!0,await bt(),Eo(),j())}),Ze(()=>s.turnActive,async(Te,Ne)=>{Te||!Ne||!ce.value&&!ct()||(await bt(),Eo(48),j())});function bs(){ce.value=!0,xe.value=!1,we=Date.now()+w8,bt(()=>{Mt(!0),Eo(16)})}function nt(Te){bs(),i("submit",Te)}function Ae(Te){ce.value=!0,xe.value=!1,we=Date.now()+w8,i("editMessage",Te)}function kt(Te){const Ne=s.queued?.[Te],Ue=Ne?.text??"";v(Ue,Ne?.attachments)&&i("editQueued",Te)}function Nt(Te){i("reorderQueue",Te)}function Xt(Te,Ne){bs(),i("answer",Te,Ne)}function ko(Te,Ne){!Te||!Ne||i("approval",Te,Ne)}let Gn=null,qn=null,oo=null,lo=null,fs=0,Ei=0,Ns=0;const Ls=q(new Set),js=O(()=>!!s.sessionId&&Ls.value.has(s.sessionId));function ii(Te,Ne){const Ue=new Set(Ls.value);Ne?Ue.add(Te):Ue.delete(Te),Ls.value=Ue}function ps(){js.value||Ns||(Ns=rt(()=>{Ns=0,!js.value&&(Dn()||(ce.value||ct())&&Mt(!1))}))}function cr(){lt++,Re&&(gt(Re),Re=0),Ns&&(gt(Ns),Ns=0)}function Vi(){const Te=Ce.value;if(we=0,cr(),Tt=0,fn=null,Te){const Ne=Te.scrollTop;typeof Te.scrollTo=="function"?Te.scrollTo({top:Ne,behavior:"auto"}):Te.scrollTop=Ne}_e=0,se=Number.NEGATIVE_INFINITY,Te&&(ue=Te.scrollTop)}function wn(){const Te=Ce.value;!Te||Te.scrollHeight-Te.clientHeight<=1&&!s.hasMoreMessages||(ce.value=!1,Vi(),Te.scrollHeight-Te.clientHeight>1&&(xe.value=!0))}function Us(Te){const Ne=Ce.value;if(!Ne)return!1;for(const Ue of Te.composedPath()){if(Ue===Ne)return!1;if(Ue instanceof HTMLElement&&Ue.scrollHeight>Ue.clientHeight+1&&Ue.scrollTop>1)return!0}return!1}function zn(Te){Te.defaultPrevented||Te.ctrlKey||Te.shiftKey||Te.deltaY>=0||Us(Te)||wn()}function ri(Te){const Ne=Ce.value;if(!Ne||Te.defaultPrevented||Te.button!==0||Te.pointerType==="touch")return;const Ue=Ne.getBoundingClientRect(),rn=Ne.offsetWidth-Ne.clientWidth,cn=rn>0?rn:12;Te.target===Ne&&Te.clientX>=Ue.right-cn&&wn()}let Fs=null;function Ti(Te){Fs=Te.touches.length===1?Te.touches[0].clientY:null}function ts(Te){const Ne=Te.touches.length===1?Te.touches[0].clientY:null;Ne!==null&&Fs!==null&&Ne>Fs+2&&!Us(Te)&&wn(),Fs=Ne}function To(){if(!qn)return;const Te=Ce.value?.firstElementChild??null;Te!==oo&&(oo&&qn.unobserve(oo),oo=Te,Te&&qn.observe(Te))}function ns(){if(!qn)return;const Te=me.value;Te!==lo&&(lo&&qn.unobserve(lo),lo=Te,Te&&qn.observe(Te))}function Oo(){const Te=Ce.value;Se(),Gn&&(Gn.disconnect(),Te&&Gn.observe(Te,{childList:!0,subtree:!0,characterData:!0})),qn&&(qn.disconnect(),oo=null,lo=null,Te&&qn.observe(Te),To(),ns()),fs=Te?.scrollHeight??0,Ei=Te?.clientHeight??0,X()}function sn(){To(),ps(),X()}function li(){typeof document>"u"||document.visibilityState==="visible"&&ce.value&&Eo()}const os=q(!1);let bo=null;function ai(){os.value=!0,bo!==null&&clearTimeout(bo),bo=setTimeout(()=>{os.value=!1},kTe)}function ui(){ai(),i("interrupt")}function ss(Te){if((Te.metaKey||Te.ctrlKey)&&Te.key.toLowerCase()==="f"){if(s.overlayOpen)return;Te.preventDefault(),ze.value=!0,bt(()=>{Ce.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Te.key==="Escape"&&(s.running||s.working)&&(Te.preventDefault(),ui())}function In(){ze.value=!1,bt(()=>Ce.value?.focus({preventScroll:!0}))}function wo(){ce.value&&ps()}bn(()=>{bt(()=>{typeof MutationObserver=="function"&&(Gn=new MutationObserver(sn)),typeof ResizeObserver=="function"&&(qn=new ResizeObserver(()=>{X(),Se();const Te=Ce.value;if(!Te)return;const{scrollHeight:Ne,clientHeight:Ue}=Te,rn=Ne>fs+1,cn=Ue{Gn&&Gn.disconnect(),qn&&qn.disconnect(),Ns&>(Ns),Re&>(Re),tn&>(tn),J&>(J),bo!==null&&clearTimeout(bo),w!==null&&(clearTimeout(w),w=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",li),document.removeEventListener("keydown",ss)),window.visualViewport?.removeEventListener("resize",wo)});function Nr(){(m.value??h.value)?.focus()}return t({loadComposerForEdit:v,focusComposer:Nr}),(Te,Ne)=>(g(),C("section",{class:Be(["con",{mobile:e.mobile}])},[ze.value&&Ce.value?(g(),he(ZEe,{key:0,pane:Ce.value,mobile:e.mobile,onClose:In},null,8,["pane","mobile"])):ie("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),he(fwe,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":D.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,onOpenChanges:Ne[0]||(Ne[0]=Ue=>i("openChanges")),onCopyAll:Ne[1]||(Ne[1]=Ue=>p.value?.copyConversation()),onCopyFinalSummary:Ne[2]||(Ne[2]=Ue=>p.value?.copyFinalSummary()),onOpenPr:Ne[3]||(Ne[3]=Ue=>e.pr&&i("openPr",e.pr.url)),onRenameSession:Ne[4]||(Ne[4]=(Ue,rn)=>i("renameSession",Ue,rn)),onForkSession:Ne[5]||(Ne[5]=Ue=>i("forkSession",Ue)),onTogglePin:Ne[6]||(Ne[6]=Ue=>i("togglePin",Ue)),onArchiveSession:Ne[7]||(Ne[7]=Ue=>i("archiveSession",Ue)),onRestoreSession:Ne[8]||(Ne[8]=Ue=>i("restoreSession",Ue)),onExportSession:Ne[9]||(Ne[9]=Ue=>i("exportSession",Ue))},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned"])):ie("",!0),e.conversationToc?(g(),he(EEe,{key:2,items:F.value,"active-turn-id":W.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:le.value,onSelect:Ye},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):ie("",!0),_("div",{class:"chat-layout",style:Ut(Y.value)},[_("div",{ref:ye,class:Be(["panes chat-scroll",{"is-following":ce.value,"history-prepending":js.value}]),tabindex:"-1",onScrollPassive:Ct,onWheelPassive:zn,onPointerdownPassive:ri,onTouchstartPassive:Ti,onTouchmovePassive:ts},[_("div",{class:Be(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),C(Ie,{key:0},[Ne[59]||(Ne[59]=_("div",{class:"empty-spacer"},null,-1)),_("div",rTe,[_("span",{class:Be(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),he(Bo,{key:0,size:"sm"})):(g(),he(lw,{key:1,size:"md",label:"","aria-hidden":"true"})),_("span",null,N(e.starting?x(o)("conversation.starting"):x(o)("composer.emptyConversationTitle")),1)],2),e.starting?ie("",!0):(g(),C("span",lTe,N(x(o)("composer.emptyConversation")),1)),u.value&&!e.starting?(g(),C("div",aTe,[Z(_n,{text:x(o)("conversation.switchWorkspace")},{default:ve(()=>[_("button",{type:"button",class:"ws-pick-btn",onClick:Ne[10]||(Ne[10]=St(Ue=>r.value=!r.value,["stop"]))},[Z(Oe,{name:"folder",size:"sm"}),_("span",uTe,N(a.value),1),Z(Oe,{class:Be(["ws-pick-chev",{open:r.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),r.value?(g(),C("div",{key:0,class:"ws-pick-backdrop",onClick:Ne[11]||(Ne[11]=Ue=>r.value=!1)})):ie("",!0),r.value?(g(),C("div",cTe,[(g(!0),C(Ie,null,ot(c.value,Ue=>(g(),C("button",{key:Ue.id,type:"button",class:Be(["ws-pick-item",{on:Ue.id===e.activeWorkspaceId}]),onClick:St(rn=>f(Ue.id),["stop"])},[_("span",fTe,N(Ue.name),1),_("span",pTe,N(Ue.shortPath),1)],10,dTe))),128)),d.value>0?(g(),C("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:Ne[12]||(Ne[12]=St(Ue=>l.value=!l.value,["stop"]))},[_("span",null,N(x(o)("conversation.moreWorkspaces",{count:d.value})),1)])):ie("",!0),Ne[58]||(Ne[58]=_("div",{class:"ws-pick-divider"},null,-1)),_("button",{type:"button",class:"ws-pick-action",onClick:Ne[13]||(Ne[13]=St(Ue=>{r.value=!1,i("addWorkspace")},["stop"]))},[Z(Oe,{name:"plus",size:"sm"}),_("span",null,N(x(o)("conversation.addWorkspace")),1)])])):ie("",!0)])):e.starting?ie("",!0):(g(),C("button",{key:2,type:"button",class:"empty-add-workspace",onClick:Ne[14]||(Ne[14]=Ue=>i("addWorkspace"))},[Z(Oe,{name:"folder-plus",size:"sm"}),_("span",null,N(x(o)("conversation.addWorkspace")),1)]))]),e.sessionId?ie("",!0):(g(),he(iTe,{key:0,sessions:e.recentSessions??[],onSelect:Ne[15]||(Ne[15]=Ue=>i("selectSession",Ue)),onOpenSessionAdmin:Ne[16]||(Ne[16]=Ue=>i("openSessionAdmin"))},null,8,["sessions"])),Z(I7,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:nt,onSteer:Ne[17]||(Ne[17]=Ue=>i("steer",Ue)),onCommand:Ne[18]||(Ne[18]=Ue=>i("command",Ue)),onInterrupt:ui,onUnqueue:Ne[19]||(Ne[19]=Ue=>i("unqueue",Ue)),onEditQueued:Ne[20]||(Ne[20]=Ue=>i("editQueued",Ue)),onSetPermission:Ne[21]||(Ne[21]=Ue=>i("setPermission",Ue)),onSetThinking:Ne[22]||(Ne[22]=Ue=>i("setThinking",Ue)),onTogglePlan:Ne[23]||(Ne[23]=Ue=>i("togglePlan")),onToggleGoal:Ne[24]||(Ne[24]=Ue=>i("toggleGoal")),onOpenBtw:Ne[25]||(Ne[25]=Ue=>i("command","/btw")),onCreateGoal:Ne[26]||(Ne[26]=Ue=>i("createGoal",Ue)),onControlGoal:Ne[27]||(Ne[27]=Ue=>i("controlGoal",Ue)),onFocusGoal:b,onCompact:Ne[28]||(Ne[28]=Ue=>i("compact")),onPickModel:Ne[29]||(Ne[29]=Ue=>i("pickModel")),onSelectModel:Ne[30]||(Ne[30]=Ue=>i("selectModel",Ue))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),Ne[60]||(Ne[60]=_("div",{class:"empty-spacer"},null,-1))],64)):(g(),he(Lx,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":ce.value,"tool-diff-panel":!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:Ne[31]||(Ne[31]=Ue=>i("openFile",Ue)),onOpenMedia:Ne[32]||(Ne[32]=Ue=>i("openMedia",Ue)),onCopyConversationCopied:y,onOpenThinking:Ne[33]||(Ne[33]=Ue=>i("openThinking",Ue)),onOpenCompaction:Ne[34]||(Ne[34]=Ue=>i("openCompaction",Ue)),onOpenAgent:Ne[35]||(Ne[35]=Ue=>i("openAgent",Ue)),onOpenToolDiff:Ne[36]||(Ne[36]=Ue=>i("openToolDiff",Ue)),onOpenTurnDiff:Ne[37]||(Ne[37]=Ue=>i("openTurnDiff",Ue)),onEditMessage:Ae,onLoadOlderMessages:Rt,onUnqueue:Ne[38]||(Ne[38]=Ue=>i("unqueue",Ue)),onEditQueued:kt,onReorderQueue:Nt,onContinueTurn:Ne[39]||(Ne[39]=Ue=>i("continueTurn",Ue))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),e.turns.length===0&&!e.sessionLoading?ie("",!0):(g(),he(wEe,{key:0,ref:ne,style:Ut(H.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":Ue=>i("openFile",Ue),"dock-panel":M.value,"bash-tasks":S.value,"subagent-tasks":I.value,"bash-running":T.value,"subagent-running":$.value,"todo-done-count":P.value,"has-dock-work":R.value,todos:e.todos,"pending-question":Q.value,"question-busy-kind":ee.value,"pending-approval":K.value,"approval-busy":ge.value,mobile:e.mobile,onToggleDockPanel:Ne[40]||(Ne[40]=Ue=>z(Ue)),onCloseDockPanel:Ne[41]||(Ne[41]=Ue=>B()),onOpenAgent:Ne[42]||(Ne[42]=Ue=>i("openAgent",Ue)),onAnswer:Xt,onDismiss:Ne[43]||(Ne[43]=Ue=>i("dismiss",Ue)),onApproval:ko,onCancelTask:Ne[44]||(Ne[44]=Ue=>i("cancelTask",Ue)),onControlGoal:Ne[45]||(Ne[45]=Ue=>i("controlGoal",Ue)),onSubmit:nt,onSteer:Ne[46]||(Ne[46]=Ue=>i("steer",Ue)),onCommand:Ne[47]||(Ne[47]=Ue=>i("command",Ue)),onInterrupt:ui,onSetPermission:Ne[48]||(Ne[48]=Ue=>i("setPermission",Ue)),onSetThinking:Ne[49]||(Ne[49]=Ue=>i("setThinking",Ue)),onTogglePlan:Ne[50]||(Ne[50]=Ue=>i("togglePlan")),onToggleGoal:Ne[51]||(Ne[51]=Ue=>i("toggleGoal")),onOpenBtw:Ne[52]||(Ne[52]=Ue=>i("command","/btw")),onCreateGoal:Ne[53]||(Ne[53]=Ue=>i("createGoal",Ue)),onFocusGoal:b,onCompact:Ne[54]||(Ne[54]=Ue=>i("compact")),onPickModel:Ne[55]||(Ne[55]=Ue=>i("pickModel")),onSelectModel:Ne[56]||(Ne[56]=Ue=>i("selectModel",Ue))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],4),Z(Sr,{name:"pill"},{default:ve(()=>[xe.value?(g(),C("button",{key:0,class:"newmsg-pill",style:Ut({bottom:`${oe.value+12}px`}),"aria-label":x(o)("conversation.jumpToLatestAria"),onClick:Ne[57]||(Ne[57]=Ue=>Mt(!0))},[Z(Oe,{class:"pill-chevron",name:"chevron-down",size:"md"}),Ve(" "+N(x(o)("conversation.newMessages")),1)],12,hTe)):ie("",!0)]),_:1}),Z(Sr,{name:"abort-toast"},{default:ve(()=>[os.value?(g(),C("div",mTe,[_("span",gTe,N(x(o)("conversation.manuallyAborted")),1)])):ie("",!0)]),_:1})],2))}}),wTe=ht(bTe,[["__scopeId","data-v-69c16115"]]);let Lf=0,$k=null;function F7(){function e(){typeof document>"u"||(Lf+=1,Lf===1&&($k=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Lf<=0||(Lf-=1,Lf===0&&typeof document<"u"&&(document.body.style.overflow=$k??"",$k=null))}return{lock:e,unlock:t}}const xTe=["aria-label"],_Te={class:"media-lightbox-card"},STe=["src","alt"],CTe=["src"],ATe={key:0,class:"media-preview-caption"},MTe=Ge({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=Gm("overlay"),r=Gm("close"),l=Gm("image"),a=O(()=>n.media.kind==="image"),u=O(()=>n.media.path??(a.value?"Image preview":"Video preview")),c=_o(1),d=_o(0),f=_o(0),p=_o(!1),h=O(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${c.value})`,cursor:c.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,w=0,v=0,y=0,b=0;const{lock:S,unlock:I}=F7();function T(){c.value=1,d.value=0,f.value=0}function $(z){if(!a.value)return;z.preventDefault();const B=Math.min(8,Math.max(1,c.value*(z.deltaY<0?1.1:.9)));c.value=B,B===1&&(d.value=0,f.value=0)}function L(){if(c.value!==1){T();return}const z=l.value;z&&(c.value=Math.min(8,Math.max(1,z.naturalWidth/z.clientWidth)))}function P(z){c.value<=1||(k=z.pointerId,w=z.clientX,v=z.clientY,y=d.value,b=f.value,p.value=!0,l.value?.setPointerCapture(z.pointerId))}function R(z){k===z.pointerId&&(d.value=y+z.clientX-w,f.value=b+z.clientY-v)}function M(z){k===z.pointerId&&(l.value?.releasePointerCapture(z.pointerId),k=null,p.value=!1)}function D(z){if(z.key==="Escape"){z.preventDefault(),z.stopPropagation(),o("close");return}if(z.key!=="Tab"||!i.value)return;const B=i.value.querySelectorAll(s),A=B[0],F=B[B.length-1];!A||!F||(i.value.contains(document.activeElement)?z.shiftKey&&document.activeElement===A?(z.preventDefault(),F.focus()):!z.shiftKey&&document.activeElement===F&&(z.preventDefault(),A.focus()):(z.preventDefault(),(z.shiftKey?F:A).focus()))}return bn(()=>{S(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",D),r.value?.focus()}),Mn(()=>{I(),window.removeEventListener("keydown",D),m?.focus()}),(z,B)=>(g(),he(Wl,{to:"body"},[_("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":u.value,onMousedown:B[1]||(B[1]=St(A=>o("close"),["self"]))},[_("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:B[0]||(B[0]=A=>o("close"))},[Z(Oe,{name:"close",size:"sm"})],512),_("div",_Te,[_("div",{class:"media-lightbox-frame",onWheel:$},[a.value?(g(),C("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:Ut(h.value),onDblclick:L,onPointerdown:P,onPointermove:R,onPointerup:M,onPointercancel:M},null,44,STe)):(g(),C("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,CTe))],32)]),e.media.path?(g(),C("div",ATe,N(e.media.path),1)):ie("",!0)],40,xTe)]))}}),ETe=ht(MTe,[["__scopeId","data-v-a5036dce"]]),TTe={class:"ui-panel-header__title"},ITe={key:0,class:"ui-panel-header__sub"},$Te=Ge({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),C("div",{class:Be(["ui-panel-header",{wrap:e.wrap}])},[_("span",TTe,N(e.title),1),Z(_n,{text:e.subtitle},{default:ve(()=>[e.subtitle?(g(),C("span",ITe,N(e.subtitle),1)):ie("",!0)]),_:1},8,["text"]),xn(t.$slots,"default",{},void 0,!0),e.closable?(g(),he(Jt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label"])):ie("",!0)],2))}}),Ra=ht($Te,[["__scopeId","data-v-a01b4e04"]]),NTe={key:0,class:"fp-empty fp-error"},LTe={key:1,class:"fp-empty"},FTe={key:2,class:"fp-loading"},OTe={class:"fp-path"},RTe={class:"fp-meta"},PTe={key:0,class:"fp-lines"},DTe={class:"fp-size"},BTe={key:3,class:"fp-search"},zTe=["placeholder"],WTe={key:0,class:"fp-search-count"},HTe=["href","aria-label"],jTe={key:1,class:"fp-code"},UTe={class:"fp-line-table"},VTe=["data-line"],qTe={class:"fp-gutter"},KTe=["innerHTML"],GTe={key:1,class:"fp-body fp-code"},ZTe={class:"fp-line-table"},YTe=["data-line"],JTe={class:"fp-gutter"},XTe=["innerHTML"],QTe={key:2,class:"fp-body"},e6e=["srcdoc","title"],t6e={key:1,class:"fp-code"},n6e={class:"fp-line-table"},o6e=["data-line"],s6e={class:"fp-gutter"},i6e=["innerHTML"],r6e={key:3,class:"fp-body fp-pdf-wrap"},l6e=["src","title"],a6e={key:1,class:"fp-binary-card"},u6e={class:"fp-binary-label"},c6e={key:4,class:"fp-body fp-table-wrap"},d6e={class:"fp-table"},f6e=["data-line"],p6e={key:5,class:"fp-body fp-image-wrap"},h6e=["src","alt"],m6e={key:1,class:"fp-binary-card"},g6e={class:"fp-binary-icon"},v6e={class:"fp-binary-label"},y6e={key:6,class:"fp-body fp-image-wrap"},k6e=["src"],b6e={key:1,class:"fp-binary-card"},w6e={class:"fp-binary-icon"},x6e={class:"fp-binary-label"},_6e={key:7,class:"fp-body fp-code"},S6e={class:"fp-line-table"},C6e=["data-line"],A6e={class:"fp-gutter"},M6e=["innerHTML"],E6e={key:8,class:"fp-body fp-binary-wrap"},T6e={class:"fp-binary-card"},I6e={class:"fp-binary-icon"},$6e={class:"fp-binary-label"},N6e=Ge({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal"],setup(e,{emit:t}){const{t:n}=It();function o(me,te){const oe=te?te.split("/").filter(Boolean):[];for(const H of me.split("/"))H===""||H==="."||(H===".."?oe.pop():oe.push(H));return oe.join("/")}const s=yn("resolveImage",async me=>me),i=O(()=>{const me=u.file?.path??"",te=me.lastIndexOf("/");return te>0?me.slice(0,te):""});function r(me){if(/^(https?:|data:|blob:)/i.test(me)||me.startsWith("/"))return me;const te=i.value;return te?o(me,te):me}async function l(me){const te=r(me);return s?s(te):te}Wn("resolveImage",l);function a(me){let te=me.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(te)||te.startsWith("/"))return me;for(const H of["#","?"]){const Y=te.indexOf(H);Y!==-1&&(te=te.slice(0,Y))}const oe=i.value;return{...me,path:o(te,oe)}}const u=e,c=t;function d(me){u.openFile?.(a(me))}const f=q(null),p=O(()=>{const me=u.file;if(!me)return"binary";const te=me.mime??"",oe=me.languageId??"",H=me.path.toLowerCase();return te==="text/markdown"||oe==="markdown"||oe==="md"||H.endsWith(".mdx")?"markdown":te==="application/json"||oe==="json"?"json":te==="text/html"||oe==="html"||H.endsWith(".html")||H.endsWith(".htm")?"html":te==="application/pdf"||H.endsWith(".pdf")?"pdf":te==="text/csv"||oe==="csv"||H.endsWith(".csv")?"csv":te.startsWith("image/")?"image":te.startsWith("video/")?"video":me.isBinary?"binary":te.startsWith("text/")||oe!==""?"text":"binary"});function h(me){const te=atob(me),oe=Uint8Array.from(te,H=>H.charCodeAt(0));return new TextDecoder().decode(oe)}const m=O(()=>{const me=u.file;if(!me)return"";if(me.encoding==="base64")try{return h(me.content)}catch{return me.content}return me.content}),k=O(()=>{if(p.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),w=O(()=>u.file?(p.value==="json"?k.value:m.value).split(` -`):[]),v=O(()=>u.file?p.value==="json"?k.value:m.value:""),y=q(""),b=q(0),S=O(()=>{const me=y.value.trim().toLowerCase();if(!me)return[];const te=[];return w.value.forEach((oe,H)=>{oe.toLowerCase().includes(me)&&te.push(H+1)}),te});Ze(y,()=>{b.value=0});function I(me,te=!1){me&&bt(()=>{const oe=f.value?.querySelector(".fp-body"),H=oe?.querySelector(`[data-line="${me}"]`);if(!oe||!H)return;te&&(oe.scrollTop=0);const Y=oe.getBoundingClientRect(),ke=H.getBoundingClientRect(),Se=ke.top-Y.top+oe.scrollTop;oe.scrollTop=Se-oe.clientHeight/2+ke.height/2})}Ze(()=>[u.file?.path,u.line],()=>I(u.line,!0),{immediate:!0});function T(me){const te=S.value;te.length!==0&&(b.value=(b.value+me+te.length)%te.length,I(te[b.value]))}function $(me){const te=S.value;return{target:u.line===me,hit:te.includes(me),active:te[b.value]===me}}function L(me){return me<1024?`${me} B`:me<1024*1024?`${(me/1024).toFixed(1)} KB`:`${(me/(1024*1024)).toFixed(1)} MB`}const P=q(!1),R=q(!1);function M(){u.file&&Zo(v.value).then(me=>{me&&(P.value=!0,setTimeout(()=>{P.value=!1},1400))})}function D(){u.file&&Zo(u.file.path).then(me=>{me&&(R.value=!0,setTimeout(()=>{R.value=!1},1400))})}const z=q("preview"),B=q("preview"),A=q("fit");function F(me){z.value=me}function W(me){B.value=me}function j(me){A.value=me}Ze(p,me=>{z.value=me==="html"?"preview":"source",B.value="preview",A.value="fit"});const le=O(()=>{const me=u.file;return!me||p.value!=="image"?null:me.sourceUrl?me.sourceUrl:me.encoding==="base64"?`data:${me.mime};base64,${me.content}`:me.mime==="image/svg+xml"?`data:${me.mime};charset=utf-8,${encodeURIComponent(me.content)}`:null}),J=O(()=>{const me=u.file;return!me||p.value!=="video"?null:me.sourceUrl?me.sourceUrl:me.encoding==="base64"?`data:${me.mime};base64,${me.content}`:null}),X=O(()=>{const me=u.file;return!me||p.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:me.encoding==="base64"?`data:${me.mime};base64,${me.content}`:null}),G=O(()=>u.file?["",'',``,m.value].join(""):"");function Q(me){const te=[];let oe="",H=!1;for(let Y=0;Yw.value.slice(0,200).map(Q));function K(me){return me.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function ge(){const me=u.file;if(!me)return"";const te=me.languageId?.toLowerCase();return te||(me.path.split(".").pop()?.toLowerCase()??"")}function Ce(me){const te=ge();let oe=K(me);return p.value==="json"||te==="json"||te==="jsonc"?(oe=oe.replace(/("[^&]*?")(\s*:)/g,'$1$2'),oe=oe.replace(/(:\s*)("[^&]*?")/g,'$1$2'),oe=oe.replace(/\b(true|false|null)\b/g,'$1'),oe=oe.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),oe):p.value==="html"||te==="html"||te==="xml"||te==="svg"?(oe=oe.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),oe=oe.replace(/(".*?")/g,'$1'),oe=oe.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),oe):(oe=oe.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),oe=oe.replace(/(".*?"|'.*?')/g,'$1'),oe=oe.replace(/(\/\/.*)$/g,'$1'),oe)}function ze(me,te=55){return!me||me.length<=te?me:"…"+me.slice(me.length-te+1)}return(me,te)=>(g(),C("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(g(),C("div",NTe,[_("span",null,N(e.error),1),e.closable?(g(),he(en,{key:0,variant:"secondary",size:"sm",onClick:te[0]||(te[0]=oe=>c("close"))},{default:ve(()=>[Ve(N(x(n)("filePreview.close")),1)]),_:1})):ie("",!0)])):!e.file&&!e.loading?(g(),C("div",LTe,N(x(n)("filePreview.empty")),1)):e.loading?(g(),C("div",FTe,[te[7]||(te[7]=_("span",{class:"spinner"},null,-1)),_("span",null,N(x(n)("filePreview.loading")),1)])):e.file?(g(),C(Ie,{key:3},[Z(Ra,{wrap:"",title:x(n)("common.preview"),closable:e.closable,"close-label":x(n)("filePreview.close"),onClose:te[6]||(te[6]=oe=>c("close"))},{default:ve(()=>[Z(_n,{text:e.file.path},{default:ve(()=>[_("span",OTe,N(ze(e.file.path)),1)]),_:1},8,["text"]),_("span",RTe,[e.file.lineCount?(g(),C("span",PTe,N(x(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):ie("",!0),_("span",DTe,N(L(e.file.size)),1)]),p.value==="html"?(g(),he(Bs,{key:0,"model-value":z.value,size:"sm",options:[{value:"preview",label:x(n)("filePreview.preview")},{value:"source",label:x(n)("filePreview.source")}],"onUpdate:modelValue":F},null,8,["model-value","options"])):ie("",!0),p.value==="markdown"?(g(),he(Bs,{key:1,"model-value":B.value,size:"sm",options:[{value:"preview",label:x(n)("filePreview.preview")},{value:"source",label:x(n)("filePreview.source")}],"onUpdate:modelValue":W},null,8,["model-value","options"])):ie("",!0),p.value==="image"?(g(),he(Bs,{key:2,"model-value":A.value,size:"sm",options:[{value:"fit",label:x(n)("filePreview.fit")},{value:"actual",label:x(n)("filePreview.actual")}],"onUpdate:modelValue":j},null,8,["model-value","options"])):ie("",!0),p.value==="text"||p.value==="json"||p.value==="html"||p.value==="csv"?(g(),C("div",BTe,[Fn(_("input",{"onUpdate:modelValue":te[1]||(te[1]=oe=>y.value=oe),class:"fp-search-input",type:"search",placeholder:x(n)("filePreview.search")},null,8,zTe),[[ks,y.value]]),y.value.trim()?(g(),C("span",WTe,N(S.value.length),1)):ie("",!0),Z(Jt,{size:"sm",disabled:S.value.length===0,label:x(n)("filePreview.prevMatch"),onClick:te[2]||(te[2]=oe=>T(-1))},{default:ve(()=>[Z(Oe,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),Z(Jt,{size:"sm",disabled:S.value.length===0,label:x(n)("filePreview.nextMatch"),onClick:te[3]||(te[3]=oe=>T(1))},{default:ve(()=>[Z(Oe,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):ie("",!0),Z(Jt,{size:"sm",class:Be({copied:R.value}),label:R.value?x(n)("filePreview.copied"):x(n)("filePreview.copyPath"),onClick:D},{default:ve(()=>[R.value?(g(),he(Oe,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),he(Oe,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.externalActions?(g(),he(Jt,{key:4,size:"sm",label:x(n)("filePreview.openInEditor"),onClick:te[4]||(te[4]=oe=>c("openExternal"))},{default:ve(()=>[Z(Oe,{name:"external-link",size:"md"})]),_:1},8,["label"])):ie("",!0),e.externalActions?(g(),he(Jt,{key:5,size:"sm",label:x(n)("filePreview.reveal"),onClick:te[5]||(te[5]=oe=>c("reveal"))},{default:ve(()=>[Z(Oe,{name:"folder",size:"md"})]),_:1},8,["label"])):ie("",!0),e.downloadUrl?(g(),C("a",{key:6,class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":x(n)("filePreview.download")},[Z(Oe,{name:"download",size:"md"})],8,HTe)):ie("",!0),!e.file.isBinary&&p.value!=="image"?(g(),he(Jt,{key:7,size:"sm",class:Be({copied:P.value}),label:P.value?x(n)("filePreview.copied"):x(n)("filePreview.copy"),onClick:M},{default:ve(()=>[P.value?(g(),he(Oe,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),he(Oe,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):ie("",!0)]),_:1},8,["title","closable","close-label"]),p.value==="markdown"?(g(),C("div",{key:0,class:Be(["fp-body",{"fp-markdown":B.value==="preview"}])},[B.value==="preview"?(g(),he(Dl,{key:0,text:m.value,"open-file":u.openFile?d:void 0},null,8,["text","open-file"])):(g(),C("div",jTe,[_("div",UTe,[(g(!0),C(Ie,null,ot(w.value,(oe,H)=>(g(),C("div",{key:H,class:Be(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",qTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:Ce(oe)},null,8,KTe)],10,VTe))),128))])]))],2)):p.value==="json"?(g(),C("div",GTe,[_("div",ZTe,[(g(!0),C(Ie,null,ot(w.value,(oe,H)=>(g(),C("div",{key:H,class:Be(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",JTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:Ce(oe)},null,8,XTe)],10,YTe))),128))])])):p.value==="html"?(g(),C("div",QTe,[z.value==="preview"?(g(),C("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:G.value,title:e.file.path},null,8,e6e)):(g(),C("div",t6e,[_("div",n6e,[(g(!0),C(Ie,null,ot(w.value,(oe,H)=>(g(),C("div",{key:H,class:Be(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",s6e,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:Ce(oe)},null,8,i6e)],10,o6e))),128))])]))])):p.value==="pdf"?(g(),C("div",r6e,[X.value?(g(),C("iframe",{key:0,class:"fp-pdf-frame",src:X.value,title:e.file.path},null,8,l6e)):(g(),C("div",a6e,[_("span",u6e,N(x(n)("filePreview.pdfNoPreview")),1)]))])):p.value==="csv"?(g(),C("div",c6e,[_("table",d6e,[_("tbody",null,[(g(!0),C(Ie,null,ot(ee.value,(oe,H)=>(g(),C("tr",{key:H,class:Be($(H+1)),"data-line":H+1},[_("th",null,N(H+1),1),(g(!0),C(Ie,null,ot(oe,(Y,ke)=>(g(),C("td",{key:ke},N(Y),1))),128))],10,f6e))),128))])])])):p.value==="image"?(g(),C("div",p6e,[le.value?(g(),C("img",{key:0,src:le.value,alt:e.file.path,class:Be(["fp-image",{actual:A.value==="actual"}])},null,10,h6e)):(g(),C("div",m6e,[_("span",g6e,[Z(Oe,{name:"image-off",size:"lg"})]),_("span",v6e,N(x(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:L(e.file.size)})),1)]))])):p.value==="video"?(g(),C("div",y6e,[J.value?(g(),C("video",{key:0,src:J.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,k6e)):(g(),C("div",b6e,[_("span",w6e,[Z(Oe,{name:"image-off",size:"lg"})]),_("span",x6e,N(x(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:L(e.file.size)})),1)]))])):p.value==="text"?(g(),C("div",_6e,[_("div",S6e,[(g(!0),C(Ie,null,ot(w.value,(oe,H)=>(g(),C("div",{key:H,class:Be(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",A6e,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:Ce(oe)},null,8,M6e)],10,C6e))),128))])])):(g(),C("div",E6e,[_("div",T6e,[_("span",I6e,[Z(Oe,{name:"file-off",size:"lg"})]),_("span",$6e,N(x(n)("filePreview.binaryNoPreview",{mime:e.file.mime||x(n)("filePreview.unknownType"),size:L(e.file.size)})),1)])]))],64)):ie("",!0)],512))}}),L6e=ht(N6e,[["__scopeId","data-v-f6cbb2b4"]]),F6e={class:"tp"},O6e=Ge({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=q(null);return Ze(()=>n.text,()=>{const r=i.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||bt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(r,l)=>(g(),C("div",F6e,[Z(Ra,{title:x(s)("common.preview"),subtitle:e.subtitle??x(s)("thinking.panelTitle"),"close-label":x(s)("thinking.close"),onClose:l[0]||(l[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),_("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},N(e.text),513)]))}}),x8=ht(O6e,[["__scopeId","data-v-e1ad626c"]]),R6e=640,P6e=`(max-width: ${R6e}px)`;function O7(){const e=q(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(P6e);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),Mn(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),Mn(()=>t.removeListener(n))),e}const D6e={class:"agent-panel"},B6e={key:0,class:"agent-fallback"},z6e={key:0,class:"agent-error"},W6e={key:1,class:"fallback-lines"},H6e=Ge({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O7(),r=O(()=>i.value?"lg":"md"),l=O(()=>i.value?"lg":"sm"),a=q(null),u=q(!0),c=q(!1),d=q(null),f=q(null),p=q({}),h=q(null);let m=null,k=0;const w=O(()=>{const D=new Set,z=[],B=n.member.prompt?.trim(),A=B?`$ ${B}`:void 0;for(const F of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` -`),n.member.summary]){const W=F?.trim();!W||D.has(W)||W===A||(D.add(W),z.push(W))}return z}),v=O(()=>w.value.filter(D=>D!==n.member.prompt?.trim()).join(` -`)),y=O(()=>[n.member.subagentType,n.member.model,n.member.thinkingEffort].filter(Boolean).join(" · ")||void 0);function b(){const D=a.value;D&&(u.value=D.scrollHeight-D.scrollTop-D.clientHeight<24)}function S(){bt(()=>{const D=a.value;D&&(D.scrollTop=D.scrollHeight)})}Wn("pinScroll",D=>{const z=a.value;if(!z)return;const B=D.getBoundingClientRect().top;requestAnimationFrame(()=>{z.scrollTop+=D.getBoundingClientRect().top-B})}),Ze(()=>{const D=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${D?.text.length??0}:${D?.tools?.length??0}`},()=>{u.value&&S()},{immediate:!0});function I(D){const z=D[0].toUpperCase()+D.slice(1);return s(`tools.dynamic_workflow.phase${z}`)}function T(){const D=d.value?.el,z=f.value?.el;if(!D||!z)return;const B=D.getBoundingClientRect(),A=8,F=8,W=Math.max(F,Math.min(B.right-z.offsetWidth,window.innerWidth-z.offsetWidth-F));B.bottom+A+z.offsetHeight<=window.innerHeight-F?p.value={left:`${W}px`,top:`${B.bottom+A}px`}:p.value={left:`${W}px`,bottom:`${window.innerHeight-B.top+A}px`}}function $(D=!1){c.value=!1,window.removeEventListener("mousedown",P,!0),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",T),window.removeEventListener("scroll",T,!0),D&&d.value?.el?.focus()}async function L(){if(c.value){$(!0);return}c.value=!0,await bt(),T(),f.value?.el?.querySelector(".ui-menu-item:not(:disabled)")?.focus(),window.addEventListener("mousedown",P,!0),window.addEventListener("keydown",R,!0),window.addEventListener("resize",T),window.addEventListener("scroll",T,!0)}function P(D){const z=D.target;f.value?.el?.contains(z)||d.value?.el?.contains(z)||$()}function R(D){D.key==="Escape"&&(D.preventDefault(),D.stopImmediatePropagation(),$(!0))}async function M(D){const z=D==="command"?n.member.prompt:D==="output"?v.value:[n.member.prompt?.trim(),v.value].filter(Boolean).join(` - -`);if(!z)return;const B=++k;!await Zo(z)||B!==k||(m!==null&&clearTimeout(m),h.value=D,m=setTimeout(()=>{m=null,h.value=null},1400),$(!0))}return Ze(()=>n.member.id,()=>{k+=1,m!==null&&clearTimeout(m),m=null,h.value=null,$()}),Mn(()=>{m!==null&&clearTimeout(m),$()}),(D,z)=>(g(),C("div",D6e,[Z(Ra,{title:e.member.name,subtitle:y.value,"close-label":x(s)("thinking.close"),onClose:z[0]||(z[0]=B=>o("close"))},{default:ve(()=>[Z(br,{variant:"neutral",size:"sm"},{default:ve(()=>[Ve(N(I(e.member.phase)),1)]),_:1}),e.member.prompt||v.value?(g(),he(Jt,{key:0,ref_key:"copyTriggerRef",ref:d,size:l.value,class:Be({"copy-menu-open":c.value}),label:x(s)("tasks.copy"),tooltip:x(s)("tasks.copy"),"aria-haspopup":"menu","aria-expanded":c.value,onClick:L},{default:ve(()=>[Z(Oe,{name:h.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","class","label","tooltip","aria-expanded"])):ie("",!0)]),_:1},8,["title","subtitle","close-label"]),_("div",{ref_key:"bodyEl",ref:a,class:"agent-transcript",onScrollPassive:b},[e.turns.length===0&&!e.loading&&(e.loadError||w.value.length>0)?(g(),C("div",B6e,[e.loadError?(g(),C("div",z6e,N(x(s)("tasks.transcriptLoadError")),1)):ie("",!0),w.value.length>0?(g(),C("pre",W6e,N(w.value.join(` -`)),1)):ie("",!0)])):(g(),he(Lx,{key:1,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":u.value,"read-only":"",inspector:"",onLoadOlderMessages:z[1]||(z[1]=B=>o("loadOlderMessages")),onOpenAgent:z[2]||(z[2]=B=>o("openAgent",B)),onOpenFile:z[3]||(z[3]=B=>o("openFile",B)),onOpenMedia:z[4]||(z[4]=B=>o("openMedia",B)),onOpenTurnDiff:z[5]||(z[5]=B=>o("openTurnDiff",B))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],544),c.value?(g(),he(Cr,{key:0,ref_key:"copyMenuRef",ref:f,class:"copy-menu",style:Ut(p.value),onClick:z[9]||(z[9]=St(()=>{},["stop"]))},{default:ve(()=>[e.member.prompt?(g(),he(hn,{key:0,size:r.value,onClick:z[6]||(z[6]=B=>M("command"))},{default:ve(()=>[Z(Oe,{name:"terminal",size:"sm"}),_("span",null,N(x(s)("tasks.copyCommand")),1)]),_:1},8,["size"])):ie("",!0),Z(hn,{size:r.value,disabled:!v.value,onClick:z[7]||(z[7]=B=>M("output"))},{default:ve(()=>[Z(Oe,{name:"file-text",size:"sm"}),_("span",null,N(x(s)("tasks.copyOutput")),1)]),_:1},8,["size","disabled"]),Z(hn,{separator:""}),Z(hn,{size:r.value,onClick:z[8]||(z[8]=B=>M("all"))},{default:ve(()=>[Z(Oe,{name:"copy",size:"sm"}),_("span",null,N(x(s)("tasks.copyAll")),1)]),_:1},8,["size"])]),_:1},8,["style"])):ie("",!0)]))}}),j6e=ht(H6e,[["__scopeId","data-v-b44fe40c"]]),U6e={class:"tdp"},V6e={class:"tdp-body"},q6e={key:1,class:"tdp-output"},K6e={key:2,class:"tdp-empty"},G6e=Ge({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=It();return(s,i)=>(g(),C("div",U6e,[Z(Ra,{title:e.target.title,subtitle:e.target.path,"close-label":x(o)("thinking.close"),onClose:i[0]||(i[0]=r=>n("close"))},null,8,["title","subtitle","close-label"]),_("div",V6e,[e.target.lines&&e.target.lines.length>0?(g(),he(n6,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),C("div",q6e,[(g(!0),C(Ie,null,ot(e.target.output,(r,l)=>(g(),C("div",{key:l},N(r),1))),128))])):(g(),C("div",K6e,N(x(o)("diff.noDiff")),1))])]))}}),Z6e=ht(G6e,[["__scopeId","data-v-8b9af3ab"]]),Y6e={class:"hl-body"},J6e={key:0,class:"hl-gutter"},X6e={key:1,class:"hl-gutter new"},Q6e={class:"hl-sign"},eIe={class:"hl-text"},tIe=["data-line"],nIe={key:0,class:"hl-gutter"},oIe={class:"hl-text"},sIe=200,iIe=Ge({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(z){const B=z?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!B)return;const A=n[B];if(A)return A;const F=B.lastIndexOf(".");if(!(F<=0))return t[B.slice(F+1)]}function s(z){return z.split(/\r?\n/)}function i(z){const B={};z.color&&(B.color=z.color);const A=z.fontStyle??0;return A&1&&(B.fontStyle="italic"),A&2&&(B.fontWeight="var(--weight-semibold)"),A&4&&(B.textDecoration="underline"),B}const r=e,l=g$(),a=O(()=>r.lines!==void 0),u=O(()=>(r.lines??[]).some(z=>z.oldNo!==void 0)),c=O(()=>(r.lines??[]).some(z=>z.newNo!==void 0)),d=O(()=>r.lineNumbers===!0&&a.value),f=O(()=>Array.isArray(r.lineNumbers)?r.lineNumbers:null),p=O(()=>Array.isArray(r.code)?r.code:s(r.code??"")),h=O(()=>{const z=r.lines;return z?r.fullTexts?r.fullTexts:{before:z.filter(B=>B.oldNo!==void 0).map(B=>B.text).join(` -`),after:z.filter(B=>B.newNo!==void 0).map(B=>B.text).join(` -`)}:null}),m=q(null),k=q(null),w=q(null);function v(){m.value=null,k.value=null,w.value=null}let y=0,b=0,S=null,I=null;async function T(){const z=++y;b=Date.now();const B=o(r.path);if(!B){z===y&&v();return}try{I??=Is(()=>import("./index-GptwYVPK.js").then(j=>j.i),[]).then(j=>j.codeToTokens);const A=await I,F=l.value?"github-dark":"github-light",W=h.value;if(W){const[j,le]=await Promise.all([W.before?A(W.before,{lang:B,theme:F}):null,W.after?A(W.after,{lang:B,theme:F}):null]);if(z!==y)return;k.value=j?.tokens??null,w.value=le?.tokens??null}else{const j=p.value.length>0?await A(p.value.join(` -`),{lang:B,theme:F}):null;if(z!==y)return;m.value=j?.tokens??null}}catch{z===y&&v()}}function $(){if(S!==null)return;const z=Math.max(0,sIe-(Date.now()-b));S=setTimeout(()=>{S=null,T()},z)}Ze([()=>p.value.join(` -`),()=>h.value?.before??null,()=>h.value?.after??null],$),Ze([()=>r.path,l,()=>r.fullTexts],()=>{y++,v(),$()}),bn(()=>void T()),uo(()=>{y++,S!==null&&clearTimeout(S)});const L=O(()=>{const z=new Map;let B=0;for(const A of r.lines??[])A.oldNo!==void 0&&z.set(A.oldNo,B++);return z}),P=O(()=>{const z=new Map;let B=0;for(const A of r.lines??[])A.newNo!==void 0&&z.set(A.newNo,B++);return z});function R(z){if(z.type==="del"){if(z.oldNo===void 0)return null;const A=r.fullTexts?z.oldNo-1:L.value.get(z.oldNo);return A===void 0?null:k.value?.[A]??null}if(z.newNo===void 0)return null;const B=r.fullTexts?z.newNo-1:P.value.get(z.newNo);return B===void 0?null:w.value?.[B]??null}function M(z){return z.type==="add"?"+":z.type==="del"?"-":" "}const D=O(()=>{let z=0;if(f.value)for(const B of f.value)B>z&&(z=B);else for(const B of r.lines??[])B.oldNo!==void 0&&B.oldNo>z&&(z=B.oldNo),B.newNo!==void 0&&B.newNo>z&&(z=B.newNo);return Math.max(4,String(z).length)});return(z,B)=>(g(),C("div",{class:Be(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed}]),style:Ut({"--gutter-ch":`${D.value}ch`})},[_("div",Y6e,[a.value?(g(!0),C(Ie,{key:0},ot(e.lines,(A,F)=>(g(),C("div",{key:F,class:Be(["hl-row",`row-${A.type}`])},[d.value?(g(),C(Ie,{key:0},[u.value?(g(),C("span",J6e,N(A.oldNo??""),1)):ie("",!0),c.value?(g(),C("span",X6e,N(A.newNo??""),1)):ie("",!0)],64)):ie("",!0),_("span",Q6e,N(M(A)),1),_("span",eIe,[R(A)?(g(!0),C(Ie,{key:0},ot(R(A),(W,j)=>(g(),C("span",{key:j,style:Ut(i(W))},N(W.content),5))),128)):(g(),C(Ie,{key:1},[Ve(N(A.text),1)],64))])],2))),128)):(g(!0),C(Ie,{key:1},ot(p.value,(A,F)=>(g(),C("div",{key:F,class:Be(["hl-row",e.lineClass?e.lineClass(f.value?.[F]??-1):void 0]),"data-line":f.value?f.value[F]:void 0},[f.value?(g(),C("span",nIe,N(f.value[F]??""),1)):ie("",!0),_("span",oIe,[m.value&&m.value[F]?(g(!0),C(Ie,{key:0},ot(m.value[F],(W,j)=>(g(),C("span",{key:j,style:Ut(i(W))},N(W.content),5))),128)):(g(),C(Ie,{key:1},[Ve(N(A),1)],64))])],10,tIe))),128))])],6))}}),R7=ht(iIe,[["__scopeId","data-v-4878c39c"]]),rIe={class:"turn-diff-panel"},lIe={class:"tdp-body"},aIe={class:"tdp-file-head"},uIe={class:"tdp-path"},cIe={key:0,class:"tdp-diff"},dIe={key:1,class:"tdp-unavailable"},fIe=Ge({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It();function i(a,u){if(!u)return null;const c=v=>v.replaceAll("\\","/"),d=c(a);let f=c(u);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const w=m===h?"":d.slice(k.length);return w.split("/").includes("..")?null:w||null}function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}function l(a){return i(a.path,n.cwd)??a.path}return(a,u)=>(g(),C("div",rIe,[Z(Ra,{title:x(s)("conversation.turnFiles.diffTitle"),onClose:u[0]||(u[0]=c=>o("close"))},null,8,["title"]),_("div",lIe,[(g(!0),C(Ie,null,ot(e.changes,c=>(g(),C("section",{key:c.path,class:"tdp-file"},[_("div",aIe,[Z(_n,{text:c.path},{default:ve(()=>[_("span",uIe,N(r(l(c))),1)]),_:2},1032,["text"]),Z(en,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:c.path})},{default:ve(()=>[Ve(N(x(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),c.diff?(g(),C("div",cIe,[Z(R7,{lines:c.diff,path:c.path,framed:!1},null,8,["lines","path"])])):(g(),C("div",dIe,[_("p",null,N(x(s)("conversation.turnFiles.diffUnavailable")),1),Z(en,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:c.path})},{default:ve(()=>[Ve(N(x(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),pIe=ht(fIe,[["__scopeId","data-v-67a3cc7e"]]),hIe=["aria-label"],mIe=Ge({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=Sl.length*Bu;function n(o){return{"--thinking-frame-delay":`${o*Bu-t}ms`,"--thinking-frame-fast-delay":`${o*(Bu/2)-t/2}ms`}}return(o,s)=>(g(),C("span",{class:Be(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),C(Ie,null,ot(x(Sl),(i,r)=>(g(),C("span",{key:i,class:"ui-thinking-indicator__frame",style:Ut(n(r)),"aria-hidden":"true"},N(i),5))),128))],10,hIe))}}),gIe=ht(mIe,[["__scopeId","data-v-ed8aef9e"]]),vIe={class:"sc"},yIe={key:0,class:"sc-empty"},kIe={key:2,class:"sc-loading","aria-hidden":"true"},bIe={class:"sc-composer"},wIe=["placeholder"],xIe=["disabled"],_Ie=Ge({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=O(()=>n.turns.find(v=>v.role==="user")?.text?.trim()??""),r=O(()=>n.title?.trim()||s("sideChat.title")),l=O(()=>n.subtitle?.trim()?n.subtitle.trim():i.value||s("sideChat.subtitle")),a=q(""),u=q(null),c=q(null);function d(){const w=a.value.trim();w&&(o("send",w),a.value="",bt(()=>{u.value&&(u.value.style.height="auto"),f()}))}function f(){const w=c.value;w&&(w.scrollTop=w.scrollHeight)}const p=O(()=>{const w=n.turns;if(w.length===0)return"0";const v=w.at(-1),y=v.thinking?.length??0,b=v.tools?.reduce((S,I)=>S+I.name.length+(I.arg?.length??0)+(I.output?.join("").length??0),0)??0;return`${w.length}:${v.text.length}:${y}:${b}`});Ze(p,async()=>{!n.running&&!n.sending||(await bt(),f())});const h=O(()=>n.sending?n.turns.at(-1)?.role==="user":!1);function m(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),d())}function k(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}return(w,v)=>(g(),C("div",vIe,[Z(Ra,{title:r.value,subtitle:l.value,"close-label":x(s)("thinking.close"),onClose:v[0]||(v[0]=y=>o("close"))},null,8,["title","subtitle","close-label"]),_("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(g(),C("div",yIe,N(x(s)("sideChat.empty")),1)):(g(),he(Lx,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),h.value?(g(),C("div",kIe,[Z(gIe)])):ie("",!0)],512),_("div",bIe,[Fn(_("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":v[1]||(v[1]=y=>a.value=y),class:"sc-input",rows:"1",placeholder:x(s)("sideChat.placeholder"),onInput:k,onKeydown:m},null,40,wIe),[[ks,a.value]]),Z(_n,{text:x(s)("sideChat.send")},{default:ve(()=>[_("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:d},[Z(Oe,{name:"arrow-right",size:"sm"})],8,xIe)]),_:1},8,["text"])])]))}}),SIe=ht(_Ie,[["__scopeId","data-v-4572766b"]]),CIe={class:"changes-pane"},AIe={class:"dv-path"},MIe={class:"diff-head"},EIe={class:"back-label"},TIe={key:"loading",class:"empty-state diff-loading"},IIe={key:"lines",class:"dv-lines-wrap"},$Ie={key:"empty",class:"empty-state"},NIe={class:"dv-change-count"},LIe={class:"ch-head"},FIe={class:"br-label"},OIe={class:"br-name"},RIe={key:0,class:"sync-info"},PIe={key:0,class:"ahead"},DIe={key:0,class:"behind"},BIe={key:1,class:"empty-head"},zIe={key:0,class:"ch-list"},WIe=["onClick"],HIe={class:"fpath"},jIe={key:1,class:"ch-list ch-tree"},UIe={class:"tree-list"},VIe=["onClick"],qIe={class:"tree-name"},KIe=["onClick"],GIe={class:"tree-name"},ZIe={key:2,class:"empty-state"},YIe={key:3,class:"empty-state"},JIe=Ge({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t;function i(R){const M=R.toLowerCase();return M==="modified"?"modified":M==="added"?"added":M==="deleted"?"deleted":M==="renamed"?"renamed":M==="untracked"?"untracked":M==="conflicted"?"conflicted":M==="ignored"?"ignored":M==="clean"?"clean":"unknown"}const r={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function l(R){return r[i(R)]??"?"}function a(R,M=60){return R.length<=M?R:"…"+R.slice(R.length-M+1)}const u=O(()=>o.gitInfo!==null),c=O(()=>o.changes.length>0),d=O(()=>(o.selectedDiffPath??null)!==null),f=O(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=O(()=>o.fileDiff??[]),h=O(()=>o.fileDiffLoading===!0);function m(R){s("open",R)}function k(){s("back")}function w(){s("close")}const v=q("list");function y(R){v.value=R}function b(R){const M={children:[]},D=[...R].sort((z,B)=>z.path.localeCompare(B.path));for(const z of D){const B=z.path.split("/");let A=M;for(let F=0;FX.name===W&&X.kind===(j?"file":"folder"));J||(J={name:W,path:le,kind:j?"file":"folder",status:j?z.status:void 0,children:[]},A.children.push(J)),A=J}}return M.children}const S=O(()=>b(o.changes)),I=q(new Set);function T(R){return!I.value.has(R)}const $=O(()=>{const R=[];function M(D,z){for(const B of D)R.push({node:B,depth:z}),B.kind==="folder"&&T(B.path)&&M(B.children,z+1)}return M(S.value,0),R});function L(R){const M=new Set(I.value);M.has(R.path)?M.delete(R.path):M.add(R.path),I.value=M}function P(R){return`${16+R*16}px`}return(R,M)=>(g(),C("div",CIe,[f.value?(g(),C(Ie,{key:0},[Z(Ra,{title:x(n)("diff.title"),closable:e.closable,"close-label":x(n)("diff.close"),onClose:w},{default:ve(()=>[Z(_n,{text:e.selectedDiffPath??""},{default:ve(()=>[_("span",AIe,N(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),_("div",MIe,[e.hideBack?ie("",!0):(g(),he(en,{key:0,variant:"ghost",size:"sm",onClick:k},{default:ve(()=>[M[0]||(M[0]=_("span",{"aria-hidden":"true"},"←",-1)),_("span",EIe,N(x(n)("diff.back")),1)]),_:1}))]),Z(Sr,{name:"diff-content",mode:"out-in"},{default:ve(()=>[h.value?(g(),C("div",TIe,[Z(Bo,{size:"md"}),_("span",null,N(x(n)("diff.loading")),1)])):p.value.length>0?(g(),C("div",IIe,[Z(R7,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts},null,8,["lines","path","full-texts"])])):(g(),C("div",$Ie,N(e.emptyFile?x(n)("diff.emptyFile"):x(n)("diff.noDiff")),1))]),_:1})],64)):(g(),C(Ie,{key:1},[Z(Ra,{title:x(n)("diff.title"),closable:e.closable,"close-label":x(n)("diff.close"),onClose:w},{default:ve(()=>[_("span",NIe,N(x(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),Z(Bs,{"model-value":v.value,size:"sm",options:[{value:"list",label:x(n)("diff.list")},{value:"tree",label:x(n)("diff.tree")}],"onUpdate:modelValue":y},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),_("div",LIe,[u.value?(g(),C(Ie,{key:0},[_("span",FIe,N(x(n)("diff.branch")),1),_("span",OIe,N(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),C("span",RIe,[Z(_n,{text:x(n)("diff.aheadTitle")},{default:ve(()=>[e.gitInfo.ahead>0?(g(),C("span",PIe,"↑"+N(e.gitInfo.ahead),1)):ie("",!0)]),_:1},8,["text"]),Z(_n,{text:x(n)("diff.behindTitle")},{default:ve(()=>[e.gitInfo.behind>0?(g(),C("span",DIe,"↓"+N(e.gitInfo.behind),1)):ie("",!0)]),_:1},8,["text"])])):ie("",!0)],64)):(g(),C("span",BIe,N(x(n)("diff.empty")),1))]),c.value&&v.value==="list"?(g(),C("div",zIe,[(g(!0),C(Ie,null,ot(e.changes,D=>(g(),he(_n,{key:D.path,text:D.path},{default:ve(()=>[_("button",{type:"button",class:"ch-row",onClick:z=>m(D.path)},[_("span",{class:Be(["badge",i(D.status)])},N(l(D.status)),3),_("span",HIe,N(a(D.path)),1)],8,WIe)]),_:2},1032,["text"]))),128))])):c.value&&v.value==="tree"?(g(),C("div",jIe,[_("ul",UIe,[(g(!0),C(Ie,null,ot($.value,({node:D,depth:z})=>(g(),C("li",{key:D.path,class:"tree-node"},[D.kind==="folder"?(g(),C("button",{key:0,type:"button",class:"tree-row tree-folder",style:Ut({paddingLeft:P(z)}),onClick:B=>L(D)},[Z(Oe,{class:"tree-icon",name:"folder-solid",size:"sm"}),_("span",qIe,N(D.name),1)],12,VIe)):(g(),he(_n,{key:1,text:D.path},{default:ve(()=>[_("button",{type:"button",class:"tree-row tree-file",style:Ut({paddingLeft:P(z)}),onClick:B=>m(D.path)},[_("span",{class:Be(["badge",i(D.status)])},N(l(D.status)),3),_("span",GIe,N(D.name),1)],12,KIe)]),_:2},1032,["text"]))]))),128))])])):u.value?(g(),C("div",ZIe,N(x(n)("diff.clean")),1)):(g(),C("div",YIe,N(x(n)("diff.empty")),1))],64))]))}}),XIe=ht(JIe,[["__scopeId","data-v-67ba251c"]]);function P7(e,t){let n=null;bn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,bt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),uo(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const QIe={class:"search-wrap"},e9e={key:0,class:"tab-strip"},t9e={key:1,class:"state-row"},n9e={key:2,class:"state-row unavail"},o9e={key:3,class:"model-list"},s9e=["aria-selected","onClick","onMouseenter"],i9e={class:"check"},r9e={class:"model-main"},l9e={class:"model-name"},a9e={class:"model-id"},u9e={key:0,class:"caps"},c9e={class:"model-provider"},d9e={class:"model-ctx"},f9e={key:0,class:"empty"},p9e={class:"footer-hint"},h9e=Ge({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,i=O(()=>new Set(o.starredIds??[]));function r(S){return i.value.has(S)}const l=q(""),a=q(null),u=q(null),c=q("all");P7(u,a);const d=O(()=>{const S=new Set,I=[{id:"all",label:n("model.allTab")}];for(const T of o.models)S.has(T.provider)||(S.add(T.provider),I.push({id:T.provider,label:T.provider}));return I}),f=O(()=>{const S=l.value.toLowerCase().trim(),I=o.models.filter(T=>{if(c.value!=="all"&&T.provider!==c.value)return!1;const $=(T.displayName??T.model).toLowerCase().includes(S),L=T.provider.toLowerCase().includes(S),P=T.id.toLowerCase().includes(S);return!S||$||L||P});return c.value!=="all"?I:I.sort((T,$)=>{const L=r(T.id)?1:0;return(r($.id)?1:0)-L})}),p=O(()=>f.value),h=q(0);Ze([l,c],()=>{h.value=0}),Ze(d,S=>{S.some(I=>I.id===c.value)||(c.value="all")}),Ze(p,S=>{h.value=Math.min(h.value,Math.max(S.length-1,0))});function m(S){if(S.key==="Escape"){s("close");return}if(S.key==="ArrowDown")S.preventDefault(),h.value=Math.min(h.value+1,p.value.length-1);else if(S.key==="ArrowUp")S.preventDefault(),h.value=Math.max(h.value-1,0);else if(S.key==="Enter"){const I=p.value[h.value];I&&s("select",I.id)}}bn(()=>{document.addEventListener("keydown",m)}),Mn(()=>{document.removeEventListener("keydown",m)});function k(S){s("select",S)}function w(S){return p.value.indexOf(S)}function v(S){c.value=S}const y={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function b(S){const I=y[S];return I?n(`model.capabilities.${I}`):n("model.capabilities.unknown",{capability:S})}return(S,I)=>(g(),he(Pd,{open:!0,"close-on-esc":!1,title:x(n)("model.title"),size:"xl",height:"fixed",onClose:I[1]||(I[1]=T=>s("close"))},{default:ve(()=>[_("div",{ref_key:"dialogRef",ref:u,class:"mp"},[_("div",QIe,[Z(vs,{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=T=>l.value=T),placeholder:x(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),d.value.length>1?(g(),C("div",e9e,[(g(!0),C(Ie,null,ot(d.value,T=>(g(),he(en,{key:T.id,variant:T.id===c.value?"secondary":"ghost",size:"sm",onClick:$=>v(T.id)},{default:ve(()=>[Ve(N(T.label),1)]),_:2},1032,["variant","onClick"]))),128))])):ie("",!0),e.loading?(g(),C("div",t9e,[Z(Bo,{size:"sm"}),_("span",null,N(x(n)("model.loading")),1)])):e.unavailable?(g(),C("div",n9e,[Z(Oe,{name:"alert-triangle",size:"lg"}),_("span",null,N(x(n)("model.unavailable")),1)])):(g(),C("div",o9e,[(g(!0),C(Ie,null,ot(p.value,T=>(g(),C("div",{key:T.id,class:Be(["model-row",{"is-current":T.id===e.current,"is-selected":w(T)===h.value}]),role:"option","aria-selected":T.id===e.current,onClick:$=>k(T.id),onMouseenter:$=>h.value=w(T)},[_("span",i9e,[T.id===e.current?(g(),he(Oe,{key:0,name:"check",size:"sm"})):ie("",!0)]),_("span",r9e,[_("span",l9e,N(T.displayName??T.model),1),_("span",a9e,N(T.id),1),T.capabilities&&T.capabilities.length>0?(g(),C("span",u9e,[(g(!0),C(Ie,null,ot(T.capabilities,$=>(g(),he(br,{key:$,variant:"info",size:"sm"},{default:ve(()=>[Ve(N(b($)),1)]),_:2},1024))),128))])):ie("",!0)]),_("span",c9e,N(T.provider),1),_("span",d9e,N(x(n)("model.contextSuffix",{size:x(Rl)(T.maxContextSize)})),1),Z(Jt,{size:"sm",label:r(T.id)?x(n)("model.unstarTitle"):x(n)("model.starTitle"),onClick:St($=>s("toggle-star",T.id),["stop"])},{default:ve(()=>[r(T.id)?(g(),he(Oe,{key:0,name:"star",size:"md"})):(g(),he(Oe,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,s9e))),128)),p.value.length===0&&!e.loading&&!e.unavailable?(g(),C("div",f9e,N(o.models.length===0?x(n)("model.emptyNoModels"):x(n)("model.emptyNoMatch")),1)):ie("",!0)])),_("div",p9e,N(x(n)("model.footerHint")),1)],512)]),_:1},8,["title"]))}}),m9e=ht(h9e,[["__scopeId","data-v-92ec064d"]]),g9e=["aria-checked","aria-label","disabled"],v9e=Ge({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),C("button",{class:Be(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[_("span",{class:"ui-switch__thumb"},null,-1)])],10,g9e))}}),hr=ht(v9e,[["__scopeId","data-v-d7337ade"]]),y9e=["value","disabled"],k9e=Ge({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),C("select",{class:Be(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[xn(s.$slots,"default",{},void 0,!0)],42,y9e))}}),C2=ht(k9e,[["__scopeId","data-v-77d887db"]]),b9e={key:0,class:"ui-field__label"},w9e={key:1,class:"ui-field__error"},x9e={key:2,class:"ui-field__hint"},_9e=Ge({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),C("div",{class:Be(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),C("label",b9e,N(e.label),1)):ie("",!0),xn(t.$slots,"default",{},void 0,!0),e.error?(g(),C("span",w9e,N(e.error),1)):e.hint?(g(),C("span",x9e,N(e.hint),1)):ie("",!0)],2))}}),Cl=ht(_9e,[["__scopeId","data-v-bd93f701"]]),S9e=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],C9e=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function A2(){return{model:"",maxContextSize:"",displayName:""}}function _8(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[A2()]}}function A9e(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function M9e(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!C9e.test(n))return"idInvalid";if(t.apiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.baseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const o of e.models){if(o.model.trim()==="")return"modelRequired";const s=o.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function D7(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function E9e(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:D7(e.models)}}function T9e(e,t,n,o){const s=D7(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(r=>r.model===i)?i:void 0,models:s}}const I9e={key:0,class:"provider-form__managed"},$9e={class:"provider-form__fields"},N9e=["value"],L9e={class:"provider-form__key"},F9e={class:"provider-form__models-head"},O9e={class:"provider-form__models"},R9e={class:"provider-form__model provider-form__model--head"},P9e={key:1,class:"provider-form__error",role:"alert"},D9e={class:"provider-form__actions"},B9e=Ge({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=_8(),r=Es(i),l=q(""),a=q(!1),u=q(!1),c=q(!1),d=q(!1),f=O(()=>n.provider?.id.startsWith("managed:")===!0),p=O(()=>S9e.map(b=>({value:b,label:s(`providers.types.${b}`)})));function h(){const b=n.provider;if(n.mode==="edit"&&b!==void 0){r.id=b.id,r.type=b.type,r.apiKey="",r.baseUrl=b.baseUrl??"";const S=A9e(b,n.config?.models);r.models=S.length>0?S:[A2()]}else Object.assign(r,_8());l.value="",o("dirtyChange",!1)}async function m(){const b=n.provider;if(!(n.mode!=="edit"||b===void 0||f.value||!b.hasApiKey))try{const S=await xt().getProvider(b.id);S.apiKey&&!d.value&&(r.apiKey=S.apiKey,c.value=!0)}catch{c.value=!1}}function k(){o("dirtyChange",!0)}function w(){r.models.push(A2()),k()}function v(b){r.models.length<=1||(r.models.splice(b,1),k())}async function y(){if(a.value||f.value)return;const b=M9e(r,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(b!==null){l.value=s(`providers.error.${b}`);return}a.value=!0,l.value="";try{if(n.mode==="add"){const T=await xt().addProvider(E9e(r));o("dirtyChange",!1),o("saved",T.id);return}const S=n.provider;if(S===void 0)return;const I=await xt().updateProvider(S.id,T9e(r,S,c.value,n.config?.providers[S.id]?.defaultModel));o("dirtyChange",!1),o("saved",I.provider.id)}catch{l.value=s("providers.saveFailed")}finally{a.value=!1}}return bn(()=>{h(),m()}),(b,S)=>(g(),C("form",{class:"provider-form",onSubmit:St(y,["prevent"]),onInput:k},[f.value?(g(),C("div",I9e,N(x(s)("providers.managedHint")),1)):ie("",!0),_("div",$9e,[Z(Cl,{label:x(s)("providers.fieldId")},{default:ve(()=>[Z(vs,{modelValue:r.id,"onUpdate:modelValue":S[0]||(S[0]=I=>r.id=I),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),_:1},8,["label"]),Z(Cl,{label:x(s)("providers.fieldType")},{default:ve(()=>[Z(C2,{modelValue:r.type,"onUpdate:modelValue":S[1]||(S[1]=I=>r.type=I),disabled:f.value},{default:ve(()=>[(g(!0),C(Ie,null,ot(p.value,I=>(g(),C("option",{key:I.value,value:I.value},N(I.label),9,N9e))),128))]),_:1},8,["modelValue","disabled"])]),_:1},8,["label"]),Z(Cl,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",L9e,[Z(vs,{modelValue:r.apiKey,"onUpdate:modelValue":[S[2]||(S[2]=I=>r.apiKey=I),S[3]||(S[3]=I=>d.value=!0)],type:u.value?"text":"password",disabled:f.value,placeholder:e.provider?.hasApiKey?x(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","disabled","placeholder"]),Z(Jt,{class:"provider-form__eye",size:"sm",disabled:f.value,label:u.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:S[4]||(S[4]=I=>u.value=!u.value)},{default:ve(()=>[Z(Oe,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["disabled","label"])])]),_:1},8,["label"]),Z(Cl,{label:x(s)("providers.fieldBaseUrl")},{default:ve(()=>[Z(vs,{modelValue:r.baseUrl,"onUpdate:modelValue":S[5]||(S[5]=I=>r.baseUrl=I),disabled:f.value,placeholder:x(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_("div",F9e,[_("strong",null,N(x(s)("providers.fieldModels")),1),Z(en,{type:"button",size:"sm",variant:"secondary",disabled:f.value,onClick:w},{default:ve(()=>[Z(Oe,{name:"plus",size:"sm"}),Ve(N(x(s)("providers.addModel")),1)]),_:1},8,["disabled"])]),_("div",O9e,[_("div",R9e,[_("span",null,N(x(s)("providers.colModelId")),1),_("span",null,N(x(s)("providers.colContext")),1),_("span",null,N(x(s)("providers.colDisplayName")),1),S[7]||(S[7]=_("span",null,null,-1))]),(g(!0),C(Ie,null,ot(r.models,(I,T)=>(g(),C("div",{key:T,class:"provider-form__model"},[Z(vs,{modelValue:I.model,"onUpdate:modelValue":$=>I.model=$,disabled:f.value,placeholder:x(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),Z(vs,{modelValue:I.maxContextSize,"onUpdate:modelValue":$=>I.maxContextSize=$,disabled:f.value,inputmode:"numeric",placeholder:x(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),Z(vs,{modelValue:I.displayName,"onUpdate:modelValue":$=>I.displayName=$,disabled:f.value,placeholder:x(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),Z(Jt,{size:"sm",disabled:f.value||r.models.length<=1,label:x(s)("providers.removeModel"),onClick:$=>v(T)},{default:ve(()=>[Z(Oe,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])]))),128))]),l.value?(g(),C("div",P9e,N(l.value),1)):ie("",!0),_("div",D9e,[Z(en,{type:"button",variant:"secondary",onClick:S[6]||(S[6]=I=>o("cancel"))},{default:ve(()=>[Ve(N(x(s)("common.cancel")),1)]),_:1}),f.value?ie("",!0):(g(),he(en,{key:0,type:"submit",variant:"primary",loading:a.value},{default:ve(()=>[Ve(N(x(s)("providers.save")),1)]),_:1},8,["loading"]))])],32))}}),B7=ht(B9e,[["__scopeId","data-v-e7c6ed44"]]),z9e={class:"add-provider-flow"},W9e={key:0,class:"add-provider-flow__section"},H9e={key:0,class:"add-provider-flow__state"},j9e={key:1,class:"add-provider-flow__state"},U9e={class:"add-provider-flow__catalog"},V9e=["disabled","onClick"],q9e={class:"add-provider-flow__name"},K9e={key:0,class:"add-provider-flow__empty"},G9e={class:"add-provider-flow__key"},Z9e={key:1,class:"add-provider-flow__warning"},Y9e={class:"add-provider-flow__note"},J9e={key:2,class:"add-provider-flow__error",role:"alert"},X9e={class:"add-provider-flow__actions"},Q9e={class:"add-provider-flow__note"},e$e={class:"add-provider-flow__key"},t$e={key:0,class:"add-provider-flow__error",role:"alert"},n$e={class:"add-provider-flow__actions"},o$e={key:2,class:"add-provider-flow__section"},s$e=Ge({__name:"AddProviderFlow",props:{config:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=q("catalog"),r=O(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),l=q([]),a=q("loading"),u=q(""),c=q(null),d=Es({id:"",apiKey:"",baseUrl:""}),f=q(""),p=q(!1),h=q(!1),m=Es({url:"",apiKey:""}),k=q(""),w=q(!1),v=q(!1),y=O(()=>{const R=u.value.trim().toLowerCase();return R===""?l.value:l.value.filter(M=>M.name.toLowerCase().includes(R)||M.id.toLowerCase().includes(R))}),b=O(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function S(){a.value="loading";try{l.value=await xt().listCatalogProviders(),a.value="ready";const R=l.value.filter(M=>!M.rejected);R.length===1&&c.value===null&&T(R[0])}catch{a.value="error"}}function I(R){const M=R.rejectReason===null?"":`providers.catalog.rejectReason.${R.rejectReason}`;return M!==""&&s(M)!==M?s(M):s("providers.catalog.rejected")}function T(R){R.rejected||(c.value=R,d.id=R.id,d.apiKey="",d.baseUrl="",f.value="")}function $(){o("dirtyChange",!0)}async function L(){const R=c.value;if(R===null||p.value)return;const M=d.id.trim();if(M===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if(R.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await xt().importCatalogProvider({catalogId:R.id,id:M===R.id?void 0:M,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",M)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function P(){if(w.value)return;const R=m.url.trim();if(R===""){k.value=s("providers.error.registryUrlRequired");return}w.value=!0,k.value="";try{const M=await xt().importCustomRegistry({url:R,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const D=M.providers[0];D===void 0?o("cancel"):o("added",D.id)}catch{k.value=s("providers.addFailed")}finally{w.value=!1}}return bn(S),(R,M)=>(g(),C("div",z9e,[Z(Bs,{modelValue:i.value,"onUpdate:modelValue":M[0]||(M[0]=D=>i.value=D),size:"sm",options:r.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),C("section",W9e,[a.value==="loading"?(g(),C("div",H9e,[Z(Bo,{size:"sm"}),Ve(N(x(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),C("div",j9e,[_("span",null,N(x(s)("providers.catalog.loadError")),1),Z(en,{size:"sm",variant:"secondary",onClick:S},{default:ve(()=>[Ve(N(x(s)("providers.catalog.retry")),1)]),_:1})])):c.value===null?(g(),C(Ie,{key:2},[Z(vs,{modelValue:u.value,"onUpdate:modelValue":M[1]||(M[1]=D=>u.value=D),placeholder:x(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),_("div",U9e,[(g(!0),C(Ie,null,ot(y.value,D=>(g(),C("button",{key:D.id,type:"button",class:"add-provider-flow__entry",disabled:D.rejected,onClick:z=>T(D)},[_("span",q9e,N(D.name),1),D.wireType?(g(),he(br,{key:0,size:"sm",variant:"neutral"},{default:ve(()=>[Ve(N(D.wireType),1)]),_:2},1024)):ie("",!0),M[15]||(M[15]=_("span",{class:"add-provider-flow__grow"},null,-1)),_("span",null,N(D.rejected?I(D):x(s)("providers.modelCount",{count:D.models.length})),1)],8,V9e))),128)),y.value.length===0?(g(),C("div",K9e,N(x(s)("providers.catalog.empty")),1)):ie("",!0)])],64)):(g(),C("form",{key:3,class:"add-provider-flow__form",onSubmit:St(L,["prevent"]),onInput:$},[_("button",{type:"button",class:"add-provider-flow__back",onClick:M[2]||(M[2]=D=>c.value=null)},[Z(Oe,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),Ve(N(x(s)("providers.catalog.backToList")),1)]),Z(Cl,{label:x(s)("providers.fieldId")},{default:ve(()=>[Z(vs,{modelValue:d.id,"onUpdate:modelValue":M[3]||(M[3]=D=>d.id=D),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),Z(Cl,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",G9e,[Z(vs,{modelValue:d.apiKey,"onUpdate:modelValue":M[4]||(M[4]=D=>d.apiKey=D),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),Z(Jt,{class:"add-provider-flow__eye",size:"sm",label:h.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:M[5]||(M[5]=D=>h.value=!h.value)},{default:ve(()=>[Z(Oe,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),c.value.needsBaseUrl?(g(),he(Cl,{key:0,label:x(s)("providers.fieldBaseUrl")},{default:ve(()=>[Z(vs,{modelValue:d.baseUrl,"onUpdate:modelValue":M[6]||(M[6]=D=>d.baseUrl=D),placeholder:x(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):ie("",!0),b.value?(g(),C("div",Z9e,N(x(s)("providers.catalog.overwriteWarning")),1)):ie("",!0),_("div",Y9e,N(x(s)("providers.catalog.willImport",{count:c.value.models.length})),1),f.value?(g(),C("div",J9e,N(f.value),1)):ie("",!0),_("div",X9e,[Z(en,{type:"button",variant:"secondary",onClick:M[7]||(M[7]=D=>o("cancel"))},{default:ve(()=>[Ve(N(x(s)("common.cancel")),1)]),_:1}),Z(en,{type:"submit",variant:"primary",loading:p.value},{default:ve(()=>[Ve(N(x(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),C("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:St(P,["prevent"]),onInput:$},[_("p",Q9e,N(x(s)("providers.catalog.registryHint")),1),Z(Cl,{label:x(s)("providers.catalog.registryUrlLabel")},{default:ve(()=>[Z(vs,{modelValue:m.url,"onUpdate:modelValue":M[8]||(M[8]=D=>m.url=D),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),Z(Cl,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",e$e,[Z(vs,{modelValue:m.apiKey,"onUpdate:modelValue":M[9]||(M[9]=D=>m.apiKey=D),type:v.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),Z(Jt,{class:"add-provider-flow__eye",size:"sm",label:v.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:M[10]||(M[10]=D=>v.value=!v.value)},{default:ve(()=>[Z(Oe,{name:v.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),C("div",t$e,N(k.value),1)):ie("",!0),_("div",n$e,[Z(en,{type:"button",variant:"secondary",onClick:M[11]||(M[11]=D=>o("cancel"))},{default:ve(()=>[Ve(N(x(s)("common.cancel")),1)]),_:1}),Z(en,{type:"submit",variant:"primary",loading:w.value},{default:ve(()=>[Ve(N(x(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),C("div",o$e,[Z(B7,{mode:"add",config:e.config,onDirtyChange:M[12]||(M[12]=D=>o("dirtyChange",D)),onSaved:M[13]||(M[13]=D=>o("added",D)),onCancel:M[14]||(M[14]=D=>o("cancel"))},null,8,["config"])]))]))}}),i$e=ht(s$e,[["__scopeId","data-v-f7a8fd45"]]),r$e={class:"providers-panel"},l$e={class:"providers-panel__heading"},a$e={key:0,class:"providers-panel__state"},u$e={key:1,class:"providers-panel__state providers-panel__state--warning"},c$e={class:"providers-panel__add-icon"},d$e={key:0,class:"providers-panel__details"},f$e={key:0,class:"providers-panel__state"},p$e=["data-testid","aria-expanded","onClick"],h$e={class:"providers-panel__identity"},m$e={class:"providers-panel__count"},g$e={key:0,class:"providers-panel__details"},v$e={key:0,class:"providers-panel__model-list"},y$e={class:"providers-panel__delete"},k$e=Ge({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=It(),{confirm:s}=qa(),i=q([]),r=q(null),l=q(!1),a=q(!1),u=q(null),c=q(!1),d=O(()=>i.value.toSorted((w,v)=>w.id.localeCompare(v.id))),f=O(()=>u.value==="$add");Ze(c,w=>n("dirtyChange",w),{immediate:!0}),Ze(()=>e.discardToken,()=>{c.value=!1,u.value=null});async function p(){l.value=!0,a.value=!1;try{i.value=await xt().listProviders()}catch{i.value=[],a.value=!0}try{r.value=await xt().getConfig()}catch{r.value=null}finally{l.value=!1}}function h(w){c.value||(u.value=u.value===w?null:w)}async function m(w){c.value=!1,await p(),u.value=w}async function k(w){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:w.id,count:w.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await xt().deleteProvider(w.id),u.value=null,c.value=!1,await p()}})}return bn(p),(w,v)=>(g(),C("section",r$e,[_("div",l$e,[_("div",null,[_("h3",null,N(x(o)("providers.title")),1),_("p",null,N(x(o)("providers.description")),1)])]),l.value?(g(),C("div",a$e,[Z(Bo,{size:"sm"}),Ve(N(x(o)("providers.loading")),1)])):a.value?(g(),C("div",u$e,[Z(Oe,{name:"alert-triangle",size:"md"}),Ve(N(x(o)("providers.unavailable")),1)])):(g(),C(Ie,{key:2},[_("section",{class:Be(["providers-panel__card providers-panel__add",{"is-open":f.value}])},[_("button",{type:"button",class:"providers-panel__summary",onClick:v[0]||(v[0]=y=>h("$add"))},[_("span",c$e,[Z(Oe,{name:"plus",size:"sm"})]),_("strong",null,N(x(o)("providers.addProvider")),1),v[5]||(v[5]=_("span",{class:"providers-panel__grow"},null,-1)),Z(Oe,{name:"chevron-right",size:"sm",class:Be({"is-rotated":f.value})},null,8,["class"])]),f.value?(g(),C("div",d$e,[Z(i$e,{config:r.value,onDirtyChange:v[1]||(v[1]=y=>c.value=y),onAdded:m,onCancel:v[2]||(v[2]=y=>{u.value=null,c.value=!1})},null,8,["config"])])):ie("",!0)],2),i.value.length===0?(g(),C("div",f$e,N(x(o)("providers.empty")),1)):ie("",!0),(g(!0),C(Ie,null,ot(d.value,y=>(g(),C("section",{key:y.id,class:"providers-panel__card"},[_("button",{type:"button",class:"providers-panel__summary","data-testid":`provider-${y.id}-toggle`,"aria-expanded":u.value===y.id,onClick:b=>h(y.id)},[Z(_n,{text:x(o)(`providers.status.${y.status}`)},{default:ve(()=>[_("span",{class:Be(["providers-panel__status",`is-${y.status}`])},null,2)]),_:2},1032,["text"]),_("span",h$e,[_("strong",null,N(y.id),1),_("span",null,[Ve(N(y.type),1),y.baseUrl?(g(),C(Ie,{key:0},[Ve(" · "+N(y.baseUrl),1)],64)):ie("",!0)])]),v[6]||(v[6]=_("span",{class:"providers-panel__grow"},null,-1)),Z(br,{variant:y.hasApiKey?"success":"neutral",size:"sm"},{default:ve(()=>[Ve(N(y.hasApiKey?x(o)("providers.keySet"):x(o)("providers.keyNotSet")),1)]),_:2},1032,["variant"]),_("span",m$e,N(x(o)("providers.modelCount",{count:y.models?.length??0})),1),Z(Oe,{name:"chevron-right",size:"sm",class:Be({"is-rotated":u.value===y.id})},null,8,["class"])],8,p$e),u.value===y.id?(g(),C("div",g$e,[y.models?.length?(g(),C("div",v$e,[(g(!0),C(Ie,null,ot(y.models,b=>(g(),C("code",{key:b},N(b),1))),128))])):ie("",!0),Z(B7,{mode:"edit",provider:y,config:r.value,onDirtyChange:v[3]||(v[3]=b=>c.value=b),onSaved:m,onCancel:v[4]||(v[4]=b=>{u.value=null,c.value=!1})},null,8,["provider","config"]),_("div",y$e,[Z(en,{variant:"danger-soft",size:"sm","data-testid":`provider-${y.id}-delete`,onClick:b=>k(y)},{default:ve(()=>[Ve(N(x(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid","onClick"])])])):ie("",!0)]))),128))],64))]))}}),b$e=ht(k$e,[["__scopeId","data-v-b143e58f"]]),w$e=["aria-expanded","aria-label","disabled"],x$e=["aria-label"],_$e=["aria-label"],S$e={class:"sm-picker__group"},C$e=["aria-selected","onMouseenter","onClick"],A$e={class:"sm-picker__option-label"},M$e=["aria-label"],E$e={class:"sm-picker__group"},T$e=["aria-selected","onMouseenter","onClick"],I$e={class:"sm-picker__option-label"},$$e=250,N$e=188,L$e=Ge({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,r=q(null),l=q(null),a=q(null),u=q(!1),c=q(!1),d=q({}),f=q(null),p=q(""),h=q(0),m=q("models"),k=q(0),w=q(0),v=q("right"),y=new Map;let b=null;const S=O(()=>n.groups.flatMap(me=>me.options)),I=O(()=>n.modelValue?S.value.find(me=>me.id===n.modelValue)?.label??n.modelValue:""),T=O(()=>n.modelValue?n.effort?`${I.value} · ${n.effort}`:I.value:s("settings.noSecondaryModel")),$=O(()=>{const me=f.value;if(me===null)return[];const te=yh(n.modelInfoById[me]),oe=n.effort===""?[null,...te]:[...te];return n.modelValue===me&&n.effort!==""&&!te.includes(n.effort)&&oe.push(n.effort),oe});function L(me){return n.modelValue!==f.value?!1:me===null?n.effort==="":n.effort===me}function P(){const me=$.value.findIndex(L);return me>=0?me:0}function R(me,te){me instanceof HTMLElement?y.set(te,me):y.delete(te)}function M(){b!==null&&(clearTimeout(b),b=null)}function D(){M(),b=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},$$e)}function z(me){me!==p.value&&(p.value=me,h.value=Math.max(0,S.value.findIndex(te=>te.id===me)))}function B(){const me=r.value,te=l.value;if(!me||!te)return;const oe=me.getBoundingClientRect(),H=te.offsetHeight,Y=window.innerHeight-oe.bottom;c.value=YH;const ke=Math.max(8,window.innerWidth-oe.right);d.value=c.value?{right:`${ke}px`,bottom:`${window.innerHeight-oe.top+4}px`,top:"auto"}:{right:`${ke}px`,top:`${oe.bottom+4}px`,bottom:"auto"}}function A(){const me=l.value,te=f.value===null?void 0:y.get(f.value);if(!me||!te)return;const oe=me.getBoundingClientRect(),H=te.getBoundingClientRect(),Y=a.value?.offsetHeight??0,ke=Math.max(0,window.innerHeight-8-Y-oe.top);w.value=Math.max(0,Math.min(H.top-oe.top-4,me.offsetHeight-40,ke));const Se=window.innerWidth-oe.right;v.value=Se>=N$e||Se>=oe.left?"right":"left"}function F(){u.value||n.disabled||(u.value=!0,p.value=n.modelValue||S.value[0]?.id||"",h.value=Math.max(0,S.value.findIndex(me=>me.id===p.value)),f.value=null,m.value="models",bt(B))}function W({restoreFocus:me=!1}={}){u.value&&(M(),u.value=!1,f.value=null,me&&bt(()=>r.value?.focus()))}function j(){u.value?W({restoreFocus:!0}):F()}function le(){f.value=null,m.value="models"}function J(me,{moveFocus:te=!1}={}){z(me),M(),f.value=me,bt(A),te&&(m.value="efforts",k.value=P())}function X(me){const te=f.value;if(te===null)return;const oe={model:te,...me===null?{}:{effort:me}};(oe.model!==n.modelValue||(oe.effort??"")!==n.effort)&&o("select",oe),W({restoreFocus:!0})}function G(){bt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function Q(me){const te=S.value;if(te.length===0)return;const oe=te[(h.value+me+te.length)%te.length];z(oe.id),f.value!==null&&J(oe.id),G()}function ee(me){const te=$.value;te.length!==0&&(k.value=(k.value+me+te.length)%te.length,G())}function K(me){if(!u.value){(me.key==="Enter"||me.key===" "||me.key==="ArrowDown")&&(me.preventDefault(),F());return}if(me.key==="ArrowDown")me.preventDefault(),m.value==="models"?Q(1):ee(1);else if(me.key==="ArrowUp")me.preventDefault(),m.value==="models"?Q(-1):ee(-1);else if(me.key==="ArrowRight")me.preventDefault(),J(p.value,{moveFocus:!0});else if(me.key==="ArrowLeft")me.preventDefault(),f.value!==null&&le();else if(me.key==="Enter"||me.key===" ")me.preventDefault(),m.value==="models"?J(p.value,{moveFocus:!0}):X($.value[k.value]??null);else if(me.key==="Home"||me.key==="End"){me.preventDefault();const te=me.key==="Home";if(m.value==="models"){const oe=S.value;if(oe.length===0)return;const H=(te?oe[0]:oe.at(-1)).id;z(H),f.value!==null&&J(H)}else k.value=te?0:$.value.length-1;G()}else me.key==="Escape"&&(me.preventDefault(),W({restoreFocus:!0}))}function ge(me){const te=me.target;te instanceof Node&&(r.value?.contains(te)||l.value?.contains(te)||W())}function Ce(me){if(u.value){if(l.value?.contains(me.target instanceof Node?me.target:null)){A();return}W(),B()}}function ze(){u.value&&B()}return bn(()=>{document.addEventListener("pointerdown",ge),document.addEventListener("scroll",Ce,!0),window.addEventListener("resize",ze)}),Mn(()=>{document.removeEventListener("pointerdown",ge),document.removeEventListener("scroll",Ce,!0),window.removeEventListener("resize",ze),M()}),(me,te)=>(g(),C("div",{class:Be(["sm-picker",{"is-open":u.value}])},[_("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":u.value,"aria-haspopup":"dialog","aria-label":x(s)("settings.secondaryModel"),disabled:e.disabled,onClick:j,onKeydown:K},[_("span",{class:Be(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[_("span",null,N(T.value),1)],2),Z(Oe,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,w$e),(g(),he(Wl,{to:"body"},[u.value?(g(),C("div",{key:0,id:i,ref_key:"menuRef",ref:l,class:Be(["sm-picker__menu",{"sm-picker__menu--up":c.value}]),style:Ut(d.value),role:"dialog","aria-label":x(s)("settings.secondaryModel")},[_("div",{class:"sm-picker__models",role:"listbox","aria-label":x(s)("settings.secondaryModel")},[(g(!0),C(Ie,null,ot(e.groups,oe=>(g(),C(Ie,{key:oe.provider},[_("div",S$e,N(oe.provider),1),(g(!0),C(Ie,null,ot(oe.options,H=>(g(),C("button",{key:H.id,ref_for:!0,ref:Y=>R(Y,H.id),type:"button",class:Be(["sm-picker__option",{"is-selected":H.id===e.modelValue,"is-active":H.id===p.value,"is-kb-active":m.value==="models"&&H.id===p.value}]),role:"option","aria-selected":H.id===e.modelValue,onMouseenter:Y=>J(H.id),onMouseleave:D,onClick:Y=>J(H.id,{moveFocus:!0})},[Z(Oe,{class:"sm-picker__check",name:"check",size:"sm"}),_("span",A$e,N(H.label),1),Z(Oe,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,C$e))),128))],64))),128))],8,_$e),f.value!==null?(g(),C("div",{key:0,ref_key:"flyoutRef",ref:a,class:Be(["sm-picker__flyout",`sm-picker__flyout--${v.value}`]),style:Ut({top:`${w.value}px`}),role:"listbox","aria-label":x(s)("settings.secondaryModelEffort"),onMouseenter:M,onMouseleave:D},[_("div",E$e,N(x(s)("settings.secondaryModelEffort")),1),(g(!0),C(Ie,null,ot($.value,(oe,H)=>(g(),C("button",{key:oe??"__default__",type:"button",class:Be(["sm-picker__option",{"is-selected":L(oe),"is-kb-active":m.value==="efforts"&&H===k.value,"is-muted":oe===null}]),role:"option","aria-selected":L(oe),onMouseenter:Y=>{m.value="efforts",k.value=H},onClick:Y=>X(oe)},[Z(Oe,{class:"sm-picker__check",name:"check",size:"sm"}),_("span",I$e,N(oe??x(s)("settings.secondaryModelEffortAuto")),1)],42,T$e))),128))],46,M$e)):ie("",!0)],14,x$e)):ie("",!0)]))],2))}}),F$e=ht(L$e,[["__scopeId","data-v-57066bcd"]]),O$e=["aria-label"],R$e=["aria-selected","onClick"],P$e={class:"body"},D$e={class:"panel"},B$e={class:"sec"},z$e={class:"sec-title"},W$e={class:"row"},H$e={class:"rlabel"},j$e={class:"row"},U$e={class:"rlabel"},V$e={class:"row"},q$e={class:"rlabel"},K$e={class:"row"},G$e={class:"rlabel"},Z$e={class:"hint"},Y$e={class:"sec"},J$e={class:"sec-title"},X$e={class:"row"},Q$e={class:"rlabel"},eNe={key:0,class:"hint"},tNe={class:"row"},nNe={class:"rlabel"},oNe={key:0,class:"hint"},sNe={class:"row"},iNe={class:"rlabel"},rNe={key:0,class:"hint"},lNe={class:"row"},aNe={class:"rlabel"},uNe={class:"panel"},cNe={class:"sec"},dNe={class:"sec-title"},fNe={class:"row"},pNe={class:"rlabel"},hNe={key:0,class:"rvalue"},mNe={class:"actions"},gNe={class:"panel"},vNe={class:"panel"},yNe={class:"sec"},kNe={class:"sec-head"},bNe={class:"sec-title"},wNe={key:0,class:"saving"},xNe={class:"row"},_Ne={class:"rlabel"},SNe={class:"hint"},CNe={key:0,class:"select-wrap"},ANe={key:0,value:"",disabled:""},MNe=["label"],ENe=["value"],TNe={key:1,class:"rvalue mono"},INe={class:"row"},$Ne={class:"rlabel"},NNe={class:"hint"},LNe={class:"row"},FNe={class:"rlabel"},ONe={class:"hint"},RNe={class:"row"},PNe={class:"rlabel"},DNe={class:"hint"},BNe={class:"row"},zNe={class:"rlabel"},WNe={class:"hint"},HNe={key:0,class:"sec"},jNe={class:"sec-title"},UNe={class:"row"},VNe={class:"rlabel"},qNe={class:"hint"},KNe={key:1,class:"rvalue"},GNe={key:1,class:"empty-config"},ZNe={class:"panel"},YNe={class:"sec"},JNe={class:"sec-title"},XNe={class:"row"},QNe={class:"rlabel"},e7e={class:"hint"},t7e={class:"rvalue mono"},n7e={class:"row"},o7e={class:"rlabel"},s7e={class:"hint"},i7e={class:"value-wrap"},r7e={class:"rvalue mono"},l7e={class:"row"},a7e={class:"rlabel"},u7e={class:"hint"},c7e={class:"value-wrap"},d7e={class:"rvalue mono"},f7e={class:"row"},p7e={class:"rlabel"},h7e={class:"rvalue mono"},m7e={key:0,class:"sec"},g7e={key:0,class:"row"},v7e={class:"rlabel"},y7e={class:"hint"},k7e={class:"hint"},b7e={class:"sec"},w7e={class:"sec-title"},x7e={class:"row"},_7e={class:"rlabel"},S7e={key:0,class:"hint"},C7e={class:"row"},A7e={class:"rlabel"},M7e={class:"panel"},E7e={class:"sec"},T7e={class:"sec-title"},I7e={class:"row"},$7e={class:"rlabel"},N7e={class:"hint"},L7e={class:"row"},F7e={class:"rlabel"},O7e={class:"hint"},R7e={key:1,class:"empty-config"},P7e={class:"panel"},D7e={class:"panel-head"},B7e={class:"panel-title"},z7e={class:"panel-desc"},W7e={class:"archive-toolbar"},H7e={class:"archive-search"},j7e=["placeholder"],U7e={value:"all"},V7e=["value"],q7e={key:0,class:"archive-empty"},K7e={key:0,class:"archive-list"},G7e={class:"archive-workspace"},Z7e={class:"path"},Y7e={class:"count"},J7e={class:"setting-card"},X7e={class:"archive-meta"},Q7e={class:"archive-name"},eLe={class:"archive-time"},tLe={key:1,class:"archive-empty"},nLe=100,oLe=Ge({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","logout","openOnboarding","updateConfig","close"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,i=q(o.initialTab??"general"),r=O(()=>jx(o.uiFontSize)),l=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"robot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"}],a=S$().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",c=q(null),d=O(()=>c.value?.serverVersion||o.serverVersion||"-"),f=O(()=>c.value?.backend??o.backend??"v1"),p=O(()=>f.value==="v2"?"agent-gateway":"server"),h=q(!1),m=q(!1),k=q(0),{confirm:w,current:v}=qa(),y=["manual","yolo","auto"],b={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},S=q(null);P7(S);function I(Je){Je.key==="Escape"&&v.value===null&&G()}bn(()=>{document.addEventListener("keydown",I),T()}),Mn(()=>{document.removeEventListener("keydown",I),Ce!==null&&clearTimeout(Ce)});async function T(){try{c.value=await xt().getMeta()}catch{c.value=null}}function $(){vN()}const L=O(()=>{const Je=new Map;for(const tt of o.models??[])Je.set(tt.id,{id:tt.id,label:tt.displayName??tt.model??tt.id,provider:tt.provider});for(const[tt,dt]of Object.entries(o.config?.models??{})){if(Je.has(tt))continue;const Rt=M(dt);Je.set(tt,{id:tt,label:D(tt,dt,Rt),provider:Rt??tt})}return Array.from(Je.values())}),P=O(()=>{const Je=new Map;for(const tt of L.value){const dt=Je.get(tt.provider)??[];dt.push(tt),Je.set(tt.provider,dt)}for(const[tt,dt]of Je)Je.set(tt,dt.toSorted((Rt,Fe)=>Rt.label.localeCompare(Fe.label)));return Array.from(Je.entries()).toSorted(([tt],[dt])=>tt.localeCompare(dt)).map(([tt,dt])=>({provider:tt,options:dt}))}),R=O(()=>{const Je=o.config?.defaultPermissionMode;return Je==="auto"||Je==="yolo"||Je==="manual"?Je:"manual"});function M(Je){if(!Je||typeof Je!="object")return;const tt=Je;return typeof tt.provider=="string"?tt.provider:void 0}function D(Je,tt,dt){if(!tt||typeof tt!="object")return Je;const Rt=tt,Fe=typeof Rt.model=="string"?Rt.model:void 0,Ye=dt??M(tt);return Fe&&Ye?`${Je} (${Ye}/${Fe})`:Fe?`${Je} (${Fe})`:Je}function z(Je){return Je===!0}function B(Je){!Je||Je===o.config?.defaultModel||s("updateConfig",{defaultModel:Je})}function A(Je){Je!==R.value&&s("updateConfig",{defaultPermissionMode:Je})}function F(Je){const tt=o.config?.[Je];s("updateConfig",{[Je]:!z(tt)})}function W(){const Je=o.config?.thinking;return!Je||typeof Je!="object"?!0:Je.enabled!==!1}function j(){s("updateConfig",{thinking:{enabled:!W()}})}function le(){const Je=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!Je})}async function J(Je){Je!==i.value&&await X()&&(i.value=Je)}async function X(){if(!m.value)return!0;const Je=await w({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return Je&&(m.value=!1,k.value+=1),Je}async function G(){await X()&&s("close")}function Q(){return[`App version: ${u}`,`Server version: ${d.value}`,`Backend: ${f.value}`,`Server address: ${a}`,`Server ID: ${c.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` -`)}async function ee(){h.value=await Zo(Q())}const K=q(!1),ge=q(!1);let Ce=null;function ze(){Ce!==null&&clearTimeout(Ce),Ce=setTimeout(()=>{K.value=!1,ge.value=!1,Ce=null},1500)}async function me(){await Zo(d.value)&&(K.value=!0,ze())}async function te(){await Zo(a)&&(ge.value=!0,ze())}const oe=O(()=>Se("secondary-model")),H=O(()=>o.config?.secondaryModel?.model??""),Y=O(()=>o.config?.secondaryModel?.defaultEffort??""),ke=O(()=>Object.fromEntries((o.models??[]).map(Je=>[Je.id,Je])));function Se(Je){return o.config?.experimental?.[Je]===!0}function ye(Je,tt){const dt={...o.config?.experimental,[Je]:tt};s("updateConfig",{experimental:dt})}function ne(Je){const tt=Je.effort?{model:Je.model,defaultEffort:Je.effort}:{model:Je.model};tt.model===H.value&&(Je.effort??"")===Y.value||s("updateConfig",{secondaryModel:tt})}function ce(Je){const tt=UN(Je);tt!==void 0&&s("setUiFontSize",tt)}const xe=V0(),fe=q([]),ue=q(!1),we=q(!1),se=q(""),_e=q("all"),Re=q("archived-desc");async function lt(){if(!(ue.value||we.value)){ue.value=!0;try{const Je=[];let tt;for(;;){const dt=await xe.loadArchivedSessions({beforeId:tt,pageSize:nLe});if(Je.push(...dt.items),!dt.hasMore||dt.items.length===0)break;const Rt=dt.items.at(-1)?.id;if(Rt===void 0)break;tt=Rt}fe.value=Je,we.value=!0}catch(Je){console.warn("loadAllArchived failed",Je)}finally{ue.value=!1}}}Ze(i,Je=>{Je==="archived"&&!we.value&<()});const ct=O(()=>{const Je=new Set;for(const tt of fe.value)Je.add(tt.cwd);return Array.from(Je).toSorted((tt,dt)=>tt.localeCompare(dt))}),Ct=O(()=>{const Je=se.value.trim().toLowerCase();let tt=fe.value.filter(dt=>dt.archived===!0);return _e.value!=="all"&&(tt=tt.filter(dt=>dt.cwd===_e.value)),Je&&(tt=tt.filter(dt=>dt.title.toLowerCase().includes(Je))),Re.value==="archived-desc"?tt.toSorted((dt,Rt)=>Rt.updatedAt.localeCompare(dt.updatedAt)):Re.value==="created-desc"?tt.toSorted((dt,Rt)=>Rt.createdAt.localeCompare(dt.createdAt)):tt.toSorted((dt,Rt)=>dt.title.localeCompare(Rt.title,"en"))}),Mt=O(()=>{const Je=new Map;for(const tt of Ct.value){const dt=Je.get(tt.cwd)??[];dt.push(tt),Je.set(tt.cwd,dt)}return Array.from(Je.entries()).map(([tt,dt])=>({cwd:tt,items:dt}))});async function Bt(Je){await xe.restoreSession(Je)&&(fe.value=fe.value.filter(dt=>dt.id!==Je))}function Vt(Je){const tt=new Date(Je);if(Number.isNaN(tt.getTime()))return Je;const dt=Rt=>String(Rt).padStart(2,"0");return`${tt.getFullYear()}-${dt(tt.getMonth()+1)}-${dt(tt.getDate())} ${dt(tt.getHours())}:${dt(tt.getMinutes())}`}return(Je,tt)=>(g(),he(Pd,{open:!0,"close-on-esc":!1,title:x(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:G},{default:ve(()=>[_("div",{ref_key:"dialogRef",ref:S,class:"sd"},[_("nav",{class:"settings-tabs",role:"tablist","aria-label":x(n)("settings.title")},[(g(),C(Ie,null,ot(l,dt=>_("button",{key:dt.id,type:"button",class:Be(["tab",{on:i.value===dt.id}]),role:"tab","aria-selected":i.value===dt.id,onClick:Rt=>J(dt.id)},[Z(Oe,{name:dt.icon,size:"sm"},null,8,["name"]),Ve(" "+N(x(n)(dt.labelKey)),1)],10,R$e)),64))],8,O$e),_("div",P$e,[Fn(_("section",D$e,[_("section",B$e,[_("h3",z$e,N(x(n)("settings.appearance")),1),_("div",W$e,[_("span",H$e,N(x(n)("theme.colorSchemeLabel")),1),Z(Bs,{"model-value":e.colorScheme,options:[{value:"light",label:x(n)("theme.light")},{value:"dark",label:x(n)("theme.dark")},{value:"system",label:x(n)("theme.system")}],"onUpdate:modelValue":tt[0]||(tt[0]=dt=>s("setColorScheme",dt))},null,8,["model-value","options"])]),_("div",j$e,[_("span",U$e,N(x(n)("theme.accentLabel")),1),Z(Bs,{"model-value":e.accent,options:[{value:"blue",label:x(n)("theme.accentBlue")},{value:"mono",label:x(n)("theme.accentBlack")}],"onUpdate:modelValue":tt[1]||(tt[1]=dt=>s("setAccent",dt))},null,8,["model-value","options"])]),_("div",V$e,[_("span",q$e,N(x(n)("settings.uiFontSize")),1),Z(Bs,{"model-value":r.value,options:x(zN),"aria-label":x(n)("settings.uiFontSize"),"onUpdate:modelValue":ce},null,8,["model-value","options","aria-label"])]),_("div",K$e,[_("span",G$e,[Ve(N(x(n)("settings.conversationToc"))+" ",1),_("span",Z$e,N(x(n)("settings.conversationTocHint")),1)]),Z(hr,{"model-value":e.conversationToc??!0,label:x(n)("settings.conversationToc"),"onUpdate:modelValue":tt[2]||(tt[2]=dt=>s("setConversationToc",dt))},null,8,["model-value","label"])])]),_("section",Y$e,[_("h3",J$e,N(x(n)("settings.notifications")),1),_("div",X$e,[_("span",Q$e,[Ve(N(x(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",eNe,N(x(n)("settings.notifyDenied")),1)):ie("",!0)]),Z(hr,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnComplete"),"onUpdate:modelValue":tt[3]||(tt[3]=dt=>s("setNotify",dt))},null,8,["model-value","disabled","label"])]),_("div",tNe,[_("span",nNe,[Ve(N(x(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",oNe,N(x(n)("settings.notifyDenied")),1)):ie("",!0)]),Z(hr,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":tt[4]||(tt[4]=dt=>s("setNotifyQuestion",dt))},null,8,["model-value","disabled","label"])]),_("div",sNe,[_("span",iNe,[Ve(N(x(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",rNe,N(x(n)("settings.notifyDenied")),1)):ie("",!0)]),Z(hr,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnApproval"),"onUpdate:modelValue":tt[5]||(tt[5]=dt=>s("setNotifyApproval",dt))},null,8,["model-value","disabled","label"])]),_("div",lNe,[_("span",aNe,N(x(n)("settings.soundOnComplete")),1),Z(hr,{"model-value":e.sound,label:x(n)("settings.soundOnComplete"),"onUpdate:modelValue":tt[6]||(tt[6]=dt=>s("setSound",dt))},null,8,["model-value","label"])])])],512),[[vi,i.value==="general"]]),Fn(_("section",uNe,[_("section",cNe,[_("h3",dNe,N(x(n)("settings.account")),1),_("div",fNe,[_("span",pNe,N(e.authReady?x(n)("settings.providers"):x(n)("sidebar.notSignedIn")),1),Z(_n,{text:e.accountModel},{default:ve(()=>[e.authReady&&e.accountModel?(g(),C("span",hNe,N(e.accountModel),1)):ie("",!0)]),_:1},8,["text"])]),_("div",mNe,[Z(en,{variant:"secondary",size:"sm",onClick:tt[7]||(tt[7]=dt=>{s("openOnboarding"),s("close")})},{default:ve(()=>[Ve(N(x(n)("onboarding.reopen")),1)]),_:1}),Z(en,{variant:"primary",size:"sm",onClick:tt[8]||(tt[8]=dt=>J("providers"))},{default:ve(()=>[Ve(N(x(n)("settings.manageProviders")),1)]),_:1})])])],512),[[vi,i.value==="account"]]),Fn(_("section",gNe,[Z(b$e,{"discard-token":k.value,onDirtyChange:tt[9]||(tt[9]=dt=>m.value=dt)},null,8,["discard-token"])],512),[[vi,i.value==="providers"]]),Fn(_("section",vNe,[_("section",yNe,[_("div",kNe,[_("h3",bNe,N(x(n)("settings.agentDefaults")),1),e.configSaving?(g(),C("span",wNe,N(x(n)("settings.saving")),1)):ie("",!0)]),e.config?(g(),C(Ie,{key:0},[_("div",xNe,[_("span",_Ne,[Ve(N(x(n)("settings.defaultModel"))+" ",1),_("span",SNe,N(x(n)("settings.defaultModelHint")),1)]),P.value.length>0?(g(),C("div",CNe,[Z(C2,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":x(n)("settings.defaultModel"),"onUpdate:modelValue":B},{default:ve(()=>[e.config.defaultModel?ie("",!0):(g(),C("option",ANe,N(x(n)("settings.noDefaultModel")),1)),(g(!0),C(Ie,null,ot(P.value,dt=>(g(),C("optgroup",{key:dt.provider,label:dt.provider},[(g(!0),C(Ie,null,ot(dt.options,Rt=>(g(),C("option",{key:Rt.id,value:Rt.id},N(Rt.label),9,ENe))),128))],8,MNe))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),C("span",TNe,N(e.config.defaultModel??x(n)("settings.noDefaultModel")),1))]),_("div",INe,[_("span",$Ne,[Ve(N(x(n)("settings.defaultPermission"))+" ",1),_("span",NNe,N(x(n)("settings.defaultPermissionHint")),1)]),Z(Bs,{"model-value":R.value,options:y.map(dt=>({value:dt,label:x(n)(b[dt])})),"onUpdate:modelValue":tt[10]||(tt[10]=dt=>A(dt))},null,8,["model-value","options"])]),_("div",LNe,[_("span",FNe,[Ve(N(x(n)("settings.defaultThinking"))+" ",1),_("span",ONe,N(x(n)("settings.defaultThinkingHint")),1)]),Z(hr,{"model-value":W(),disabled:e.configSaving,label:x(n)("settings.defaultThinking"),"onUpdate:modelValue":tt[11]||(tt[11]=dt=>j())},null,8,["model-value","disabled","label"])]),_("div",RNe,[_("span",PNe,[Ve(N(x(n)("settings.defaultPlanMode"))+" ",1),_("span",DNe,N(x(n)("settings.defaultPlanModeHint")),1)]),Z(hr,{"model-value":z(e.config.defaultPlanMode),disabled:e.configSaving,label:x(n)("settings.defaultPlanMode"),"onUpdate:modelValue":tt[12]||(tt[12]=dt=>F("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),_("div",BNe,[_("span",zNe,[Ve(N(x(n)("settings.mergeSkills"))+" ",1),_("span",WNe,N(x(n)("settings.mergeSkillsHint")),1)]),Z(hr,{"model-value":z(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:x(n)("settings.mergeSkills"),"onUpdate:modelValue":tt[13]||(tt[13]=dt=>F("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])]),oe.value?(g(),C("section",HNe,[_("h3",jNe,N(x(n)("settings.secondaryModelSection")),1),_("div",UNe,[_("span",VNe,[Ve(N(x(n)("settings.secondaryModel"))+" ",1),_("span",qNe,N(x(n)("settings.secondaryModelHint")),1)]),P.value.length>0?(g(),he(F$e,{key:0,"model-value":H.value,effort:Y.value,groups:P.value,"model-info-by-id":ke.value,disabled:e.configSaving,onSelect:ne},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),C("span",KNe,N(x(n)("settings.noSecondaryModel")),1))])])):ie("",!0)],64)):(g(),C("div",GNe,N(x(n)("settings.configUnavailable")),1))])],512),[[vi,i.value==="agent"]]),Fn(_("section",ZNe,[_("section",YNe,[_("h3",JNe,N(x(n)("settings.versionAndUpdates")),1),_("div",XNe,[_("span",QNe,[Ve(N(x(n)("settings.appVersion"))+" ",1),_("span",e7e,N(x(n)("settings.appVersionHint")),1)]),_("span",t7e,N(x(u)),1)]),_("div",n7e,[_("span",o7e,[Ve(N(x(n)("settings.serverVersion"))+" ",1),_("span",s7e,N(x(n)("settings.serverVersionHint")),1)]),_("span",i7e,[_("span",r7e,N(d.value),1),Z(Jt,{size:"sm",label:K.value?x(n)("settings.copied"):x(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:me},{default:ve(()=>[Z(Oe,{name:K.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_("div",l7e,[_("span",a7e,[Ve(N(x(n)("settings.serverAddress"))+" ",1),_("span",u7e,N(x(n)("settings.serverAddressHint")),1)]),_("span",c7e,[_("span",d7e,N(x(a)),1),Z(Jt,{size:"sm",label:ge.value?x(n)("settings.copied"):x(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:te},{default:ve(()=>[Z(Oe,{name:ge.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_("div",f7e,[_("span",p7e,N(x(n)("settings.backend")),1),_("span",h7e,N(p.value),1)])]),e.config?(g(),C("section",m7e,[e.config?(g(),C("div",g7e,[_("span",v7e,[Ve(N(x(n)("settings.telemetry"))+" ",1),_("span",y7e,N(x(n)("settings.telemetryHint")),1),_("span",k7e,N(x(n)("settings.telemetryRestartHint")),1)]),Z(hr,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:x(n)("settings.telemetry"),"onUpdate:modelValue":tt[14]||(tt[14]=dt=>le())},null,8,["model-value","disabled","label"])])):ie("",!0)])):ie("",!0),_("section",b7e,[_("h3",w7e,N(x(n)("settings.diagnostics")),1),_("div",x7e,[_("span",_7e,[Ve(N(x(n)("settings.exportLog"))+" ",1),x($r)()?ie("",!0):(g(),C("span",S7e,N(x(n)("settings.logHint")),1))]),Z(en,{variant:"secondary",size:"sm",onClick:$},{default:ve(()=>[Ve(N(x(n)("settings.exportLogBtn")),1)]),_:1})]),_("div",C7e,[_("span",A7e,N(x(n)("settings.copyDetails")),1),Z(en,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:ee},{default:ve(()=>[Ve(N(h.value?x(n)("settings.copied"):x(n)("settings.copyDetails")),1)]),_:1})])])],512),[[vi,i.value==="advanced"]]),Fn(_("section",M7e,[_("section",E7e,[_("h3",T7e,N(x(n)("settings.tabs.lab")),1),e.config?(g(),C(Ie,{key:0},[_("div",I7e,[_("span",$7e,[Ve(N(x(n)("settings.lab.sidebarTabs"))+" ",1),_("span",N7e,N(x(n)("settings.lab.sidebarTabsHint")),1)]),Z(hr,{"model-value":Se("sidebarTabs"),disabled:e.configSaving,label:x(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":tt[15]||(tt[15]=dt=>ye("sidebarTabs",dt))},null,8,["model-value","disabled","label"])]),_("div",L7e,[_("span",F7e,[Ve(N(x(n)("settings.lab.secondaryModel"))+" ",1),_("span",O7e,N(x(n)("settings.lab.secondaryModelHint")),1)]),Z(hr,{"model-value":Se("secondary-model"),disabled:e.configSaving,label:x(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":tt[16]||(tt[16]=dt=>ye("secondary-model",dt))},null,8,["model-value","disabled","label"])])],64)):(g(),C("div",R7e,N(x(n)("settings.configUnavailable")),1))])],512),[[vi,i.value==="lab"]]),Fn(_("section",P7e,[_("div",D7e,[tt[20]||(tt[20]=_("div",{class:"panel-kicker"},"Archived sessions",-1)),_("h4",B7e,N(x(n)("settings.archivedTitle")),1),_("p",z7e,N(x(n)("settings.archivedDesc")),1)]),_("div",W7e,[_("label",H7e,[tt[21]||(tt[21]=_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("circle",{cx:"11",cy:"11",r:"7"}),_("path",{d:"m21 21-4.3-4.3"})],-1)),Fn(_("input",{"onUpdate:modelValue":tt[17]||(tt[17]=dt=>se.value=dt),placeholder:x(n)("settings.archivedSearch")},null,8,j7e),[[ks,se.value]])]),Z(C2,{"model-value":_e.value,size:"sm","aria-label":x(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":tt[18]||(tt[18]=dt=>_e.value=dt)},{default:ve(()=>[_("option",U7e,N(x(n)("settings.archivedAllWorkspaces")),1),(g(!0),C(Ie,null,ot(ct.value,dt=>(g(),C("option",{key:dt,value:dt},N(dt),9,V7e))),128))]),_:1},8,["model-value","aria-label"]),Z(Bs,{size:"sm","model-value":Re.value,options:[{value:"archived-desc",label:x(n)("settings.archivedSortArchived")},{value:"created-desc",label:x(n)("settings.archivedSortCreated")},{value:"name-asc",label:x(n)("settings.archivedSortName")}],"onUpdate:modelValue":tt[19]||(tt[19]=dt=>Re.value=dt)},null,8,["model-value","options"])]),ue.value?(g(),C("div",q7e,N(x(n)("settings.archivedLoadingAll")),1)):(g(),C(Ie,{key:1},[Mt.value.length>0?(g(),C("div",K7e,[(g(!0),C(Ie,null,ot(Mt.value,dt=>(g(),C("section",{key:dt.cwd,class:"archive-card"},[_("div",G7e,[tt[22]||(tt[22]=_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M3 7h6l2 2h10v9H3z"}),_("path",{d:"M3 7V5h6l2 2"})],-1)),_("span",Z7e,N(dt.cwd),1),_("span",Y7e,N(x(n)("settings.archivedSessionsCount",{count:dt.items.length})),1)]),_("div",J7e,[(g(!0),C(Ie,null,ot(dt.items,Rt=>(g(),C("div",{key:Rt.id,class:"archive-row"},[_("div",X7e,[_("div",Q7e,N(Rt.title),1),_("div",eLe,N(x(n)("settings.archivedAt",{time:Vt(Rt.updatedAt)})),1)]),Z(en,{variant:"secondary",size:"sm",onClick:Fe=>Bt(Rt.id)},{default:ve(()=>[Ve(N(x(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),C("div",tLe,N(fe.value.length===0?x(n)("settings.archivedEmpty"):x(n)("settings.archivedNoMatch")),1))],64))],512),[[vi,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),sLe=ht(oLe,[["__scopeId","data-v-8ba6a8d4"]]),iLe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,z7=/^[A-Za-z]:[\\/]/,rLe=/^\/\/(?!\/)/;function Nk(e){return iLe.test(e.trim())}function lLe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function aLe(e){return rLe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function uLe(e){return z7.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function cLe(e){return z7.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function M2(e,t){let n=aLe(lLe(e.trim(),t));const o=uLe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const r=n.lastIndexOf("/"),l=o?n.lastIndexOf("\\"):-1,a=Math.max(r,l),u=l>r?"\\":"/",c=cLe(n),d=ad.value.trim().length>0);let m=0,k=null;const w=O(()=>Nk(d.value)),v=q("idle"),y=q(""),b=q("/"),S=q([]),I=q(""),T=q(null),$=q(null),L=O(()=>v.value!=="valid"?null:fLe(d.value,I.value,$.value));let P=0,R=null;function M(ee,K){const ge=ee.toLowerCase(),Ce=K.toLowerCase();let ze=0;for(let me=0;me0&&te=S8))break;oe.depth+1{k&&clearTimeout(k),R&&clearTimeout(R),P++,v.value="idle",S.value=[],$.value=null;const K=ee.trim();if(K===""){m++,p.value=[],f.value=!1;return}if(Nk(K)){if(m++,p.value=[],f.value=!1,l.value)return;v.value="checking",R=setTimeout(()=>void z(K),150);return}k=setTimeout(()=>void D(ee),220)});async function z(ee){const K=++P;v.value="checking",$.value=null;const ge=M2(ee,I.value),{target:Ce}=ge;try{const me=await o.browseFs(Ce);if(K!==P)return;if(me.path){v.value="valid",S.value=[],$.value=Ce,a.value=me.path,u.value=me.parent,c.value=me.entries,l.value=!1;return}}catch{}if(K!==P)return;const ze=ge.base.toLowerCase();y.value=ge.parent,b.value=ge.separator;try{const me=await o.browseFs(ge.parent);if(K!==P)return;if(me.path){S.value=me.entries.filter(te=>te.isDir&&te.name.toLowerCase().startsWith(ze)),v.value="not-found";return}}catch{}K===P&&(S.value=[],v.value="bad-parent")}function B(ee){d.value=dLe(y.value,ee,b.value),T.value?.focus()}const A=O(()=>l.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),F=O(()=>l.value?n("workspace.degradedHint"):w.value&&v.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function W(ee){if(ee.key==="Escape"){d.value?d.value="":s("close");return}if(ee.key!=="Enter")return;const K=d.value.trim();if(Nk(K)){if(ee.preventDefault(),l.value){const{target:ge}=M2(K,I.value);ge&&s("add",ge);return}v.value==="valid"?Q():v.value==="not-found"&&S.value[0]&&B(S.value[0].name)}}const j=O(()=>{const ee=a.value;if(!ee)return[];const K=ee.split("/").filter(Boolean),ge=[{label:"/",path:"/"}];let Ce="";for(const ze of K)Ce+=`/${ze}`,ge.push({label:ze,path:Ce});return ge}),le=O(()=>!(a.value.length===0||w.value&&L.value===null));async function J(ee){r.value=!0;try{const K=await o.browseFs(ee);if(!K.path){l.value=!0;return}a.value=K.path,u.value=K.parent,c.value=K.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function X(ee){ee.isDir&&J(ee.path)}function G(){u.value&&J(u.value)}function Q(){le.value&&s("add",L.value??a.value)}return bn(async()=>{r.value=!0;try{const ee=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(ee.home&&(I.value=ee.home),o.defaultPath&&(await J(o.defaultPath),!l.value))return;I.value?await J(I.value):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),Mn(()=>{k&&clearTimeout(k),R&&clearTimeout(R)}),(ee,K)=>(g(),he(Pd,{open:i.value,"onUpdate:open":K[2]||(K[2]=ge=>i.value=ge),title:x(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:K[3]||(K[3]=ge=>s("close"))},{default:ve(()=>[_("div",pLe,[l.value?ie("",!0):(g(),C("div",hLe,[Z(Jt,{size:"sm",disabled:!u.value,label:x(n)("workspace.up"),onClick:G},{default:ve(()=>[Z(Oe,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),_("div",mLe,[(g(!0),C(Ie,null,ot(j.value,(ge,Ce)=>(g(),C(Ie,{key:ge.path},[Ce>1?(g(),C("span",gLe,"/")):ie("",!0),_("button",{class:Be(["crumb",{last:Ce===j.value.length-1}]),onClick:ze=>J(ge.path)},N(ge.label),11,vLe)],64))),128))])])),!r.value||l.value?(g(),C("div",{key:1,class:Be(["filterbar",{"has-error":v.value==="not-found"||v.value==="bad-parent"}])},[Z(Oe,{class:"filter-icon",name:"search",size:"md"}),Fn(_("input",{ref_key:"filterEl",ref:T,"onUpdate:modelValue":K[0]||(K[0]=ge=>d.value=ge),class:"filter-input",type:"text",placeholder:A.value,autocomplete:"off",spellcheck:"false",onKeydown:St(W,["stop"])},null,40,yLe),[[ks,d.value]]),f.value||v.value==="checking"?(g(),he(Bo,{key:0,size:"sm"})):ie("",!0)],2)):ie("",!0),l.value?(g(),C("div",FLe,N(x(n)("workspace.degradedHint")),1)):(g(),C("div",kLe,[r.value?(g(),C("div",bLe,N(x(n)("workspace.browsing")),1)):w.value&&v.value!=="valid"?(g(),C(Ie,{key:1},[v.value==="checking"?(g(),C("div",wLe,N(x(n)("workspace.checkingPath")),1)):v.value==="not-found"?(g(),C(Ie,{key:1},[S.value.length>0?(g(),C("div",xLe,N(x(n)("workspace.pathPickHint")),1)):ie("",!0),(g(!0),C(Ie,null,ot(S.value,ge=>(g(),C("button",{key:ge.path,class:"folder-row",onClick:Ce=>B(ge.name)},[Z(Oe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",SLe,N(ge.name),1)],8,_Le))),128)),S.value.length===0?(g(),C("div",CLe,N(x(n)("workspace.noPathMatch",{parent:y.value})),1)):ie("",!0)],64)):v.value==="bad-parent"?(g(),C("div",ALe,N(x(n)("workspace.badParent",{parent:y.value})),1)):ie("",!0)],64)):h.value&&!w.value?(g(),C(Ie,{key:2},[(g(!0),C(Ie,null,ot(p.value,ge=>(g(),C("button",{key:ge.path,class:"folder-row",onClick:Ce=>J(ge.path)},[Z(Oe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",ELe,N(ge.rel),1)],8,MLe))),128)),!f.value&&p.value.length===0?(g(),C("div",TLe,N(x(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),C("div",ILe,N(x(n)("workspace.searching")),1)):ie("",!0)],64)):(g(),C(Ie,{key:3},[(g(!0),C(Ie,null,ot(c.value,ge=>(g(),C("button",{key:ge.path,class:"folder-row",onClick:Ce=>X(ge)},[Z(Oe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",NLe,N(ge.name),1)],8,$Le))),128)),c.value.length===0?(g(),C("div",LLe,N(x(n)("workspace.noSubfolders")),1)):ie("",!0)],64))])),e.error?(g(),C("div",OLe,N(e.error),1)):ie("",!0),_("div",RLe,[Z(_n,{text:a.value},{default:ve(()=>[l.value?ie("",!0):(g(),he(en,{key:0,variant:"primary",disabled:!le.value,onClick:Q},{default:ve(()=>[Ve(N(x(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),Z(en,{variant:"secondary",onClick:K[1]||(K[1]=ge=>s("close"))},{default:ve(()=>[Ve(N(x(n)("workspace.cancel")),1)]),_:1})]),_("div",PLe,N(F.value),1)])]),_:1},8,["open","title"]))}}),WLe=ht(zLe,[["__scopeId","data-v-09b74e91"]]),HLe={key:0,class:"confirm-dialog__message"},jLe=Ge({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It();function i(){n.loading||(o("update:open",!1),o("cancel"))}function r(l){if(l.key!=="Enter"||!n.open||n.loading)return;const a=l.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(l.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),uo(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(g(),he(Pd,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=u=>o("update:open",u)),onClose:i},{foot:ve(()=>[Z(en,{variant:"secondary",disabled:e.loading,onClick:i},{default:ve(()=>[Ve(N(e.cancelLabel??x(s)("common.cancel")),1)]),_:1},8,["disabled"]),Z(en,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>o("confirm"))},{default:ve(()=>[Ve(N(e.confirmLabel??x(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ve(()=>[e.message?(g(),C("p",HLe,N(e.message),1)):ie("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),ULe=ht(jLe,[["__scopeId","data-v-074405fe"]]),VLe=Ge({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=qa();function i(){s()}return(r,l)=>(g(),he(ULe,{open:x(t)!==null,title:x(t)?.title??"",message:x(t)?.message,"confirm-label":x(t)?.confirmLabel,"cancel-label":x(t)?.cancelLabel,variant:x(t)?.variant,loading:x(n),onConfirm:i,onCancel:l[0]||(l[0]=a=>x(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),qLe={class:"rows"},KLe={class:"row"},GLe={class:"row"},ZLe={class:"row"},YLe={class:"row"},JLe={class:"row"},XLe={class:"row"},QLe={class:"ctx-text"},eFe={key:0,class:"bar"},tFe={class:"row"},nFe=Ge({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,i=q(!0),r=O(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),l=O(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:Rl(o.status.ctxUsed),max:Rl(o.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const u=O(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),c=O(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=O(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=O(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=O(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),he(Pd,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:x(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ve(()=>[_("dl",qLe,[_("div",KLe,[_("dt",null,N(x(n)("status.statusModel")),1),_("dd",null,N(e.status.model),1)]),_("div",GLe,[_("dt",null,N(x(n)("status.statusThinking")),1),_("dd",null,N(e.thinking),1)]),_("div",ZLe,[_("dt",null,N(x(n)("status.statusPermission")),1),_("dd",{style:Ut({color:u.value})},N(a(e.status.permission)),5)]),_("div",YLe,[_("dt",null,N(x(n)("status.statusPlanMode")),1),_("dd",{class:Be({"plan-on":e.planMode})},N(c.value),3)]),_("div",JLe,[_("dt",null,N(x(n)("status.statusDynamicWorkflowMode")),1),_("dd",{class:Be({"workflow-on":e.dynamicWorkflowMode})},N(d.value),3)]),_("div",XLe,[_("dt",null,N(x(n)("status.statusContext")),1),_("dd",null,[_("span",QLe,N(l.value),1),e.status.ctxMax>0?(g(),C("span",eFe,[_("i",{style:Ut({width:r.value+"%"})},null,4)])):ie("",!0)])]),_("div",tFe,[_("dt",null,N(x(n)("status.statusCost")),1),_("dd",null,N(p.value),1)])])]),_:1},8,["open","title"]))}}),oFe=ht(nFe,[["__scopeId","data-v-7992546c"]]),sFe={class:"ui-toast__icon","aria-hidden":"true"},iFe={class:"ui-toast__body"},rFe={class:"ui-toast__title"},lFe={key:0,class:"ui-toast__msg"},aFe=Ge({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),C("div",{class:Be(["ui-toast",`ui-toast--${e.variant}`])},[_("span",sFe,[xn(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),he(Oe,{key:0,name:"check"})):e.variant==="danger"?(g(),he(Oe,{key:1,name:"close"})):e.variant==="warning"?(g(),he(Oe,{key:2,name:"alert-triangle"})):(g(),he(Oe,{key:3,name:"info"}))],!0)]),_("div",iFe,[_("div",rFe,N(e.title),1),e.message?(g(),C("div",lFe,N(e.message),1)):ie("",!0),xn(t.$slots,"default",{},void 0,!0)]),Z(Jt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),uFe=ht(aFe,[["__scopeId","data-v-44bc260b"]]),cFe={key:0,class:"actions"},dFe=["onClick"],fFe=["onClick"],pFe={key:1,class:"details"},hFe=Ge({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It();function i(L){return typeof L=="object"&&L!==null}function r(L){return i(L)?L.title:L}function l(L){return i(L)?L.message??"":""}function a(L){return i(L)?L.details:void 0}function u(L){return i(L)?L.severity==="error":L.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(L)}function c(L){if(!i(L))return u(L)?"danger":"warning";switch(L.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(L){return i(L)?`notice:${L.severity}:${L.title}:${L.message??""}:${JSON.stringify(L.details??[])}`:`text:${L}`}function f(L){if(!i(L))return L;const P=[L.title];L.message&&P.push(L.message);const R=L.details??[];if(R.length>0){P.push("",`${s("warnings.diagnostics")}:`);for(const M of R)P.push(`${M.label}: ${M.value}`)}return P.join(` -`)}let p=1;const h=q([]),m=new Map,k=new Map;function w(L){const P=u(L)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?P+5e3:P}function v(L,P){const R=m.get(L)??{handle:null,deadline:0,remaining:0};R.handle=setTimeout(()=>$(L),P),R.deadline=Date.now()+P,m.set(L,R)}function y(L){const P=m.get(L);P&&P.handle!==null&&clearTimeout(P.handle),m.delete(L)}function b(L){const P=m.get(L);!P||P.handle===null||(clearTimeout(P.handle),P.handle=null,P.remaining=Math.max(0,P.deadline-Date.now()))}function S(L){if(h.value.find(M=>M.id===L)?.detailsOpen)return;const R=m.get(L);!R||R.handle!==null||v(L,R.remaining)}function I(L){L.detailsOpen=!L.detailsOpen,L.detailsOpen?b(L.id):S(L.id)}async function T(L){if(!await Zo(f(L.warning)))return;L.copied=!0;const R=k.get(L.id);R&&clearTimeout(R),k.set(L.id,setTimeout(()=>{L.copied=!1,k.delete(L.id)},1400))}function $(L){y(L);const P=k.get(L);P&&clearTimeout(P),k.delete(L);const R=h.value.findIndex(M=>M.id===L);R!==-1&&(h.value=h.value.filter(M=>M.id!==L),o("dismiss",R))}return Ze(()=>n.warnings,L=>{const P=[...h.value];h.value=L.map(R=>{const M=d(R),D=P.findIndex(A=>A.key===M),z=D===-1?void 0:P.splice(D,1)[0];if(z)return z.warning=R,z;const B={id:p++,key:M,warning:R,detailsOpen:!1,copied:!1};return v(B.id,w(R)),B});for(const R of P){y(R.id);const M=k.get(R.id);M&&clearTimeout(M),k.delete(R.id)}},{immediate:!0,flush:"post"}),Mn(()=>{m.forEach(L=>{L.handle!==null&&clearTimeout(L.handle)}),m.clear(),k.forEach(L=>clearTimeout(L)),k.clear()}),(L,P)=>(g(),he($R,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ve(()=>[(g(!0),C(Ie,null,ot(h.value,R=>(g(),he(uFe,{key:R.id,variant:c(R.warning),title:r(R.warning),message:l(R.warning),"dismiss-label":x(s)("warnings.dismiss"),onDismiss:M=>$(R.id),onPointerenter:M=>b(R.id),onPointerleave:M=>S(R.id)},{default:ve(()=>[a(R.warning)?.length?(g(),C("div",cFe,[_("button",{class:"link",type:"button",onClick:M=>I(R)},N(R.detailsOpen?x(s)("warnings.hideDetails"):x(s)("warnings.showDetails")),9,dFe),_("button",{class:"link",type:"button",onClick:M=>T(R)},N(R.copied?x(s)("warnings.copied"):x(s)("warnings.copyDetails")),9,fFe)])):ie("",!0),R.detailsOpen&&a(R.warning)?.length?(g(),C("dl",pFe,[(g(!0),C(Ie,null,ot(a(R.warning),M=>(g(),C("div",{key:`${M.label}:${M.value}`,class:"detail-row"},[_("dt",null,N(M.label),1),_("dd",null,N(M.value),1)]))),128))])):ie("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),mFe=ht(hFe,[["__scopeId","data-v-6d8f28b8"]]),gFe={key:0,class:"update-toast",role:"status","aria-live":"polite"},vFe={class:"body"},yFe={class:"title"},kFe={class:"msg"},bFe={class:"acts"},wFe=["disabled"],C8="pythinker.update.skipped",xFe=Ge({__name:"UpdateToast",setup(e){const{t}=It(),n=typeof window<"u"?window.pythinkerDesktop:void 0,o=q(),s=q(!1),i=q(l());let r;function l(){try{const f=JSON.parse(localStorage.getItem(C8)??"[]");return Array.isArray(f)?f.filter(p=>typeof p=="string"):[]}catch{return[]}}const a=O(()=>{const f=o.value;return f===void 0||f.status!=="downloaded"&&!(f.status==="available"&&!f.autoUpdate)?!1:!i.value.includes(f.version??"")}),u=O(()=>o.value?.version?t("update.availableVersion",{version:o.value.version}):t("update.available"));async function c(){if(!(n===void 0||s.value)){s.value=!0;try{o.value=await n.quitAndInstall()}finally{s.value=!1}}}function d(){const f=[...i.value,o.value?.version??""];i.value=f;try{localStorage.setItem(C8,JSON.stringify(f.filter(p=>p!=="")))}catch{}}return bn(()=>{n!==void 0&&(r=n.onUpdateState(f=>{o.value=f}),n.getUpdateState().then(f=>{o.value=f},()=>{}))}),Mn(()=>{r?.()}),(f,p)=>a.value?(g(),C("div",gFe,[_("div",vFe,[_("div",yFe,N(u.value),1),_("div",kFe,N(x(t)("update.prompt")),1)]),_("div",bFe,[_("button",{type:"button",class:"skip",onClick:d},N(x(t)("update.skip")),1),_("button",{type:"button",class:"go",disabled:s.value,onClick:p[0]||(p[0]=h=>void c())},N(x(t)("update.install")),9,wFe)])])):ie("",!0)}}),_Fe=ht(xFe,[["__scopeId","data-v-f7646e4e"]]),SFe={class:"ui-action-toast-host"},CFe={class:"ui-action-toast__body"},AFe=Ge({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=It();let s=null,i=0,r=e.duration;function l(c){if(c<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),c),i=Date.now()+c}function a(){s!==null&&(clearTimeout(s),s=null,r=Math.max(0,i-Date.now()))}function u(){s===null&&l(r)}return l(e.duration),Mn(()=>{s!==null&&clearTimeout(s)}),(c,d)=>(g(),C("div",SFe,[_("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:u},[_("span",CFe,[xn(c.$slots,"default",{},void 0,!0)]),Z(Jt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??x(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ve(()=>[Z(Oe,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),Lk=ht(AFe,[["__scopeId","data-v-9efa207b"]]),MFe={key:0,class:"window-controls"},EFe=["aria-label"],TFe=["aria-label"],IFe=["aria-label"],$Fe=Ge({__name:"WindowControls",setup(e){const{t}=It(),n=O(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(r,l)=>n.value?(g(),C("div",MFe,[_("button",{type:"button",class:"wc wc-min","aria-label":x(t)("app.minimizeWindow"),onClick:o},[...l[0]||(l[0]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[_("path",{d:"M2.5 5h5"})],-1)])],8,EFe),_("button",{type:"button",class:"wc wc-max","aria-label":x(t)("app.maximizeWindow"),onClick:s},[...l[1]||(l[1]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[_("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,TFe),_("button",{type:"button",class:"wc wc-close","aria-label":x(t)("app.closeWindow"),onClick:i},[...l[2]||(l[2]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[_("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,IFe)])):ie("",!0)}}),NFe=ht($Fe,[["__scopeId","data-v-041ca08b"]]),LFe={class:"topbar"},FFe={class:"wsq"},OFe=["aria-label"],RFe={class:"tb-path"},PFe={class:"ws"},DFe={class:"se"},BFe={class:"tb-sub"},zFe=Ge({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,i=O(()=>{const a=o.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=O(()=>o.workspace?.name??n("workspace.noWorkspace")),l=O(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(g(),C("div",LFe,[_("span",FFe,N(i.value),1),_("button",{type:"button",class:"tb-mid","aria-label":x(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[_("span",RFe,[_("span",PFe,N(r.value),1),e.sessionTitle?(g(),C(Ie,{key:0},[u[2]||(u[2]=_("span",{class:"sl"},"/",-1)),_("span",DFe,N(e.sessionTitle),1)],64)):ie("",!0),u[3]||(u[3]=_("span",{class:"cv"},"⌄",-1))]),_("span",BFe,[_("span",{class:Be(["rd",{on:e.running}])},null,2),_("span",null,N(l.value),1),e.branch?(g(),C(Ie,{key:0},[Ve(" · "+N(e.branch),1)],64)):ie("",!0),e.sessionCount>0?(g(),C(Ie,{key:1},[Ve(" · "+N(x(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):ie("",!0)])],8,OFe),Z(Jt,{size:"lg",label:x(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:ve(()=>[Z(Oe,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),WFe=ht(zFe,[["__scopeId","data-v-27a83eb2"]]),HFe={key:0,class:"sheet-root"},jFe=["aria-label"],UFe=["aria-label"],VFe={key:0,class:"sheet-head"},qFe={class:"sheet-title"},KFe={class:"sheet-body"},GFe=Ge({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,{lock:i,unlock:r}=F7();function l(){s("update:modelValue",!1),s("close")}function a(u){u.key==="Escape"&&o.closeOnEsc&&l()}return Ze(()=>o.modelValue,u=>{typeof document>"u"||(u?(i(),document.addEventListener("keydown",a)):(r(),document.removeEventListener("keydown",a)))},{immediate:!0}),Mn(()=>{typeof document<"u"&&(r(),document.removeEventListener("keydown",a))}),(u,c)=>(g(),he(Sr,{name:"sheet"},{default:ve(()=>[e.modelValue?(g(),C("div",HFe,[_("div",{class:"sheet-scrim",onClick:l}),_("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||x(n)("mobile.sheetLabel")},[_("button",{type:"button",class:"sheet-grab","aria-label":x(n)("mobile.closeSheet"),onClick:l},null,8,UFe),e.title?(g(),C("div",VFe,[_("span",qFe,N(e.title),1)])):ie("",!0),_("div",KFe,[xn(u.$slots,"default",{},void 0,!0)])],8,jFe)])):ie("",!0)]),_:3}))}}),W7=ht(GFe,[["__scopeId","data-v-92ecd88c"]]),ZFe={class:"mlist"},YFe={key:0,class:"mempty"},JFe=["onClick"],XFe={class:"mgh-main"},QFe={class:"mgh-name"},eOe={class:"mgh-path"},tOe={key:2,class:"att"},nOe={key:0,class:"mempty small"},oOe=["onClick"],sOe={class:"m"},iOe={class:"s"},rOe={key:0,class:"att"},lOe=["disabled","onClick"],aOe=["onClick"],uOe=Ge({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t;function i(){s("update:modelValue",!1)}function r(R){s("select",R),i()}function l(R){s("createInWorkspace",R),i()}function a(){s("create"),i()}function u(){s("addWorkspace"),i()}const c=q(new Set);function d(R){return c.value.has(R)}function f(R){const M=new Set(c.value);M.has(R)?M.delete(R):M.add(R),c.value=M,y.value=null,T.value=null}const p=q(new Set);function h(R){return p.value.has(R)}function m(R){const M=new Set(p.value);M.has(R)?M.delete(R):M.add(R),p.value=M}function k(R){if(h(R.workspace.id))return R.sessions;const M=R.sessions.slice(0,R.initialCount);if(o.activeId&&!M.some(D=>D.id===o.activeId)){const D=R.sessions.find(z=>z.id===o.activeId);if(D)return[...M,D]}return M}function w(R){if(!p.value.has(R)){const M=new Set(p.value);M.add(R),p.value=M}s("loadMore",R)}function v(R){return o.attentionByWorkspace[R]??0}const y=q(null);function b(R){y.value=y.value===R?null:R,T.value=null}function S(R){y.value=null;const D=(typeof window<"u"?window.prompt(n("sidebar.rename"),R.title):null)?.trim();D&&s("rename",R.id,D)}function I(R){y.value=null,s("archive",R)}const T=q(null);function $(R){T.value=T.value===R?null:R,y.value=null}function L(R){Zo(R.root),T.value=null}function P(R){T.value=null,s("deleteWorkspace",R.id)}return(R,M)=>(g(),he(W7,{"model-value":e.modelValue,"onUpdate:modelValue":M[2]||(M[2]=D=>s("update:modelValue",D))},{default:ve(()=>[_("button",{type:"button",class:"newrow",onClick:a},[Z(Oe,{name:"message",size:"sm"}),Ve(" "+N(x(n)("sidebar.newChat")),1)]),_("button",{type:"button",class:"newrow secondary",onClick:u},[Z(Oe,{name:"folder",size:"sm"}),Ve(" "+N(x(n)("sidebar.newWorkspace")),1)]),_("div",ZFe,[e.groups.length===0?(g(),C("div",YFe,N(x(n)("workspace.noWorkspace")),1)):ie("",!0),(g(!0),C(Ie,null,ot(e.groups,D=>(g(),C("div",{key:D.workspace.id,class:"mgroup"},[_("div",{class:Be(["mgh",{on:D.workspace.id===e.activeWorkspaceId}]),onClick:z=>f(D.workspace.id)},[d(D.workspace.id)?(g(),he(Oe,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),he(Oe,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),_("div",XFe,[_("span",QFe,N(D.workspace.name),1),Z(_n,{text:D.workspace.root},{default:ve(()=>[_("span",eOe,N(D.workspace.shortPath),1)]),_:2},1032,["text"])]),d(D.workspace.id)&&v(D.workspace.id)>0?(g(),C("span",tOe,N(v(D.workspace.id)),1)):ie("",!0),Z(Jt,{size:"lg",class:"mgh-more",label:x(n)("sidebar.options"),onClick:St(z=>$(D.workspace.id),["stop"])},{default:ve(()=>[Z(Oe,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),Z(Jt,{size:"lg",class:"mgh-add",label:x(n)("workspace.newInGroup"),onClick:St(z=>l(D.workspace.id),["stop"])},{default:ve(()=>[Z(Oe,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),T.value===D.workspace.id?(g(),he(Cr,{key:3,class:"kmenu wsmenu",onClick:M[0]||(M[0]=St(()=>{},["stop"]))},{default:ve(()=>[Z(hn,{size:"lg",onClick:z=>L(D.workspace)},{default:ve(()=>[Ve(N(x(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),Z(hn,{size:"lg",danger:"",onClick:z=>P(D.workspace)},{default:ve(()=>[Ve(N(x(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):ie("",!0)],10,JFe),Fn(_("div",null,[D.sessions.length===0?(g(),C("div",nOe,N(x(n)("sidebar.noSessions")),1)):ie("",!0),(g(!0),C(Ie,null,ot(k(D),z=>(g(),C("div",{key:z.id,class:Be(["srow",{cur:z.id===e.activeId}]),onClick:B=>r(z.id)},[_("div",sOe,[_("div",{class:Be(["t",{run:z.busy,aborted:!z.busy&&(e.attentionBySession[z.id]??0)===0&&(z.lastTurnReason==="cancelled"||z.lastTurnReason==="failed")}])},N(z.title),3),_("div",iOe,N(z.time),1)]),(e.attentionBySession[z.id]??0)>0?(g(),C("span",rOe,N(e.attentionBySession[z.id]),1)):ie("",!0),Z(Jt,{size:"lg",class:"kb",label:x(n)("sidebar.options"),onClick:St(B=>b(z.id),["stop"])},{default:ve(()=>[Z(Oe,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),y.value===z.id?(g(),he(Cr,{key:1,class:"kmenu",onClick:M[1]||(M[1]=St(()=>{},["stop"]))},{default:ve(()=>[Z(hn,{size:"lg",onClick:B=>S(z)},{default:ve(()=>[Ve(N(x(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),Z(hn,{size:"lg",danger:"",onClick:B=>I(z.id)},{default:ve(()=>[Ve(N(x(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):ie("",!0)],10,oOe))),128)),D.hasMore||D.loadingMore?(g(),C("button",{key:1,type:"button",class:"mshow-more",disabled:D.loadingMore,onClick:St(z=>w(D.workspace.id),["stop"])},N(D.loadingMore?x(n)("sidebar.loadingMore"):x(n)("sidebar.showMore",{count:Math.max(0,D.workspace.sessionCount-D.sessions.length)})),9,lOe)):ie("",!0),D.sessions.length>D.initialCount?(g(),C("button",{key:2,type:"button",class:"mshow-more",onClick:St(z=>m(D.workspace.id),["stop"])},N(h(D.workspace.id)?x(n)("sidebar.showLess"):x(n)("sidebar.showAll",{count:D.sessions.length-D.initialCount})),9,aOe)):ie("",!0)],512),[[vi,!d(D.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),cOe=ht(uOe,[["__scopeId","data-v-4c7bceaf"]]),dOe={class:"group-title"},fOe={class:"srow-main"},pOe={class:"srow-label"},hOe={class:"srow-sub"},mOe={class:"srow read-only"},gOe={class:"srow-main"},vOe={class:"srow-label"},yOe={key:0,class:"srow-sub"},kOe={class:"cache-note"},bOe={class:"srow-main"},wOe={class:"srow-label"},xOe={class:"srow-sub"},_Oe=["aria-checked"],SOe={key:0,class:"srow read-only"},COe={class:"srow-main"},AOe={class:"srow-label"},MOe={class:"srow-sub"},EOe={class:"goal-actions"},TOe=["aria-checked"],IOe={class:"srow-main"},$Oe={class:"srow-label"},NOe={class:"srow-sub"},LOe={class:"srow read-only"},FOe={class:"srow-main"},OOe={class:"srow-label"},ROe={class:"srow-sub"},POe={class:"srow-main"},DOe={class:"srow-label"},BOe={class:"srow read-only"},zOe={class:"srow-main"},WOe={class:"srow-label"},HOe={class:"srow-sub"},jOe=["aria-label"],UOe={class:"group-title"},VOe={class:"srow-main"},qOe={class:"srow-label"},KOe={class:"srow-sub"},GOe={class:"srow read-only pref"},ZOe={class:"srow-main"},YOe={class:"srow-label"},JOe={class:"srow read-only pref"},XOe={class:"srow-main"},QOe={class:"srow-label"},eRe={class:"srow-main"},tRe={class:"srow-label"},nRe={class:"srow-sub"},oRe=["aria-checked"],sRe={class:"srow-main"},iRe={class:"srow-label"},rRe={key:2,class:"srow read-only"},lRe={class:"srow-main"},aRe={class:"srow-label"},uRe={class:"srow-val dim"},cRe={class:"arch-subhead"},dRe={class:"arch-count"},fRe={class:"arch-tools"},pRe={key:0,class:"arch-empty"},hRe={class:"arch-meta"},mRe={class:"arch-name"},gRe={class:"arch-time"},vRe={key:2,class:"arch-empty"},yRe=100,kRe=Ge({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},authReady:{type:Boolean,default:!1},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=It(),o=e,s=t,{confirm:i}=qa();function r(K){s("setColorScheme",K)}const l=["manual","yolo","auto"],a=O(()=>o.models?.find(K=>K.id===o.status?.modelId)),u=O(()=>D0(a.value)),c=O(()=>yh(a.value)),d=O(()=>N1(a.value,o.thinking)),f=O(()=>c.value.includes(d.value)?d.value:""),p=O(()=>c.value.map(K=>({value:K,label:Yp(K)}))),h=O(()=>o.planMode===!0),m=O(()=>o.goalMode===!0),k=O(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),w=O(()=>{const K=o.goal?.status;return K?n(`status.goalStatus${K[0].toUpperCase()}${K.slice(1)}`):""});async function v(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const y=O(()=>jx(o.uiFontSize));function b(K){const ge=UN(K);ge!==void 0&&s("setUiFontSize",ge)}const S=O(()=>{const K=o.status.permission;return K==="yolo"?"var(--color-warning)":K==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),I=O(()=>{const K=o.status.permission,ge=n(K==="yolo"?"mobile.permYoloSub":K==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${K} · ${ge}`}),T=O(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),$=O(()=>o.status.ctxMax>0?`${Rl(o.status.ctxUsed)}/${Rl(o.status.ctxMax)}`:n("status.statusNone"));function L(K){s("setThinking",Wx(a.value,K))}function P(){const K=l.indexOf(o.status.permission),ge=l[(K+1)%l.length];s("setPermission",ge)}function R(){s("pickModel"),s("update:modelValue",!1)}function M(){s("login"),s("update:modelValue",!1)}const D=V0(),z=q("main"),B=q([]),A=q(!1),F=q(!1),W=q(""),j=q("archived-desc");async function le(){if(!A.value){A.value=!0,F.value=!1;try{const K=[];let ge;for(;;){const Ce=await D.loadArchivedSessions({beforeId:ge,pageSize:yRe});if(K.push(...Ce.items),!Ce.hasMore||Ce.items.length===0)break;const ze=Ce.items.at(-1)?.id;if(ze===void 0)break;ge=ze}B.value=K,F.value=!0}catch(K){console.warn("loadAllArchived failed",K)}finally{A.value=!1}}}function J(){z.value="archived",W.value="",le()}function X(){z.value="main"}const G=O(()=>{const K=W.value.trim().toLowerCase();let ge=B.value.filter(Ce=>Ce.archived===!0);return K&&(ge=ge.filter(Ce=>Ce.title.toLowerCase().includes(K))),ge=ge.slice(),j.value==="archived-desc"?ge.sort((Ce,ze)=>ze.updatedAt.localeCompare(Ce.updatedAt)):j.value==="created-desc"?ge.sort((Ce,ze)=>ze.createdAt.localeCompare(Ce.createdAt)):ge.sort((Ce,ze)=>Ce.title.localeCompare(ze.title,"en")),ge});async function Q(K){await D.restoreSession(K)&&(B.value=B.value.filter(Ce=>Ce.id!==K))}function ee(K){const ge=new Date(K);if(Number.isNaN(ge.getTime()))return K;const Ce=ze=>String(ze).padStart(2,"0");return`${ge.getFullYear()}-${Ce(ge.getMonth()+1)}-${Ce(ge.getDate())} ${Ce(ge.getHours())}:${Ce(ge.getMinutes())}`}return Ze(()=>o.modelValue,K=>{K||(z.value="main")}),(K,ge)=>(g(),he(W7,{"model-value":e.modelValue,title:x(n)("mobile.settingsTitle"),"onUpdate:modelValue":ge[7]||(ge[7]=Ce=>s("update:modelValue",Ce))},{default:ve(()=>[z.value==="main"?(g(),C(Ie,{key:0},[_("div",dOe,N(x(n)("mobile.groupSession")),1),_("button",{type:"button",class:"srow",onClick:R},[_("span",fOe,[_("span",pOe,N(x(n)("status.statusModel")),1),_("span",hOe,N(e.status.model),1)]),ge[8]||(ge[8]=_("span",{class:"chev"},"›",-1))]),_("div",mOe,[_("span",gOe,[_("span",vOe,N(x(n)("status.statusThinking")),1),u.value==="unsupported"?(g(),C("span",yOe,N(x(n)("status.modeNotSupported")),1)):ie("",!0)]),c.value.length>1?(g(),he(Bs,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":L},null,8,["model-value","options"])):(g(),C("span",{key:1,class:Be(["srow-val",{dim:d.value==="off"}])},N(d.value==="off"?x(n)("status.planOff"):x(Yp)(d.value)),3))]),_("div",kOe,N(x(n)("status.cacheNote")),1),_("button",{type:"button",class:"srow",onClick:ge[0]||(ge[0]=Ce=>s("togglePlan"))},[_("span",bOe,[_("span",wOe,N(x(n)("status.statusPlanMode")),1),_("span",xOe,N(x(n)("mobile.planModeSub")),1)]),_("span",{class:Be(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,_Oe)]),k.value?(g(),C("div",SOe,[_("span",COe,[_("span",AOe,N(x(n)("status.goalLabel")),1),_("span",MOe,N(w.value),1)]),_("span",EOe,[e.goal?.status==="active"?(g(),he(en,{key:0,variant:"secondary",size:"sm",onClick:ge[1]||(ge[1]=Ce=>s("controlGoal","pause"))},{default:ve(()=>[Ve(N(x(n)("status.goalPause")),1)]),_:1})):ie("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),he(en,{key:1,variant:"secondary",size:"sm",onClick:ge[2]||(ge[2]=Ce=>s("controlGoal","resume"))},{default:ve(()=>[Ve(N(x(n)("status.goalResume")),1)]),_:1})):ie("",!0),Z(en,{variant:"ghost",size:"sm",onClick:v},{default:ve(()=>[Ve(N(x(n)("status.goalCancel")),1)]),_:1})])])):(g(),C("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:ge[3]||(ge[3]=Ce=>s("toggleGoal"))},[_("span",IOe,[_("span",$Oe,N(x(n)("status.goalLabel")),1),_("span",NOe,N(x(n)("mobile.goalModeSub")),1)]),_("span",{class:Be(["toggle",{on:m.value}])},null,2)],8,TOe)),_("div",LOe,[_("span",FOe,[_("span",OOe,N(x(n)("status.statusDynamicWorkflowMode")),1),_("span",ROe,N(x(n)("mobile.workflowModeSub")),1)]),_("span",{class:Be(["srow-val",{dim:!e.dynamicWorkflowMode}])},N(e.dynamicWorkflowMode?x(n)("status.dynamicWorkflowOn"):x(n)("status.dynamicWorkflowOff")),3)]),_("button",{type:"button",class:"srow",onClick:P},[_("span",POe,[_("span",DOe,N(x(n)("status.statusPermission")),1),_("span",{class:"srow-sub",style:Ut({color:S.value})},N(I.value),5)]),ge[9]||(ge[9]=_("span",{class:"chev"},"›",-1))]),_("div",BOe,[_("span",zOe,[_("span",WOe,N(x(n)("status.statusContext")),1),_("span",HOe,N($.value),1)]),_("span",{class:"ctx-meter","aria-label":$.value},[_("i",{style:Ut({width:T.value+"%"})},null,4)],8,jOe)]),_("div",UOe,N(x(n)("mobile.groupApp")),1),_("button",{type:"button",class:"srow",onClick:J},[_("span",VOe,[_("span",qOe,N(x(n)("mobile.archivedSessions")),1),_("span",KOe,N(x(n)("mobile.archivedSessionsSub")),1)]),ge[10]||(ge[10]=_("span",{class:"chev"},"›",-1))]),_("div",GOe,[_("span",ZOe,[_("span",YOe,N(x(n)("theme.colorSchemeLabel")),1)]),Z(Bs,{"model-value":e.colorScheme??"system",options:[{value:"light",label:x(n)("theme.light")},{value:"dark",label:x(n)("theme.dark")},{value:"system",label:x(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),_("div",JOe,[_("span",XOe,[_("span",QOe,N(x(n)("settings.uiFontSize")),1)]),Z(Bs,{"model-value":y.value,options:x(zN),"aria-label":x(n)("settings.uiFontSize"),"onUpdate:modelValue":b},null,8,["model-value","options","aria-label"])]),_("button",{type:"button",class:"srow",onClick:ge[4]||(ge[4]=Ce=>s("setConversationToc",!e.conversationToc))},[_("span",eRe,[_("span",tRe,N(x(n)("settings.conversationToc")),1),_("span",nRe,N(x(n)("settings.conversationTocHint")),1)]),_("span",{class:Be(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,oRe)]),_("button",{type:"button",class:"srow acct in",onClick:M},[_("span",sRe,[_("span",iRe,N(x(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),C("div",rRe,[_("span",lRe,[_("span",aRe,N(x(n)("settings.serverVersion")),1)]),_("span",uRe,N(e.serverVersion),1)])):ie("",!0)],64)):(g(),C(Ie,{key:1},[_("div",cRe,[_("button",{type:"button",class:"arch-back",onClick:X},[ge[11]||(ge[11]=_("span",{class:"chev back"},"‹",-1)),Ve(" "+N(x(n)("mobile.archivedBack")),1)]),_("span",dRe,N(x(n)("mobile.sessionCount",{n:G.value.length})),1)]),_("div",fRe,[Z(vs,{class:"arch-search-input","model-value":W.value,size:"sm",placeholder:x(n)("settings.archivedSearch"),"onUpdate:modelValue":ge[5]||(ge[5]=Ce=>W.value=Ce)},null,8,["model-value","placeholder"]),Z(Bs,{size:"sm","model-value":j.value,options:[{value:"archived-desc",label:x(n)("settings.archivedSortArchived")},{value:"created-desc",label:x(n)("settings.archivedSortCreated")},{value:"name-asc",label:x(n)("settings.archivedSortName")}],"onUpdate:modelValue":ge[6]||(ge[6]=Ce=>j.value=Ce)},null,8,["model-value","options"])]),A.value?(g(),C("div",pRe,N(x(n)("settings.archivedLoadingAll")),1)):G.value.length>0?(g(!0),C(Ie,{key:1},ot(G.value,Ce=>(g(),C("div",{key:Ce.id,class:"arch-row"},[_("div",hRe,[_("div",mRe,N(Ce.title),1),_("div",gRe,N(x(n)("settings.archivedAt",{time:ee(Ce.updatedAt)})),1)]),Z(en,{variant:"secondary",size:"sm",onClick:ze=>Q(Ce.id)},{default:ve(()=>[Ve(N(x(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),C("div",vRe,N(B.value.length===0?x(n)("settings.archivedEmpty"):x(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),bRe=ht(kRe,[["__scopeId","data-v-3afd1467"]]),wRe=["aria-label"],xRe={class:"wiz-body"},_Re={class:"wiz-step"},SRe={class:"wiz-title"},CRe={class:"wiz-sub"},ARe={class:"wiz-step-fill"},MRe={class:"pref-group"},ERe={class:"pref-label"},TRe={class:"theme-cards"},IRe=["onClick"],$Re={class:"opt-label"},NRe={class:"pref-group"},LRe={class:"pref-label"},FRe={class:"accent-cards"},ORe=["onClick"],RRe={class:"opt-label"},PRe={class:"wiz-foot"},DRe=Ge({__name:"Onboarding",emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=It(),{colorScheme:s,accent:i,setColorScheme:r,setAccent:l}=Kx(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],u=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(c,d)=>(g(),C("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":x(o)("onboarding.title")},[_("div",xRe,[_("section",_Re,[Z(lw,{size:"lg",animated:!1,label:"Pythinker Code"}),_("h1",SRe,N(x(o)("onboarding.title")),1),_("p",CRe,N(x(o)("onboarding.subtitle")),1),_("div",ARe,[_("div",MRe,[_("div",ERe,N(x(o)("theme.colorSchemeLabel")),1),_("div",TRe,[(g(),C(Ie,null,ot(a,f=>_("button",{key:f.value,type:"button",class:Be(["opt-card theme-card",{selected:x(s)===f.value}]),onClick:p=>x(r)(f.value)},[_("span",{class:Be(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),C(Ie,{key:0},[d[2]||(d[2]=K2('',2))],64)):(g(),C(Ie,{key:1},[d[3]||(d[3]=_("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=_("span",{class:"theme-lines"},[_("span"),_("span"),_("span")],-1))],64))],2),_("span",$Re,N(f.label),1)],10,IRe)),64))])]),_("div",NRe,[_("div",LRe,N(x(o)("theme.accentLabel")),1),_("div",FRe,[(g(),C(Ie,null,ot(u,f=>_("button",{key:f.value,type:"button",class:Be(["opt-card accent-card",{selected:x(i)===f.value}]),onClick:p=>x(l)(f.value)},[_("span",{class:Be(["opt-radio",{on:x(i)===f.value}])},null,2),_("span",{class:Be(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),_("span",RRe,N(f.label),1)],10,ORe)),64))])])])]),_("div",PRe,[Z(en,{variant:"primary",size:"lg",class:"wiz-primary",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ve(()=>[Ve(N(x(o)("onboarding.start")),1)]),_:1}),Z(en,{variant:"ghost",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ve(()=>[Ve(N(x(o)("onboarding.skip")),1)]),_:1})])])],8,wRe))}}),BRe=ht(DRe,[["__scopeId","data-v-043d59e7"]]),zRe="/logo.png",WRe=["aria-label"],HRe={class:"gload-box"},jRe={class:"gload-text"},URe={key:0,class:"gload-issue"},VRe={class:"gload-issue-detail"},qRe=Ge({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=It();return(n,o)=>(g(),C("div",{class:"gload",role:"status","aria-label":x(t)("app.connecting")},[_("div",HRe,[o[0]||(o[0]=_("img",{class:"gload-logo",src:zRe,alt:"Pythinker",width:"120",height:"120"},null,-1)),Z(Bo,{size:"md",label:x(t)("app.connecting")},null,8,["label"]),_("div",jRe,N(x(t)("app.connecting")),1),e.issue?(g(),C("div",URe,[_("div",null,N(x(t)("app.connectRetrying")),1),_("div",VRe,N(e.issue),1)])):ie("",!0)])],8,WRe))}}),KRe=ht(qRe,[["__scopeId","data-v-2468172e"]]),GRe={class:"kap-root"},ZRe={class:"kap-head"},YRe={class:"kap-count"},JRe={class:"kap-head-actions"},XRe={class:"kap-filters"},QRe=["value"],ePe={class:"kap-check"},tPe={class:"kap-check"},nPe={class:"kap-view-toggle",role:"group"},oPe={key:0,class:"kap-empty"},sPe=["onClick"],iPe={class:"kap-ts"},rPe={class:"kap-label"},lPe={key:0,class:"kap-detail"},aPe={class:"kap-detail-actions"},uPe=["onClick"],cPe={key:1,class:"kap-agg"},dPe={class:"mono"},fPe={class:"mono"},pPe={class:"num"},hPe={class:"num"},mPe={key:0},gPe={class:"mono"},vPe={class:"num"},yPe={class:"num"},kPe={key:0},bPe=Ge({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=q("all"),s=q(""),i=q(""),r=q(!1),l=q("timeline"),a=O(()=>(Ax.value,[...Bye()])),u=O(()=>{const L=new Set;for(const P of a.value)P.sessionId&&L.add(P.sessionId);return[...L].sort()});function c(L){return L.kind==="rest:error"||L.code!==void 0&&L.code!==0||L.eventType==="error"||L.eventType==="parse-error"}const d=O(()=>{const L=s.value.trim().toLowerCase();return a.value.filter(P=>!(o.value!=="all"&&P.source!==o.value||i.value&&P.sessionId!==i.value||r.value&&!c(P)||L&&!`${P.label} ${P.kind} ${P.eventType??""} ${P.sessionId??""} ${P.requestId??""}`.toLowerCase().includes(L)))}),f=O(()=>{const L=new Map;for(const P of d.value){if(P.kind!=="ws:in"&&P.kind!=="ws:out")continue;const R=P.kind==="ws:in"?"←":"→",M=`${R} ${P.eventType??"?"} @ ${P.sessionId??"-"}`,D=L.get(M)??{key:M,sessionId:P.sessionId??"-",eventType:P.eventType??"?",dir:R,count:0};D.count++,P.seq!==void 0&&(D.lastSeq=P.seq),L.set(M,D)}return[...L.values()].sort((P,R)=>R.count-P.count)}),p=O(()=>{const L=new Map;for(const P of d.value){if(P.source!=="rest"||P.kind==="rest:request")continue;const R=`${P.method??"?"} ${P.path??"?"}`,M=L.get(R)??{count:0,errors:0,totalMs:0,timed:0};M.count++,c(P)&&M.errors++,P.durationMs!==void 0&&(M.totalMs+=P.durationMs,M.timed++),L.set(R,M)}return[...L.entries()].map(([P,R])=>({key:P,count:R.count,errors:R.errors,avgMs:R.timed>0?Math.round(R.totalMs/R.timed):0})).sort((P,R)=>R.count-P.count)}),h=q(null),m=q(!0),k=q(null),w=q(null);Ze(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await bt();const L=k.value;L&&(L.scrollTop=L.scrollHeight)});function v(L){h.value=h.value===L?null:L}function y(L){const P=new Date(L),R=(M,D=2)=>String(M).padStart(D,"0");return`${R(P.getHours())}:${R(P.getMinutes())}:${R(P.getSeconds())}.${R(P.getMilliseconds(),3)}`}function b(L){return JSON.stringify(L,null,2)}async function S(L){await Zo(b(L))&&(w.value=L.id,setTimeout(()=>{w.value===L.id&&(w.value=null)},1500))}function I(){vN(d.value)}function T(L){return c(L)||L.source==="client"?"b-err":L.source==="rest"?"b-rest":L.kind==="ws:lifecycle"?"b-life":L.kind==="ws:out"?"b-out":"b-in"}function $(L){return L.source==="rest"?"REST":L.source==="client"?"APP":"WS"}return(L,P)=>(g(),C("section",GRe,[_("header",ZRe,[P[11]||(P[11]=_("strong",null,"KAP debug",-1)),_("span",YRe,N(d.value.length)+"/"+N(a.value.length),1),_("div",JRe,[_("button",{type:"button",class:Be({on:x(Zf)}),onClick:P[0]||(P[0]=R=>Zf.value=!x(Zf))},N(x(Zf)?"resume":"pause"),3),_("button",{type:"button",onClick:P[1]||(P[1]=R=>x(zye)())},"clear"),_("button",{type:"button",onClick:P[2]||(P[2]=R=>I())},"export jsonl"),Z(_n,{text:"Close window"},{default:ve(()=>[_("button",{type:"button",onClick:P[3]||(P[3]=R=>n("close"))},"✕")]),_:1})])]),_("div",XRe,[Fn(_("select",{"onUpdate:modelValue":P[4]||(P[4]=R=>o.value=R),"aria-label":"Source filter"},[...P[12]||(P[12]=[_("option",{value:"all"},"rest + ws + app",-1),_("option",{value:"rest"},"rest",-1),_("option",{value:"ws"},"ws",-1),_("option",{value:"client"},"app errors",-1)])],512),[[Qk,o.value]]),Fn(_("select",{"onUpdate:modelValue":P[5]||(P[5]=R=>i.value=R),"aria-label":"Session filter"},[P[13]||(P[13]=_("option",{value:""},"all sessions",-1)),(g(!0),C(Ie,null,ot(u.value,R=>(g(),C("option",{key:R,value:R},N(R),9,QRe))),128))],512),[[Qk,i.value]]),Fn(_("input",{"onUpdate:modelValue":P[6]||(P[6]=R=>s.value=R),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[ks,s.value]]),_("label",ePe,[Fn(_("input",{"onUpdate:modelValue":P[7]||(P[7]=R=>r.value=R),type:"checkbox"},null,512),[[Dg,r.value]]),P[14]||(P[14]=Ve(" errors",-1))]),_("label",tPe,[Fn(_("input",{"onUpdate:modelValue":P[8]||(P[8]=R=>m.value=R),type:"checkbox"},null,512),[[Dg,m.value]]),P[15]||(P[15]=Ve(" follow",-1))]),_("div",nPe,[_("button",{type:"button",class:Be({on:l.value==="timeline"}),onClick:P[9]||(P[9]=R=>l.value="timeline")},"timeline",2),_("button",{type:"button",class:Be({on:l.value==="aggregate"}),onClick:P[10]||(P[10]=R=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(g(),C("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),C("div",oPe," No trace entries yet. REST calls and WS frames will appear here. ")):ie("",!0),(g(!0),C(Ie,null,ot(d.value,R=>(g(),C("div",{key:R.id,class:"kap-row-wrap"},[_("button",{type:"button",class:Be(["kap-row",{expanded:h.value===R.id}]),onClick:M=>v(R.id)},[_("span",iPe,N(y(R.ts)),1),_("span",{class:Be(["kap-badge",T(R)])},N($(R)),3),_("span",rPe,N(R.label),1)],10,sPe),h.value===R.id?(g(),C("div",lPe,[_("div",aPe,[_("button",{type:"button",onClick:M=>S(R)},N(w.value===R.id?"copied ✓":"copy json"),9,uPe)]),_("pre",null,N(b(R)),1)])):ie("",!0)]))),128))],512)):(g(),C("div",cPe,[P[20]||(P[20]=_("h4",null,"WS frames by session / type",-1)),_("table",null,[P[17]||(P[17]=_("thead",null,[_("tr",null,[_("th",null,"dir"),_("th",null,"type"),_("th",null,"session"),_("th",null,"count"),_("th",null,"last seq")])],-1)),_("tbody",null,[(g(!0),C(Ie,null,ot(f.value,R=>(g(),C("tr",{key:R.key},[_("td",null,N(R.dir),1),_("td",dPe,N(R.eventType),1),_("td",fPe,N(R.sessionId),1),_("td",pPe,N(R.count),1),_("td",hPe,N(R.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),C("tr",mPe,[...P[16]||(P[16]=[_("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):ie("",!0)])]),P[21]||(P[21]=_("h4",null,"REST by endpoint",-1)),_("table",null,[P[19]||(P[19]=_("thead",null,[_("tr",null,[_("th",null,"endpoint"),_("th",null,"count"),_("th",null,"errors"),_("th",null,"avg ms")])],-1)),_("tbody",null,[(g(!0),C(Ie,null,ot(p.value,R=>(g(),C("tr",{key:R.key},[_("td",gPe,N(R.key),1),_("td",vPe,N(R.count),1),_("td",{class:Be(["num",{err:R.errors>0}])},N(R.errors),3),_("td",yPe,N(R.avgMs),1)]))),128)),p.value.length===0?(g(),C("tr",kPe,[...P[18]||(P[18]=[_("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):ie("",!0)])])]))]))}}),wPe=ht(bPe,[["__scopeId","data-v-7bab00af"]]),xPe=Ge({__name:"DebugPanel",setup(e){const t=q(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function r(c){const d=document.documentElement,f=c.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));r(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=Bg(wPe,{onClose:()=>c.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return bn(()=>{u()}),uo(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(g(),he(_n,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ve(()=>[_("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),_Pe=ht(xPe,[["__scopeId","data-v-992ae84c"]]);function SPe({client:e,authLogoRef:t}){const n=O(()=>e.authReady.value),o=O(()=>e.initialized.value&&!n.value),s="/login",i=q(null);let r=null;function l(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function a(c){typeof window>"u"||window.history.replaceState(window.history.state,"",c)}Ze(o,c=>{if(!(typeof window>"u")){if(c){window.location.pathname!==s&&(i.value=l(),a(s));return}window.location.pathname===s&&(a(i.value??"/"),i.value=null)}},{immediate:!0});function u(){const c=t.value;c&&(c.classList.remove("blink-now"),c.getBoundingClientRect(),c.classList.add("blink-now"),r!==null&&clearTimeout(r),r=setTimeout(()=>{r=null,c.classList.remove("blink-now")},300))}return Mn(()=>{r!==null&&clearTimeout(r)}),{showAuthGate:o,blinkAuthLogo:u}}function CPe({running:e,showAuthGate:t}){const{t:n}=It(),o=q(Sl[0]);let s=0,i;function r(){i!==void 0&&clearInterval(i),i=void 0}Ze(e,a=>{r(),s=0,o.value=Sl[0],a&&(i=setInterval(()=>{s=(s+1)%Sl.length,o.value=Sl[s]??Sl[0]},Bu))},{immediate:!0}),Ld(r);const l=O(()=>{const a=e.value?`${o.value} `:"";return t.value?`${a}${n("app.authPageTitle")} - Pythinker Code Web`:`${a}Pythinker Code Web`});iE(()=>{typeof document<"u"&&(document.title=l.value)})}function APe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),r=e.items.findLast(a=>a.kind==="turn"),l=e.items.flatMap(a=>a.kind==="turn"?MPe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===r?.turnId?t?.disposedAt:void 0}):[]);return o_(l,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function MPe(e,t,n,o){const s=[],i=IPe([e.startedAt,...e.steps.map(u=>u.startedAt),o.startedAt]),r=Vm(e.endedAt)??Vm(o.endedAt),l=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const u=[{type:"text",text:e.prompt}];for(const c of e.attachmentIds??[]){const d=EPe(t.get(c));d!==void 0&&u.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:u,createdAt:i,promptId:l,metadata:{origin:e.origin}})}for(const u of e.steps){const c=Vm(u.startedAt)??i;for(const d of u.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:c,promptId:l,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId)}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text}],createdAt:c,promptId:l});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?TPe(d.output):void 0}],createdAt:c,promptId:l}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:Vm(u.endedAt)??c,promptId:l}))}}const a=e.durationMs??$Pe(i,r);if(a!==void 0){const u=s.findLastIndex(c=>c.role==="assistant");u>=0&&(s[u]={...s[u],durationMs:a})}return s}function EPe(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function TPe(e){if(e==null)return;if(typeof e=="string")return e.split(` -`);if(!Array.isArray(e))return[JSON.stringify(e)];const t=[];for(const n of e){if(typeof n=="string"){t.push(...n.split(` -`));continue}if(n===null||typeof n!="object")continue;const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` -`)):o.type==="think"&&typeof o.think=="string"&&t.push(...o.think.split(` -`))}return t.length>0?t:void 0}function Vm(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function IPe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const H7=q(typeof window>"u"?0:window.innerWidth);let qm=0,j1=!1;function E2(){H7.value=window.innerWidth}function NPe(){j1||typeof window>"u"||(window.addEventListener("resize",E2),j1=!0,E2())}function LPe(){!j1||typeof window>"u"||(window.removeEventListener("resize",E2),j1=!1)}function j7(e,t,n){return Math.max(t,e-n)}function T2(e,t,n){return Math.min(n,Math.max(t,e))}function U7(){return bn(()=>{qm+=1,NPe()}),uo(()=>{qm=Math.max(0,qm-1),qm===0&&LPe()}),{viewportWidth:H7}}const FPe="pythinker-web.file-preview-width",Hc=320;function OPe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=U7(),i=O(()=>Math.max(0,s.value-t.value)),r=O(()=>j7(i.value,Hc,Hc));function l(fe){return T2(Math.round(fe),Hc,r.value)}function a(){return l(i.value/2)}const u=O(()=>a()),c=q(u.value),d=O(()=>T2(c.value,Hc,r.value)),f=q(null),p=O(()=>{const fe=f.value;if(!fe)return null;const we=e.turns.value.find(se=>se.id===fe.turnId)?.blocks?.[fe.blockIndex];return we?.kind==="thinking"?we.thinking:null}),h=O(()=>p.value!==null);function m(fe){const ue=f.value;if(ue&&ue.turnId===fe.turnId&&ue.blockIndex===fe.blockIndex){f.value=null,n.value==="thinking"&&(n.value=null);return}n.value="thinking",f.value=fe}function k(){f.value=null,n.value==="thinking"&&(n.value=null)}const w=q(null),v=O(()=>{const fe=w.value;if(!fe)return null;const ue=e.turns.value.find(we=>we.id===fe.turnId);return ue?.role==="compaction"&&ue.text?ue.text:null}),y=O(()=>v.value!==null);function b(fe){if(w.value?.turnId===fe.turnId){w.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",w.value=fe}function S(){w.value=null,n.value==="compaction"&&(n.value=null)}const I=q(null),T=O(()=>{const fe=I.value;if(!fe)return{entry:void 0,version:0};const ue=e.auxiliaryTranscripts.getEntry(fe.sessionId,fe.subagentId);return{entry:ue,version:ue?.version.value??0}});function $(fe){const ue=e.activeAppTasks.value.find(we=>we.agentId===fe||we.id===fe||we.backgroundTaskId===fe||we.parentToolCallId===fe);return ue?.agentId??ue?.id??fe}const L=O(()=>{const fe=I.value;if(!fe)return null;const ue=e.activeAppTasks.value.find(Bt=>Bt.agentId===fe.subagentId||Bt.id===fe.subagentId||Bt.backgroundTaskId===fe.subagentId);if(ue)return qCe(ue);const we=T.value.entry?.channel;if(!we)return null;const se=we.agents.find(Bt=>Bt.agentId===fe.subagentId),_e=we.snapshot.items.findLast(Bt=>Bt.kind==="turn"),Re=we.snapshot.meta.activity==="turn",lt=we.loading,ct=_e?.kind==="turn"&&_e.state==="failed",Ct=_e?.kind==="turn"&&_e.state==="cancelled",Mt=we.refreshError&&_e===void 0;return{id:fe.subagentId,name:se?.label??fe.subagentId,subagentType:se?.type==="sub"?"subagent":se?.type,phase:Re?"working":Ct?"cancelled":ct||Mt?"failed":lt?"queued":"completed",status:Re||lt?"running":Ct?"cancelled":ct||Mt?"failed":"completed"}}),P=O(()=>{const fe=I.value,ue=T.value.entry?.channel;if(!fe||!ue)return[];const we=ue.agents.find(se=>se.agentId===fe.subagentId);return APe(ue.snapshot,we,{sessionId:fe.sessionId,getFileUrl:se=>e.getFileUrl(se)})}),R=O(()=>T.value.entry?.channel.loading??!1),M=O(()=>T.value.entry?.channel.refreshError??!1),D=O(()=>T.value.entry?.channel.loadingOlder??!1),z=O(()=>T.value.entry?.channel.loadOlderError??!1),B=O(()=>T.value.entry?.channel.snapshot.hasMoreOlder??!1),A=O(()=>T.value.entry?.channel.snapshot.meta.activity==="turn"),F=O(()=>L.value!==null);function W(fe){const ue=e.activeSessionId.value;if(!fe||!ue)return;const we=$(fe);if(n.value==="agent"&&I.value?.sessionId===ue&&I.value.subagentId===we){j();return}const se=I.value;se&&se.subagentId!==we&&e.auxiliaryTranscripts.deactivate(se.sessionId,se.subagentId),I.value={sessionId:ue,subagentId:we},n.value="agent",e.auxiliaryTranscripts.activate(ue,we)}function j(){const fe=I.value;fe&&e.auxiliaryTranscripts.deactivate(fe.sessionId,fe.subagentId),I.value=null,n.value==="agent"&&(n.value=null)}Ze(n,(fe,ue)=>{if(ue!=="agent"||fe==="agent")return;const we=I.value;we&&e.auxiliaryTranscripts.deactivate(we.sessionId,we.subagentId)});function le(){T.value.entry?.channel.loadOlder().catch(()=>{})}const J=q(null),X=O(()=>{const fe=J.value;if(!fe)return null;const ue=jY(e.turns.value,fe);return ue?{id:fe,title:$s(ue.name),path:cw(ue.arg),lines:ue.status==="error"?null:uw(ue),output:ue.output}:null}),G=O(()=>X.value!==null);function Q(fe){if(n.value==="toolDiff"&&J.value===fe){ee();return}n.value="toolDiff",J.value=fe}function ee(){J.value=null,n.value==="toolDiff"&&(n.value=null)}const K=q("list"),ge=q(null);function Ce(){if(n.value==="diff"){ze();return}n.value="diff",K.value="list",ge.value=null,e.loadGitStatus(e.activeSessionId.value)}function ze(){n.value==="diff"&&(n.value=null),K.value="list",ge.value=null,e.clearFileDiff()}async function me(fe){K.value="detail",ge.value=fe,await e.loadFileDiff(fe)}async function te(fe){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,fe):await e.openSideChat(fe),n.value="btw"}function oe(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function H(){n.value==="btw"&&(n.value=null)}const Y=O(()=>e.sideChatVisible.value),ke=O(()=>n.value!==null&&(n.value!=="thinking"||h.value)&&(n.value!=="compaction"||y.value)&&(n.value!=="agent"||F.value)&&(n.value!=="toolDiff"||G.value)&&(n.value!=="btw"||Y.value)),Se=q(!1),ye=q({});function ne(){switch(n.value){case"thinking":return f.value?{kind:"thinking",...f.value}:null;case"compaction":return w.value?{kind:"compaction",...w.value}:null;case"agent":return I.value?{kind:"agent",...I.value}:null;case"toolDiff":return J.value?{kind:"toolDiff",toolId:J.value}:null;case"btw":return{kind:"btw"};default:return null}}function ce(fe){if(fe)switch(fe.kind){case"thinking":f.value={turnId:fe.turnId,blockIndex:fe.blockIndex},n.value="thinking";break;case"compaction":w.value={turnId:fe.turnId},n.value="compaction";break;case"agent":{const ue=e.activeSessionId.value;if(!ue)break;const we=$(fe.subagentId);I.value={sessionId:ue,subagentId:we},n.value="agent",e.auxiliaryTranscripts.activate(ue,we);break}case"toolDiff":J.value=fe.toolId,n.value="toolDiff";break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function xe(){return n.value==="thinking"&&h.value?(k(),!0):n.value==="compaction"&&y.value?(S(),!0):n.value==="agent"&&F.value?(j(),!0):n.value==="toolDiff"&&G.value?(ee(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(ze(),!0):n.value==="btw"?(oe(),!0):!1}return Ze(e.activeSessionId,(fe,ue)=>{if(ue){const we=ne();we?ye.value[ue]=we:delete ye.value[ue]}o(),k(),S(),j(),ee(),ze(),H(),fe&&ce(ye.value[fe])}),{PREVIEW_WIDTH_KEY:FPe,PREVIEW_MIN:Hc,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,thinkingPanelText:p,thinkingVisible:h,openThinkingPanel:m,closeThinkingPanel:k,compactionPanelText:v,compactionPanelVisible:y,openCompactionPanel:b,closeCompactionPanel:S,agentPanelMember:L,agentPanelTurns:P,agentPanelLoading:R,agentPanelLoadError:M,agentPanelLoadingMore:D,agentPanelLoadMoreError:z,agentPanelHasMore:B,agentPanelRunning:A,agentPanelVisible:F,openAgentPanel:W,closeAgentPanel:j,loadOlderAgentMessages:le,toolDiffTarget:X,toolDiffVisible:G,openToolDiff:Q,closeToolDiff:ee,detailDiffMode:K,detailDiffPath:ge,openDiffDetail:Ce,closeDiffDetail:ze,selectDiffFile:me,btwVisible:Y,openSideChatTab:te,closeSideChat:oe,hideSideChatPanel:H,sidePanelVisible:ke,panelDragging:Se,closeOpenSidePanel:xe}}const RPe=ln.sidebarWidth,A8=ln.sidebarCollapsed,M8=270,Fk=170,PPe=480,DPe=320;function BPe(e={}){const{viewportWidth:t}=U7(),n=q(M8),o=q(!1),s=q(!1),i=O(()=>{const c=DPe+(J8(e.previewOpen)?Hc:0);return Math.min(PPe,j7(t.value,Fk,c))}),r=O(()=>T2(n.value,Fk,i.value));function l(){try{o.value=zo(A8)==="true"}catch{o.value=!1}}function a(){try{Qo(A8,String(o.value))}catch{}}function u(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:RPe,SIDEBAR_DEFAULT:M8,SIDEBAR_MIN:Fk,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}async function zPe(e){if(!e.fileId)return{url:e.url};try{const t=await xt().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function WPe({client:e,detailTarget:t}){const{t:n}=It(),o=q(null),s=q(null),i=q(!1),r=q(null),l=q(null);let a=0;const u=O(()=>{const y=l.value;return y?e.getFileDownloadUrl(y):null}),c=O(()=>o.value!==null);function d(y){return y.length>1?y.replace(/\/+$/,""):y}function f(y){const b=[];for(const S of y.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){b.pop();continue}b.push(S)}return b.join("/")}function p(y){const b=y.trim();if(!b)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(b))return{error:n("filePreview.errors.unsupportedPath")};if(b.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const S=d(e.status.value.cwd);if(b.startsWith("/")){if(!S||b!==S&&!b.startsWith(`${S}/`))return{error:n("filePreview.errors.outsideWorkspace")};const T=b===S?"":b.slice(S.length+1);if(T.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const $=f(T);return $?{path:$}:{error:n("filePreview.errors.isDirectory")}}if(b.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const I=f(b);return I?{path:I}:{error:n("filePreview.errors.emptyPath")}}async function h(y){const b=o.value;if(t.value==="file"&&b&&b.path===y.path&&b.line===y.line){k();return}const S=++a;t.value="file",s.value=null,r.value=null,i.value=!0,o.value=y,l.value=null;const I=p(y.path);if("error"in I){i.value=!1,r.value=I.error;return}l.value=I.path;try{const T=await e.readFileContent(I.path);if(S!==a)return;T?s.value={...T,path:T.path||I.path}:r.value=n("filePreview.errors.loadFailed")}catch(T){if(S!==a)return;r.value=T instanceof Error?T.message:n("filePreview.errors.loadFailed")}finally{S===a&&(i.value=!1)}}function m(){a+=1,o.value=null,l.value=null,s.value=null,r.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ze(t,(y,b)=>{b==="file"&&y!=="file"&&m()});function w(){const y=s.value?.path??o.value?.path;y&&e.openWorkspaceFile(y,o.value?.line)}function v(){const y=s.value?.path??o.value?.path;y&&e.revealWorkspaceFile(y)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:w,revealPreviewFile:v}}const HPe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},jPe={class:"server-auth-card"},UPe={class:"server-auth-body"},VPe={class:"server-auth-foot"},qPe=Ge({__name:"ServerAuthDialog",setup(e){const t=q(""),n=q(null),o=q(!1);bn(()=>{bt(()=>n.value?.focus())});function s(){const r=t.value;!r||o.value||(o.value=!0,SN(r),window.location.reload())}function i(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(g(),C("div",HPe,[_("div",jPe,[l[1]||(l[1]=_("div",{class:"server-auth-head"},[_("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),_("p",{class:"server-auth-hint"},[Ve(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),_("code",null,"PYTHINKER_CODE_PASSWORD"),Ve("). ")])],-1)),_("div",UPe,[Z(vs,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),_("div",VPe,[Z(en,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ve(()=>[Ve(N(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),KPe=ht(qPe,[["__scopeId","data-v-82dad292"]]),GPe=["aria-label"],ZPe=Ge({__name:"InternalBuildBanner",setup(e){const{t}=It(),n=Df;return(o,s)=>x(n)?(g(),C("span",{key:0,class:"internal-build-tag",role:"note","aria-label":x(t)("app.internalBuildBanner")},[s[0]||(s[0]=_("svg",{viewBox:"0 0 16 16",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"M8 2 14 13H2L8 2Z"}),_("path",{d:"M8 6v3.5"}),_("path",{d:"M8 11.5h.01"})],-1)),_("span",null,N(x(t)("app.internalBuildBanner")),1)],8,GPe)):ie("",!0)}}),YPe=ht(ZPe,[["__scopeId","data-v-6eba49b4"]]),JPe={class:"app-shell"},XPe={key:1,class:"auth-page"},QPe={class:"auth-page-inner"},eDe={class:"auth-page-copy"},tDe=["aria-label","aria-hidden"],nDe={class:"action-toast-stack"},oDe=Ge({__name:"App",setup(e){Lke();const t=q(!1);let n=null;const o=V0(),s=q([]),i=q(!1),r=q(null),l=q(null),a=q(null);let u=null;const c=O(()=>{const st=o.activeWorkspaceId.value;return st?[...o.sessionsForView.value,...s.value].filter(V=>V.workspaceId===st).toSorted((V,pe)=>new Date(pe.updatedAt??0).getTime()-new Date(V.updatedAt??0).getTime()).slice(0,6):[]});function d(st){return{id:st.id,title:st.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(st.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:st.updatedAt,workspaceId:st.workspaceId,archived:!0}}async function f(){try{const st=[];let V;for(;;){const pe=await o.loadArchivedSessions({beforeId:V,pageSize:100});if(st.push(...pe.items),!pe.hasMore||pe.items.length===0||(V=pe.items.at(-1)?.id,V===void 0))break}s.value=st.map(d)}catch(st){console.warn("loadDoneSessions failed",st)}}const p=O(()=>{const st=new Map(o.workspaceGroups.value.flatMap(V=>V.sessions.map(pe=>[pe.id,pe.updatedAt])));return o.sessionsForView.value.map(V=>({id:V.id,title:V.title,workspaceId:V.workspaceId??"",workspaceName:V.workspaceName??"-",lastPrompt:V.lastPrompt,updatedAt:V.updatedAt??st.get(V.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const st=[];let V;for(;;){const Xe=await o.loadArchivedSessions({beforeId:V,pageSize:100});if(st.push(...Xe.items),!Xe.hasMore||Xe.items.length===0||(V=Xe.items.at(-1)?.id,V===void 0))break}const pe=o.workspacesView.value;return st.filter(Xe=>!Xe.parentSessionId).map(Xe=>{const on=pe.find(Io=>Io.id===Xe.workspaceId||Io.root===Xe.cwd);return{id:Xe.id,title:Xe.title,workspaceId:on?.id??Xe.workspaceId??Xe.cwd,workspaceName:on?.name??Xe.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:Xe.lastPrompt,updatedAt:Xe.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(st,V){r.value={kind:st,ids:Array.isArray(V)?V:[V]}}const w=O(()=>!o.dangerousBypassAuth.value&&t.value);Wn("resolveImage",o.resolveImageUrl),Wn("resolveDynamicWorkflowMembers",st=>o.dynamicWorkflowMembersByToolCallId.value.get(st)??[]);const{t:v}=It(),{confirm:y}=qa(),b=$r(),S=O7(),I=q(!1),T=q(!1),$=O(()=>{const st=o.activeSessionId.value;return o.sessions.value.find(V=>V.id===st)?.title??s.value.find(V=>V.id===st)?.title??""}),L=O(()=>{const st=o.activeSessionId.value;return o.sessions.value.find(V=>V.id===st)?.lastTurnReason}),P=O(()=>{const st=o.activeSessionId.value;if(st)return dke(st)}),R=O(()=>s.value.some(st=>st.id===o.activeSessionId.value)),M=O(()=>o.visibleWorkspace.value?.sessionCount??0),D=O(()=>o.activity.value!=="idle"),z=q(null),{showAuthGate:B,blinkAuthLogo:A}=SPe({client:o,authLogoRef:z});CPe({running:D,showAuthGate:B});function F(st){const V=o.models.value.find(Io=>Io.id===o.status.value.modelId),pe=yh(V),Xe=pe.indexOf(N1(V,st)),on=pe[(Xe+1)%pe.length]??pe[0]??"off";return Wx(V,on)}const W=O(()=>{const st=o.models.value.find(V=>V.id===o.status.value.modelId);return N1(st,o.thinking.value)}),j=q(!o.onboarded.value);function le(){o.setOnboarded(!0),j.value=!1}function J(){j.value=!0}let X=0;function G(){const st=window.visualViewport,V=document.documentElement.style;V.setProperty("--app-height",`${st?.height??window.innerHeight}px`),V.setProperty("--app-top",`${st?.offsetTop??0}px`)}function Q(){X||(X=requestAnimationFrame(()=>{X=0,G()}))}bn(()=>{n=Rke(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),Rt(),G(),window.visualViewport?.addEventListener("resize",Q),window.visualViewport?.addEventListener("scroll",Q),window.addEventListener("resize",Q),document.addEventListener("keydown",ee,!0)}),Mn(()=>{Re(),document.removeEventListener("keydown",ee,!0),window.visualViewport?.removeEventListener("resize",Q),window.visualViewport?.removeEventListener("scroll",Q),window.removeEventListener("resize",Q),X&&(cancelAnimationFrame(X),X=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function ee(st){if(st.key==="Escape"&&!ai.value){if(K.value==="turnDiff")ze();else if(!Fs())return;st.stopPropagation(),st.preventDefault()}}const K=q(null),ge=q(null);function Ce(st){if(K.value==="turnDiff"&&ge.value?.turnId===st.turnId){ze();return}ge.value=st,K.value="turnDiff"}function ze(){ge.value=null,K.value==="turnDiff"&&(K.value=null)}const me=q(!1);Ze(o.activeSessionId,()=>{ze(),me.value=!0,bt(()=>{me.value=!1})});const{previewTarget:te,previewFile:oe,previewLoading:H,previewError:Y,previewDownloadUrl:ke,previewExternalActions:Se,openFilePreview:ye,closeFilePreview:ne,openPreviewInEditor:ce,revealPreviewFile:xe}=WPe({client:o,detailTarget:K}),fe=q(null),ue=q(null);let we=0,se;async function _e(st){if(st.kind!=="image"&&st.kind!=="video")return;const V=++we;se?.(),se=void 0,fe.value=null,ue.value=null;const pe=await zPe(st);if(V!==we){pe.revoke?.();return}se=pe.revoke,fe.value=st,ue.value=pe.url}function Re(){we+=1,se?.(),se=void 0,fe.value=null,ue.value=null}const lt=O(()=>K.value!==null),{SIDEBAR_WIDTH_KEY:ct,SIDEBAR_DEFAULT:Ct,SIDEBAR_MIN:Mt,sidebarMax:Bt,sessionColWidth:Vt,sidebarCollapsed:Je,sidebarDragging:tt,sideWidth:dt,loadSidebarCollapsed:Rt,toggleSidebarCollapse:Fe}=BPe({previewOpen:lt}),{PREVIEW_WIDTH_KEY:Ye,PREVIEW_MIN:it,previewDefaultWidth:rt,previewMax:gt,previewWidth:Tt,previewPanelWidth:tn,thinkingPanelText:fn,thinkingVisible:Kt,openThinkingPanel:Dn,closeThinkingPanel:Yt,compactionPanelText:Eo,compactionPanelVisible:Wo,openCompactionPanel:ho,closeCompactionPanel:Bn,agentPanelMember:bs,agentPanelTurns:nt,agentPanelLoading:Ae,agentPanelLoadError:kt,agentPanelLoadingMore:Nt,agentPanelLoadMoreError:Xt,agentPanelHasMore:ko,agentPanelRunning:Gn,openAgentPanel:qn,closeAgentPanel:oo,loadOlderAgentMessages:lo,toolDiffTarget:fs,openToolDiff:Ei,closeToolDiff:Ns,detailDiffMode:Ls,detailDiffPath:js,openDiffDetail:ii,closeDiffDetail:ps,selectDiffFile:cr,btwVisible:Vi,openSideChatTab:wn,closeSideChat:Us,sidePanelVisible:zn,panelDragging:ri,closeOpenSidePanel:Fs}=OPe({client:o,sideWidth:dt,detailTarget:K,closeFilePreview:ne}),Ti=q(null),ts=q(!1),To=q(!1),ns=q(!1),Oo=q(!1),sn=q("general"),li=O(()=>ku.value>0||ts.value||To.value||ns.value||Oo.value||I.value||T.value||fe.value!==null),os=q(null),bo=q(null),ai=O(()=>ku.value>0||ts.value||To.value||ns.value||Oo.value||j.value||I.value||T.value||fe.value!==null),ui=q(!1),ss=q(!1),In=q(!1);async function wo(){ui.value=!0,ss.value=!1,ts.value=!0;try{await o.refreshAllProviders()}catch{ss.value=!0}finally{ui.value=!1}}function Nr(st="general"){sn.value=st,Oo.value=!0}function Te(){Nr("providers")}function Ne(){Te()}async function Ue(st){ts.value=!1,await rn(st)}async function rn(st){await o.setModel(st)&&st!==o.defaultModel.value&&o.updateConfig({defaultModel:st})}async function cn(st){await o.archiveSession(st),await f(),k("done",st)}async function Sn(st){await o.restoreSession(st)&&(s.value=s.value.filter(V=>V.id!==st),k("open",st))}async function Cn(st,V){await o.renameSession(st,V),s.value.some(pe=>pe.id===st)&&await f()}async function de(st,V){const pe=s.value.find(Xe=>Xe.id===st);if(!pe){await o.setSessionEmoji(st,V);return}await Cn(st,GT(V,pe.title))}async function Me(st,V){const pe=st.map(Xe=>Xe.id);for(const Xe of pe)V==="archive"?await o.archiveSession(Xe):await o.restoreSession(Xe);await f(),k(V==="archive"?"done":"open",pe)}async function Le(){const st=r.value;if(st){r.value=null;for(const V of st.ids)st.kind==="done"?await o.restoreSession(V):await o.archiveSession(V);await f()}}async function je(st){const V=st??o.activeSessionId.value;if(!V)return;l.value={state:"running",sessionId:V};const pe=await o.exportSession(V);l.value=pe?{state:"done",sessionId:V}:null}async function at(st){const V=o.workspacesView.value.find(pe=>pe.id===st)?.name??st;await y({title:v("sidebar.removeWorkspace"),message:v("workspace.removeWorkspaceConfirm",{name:V}),variant:"danger",action:()=>o.deleteWorkspace(st)})}async function yt(st){In.value=!0;try{await o.updateConfig(st)&&await o.checkAuth()}finally{In.value=!1}}async function Gt(st){await o.undo(1),await bt(),Ti.value?.loadComposerForEdit(st.text,st.attachments)}function nn(st){if(st==="/compact"||st.startsWith("/compact ")){o.compact(st.slice(8).trim()||void 0);return}if(st==="/dynamic_workflow"||st.startsWith("/dynamic_workflow ")){const V=st.slice(17).trim();V==="on"?o.setDynamicWorkflowMode(!0):V==="off"?o.setDynamicWorkflowMode(!1):V?(o.setDynamicWorkflowMode(!0),o.sendPrompt(V)):o.toggleDynamicWorkflowMode();return}if(st==="/goal"||st.startsWith("/goal ")){const V=st.slice(5).trim();V==="pause"||V==="resume"||V==="cancel"?o.controlGoal(V):V?o.createGoal(V):o.toggleGoalMode();return}if(st==="/btw"||st.startsWith("/btw ")){const V=st.slice(4).trim();!V&&o.sideChatVisible.value?Us():wn(V||void 0);return}switch(st){case"/new":case"/clear":Ro();break;case"/fork":o.forkSession();break;case"/export":je();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/auto":o.setPermission("auto");break;case"/yolo":o.setPermission("yolo");break;case"/thinking":o.setThinking(F(o.thinking.value));break;case"/status":ns.value=!0;break;case"/login":Ne();break;default:{const V=st.indexOf(" "),pe=S_e((V===-1?st:st.slice(0,V)).slice(1)),Xe=V===-1?void 0:st.slice(V+1).trim()||void 0;if(!pe)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,pe,Xe):o.activateSkill(pe,Xe);break}}}function Zn(st){o.unqueue(st)}function gn(st){o.unqueue(st)}function An(st){o.reorderQueue(st.from,st.to)}async function Ho(st){const V=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&V){await o.startSessionAndSendPrompt(V,st.text,st.attachments);return}if(!o.activeSessionId.value&&!V){os.value=st,To.value=!0;return}o.sendPrompt(st.text,st.attachments)}async function Ot(st){const V=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&V){await o.startSessionAndSendPrompt(V,st,[]);return}o.activeSessionId.value&&o.sendPrompt(st)}async function Zt(st){if(bo.value=null,!await o.addWorkspaceByPath(st)){bo.value=v("workspace.addFailed");return}To.value=!1;const pe=os.value;os.value=null;const Xe=o.activeWorkspaceId.value;pe&&Xe&&await o.startSessionAndSendPrompt(Xe,pe.text,pe.attachments)}function pn(){os.value=null,bo.value=null,To.value=!1}async function Yn(st){for(const V of st)if(bo.value=null,!await o.addWorkspaceByPath(V)){bo.value=v("workspace.addFailed"),To.value=!0;return}}async function Jn(st,V){const pe=await o.generateSessionTitle(st);pe===null&&(a.value=v("sidebar.genTitleUnavailable"),u!==null&&clearTimeout(u),u=setTimeout(()=>{a.value=null,u=null},5e3)),V(pe)}function is(){bt(()=>{Ti.value?.focusComposer()})}function Ro(){const st=o.activeWorkspaceId.value;st?o.openWorkspaceDraft(st):o.clearActiveSession(),is()}function Vs(st){o.openWorkspaceDraft(st),is()}function Lr(st){st&&window.open(st,"_blank","noopener")}return(st,V)=>(g(),C("div",JPe,[Z(NFe),w.value?(g(),he(KPe,{key:0})):ie("",!0),x(B)?(g(),C("section",XPe,[_("div",QPe,[(g(),C("svg",{ref_key:"authLogoRef",ref:z,class:"auth-page-logo ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Pythinker Code",onMousedown:V[0]||(V[0]=St(()=>{},["prevent"])),onClick:V[1]||(V[1]=(...pe)=>x(A)&&x(A)(...pe))},[...V[110]||(V[110]=[K2('',2)])],544)),_("div",eDe,[_("h1",null,N(x(v)("app.authPageTitle")),1),_("p",null,N(x(v)("app.authPageMessage")),1)]),Z(en,{class:"auth-page-btn",variant:"primary",onClick:Ne},{default:ve(()=>[Z(Oe,{name:"log-in",size:"md"}),_("span",null,N(x(v)("app.authPageLogin")),1)]),_:1})])])):(g(),C("div",{key:2,class:Be(["app",{mobile:x(S),"sidebar-collapsed":x(Je)&&!x(S),"macos-desktop":x(ld)}]),style:Ut({"--preview-w":x(tn)+"px"})},[x(S)?(g(),he(WFe,{key:1,workspace:x(o).visibleWorkspace.value,"session-title":$.value,running:D.value,branch:x(o).status.value.branch,"session-count":M.value,onOpenSwitcher:V[22]||(V[22]=pe=>I.value=!0),onOpenSettings:V[23]||(V[23]=pe=>T.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),C(Ie,{key:0},[Z(ZK,{collapsed:x(Je),dragging:x(tt),"col-width":x(dt),"active-workspace":x(o).visibleWorkspace.value,"active-workspace-id":x(o).activeWorkspaceId.value,sessions:x(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":x(o).pinnedSessionIds.value,"pinned-collapsed":x(o).pinnedCollapsed.value,groups:x(o).workspaceGroups.value,"active-id":x(o).activeSessionId.value,"attention-by-session":x(o).attentionBySession.value,"pending-by-session":x(o).pendingBySession.value,"unread-by-session":x(o).unreadBySession.value,"workspace-sort-mode":x(o).workspaceSortMode.value,workspaces:x(o).workspacesView.value,"tabs-enabled":x(o).config.value?.experimental?.sidebarTabs===!0,onSelect:V[2]||(V[2]=pe=>x(o).selectSession(pe)),onCreate:Ro,onCreateInWorkspace:V[3]||(V[3]=pe=>Vs(pe)),onSelectWorkspace:V[4]||(V[4]=pe=>x(o).openWorkspace(pe)),onAddWorkspace:V[5]||(V[5]=pe=>To.value=!0),onAddWorkspacePaths:Yn,onRename:Cn,onGenerateTitle:Jn,onArchive:V[6]||(V[6]=pe=>cn(pe)),onRestore:V[7]||(V[7]=pe=>Sn(pe)),onPin:V[8]||(V[8]=pe=>x(o).togglePinnedSession(pe)),onReorderPins:V[9]||(V[9]=pe=>x(o).reorderPinnedSessions(pe)),onTogglePinnedCollapsed:V[10]||(V[10]=pe=>x(o).togglePinnedCollapsed()),onSetSessionEmoji:de,onLoadDoneSessions:f,onFork:V[11]||(V[11]=pe=>x(o).forkSession(pe)),onExport:V[12]||(V[12]=pe=>je(pe)),onRenameWorkspace:V[13]||(V[13]=(pe,Xe)=>x(o).renameWorkspace(pe,Xe)),onDeleteWorkspace:V[14]||(V[14]=pe=>at(pe)),onReorderWorkspaces:V[15]||(V[15]=pe=>x(o).reorderWorkspaces(pe)),onSetWorkspaceSortMode:V[16]||(V[16]=pe=>x(o).setWorkspaceSortMode(pe)),onLoadMoreSessions:V[17]||(V[17]=pe=>void x(o).loadMoreSessions(pe)),onLoadAllSessions:V[18]||(V[18]=pe=>void x(o).loadAllSessions()),onOpenSettings:V[19]||(V[19]=pe=>Nr()),onOpenSessionAdmin:m,onCollapse:x(Fe)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Fn(Z(p4,{class:"side-handle","storage-key":x(ct),"default-width":x(Ct),min:x(Mt),max:x(Bt),"onUpdate:width":V[20]||(V[20]=pe=>Vt.value=pe),"onUpdate:dragging":V[21]||(V[21]=pe=>tt.value=pe)},null,8,["storage-key","default-width","min","max"]),[[vi,!x(Je)]])],64)),i.value?(g(),he(ZG,{key:2,"open-sessions":p.value,workspaces:x(o).workspacesView.value,"load-archived":h,"archive-session":cn,"restore-session":Sn,"run-batch":Me,onOpen:V[24]||(V[24]=pe=>{i.value=!1,x(o).selectSession(pe)}),onRename:V[25]||(V[25]=(pe,Xe)=>x(o).renameSession(pe,Xe)),onFork:V[26]||(V[26]=pe=>x(o).forkSession(pe)),onExport:V[27]||(V[27]=pe=>je(pe)),onBack:V[28]||(V[28]=pe=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),he(wTe,{key:3,ref_key:"conversationPaneRef",ref:Ti,mobile:x(S),turns:x(o).turns.value,"session-id":x(o).activeSessionId.value,approvals:x(o).pendingApprovals.value,changes:x(o).changes.value,"git-info":x(o).gitInfo.value,tasks:x(o).tasks.value,todos:x(o).todos.value,goal:x(o).goal.value,"activation-badges":x(o).activationBadges.value,status:x(o).status.value,thinking:x(o).thinking.value,"plan-mode":x(o).planMode.value,"plan-armed":x(o).planArmed.value,"session-plans":x(o).sessionPlans.value,"overlay-open":li.value,"goal-mode":x(o).goalMode.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,models:x(o).models.value,"starred-ids":x(o).starredModelIds.value,skills:x(o).skills.value,questions:x(o).questions.value,"pending-question-actions":x(o).pendingQuestionActions,"pending-approval-actions":x(o).pendingApprovalActions,running:D.value,"turn-active":x(o).turnActive.value,queued:x(o).queued.value,"search-files":x(o).searchFiles,"upload-image":x(o).uploadImage,working:x(o).working.value,starting:x(o).isStartingFirstPrompt.value,"fast-moon":x(o).fastMoon.value,"file-reload-key":x(o).activeSessionId.value,"session-loading":x(o).sessionLoading.value,compaction:x(o).compaction.value,"has-more-messages":x(o).hasMoreMessages.value,"loading-more":x(o).loadingMoreMessages.value,"loading-more-error":x(o).loadMoreMessagesError.value,"load-older-messages":x(o).loadOlderMessages,"workspace-name":x(o).visibleWorkspace.value?.name,"workspace-root":x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,"git-diff-stats":x(o).gitDiffStats.value,workspaces:x(o).workspacesView.value,"active-workspace-id":x(o).activeWorkspaceId.value,"session-title":$.value,pr:x(o).activePullRequest.value,"conversation-toc":x(o).conversationToc.value,"last-turn-reason":L.value,"turn-error-kind":P.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":P.value?.message,"session-done":R.value,pinned:x(o).pinnedSessionIds.value.includes(x(o).activeSessionId.value??""),"recent-sessions":c.value,onOpenChanges:V[29]||(V[29]=pe=>x(ii)()),onSelectWorkspace:V[30]||(V[30]=pe=>Vs(pe)),onAddWorkspace:V[31]||(V[31]=pe=>To.value=!0),onOpenPr:Lr,onSubmit:V[32]||(V[32]=pe=>Ho(pe)),onSteer:V[33]||(V[33]=pe=>x(o).steerPrompt(pe.text,pe.attachments)),onApproval:V[34]||(V[34]=(pe,Xe)=>x(o).respondApproval(pe,Xe)),onCancelTask:V[35]||(V[35]=pe=>x(o).cancelTask(pe)),onAnswer:V[36]||(V[36]=(pe,Xe)=>x(o).respondQuestion(pe,Xe)),onDismiss:V[37]||(V[37]=pe=>x(o).dismissQuestion(pe)),onCommand:nn,onInterrupt:V[38]||(V[38]=pe=>x(o).abortCurrentPrompt()),onUnqueue:Zn,onEditQueued:gn,onReorderQueue:An,onSetPermission:V[39]||(V[39]=pe=>x(o).setPermission(pe)),onSetThinking:V[40]||(V[40]=pe=>x(o).setThinking(pe)),onTogglePlan:V[41]||(V[41]=pe=>x(o).togglePlanMode()),onToggleGoal:V[42]||(V[42]=pe=>x(o).toggleGoalMode()),onCreateGoal:V[43]||(V[43]=pe=>x(o).createGoal(pe)),onControlGoal:V[44]||(V[44]=pe=>x(o).controlGoal(pe)),onRefreshGitStatus:V[45]||(V[45]=pe=>x(o).activeSessionId.value&&x(o).loadGitStatus(x(o).activeSessionId.value)),onRenameSession:V[46]||(V[46]=(pe,Xe)=>x(o).renameSession(pe,Xe)),onForkSession:V[47]||(V[47]=pe=>x(o).forkSession(pe)),onArchiveSession:V[48]||(V[48]=pe=>cn(pe)),onRestoreSession:V[49]||(V[49]=pe=>Sn(pe)),onSelectSession:V[50]||(V[50]=pe=>x(o).selectSession(pe)),onTogglePin:V[51]||(V[51]=pe=>x(o).togglePinnedSession(pe)),onOpenSessionAdmin:m,onExportSession:V[52]||(V[52]=pe=>je(pe)),onCompact:V[53]||(V[53]=pe=>x(o).compact()),onPickModel:V[54]||(V[54]=pe=>wo()),onSelectModel:V[55]||(V[55]=pe=>rn(pe)),onOpenFile:V[56]||(V[56]=pe=>x(ye)(pe)),onOpenMedia:V[57]||(V[57]=pe=>_e(pe)),onOpenThinking:V[58]||(V[58]=pe=>x(Dn)(pe)),onOpenCompaction:V[59]||(V[59]=pe=>x(ho)(pe)),onOpenAgent:V[60]||(V[60]=pe=>x(qn)(pe)),onOpenToolDiff:V[61]||(V[61]=pe=>x(Ei)(pe)),onOpenTurnDiff:V[62]||(V[62]=pe=>Ce(pe)),onEditMessage:Gt,onContinueTurn:Ot},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","conversation-toc","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!x(S)&&(x(ld)||x(Je))?(g(),he(Jt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:x(Je)?x(v)("sidebar.expandSidebar"):x(v)("sidebar.collapseSidebar"),onClick:x(Fe)},{default:ve(()=>[Z(Oe,{name:x(Je)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):ie("",!0),!x(S)&&x(Je)?(g(),he(Jt,{key:5,class:"new-chat-btn",size:"sm",label:x(v)("sidebar.newChat"),onClick:Ro},{default:ve(()=>[Z(Oe,{name:"chat-new"})]),_:1},8,["label"])):ie("",!0),!i.value&&x(zn)&&!x(S)?(g(),he(p4,{key:6,class:"preview-handle","storage-key":x(Ye),"default-width":x(rt),min:x(it),max:x(gt),reverse:"","aria-label":x(v)("layout.resizePreviewAria"),"onUpdate:width":V[63]||(V[63]=pe=>Tt.value=pe),"onUpdate:dragging":V[64]||(V[64]=pe=>ri.value=pe)},null,8,["storage-key","default-width","min","max","aria-label"])):ie("",!0),!i.value&&(!x(S)||x(zn))?(g(),C("aside",{key:7,class:Be(["global-preview",{open:x(zn),mobile:x(S),"no-anim":x(ri)||me.value}]),role:"complementary","aria-label":x(v)("layout.detailPanelAria"),"aria-hidden":!x(zn)},[K.value==="thinking"&&x(Kt)?(g(),he(x8,{key:0,text:x(fn)??"",onClose:x(Yt)},null,8,["text","onClose"])):K.value==="compaction"&&x(Wo)?(g(),he(x8,{key:1,text:x(Eo)??"",subtitle:x(v)("conversation.summaryTitle"),onClose:x(Bn)},null,8,["text","subtitle","onClose"])):K.value==="agent"&&x(bs)?(g(),he(j6e,{key:2,member:x(bs),turns:x(nt),running:x(Gn),loading:x(Ae),"load-error":x(kt),"has-more":x(ko),"loading-more":x(Nt),"load-more-error":x(Xt),onClose:x(oo),onLoadOlderMessages:x(lo),onOpenFile:V[65]||(V[65]=pe=>x(ye)(pe)),onOpenMedia:V[66]||(V[66]=pe=>_e(pe)),onOpenAgent:V[67]||(V[67]=pe=>x(qn)(pe)),onOpenTurnDiff:V[68]||(V[68]=pe=>Ce(pe))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages"])):K.value==="btw"&&x(Vi)?(g(),he(SIe,{key:3,turns:x(o).sideChatTurns.value,running:x(o).sideChatRunning.value,sending:x(o).sideChatSending.value,onSend:V[69]||(V[69]=pe=>x(o).sendSideChatPrompt(pe)),onClose:x(Us)},null,8,["turns","running","sending","onClose"])):K.value==="diff"?(g(),he(XIe,{key:4,mode:x(Ls),changes:x(o).changes.value,"git-info":x(o).gitInfo.value,"file-diff":x(o).fileDiff.value,"selected-diff-path":x(o).selectedDiffPath.value,"file-diff-loading":x(o).fileDiffLoading.value,closable:"",onOpen:x(cr),onBack:V[70]||(V[70]=pe=>{Ls.value="list",js.value=null,x(o).clearFileDiff()}),onClose:x(ps)},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen","onClose"])):K.value==="toolDiff"&&x(fs)?(g(),he(Z6e,{key:5,target:x(fs),onClose:x(Ns)},null,8,["target","onClose"])):K.value==="turnDiff"&&ge.value?(g(),he(pIe,{key:6,changes:ge.value.changes,cwd:x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,onOpenFile:V[71]||(V[71]=pe=>x(ye)(pe)),onClose:ze},null,8,["changes","cwd"])):K.value==="file"?(g(),he(L6e,{key:7,file:x(oe),loading:x(H),error:x(Y),line:x(te)?.line,"download-url":x(ke),closable:"","external-actions":x(Se),"open-file":x(ye),onClose:x(ne),onOpenExternal:x(ce),onReveal:x(xe)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):ie("",!0)],10,tDe)):ie("",!0),Z(YPe,{class:"internal-build-fab"}),fe.value&&ue.value?(g(),he(ETe,{key:8,media:fe.value,src:ue.value,onClose:Re},null,8,["media","src"])):ie("",!0),ts.value?(g(),he(m9e,{key:9,models:x(o).models.value,current:x(o).status.value.modelId,"starred-ids":x(o).starredModelIds.value,loading:ui.value,unavailable:ss.value,onSelect:V[72]||(V[72]=pe=>Ue(pe)),onToggleStar:V[73]||(V[73]=pe=>x(o).toggleStarModel(pe)),onClose:V[74]||(V[74]=pe=>ts.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):ie("",!0),ns.value?(g(),he(oFe,{key:10,status:x(o).status.value,thinking:W.value,"plan-mode":x(o).planMode.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,"cost-usd":x(o).sessionCost.value,onClose:V[75]||(V[75]=pe=>ns.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):ie("",!0),To.value?(g(),he(WLe,{key:11,"browse-fs":x(o).browseFs,"get-fs-home":x(o).getFsHome,"default-path":x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,error:bo.value,onAdd:V[76]||(V[76]=pe=>Zt(pe)),onClose:pn},null,8,["browse-fs","get-fs-home","default-path","error"])):ie("",!0),Z(Sr,{name:"gload-fade"},{default:ve(()=>[x(o).initialized.value?ie("",!0):(g(),he(KRe,{key:0,issue:x(o).connectIssue.value},null,8,["issue"]))]),_:1}),x(o).initialized.value&&j.value&&!x(B)?(g(),he(BRe,{key:12,onComplete:le,onSkip:le})):ie("",!0),Z(mFe,{warnings:x(o).warnings.value,onDismiss:x(o).dismissWarning},null,8,["warnings","onDismiss"]),Z(_Fe),_("div",nDe,[r.value?(g(),he(Lk,{key:`${r.value.kind}:${r.value.ids.join(",")}`,duration:8e3,onDismiss:V[77]||(V[77]=pe=>r.value=null)},{default:ve(()=>[_("span",null,N(x(v)(r.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:r.value.ids.length})),1),_("button",{type:"button",class:"session-action-undo",onClick:Le},N(x(v)("sidebar.archiveToastUndo")),1)]),_:1})):ie("",!0),l.value?(g(),he(Lk,{key:`${l.value.sessionId}:${l.value.state}`,duration:l.value.state==="running"?6e4:4e3,onDismiss:V[78]||(V[78]=pe=>l.value=null)},{default:ve(()=>[Ve(N(x(v)(l.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):ie("",!0),a.value?(g(),he(Lk,{key:a.value,duration:5e3,onDismiss:V[79]||(V[79]=pe=>a.value=null)},{default:ve(()=>[Ve(N(a.value),1)]),_:1})):ie("",!0)]),x(b)?(g(),he(_Pe,{key:13})):ie("",!0),x(S)?(g(),he(cOe,{key:14,modelValue:I.value,"onUpdate:modelValue":V[80]||(V[80]=pe=>I.value=pe),groups:x(o).workspaceGroups.value,"active-workspace-id":x(o).activeWorkspaceId.value,"active-id":x(o).activeSessionId.value,"attention-by-session":x(o).attentionBySession.value,"attention-by-workspace":x(o).attentionByWorkspace.value,onSelect:V[81]||(V[81]=pe=>x(o).selectSession(pe)),onCreate:Ro,onCreateInWorkspace:V[82]||(V[82]=pe=>Vs(pe)),onAddWorkspace:V[83]||(V[83]=pe=>To.value=!0),onRename:V[84]||(V[84]=(pe,Xe)=>x(o).renameSession(pe,Xe)),onArchive:V[85]||(V[85]=pe=>cn(pe)),onDeleteWorkspace:V[86]||(V[86]=pe=>at(pe)),onLoadMore:V[87]||(V[87]=pe=>void x(o).loadMoreSessions(pe))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):ie("",!0),x(S)?(g(),he(bRe,{key:15,modelValue:T.value,"onUpdate:modelValue":V[88]||(V[88]=pe=>T.value=pe),status:x(o).status.value,thinking:x(o).thinking.value,models:x(o).models.value,"plan-mode":x(o).planMode.value,"goal-mode":x(o).goalMode.value,goal:x(o).goal.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,"color-scheme":x(o).colorScheme.value,"ui-font-size":x(o).uiFontSize.value,"auth-ready":x(o).authReady.value,"conversation-toc":x(o).conversationToc.value,"server-version":x(o).serverVersion.value,onPickModel:V[89]||(V[89]=pe=>wo()),onSetThinking:V[90]||(V[90]=pe=>x(o).setThinking(pe)),onTogglePlan:V[91]||(V[91]=pe=>x(o).togglePlanMode()),onToggleGoal:V[92]||(V[92]=pe=>x(o).toggleGoalMode()),onControlGoal:V[93]||(V[93]=pe=>x(o).controlGoal(pe)),onSetPermission:V[94]||(V[94]=pe=>x(o).setPermission(pe)),onSetColorScheme:V[95]||(V[95]=pe=>x(o).setColorScheme(pe)),onSetUiFontSize:V[96]||(V[96]=pe=>x(o).setUiFontSize(pe)),onSetConversationToc:V[97]||(V[97]=pe=>x(o).setConversationToc(pe)),onLogin:V[98]||(V[98]=()=>{T.value=!1,Ne()}),onLogout:x(o).logout},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","auth-ready","conversation-toc","server-version","onLogout"])):ie("",!0)],6)),Oo.value?(g(),he(sLe,{key:3,"color-scheme":x(o).colorScheme.value,accent:x(o).accent.value,"ui-font-size":x(o).uiFontSize.value,"auth-ready":x(o).authReady.value,"account-model":x(o).defaultModel.value,notify:x(o).notifyOnComplete.value,"notify-question":x(o).notifyOnQuestion.value,"notify-approval":x(o).notifyOnApproval.value,"notify-permission":x(o).notifyPermission.value,sound:x(o).soundOnComplete.value,"conversation-toc":x(o).conversationToc.value,config:x(o).config.value,models:x(o).models.value,"config-saving":In.value,"server-version":x(o).serverVersion.value,backend:x(o).backend.value,"initial-tab":sn.value,onSetColorScheme:V[99]||(V[99]=pe=>x(o).setColorScheme(pe)),onSetAccent:V[100]||(V[100]=pe=>x(o).setAccent(pe)),onSetUiFontSize:V[101]||(V[101]=pe=>x(o).setUiFontSize(pe)),onSetNotify:V[102]||(V[102]=pe=>x(o).setNotifyOnComplete(pe)),onSetNotifyQuestion:V[103]||(V[103]=pe=>x(o).setNotifyOnQuestion(pe)),onSetNotifyApproval:V[104]||(V[104]=pe=>x(o).setNotifyOnApproval(pe)),onSetSound:V[105]||(V[105]=pe=>x(o).setSoundOnComplete(pe)),onSetConversationToc:V[106]||(V[106]=pe=>x(o).setConversationToc(pe)),onUpdateConfig:V[107]||(V[107]=pe=>yt(pe)),onLogout:x(o).logout,onOpenOnboarding:V[108]||(V[108]=()=>{Oo.value=!1,J()}),onClose:V[109]||(V[109]=pe=>Oo.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","config","models","config-saving","server-version","backend","initial-tab","onLogout"])):ie("",!0),Z(VLe)]))}}),sDe=ht(oDe,[["__scopeId","data-v-adf9e9df"]]);qye();Bg(sDe).use(ao).mount("#app");export{dF as $,Ap as A,tO as B,Ko as C,eBe as D,F8 as E,Ie as F,K2 as G,Ve as H,Z as I,OF as J,CDe as K,nr as L,Ge as M,AR as N,TDe as O,IDe as P,LDe as Q,xg as R,id as S,Wl as T,$De as U,Z2 as V,EDe as W,nBe as X,NDe as Y,ZDe as Z,iDe as _,cE as a,as as a$,Xo as a0,N2 as a1,fDe as a2,P2 as a3,zE as a4,an as a5,Fd as a6,yDe as a7,iBe as a8,wDe as a9,mE as aA,fO as aB,yO as aC,bn as aD,vO as aE,gO as aF,Ld as aG,mO as aH,Mn as aI,B2 as aJ,zF as aK,g as aL,_R as aM,gDe as aN,Wn as aO,X8 as aP,mDe as aQ,Ag as aR,Es as aS,Dk as aT,q as aU,jDe as aV,HR as aW,ot as aX,xn as aY,bO as aZ,ADe as a_,SDe as aa,_De as ab,xDe as ac,VDe as ad,rBe as ae,yn as af,nR as ag,o0 as ah,ba as ai,Ll as aj,Do as ak,UDe as al,Fi as am,Ea as an,At as ao,RDe as ap,PDe as aq,jn as ar,bt as as,lR as at,Be as au,rF as av,Ut as aw,dO as ax,hO as ay,uo as az,hDe as b,Bce as b$,XDe as b0,Cp as b1,Ng as b2,YDe as b3,Ma as b4,IF as b5,lDe as b6,_o as b7,KF as b8,JDe as b9,ks as bA,vi as bB,oR as bC,KDe as bD,Ze as bE,iE as bF,kDe as bG,ZF as bH,BDe as bI,ve as bJ,FDe as bK,Fn as bL,Po as bM,qDe as bN,St as bO,vDe as bP,Vn as bQ,Is as bR,fBe as bS,pBe as bT,z9 as bU,hBe as bV,sce as bW,B9 as bX,Nb as bY,yBe as bZ,Hce as b_,rDe as ba,N as bb,Km as bc,MDe as bd,Nn as be,uDe as bf,aDe as bg,J8 as bh,HDe as bi,NF as bj,x as bk,oh as bl,sBe as bm,tBe as bn,ER as bo,bDe as bp,zDe as bq,GF as br,oBe as bs,ODe as bt,Gm as bu,uE as bv,Dg as bw,PR as bx,nT as by,Qk as bz,GDe as c,Xw as c0,Yw as c1,Jw as c2,bBe as c3,h1 as c4,Kc as c5,f1 as c6,Oce as c7,Rce as c8,wBe as c9,ht as cA,kBe as ca,uBe as cb,xBe as cc,_0 as cd,gi as ce,Xce as cf,Jce as cg,Jue as ch,dBe as ci,Kue as cj,Gue as ck,cBe as cl,Qw as cm,Qce as cn,ZA as co,TA as cp,rce as cq,p1 as cr,d1 as cs,mBe as ct,vBe as cu,aBe as cv,gBe as cw,Oe as cx,lBe as cy,gIe as cz,WDe as d,wa as e,cDe as f,Sr as g,$R as h,dDe as i,pDe as j,lr as k,eh as l,ds as m,Z1 as n,Fl as o,QDe as p,O as q,Bg as r,he as s,ie as t,C as u,_ as v,HO as w,DDe as x,WO as y,jR as z}; diff --git a/apps/pythinker-code/dist-web/assets/index-wWN4iTUD.css b/apps/pythinker-code/dist-web/assets/index-wWN4iTUD.css new file mode 100644 index 000000000..4955331e9 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/index-wWN4iTUD.css @@ -0,0 +1 @@ +.pythinker-logo[data-v-4349c96d]{display:block;object-fit:contain;flex:none}.size-sm[data-v-4349c96d]{height:28px;width:auto}.size-md[data-v-4349c96d]{height:44px;width:auto}.size-lg[data-v-4349c96d]{height:64px;width:auto}.size-xl[data-v-4349c96d]{height:96px;width:auto}.pythinker-logo.interactive[data-v-4349c96d]{cursor:pointer;user-select:none;-webkit-user-select:none;transition:transform .18s ease}.pythinker-logo.interactive[data-v-4349c96d]:hover{transform:scale(1.06)}@media(prefers-reduced-motion:reduce){.pythinker-logo.interactive[data-v-4349c96d]:hover{transform:none}}.ui-icon-button[data-v-4b23513f]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:1px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-4b23513f]:hover:not(:disabled){background:color-mix(in srgb,var(--color-text) 8%,transparent);color:var(--color-text)}.ui-icon-button[data-v-4b23513f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-4b23513f]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-4b23513f]{width:26px;height:26px;border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-4b23513f]{width:32px;height:32px}.ui-icon-button--lg[data-v-4b23513f]{width:44px;height:44px}.ui-icon-button[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-4b23513f] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-4b23513f] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-dialog__overlay[data-v-e1a908d4]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111773;animation:pythinker-dialog-overlay-in-e1a908d4 var(--duration-base) var(--ease-out)}@keyframes pythinker-dialog-overlay-in-e1a908d4{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-e1a908d4]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-e1a908d4]{width:min(440px,100%)}.ui-dialog--lg[data-v-e1a908d4]{width:min(640px,100%)}.ui-dialog--xl[data-v-e1a908d4]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-e1a908d4]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--flush .ui-dialog__body[data-v-e1a908d4]{padding:0}.ui-dialog__head[data-v-e1a908d4]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-e1a908d4]{flex:1;min-width:0}.ui-dialog__title[data-v-e1a908d4]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-e1a908d4]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-e1a908d4]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-e1a908d4]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-e1a908d4]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.sd-head[data-v-0c6780a0]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.sd-search-icon[data-v-0c6780a0]{flex:none;color:var(--color-text-muted)}.sd-input[data-v-0c6780a0]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-lg);color:var(--color-text);background:none;border:none;outline:none;padding:var(--space-1) 0}.sd-input[data-v-0c6780a0]::placeholder{color:var(--color-text-muted)}.sd-list[data-v-0c6780a0]{height:420px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.sd-row[data-v-0c6780a0]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-0c6780a0]:hover,.sd-row.on[data-v-0c6780a0]{background:var(--color-surface-sunken)}.sd-row.active .sd-title[data-v-0c6780a0]{color:var(--color-accent-hover)}.sd-row-ws[data-v-0c6780a0]{flex-direction:row;align-items:center;gap:var(--space-2)}.sd-ws-name[data-v-0c6780a0]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-0c6780a0]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-section[data-v-0c6780a0]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-0c6780a0]{font-weight:var(--weight-regular)}.sd-section[data-v-0c6780a0]:first-child{padding-top:var(--space-1)}.sd-section[data-v-0c6780a0]:not(:first-child){margin-top:var(--space-1);border-top:1px solid var(--color-line)}.sd-meta[data-v-0c6780a0]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-folder[data-v-0c6780a0]{flex:none;color:var(--color-text-muted)}.sd-ws[data-v-0c6780a0]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-time[data-v-0c6780a0]{flex:none;font-family:var(--font-mono);color:var(--color-text-faint)}.sd-title[data-v-0c6780a0]{min-width:0;font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-snippet[data-v-0c6780a0]{min-width:0;font-size:var(--text-sm);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-0c6780a0] mark,.sd-snippet[data-v-0c6780a0] mark,.sd-ws-name[data-v-0c6780a0] mark,.sd-ws-path[data-v-0c6780a0] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-0c6780a0]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.sd-hint[data-v-0c6780a0]{font-size:var(--text-xs);color:var(--color-text-muted)}.ui-spinner[data-v-9ef9c2db]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--sm[data-v-9ef9c2db]{width:14px;height:14px}.ui-spinner--md[data-v-9ef9c2db]{width:18px;height:18px}.ui-spinner--lg[data-v-9ef9c2db]{width:28px;height:28px}.ui-spinner__svg[data-v-9ef9c2db]{width:100%;height:100%;animation:ui-spinner-rotate-9ef9c2db .85s linear infinite}.ui-spinner__track[data-v-9ef9c2db]{fill:none;stroke:var(--color-line);stroke-width:2.2}.ui-spinner__arc[data-v-9ef9c2db]{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes ui-spinner-rotate-9ef9c2db{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ui-spinner__svg[data-v-9ef9c2db]{animation-duration:1.8s}}.ui-badge[data-v-07bffc39]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:1px solid transparent}.ui-badge--md[data-v-07bffc39]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-07bffc39]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-07bffc39]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-07bffc39]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-07bffc39]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-07bffc39]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-07bffc39]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-07bffc39]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-07bffc39]{background:var(--color-text);color:var(--color-bg)}.ui-menu[data-v-54950237]{min-width:180px;padding:var(--space-1);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column}.ui-menu-item[data-v-826e1b9c]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:6px 10px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-826e1b9c]:hover:not(:disabled){background:var(--color-surface-sunken)}.ui-menu-item[data-v-826e1b9c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-826e1b9c]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-826e1b9c]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.ui-menu-item.is-danger[data-v-826e1b9c]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-826e1b9c]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-826e1b9c] svg{width:14px;height:14px;flex:none}.ui-menu-item--lg[data-v-826e1b9c]{min-height:44px;padding:12px 14px;font-size:var(--text-base)}.ui-menu-sep[data-v-826e1b9c]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-e9a227e9]{display:contents}.ui-tip__bubble[data-v-e9a227e9]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-e9a227e9]{opacity:1}.ui-input[data-v-609588ac]{width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-609588ac]{height:38px}.ui-input--sm[data-v-609588ac]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-609588ac]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-609588ac]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-609588ac]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-609588ac]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-609588ac]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-609588ac]{border-color:var(--color-danger)}.ui-input.has-error[data-v-609588ac]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.popover[data-v-fb2e6af0]{position:fixed;z-index:200;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow-y:auto;padding:2px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);box-shadow:0 8px 24px color-mix(in srgb,var(--ink) 18%,transparent)}.emoji-picker[data-v-b79cd42c]{width:min(320px,calc(100vw - 40px));max-height:min(440px,calc(100vh - 48px));padding:var(--space-3);overflow-y:auto;background:var(--color-surface-raised)}.emoji-actions[data-v-b79cd42c]{display:flex;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-2)}.emoji-actions button[data-v-b79cd42c]{border:0;background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);cursor:pointer}.emoji-actions button[data-v-b79cd42c]:hover{color:var(--color-text)}.emoji-group h3[data-v-b79cd42c]{margin:var(--space-3) 0 var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.emoji-grid[data-v-b79cd42c]{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:var(--space-1)}.emoji[data-v-b79cd42c]{display:grid;place-items:center;min-width:32px;min-height:32px;border:0;border-radius:var(--radius-sm);background:transparent;font-size:var(--text-lg);cursor:pointer}.emoji[data-v-b79cd42c]:hover{background:var(--color-hover)}.emoji[data-v-b79cd42c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.emoji-empty[data-v-b79cd42c]{padding:var(--space-5) 0;color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.se[data-v-f72e274b]{display:block;margin:0;padding:8px var(--space-2);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-f72e274b]:hover{background:var(--sb-hover, var(--color-surface-sunken));color:var(--color-text)}.se.on[data-v-f72e274b]{background:var(--color-selected);color:var(--color-text)}.row[data-v-f72e274b]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-f72e274b]{display:flex;align-items:center;flex:1;min-width:0}.session-emoji[data-v-f72e274b]{flex:none;margin-right:var(--space-1);font-size:var(--text-base);line-height:1}.lead[data-v-f72e274b]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-f72e274b]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-f72e274b]{color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts[data-v-f72e274b]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-f72e274b]{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:flex-end;min-width:26px}.act .kebab[data-v-f72e274b]{position:absolute;right:0;top:50%;transform:translateY(-50%);visibility:hidden}.se:hover .act .kebab[data-v-f72e274b],.act:has(.kebab.open) .kebab[data-v-f72e274b]{visibility:visible}.se:hover .act .ts[data-v-f72e274b],.act:has(.kebab.open) .ts[data-v-f72e274b]{visibility:hidden}.kebab.open[data-v-f72e274b]{color:var(--color-text);background:var(--sb-hover, var(--color-surface-sunken))}.menu[data-v-f72e274b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-time[data-v-f72e274b]{padding:6px 10px;color:var(--color-text-faint);font-family:var(--font-mono);font-size:var(--text-xs);cursor:default;user-select:text}.rename-wrap[data-v-f72e274b]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-f72e274b]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none}.rename-wrap.generating .rename-input[data-v-f72e274b]{visibility:hidden}.gen-title-btn[data-v-f72e274b]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-f72e274b]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-f72e274b]{margin:0;border-radius:var(--radius-sm);padding:8px calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px))}.sessions .se .rename-wrap[data-v-f72e274b]{border-radius:var(--radius-sm)}.sessions .se .rename-input[data-v-f72e274b]{font-family:var(--sans)}.sessions .se .kebab[data-v-f72e274b]{border-radius:var(--radius-sm)}.group.dragging[data-v-4e9d3a01]{opacity:.45}.group-sessions[data-v-4e9d3a01]{display:grid;grid-template-rows:minmax(0,1fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-4e9d3a01]{grid-template-rows:minmax(0,0fr)}.group-sessions-inner[data-v-4e9d3a01]{min-height:0;overflow:hidden}.gh[data-v-4e9d3a01]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-4e9d3a01]:active{cursor:grabbing}.gh[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.gh-top[data-v-4e9d3a01]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-4e9d3a01]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-4e9d3a01]{font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-4e9d3a01]{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;background:var(--color-sidebar-bg);opacity:0;pointer-events:none}.gh-actions[data-v-4e9d3a01]:after{content:"";position:absolute;inset:0;z-index:0;border-radius:var(--radius-sm);background:transparent}.gh:hover .gh-actions[data-v-4e9d3a01]:after{background:var(--sb-hover, var(--color-surface-sunken))}.gh-actions[data-v-4e9d3a01]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-4e9d3a01],.gh:focus-within .gh-actions[data-v-4e9d3a01],.gh-actions.open[data-v-4e9d3a01]{opacity:1;pointer-events:auto}.gh-more.open[data-v-4e9d3a01]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-4e9d3a01]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.show-more[data-v-4e9d3a01]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-4e9d3a01]:hover{background:var(--sb-hover, var(--color-surface-sunken))}.show-more[data-v-4e9d3a01]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-lead[data-v-4e9d3a01]{width:var(--sb-gutter);flex:none}.show-more-label[data-v-4e9d3a01]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-4e9d3a01]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-4e9d3a01]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-4e9d3a01]{color:var(--faint)}.gh-add[data-v-4e9d3a01]:hover{color:var(--dim)}.ui-kbd[data-v-e5cfdeb4]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-e5cfdeb4]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--color-line);border-bottom-width:2px;border-radius:var(--radius-xs);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:11px;line-height:1}.pinned[data-v-c0d7fd9d]{padding-bottom:var(--space-2);border-bottom:1px solid var(--color-line)}.pinned-header[data-v-c0d7fd9d]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--sb-inset);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.pin-row.dragging[data-v-c0d7fd9d]{opacity:.45}.side[data-v-b61c245a]{background:var(--color-sidebar-bg);display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover)}.side.no-anim[data-v-b61c245a]{transition:none}.side.collapsed[data-v-b61c245a]{visibility:hidden}.col[data-v-b61c245a]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:1px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-b61c245a]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-b61c245a]{padding-left:80px;-webkit-app-region:drag}.side.macos-desktop .ch-brand[data-v-b61c245a]{display:none}.ch-logo[data-v-b61c245a]{height:28px;width:28px;object-fit:contain;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-b61c245a]:hover{transform:scale(1.08)}.ch-brand[data-v-b61c245a]{display:flex;align-items:center;gap:8px;min-width:0;flex:1;user-select:none;touch-action:none}.ch-name[data-v-b61c245a]{font-size:var(--ui-font-size);font-weight:500;line-height:22px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container sidebar-col (max-width: 250px){.ch-name[data-v-b61c245a]{display:none}}.btn-wrap[data-v-b61c245a]{display:flex;align-items:center;gap:8px;padding:0 var(--sb-inset)}.btn-new-chat[data-v-b61c245a]{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-new-chat[data-v-b61c245a]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-b61c245a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-b61c245a]{flex:none}.btn-new-chat span[data-v-b61c245a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-tabs[data-v-b61c245a]{display:flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--sb-inset) var(--space-2)}.status-tabs>button[data-v-b61c245a]:not(.status-view-switcher){min-height:28px;padding:0 var(--space-3);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font:inherit;font-size:var(--text-xs);cursor:pointer}.status-tabs>button.active[data-v-b61c245a]{background:var(--color-selected);color:var(--color-text)}.status-view-switcher[data-v-b61c245a]{margin-left:auto}.search-wrap[data-v-b61c245a]{padding:0 var(--sb-inset);position:relative;z-index:1;background:var(--color-sidebar-bg);border-bottom:1px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.search-wrap--scrolled[data-v-b61c245a]{border-bottom-color:var(--line);box-shadow:var(--shadow-sm)}.search[data-v-b61c245a]{display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-b61c245a]:hover{background:var(--sb-hover)}.search[data-v-b61c245a]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-b61c245a]{flex:none}.search-input[data-v-b61c245a]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-b61c245a]{flex:1;overflow-y:auto;padding:var(--space-3) var(--sb-inset);min-height:0}.sessions[data-v-b61c245a]::-webkit-scrollbar{width:4px}.sessions[data-v-b61c245a]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-b61c245a]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:var(--radius-full)}.sessions[data-v-b61c245a]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-b61c245a]{flex:none;padding:var(--space-2) var(--sb-inset);border-top:1px solid var(--line)}.btn-settings[data-v-b61c245a]{display:flex;align-items:center;gap:12px;width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:var(--leading-tight);cursor:pointer;text-align:left}.btn-settings[data-v-b61c245a]:hover{background:var(--sb-hover)}.btn-settings[data-v-b61c245a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-settings svg[data-v-b61c245a]{flex:none}.btn-settings span[data-v-b61c245a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-label[data-v-b61c245a]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-regular);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-b61c245a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-section-toggle[data-v-b61c245a]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-b61c245a],.side-section-label:focus-within .side-section-toggle[data-v-b61c245a]{opacity:1}.side-section-toggle[data-v-b61c245a]:hover{color:var(--dim)}.side-section-toggle svg[data-v-b61c245a]{width:13px;height:13px}.side-section-actions[data-v-b61c245a]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-b61c245a]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-b61c245a]{box-shadow:inset 0 -2px 0 var(--color-accent)}.empty[data-v-b61c245a]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-b61c245a],.gh-menu[data-v-b61c245a],.section-menu[data-v-b61c245a]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.section-menu-check[data-v-b61c245a]{display:inline-flex;flex:none;width:14px}.section-menu-label[data-v-b61c245a]{padding:var(--space-2) var(--space-3) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ws-dir[data-v-b61c245a]{display:block;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);cursor:pointer;position:relative;user-select:none}.ws-dir[data-v-b61c245a]:hover{background:var(--sb-hover, var(--color-hover))}.ws-dir.on[data-v-b61c245a]{background:var(--color-selected)}.ws-dir+.ws-dir[data-v-b61c245a]{margin-top:var(--space-05)}.ws-dir-row[data-v-b61c245a]{display:flex;align-items:center;gap:var(--sb-gap);min-width:0;position:relative}.ws-dir-icon[data-v-b61c245a]{flex:none;color:var(--color-text-muted)}.ws-dir-name[data-v-b61c245a]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-rename[data-v-b61c245a]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-sm);padding:2px 5px;outline:none}.ws-dir-sub[data-v-b61c245a]{margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-act[data-v-b61c245a]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.ws-dir:hover .ws-dir-act[data-v-b61c245a],.ws-dir:focus-within .ws-dir-act[data-v-b61c245a],.ws-dir-act.open[data-v-b61c245a]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh[data-v-b61c245a]{display:flex;align-items:center;gap:var(--sb-gap);padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);user-select:none;position:relative;cursor:pointer}.done-gh[data-v-b61c245a]:hover{background:var(--sb-hover, var(--color-hover))}.done-gh-folder[data-v-b61c245a]{flex:none;color:var(--color-text-muted)}.done-gh-name[data-v-b61c245a]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.done-gh-count[data-v-b61c245a]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.done-gh-more[data-v-b61c245a]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%);opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh:hover .done-gh-more[data-v-b61c245a],.done-gh:focus-within .done-gh-more[data-v-b61c245a],.done-gh-more.open[data-v-b61c245a]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh:hover .done-gh-count[data-v-b61c245a],.done-gh:focus-within .done-gh-count[data-v-b61c245a]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh-sessions[data-v-b61c245a]{padding-bottom:var(--space-1)}.folder-drop-overlay[data-v-b61c245a]{position:absolute;inset:0;z-index:var(--z-dropdown);display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-b61c245a]{opacity:1;visibility:visible}.folder-drop-card[data-v-b61c245a]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:1px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-b61c245a]{flex:none}.folder-drop-card span[data-v-b61c245a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-button[data-v-738fde35]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:1px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-738fde35]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-738fde35]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-738fde35]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-738fde35]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-738fde35]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-738fde35]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-738fde35]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-738fde35] svg{flex:none}.ui-button__content[data-v-738fde35] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-738fde35]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-738fde35]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-738fde35]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-738fde35]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ui-button--ghost[data-v-738fde35]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-738fde35]:not(:disabled):hover{background:var(--color-surface-sunken);color:var(--color-text)}.ui-button--danger[data-v-738fde35]{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-738fde35]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-738fde35]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-738fde35]:not(:disabled):hover{background:var(--color-danger);color:var(--surface-light);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-738fde35]{opacity:.7}.ui-button .ui-button__spinner[data-v-738fde35]{flex:none;color:inherit}.ui-button__spinner[data-v-738fde35] .ui-spinner__track{opacity:.35}.ui-check[data-v-7344a446]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-7344a446]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-7344a446]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-7344a446]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:1.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-7344a446]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-7344a446]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-7344a446]{width:12px;height:12px}.ui-check__label[data-v-7344a446]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ui-empty[data-v-9dd6e8c0]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-9dd6e8c0]{color:var(--color-text-faint)}.ui-empty__icon[data-v-9dd6e8c0] svg{width:48px;height:48px}.ui-empty__title[data-v-9dd6e8c0]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-9dd6e8c0]{font-size:var(--text-sm);color:var(--color-text-muted)}.filter-select[data-v-6bf585f9]{position:relative;min-width:0}.filter-select__trigger[data-v-6bf585f9]{min-height:32px;display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.filter-select__trigger[data-v-6bf585f9]:hover{background:var(--color-hover)}.filter-select__trigger[data-v-6bf585f9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.filter-select__label[data-v-6bf585f9]{color:var(--color-text-muted)}.filter-select__value[data-v-6bf585f9]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filter-select__menu[data-v-6bf585f9]{position:absolute;top:calc(100% + var(--space-1));right:0;z-index:var(--z-dropdown)}.filter-select__check[data-v-6bf585f9]{width:16px;flex:none}.sa-dot[data-v-6bf585f9]{flex:none;width:8px;height:8px;border-radius:var(--radius-full)}.sa-dot--open[data-v-6bf585f9]{background:var(--color-success)}.sa-dot--done[data-v-6bf585f9]{background:var(--color-done)}.multi-select[data-v-887f9b9a]{position:relative;min-width:0}.multi-select__trigger[data-v-887f9b9a]{min-height:32px;max-width:320px;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font:inherit;cursor:pointer}.multi-select__trigger[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__trigger[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__placeholder[data-v-887f9b9a]{padding:0 var(--space-1);color:var(--color-text-muted)}.multi-select__tag[data-v-887f9b9a]{min-width:0;display:inline-flex;align-items:center;gap:var(--space-1);padding:2px 6px;border-radius:var(--radius-full);background:var(--color-surface-sunken)}.multi-select__tag>span[data-v-887f9b9a]:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__remove[data-v-887f9b9a]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:var(--radius-full)}.multi-select__remove[data-v-887f9b9a]{padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.multi-select__remove[data-v-887f9b9a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.multi-select__more[data-v-887f9b9a]{color:var(--color-text-muted)}.multi-select__menu[data-v-887f9b9a]{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:var(--z-dropdown);width:min(320px,calc(100vw - var(--space-4)))}.multi-select__search[data-v-887f9b9a]{padding:var(--space-1)}.multi-select__separator[data-v-887f9b9a]{height:1px;margin:var(--space-1) 0;background:var(--color-line)}.multi-select__options[data-v-887f9b9a]{max-height:240px;overflow:auto}.multi-select__option[data-v-887f9b9a]{min-height:32px;display:flex;align-items:center;gap:var(--space-2);padding:6px 10px;border-radius:var(--radius-sm);color:var(--color-text);font-size:var(--text-base);cursor:pointer}.multi-select__option[data-v-887f9b9a]:hover{background:var(--color-hover)}.multi-select__option.active[data-v-887f9b9a]{background:var(--color-selected)}.multi-select__name[data-v-887f9b9a]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-select__empty[data-v-887f9b9a]{padding:var(--space-3);color:var(--color-text-muted);text-align:center}.session-admin[data-v-264fe89e]{grid-column:3 / -1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text)}.session-admin__header[data-v-264fe89e]{min-height:var(--panel-head-h);display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-4);border-bottom:.5px solid var(--color-line)}.session-admin__header h1[data-v-264fe89e]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium)}.session-admin__header p[data-v-264fe89e]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__body[data-v-264fe89e]{width:min(100%,var(--p-table-max));min-height:0;margin:0 auto;padding:var(--space-5);overflow:auto}.session-admin__filters[data-v-264fe89e]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-4)}.session-admin__query[data-v-264fe89e]{width:min(260px,100%)}.session-admin__batch[data-v-264fe89e]{min-height:44px;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-bottom:0;border-radius:var(--radius-md) var(--radius-md) 0 0;background:var(--color-surface);font-size:var(--text-sm)}.session-admin__table-wrap[data-v-264fe89e]{min-width:0;overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.session-admin__batch+.session-admin__table-wrap[data-v-264fe89e]{border-radius:0 0 var(--radius-md) var(--radius-md)}.session-admin__table[data-v-264fe89e]{width:100%;border-collapse:collapse;font-size:var(--text-sm)}.session-admin__table th[data-v-264fe89e],.session-admin__table td[data-v-264fe89e]{padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line);text-align:left;vertical-align:middle}.session-admin__table th[data-v-264fe89e]{background:var(--color-surface);color:var(--color-text-muted);font-weight:var(--weight-medium);white-space:nowrap}.session-admin__table tbody tr[data-v-264fe89e]:hover{background:var(--color-hover)}.session-admin__table tbody tr:last-child td[data-v-264fe89e]{border-bottom:0}.session-admin__check[data-v-264fe89e]{width:32px}.session-admin__back-icon[data-v-264fe89e]{transform:rotate(180deg)}.session-admin__status[data-v-264fe89e]{display:inline-flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__status.done[data-v-264fe89e]{color:var(--color-success)}.session-admin__title[data-v-264fe89e],.session-admin__prompt[data-v-264fe89e]{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-admin__title-button[data-v-264fe89e]{max-width:100%;overflow:hidden;border:0;background:transparent;color:inherit;font:inherit;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.session-admin__title-button[data-v-264fe89e]:hover{text-decoration:underline;text-underline-offset:3px}.session-admin__title-button[data-v-264fe89e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.session-admin__rename[data-v-264fe89e]{width:100%;min-width:140px;border:1px solid var(--color-accent);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text);font:inherit}.session-admin__actions[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-1);white-space:nowrap}.session-admin__updated[data-v-264fe89e]{white-space:nowrap;color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs)}.session-admin__state[data-v-264fe89e]{min-height:220px;display:grid;place-items:center}.session-admin__sr-only[data-v-264fe89e]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.session-admin__pager[data-v-264fe89e]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding-top:var(--space-3);color:var(--color-text-muted);font-size:var(--text-sm)}.session-admin__pager>div[data-v-264fe89e]{display:flex;align-items:center;gap:var(--space-2)}@media(max-width:640px){.session-admin[data-v-264fe89e]{grid-column:1}.session-admin__body[data-v-264fe89e],.session-admin__header[data-v-264fe89e]{padding:var(--space-3)}}.rh[data-v-3b8c5b6c]{width:4px;flex:none;cursor:col-resize;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-3b8c5b6c]{position:absolute;inset:0;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-3b8c5b6c],.rh.dragging .rh-bar[data-v-3b8c5b6c]{background:var(--color-accent)}.kw-dot[data-v-0c65e524]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-0c65e524]{background:var(--color-success)}.kw-dot--error[data-v-0c65e524]{background:var(--color-danger)}.kw-dot--suspended[data-v-0c65e524]{background:var(--color-warning)}.kw-dot--running[data-v-0c65e524]{background:var(--color-accent);animation:kw-dot-pulse-0c65e524 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-0c65e524{0%{box-shadow:0 0 color-mix(in srgb,var(--color-accent) 40%,transparent)}to{box-shadow:0 0 0 6px transparent}}.box[data-v-afffc498]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.box.err[data-v-afffc498]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.box.stacked[data-v-afffc498]{border:none;border-radius:0}.box.stacked .bh[data-v-afffc498]{border-radius:0}.box.stack-middle[data-v-afffc498],.box.stack-last[data-v-afffc498]{border-top:1px solid var(--color-line)}.bh[data-v-afffc498]{display:flex;align-items:center;gap:8px;min-height:30px;padding:0 11px;cursor:pointer;font:var(--text-sm) var(--font-mono);color:var(--color-text)}.box.open .bh[data-v-afffc498],.bh[data-v-afffc498]:hover{background:var(--color-surface-sunken)}.box.err .bh[data-v-afffc498]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.box.err .bh[data-v-afffc498]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.gl[data-v-afffc498]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.bh-text[data-v-afffc498]{display:flex;align-items:baseline;gap:inherit;flex:1;min-width:0}.a[data-v-afffc498]{color:var(--color-text);font-weight:var(--weight-medium);flex:none}.p[data-v-afffc498]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-afffc498]{margin-left:auto;color:var(--color-text-muted);font-size:var(--text-xs);display:flex;align-items:center;gap:6px;flex:none}.tm[data-v-afffc498]{color:var(--color-text-faint)}.chip[data-v-afffc498-s]{color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);flex:none}.status[data-v-afffc498]{display:inline-flex;align-items:center;flex:none}.status.ok[data-v-afffc498]{color:var(--color-success)}.status.error[data-v-afffc498]{color:var(--color-danger)}.bb[data-v-afffc498]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.bb.open[data-v-afffc498]{grid-template-rows:minmax(0,1fr)}.bb-pad[data-v-afffc498]{min-height:0;overflow:hidden;padding:var(--space-2) var(--space-3) var(--space-3);background:var(--color-surface-sunken);border-top:1px solid var(--color-line);color:var(--color-text);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.box.mob[data-v-afffc498]{margin:0}.at-open[data-v-648f4e11]{flex:none;background:none;border:1px solid var(--color-line);border-radius:var(--radius-xs);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);padding:1px 7px;cursor:pointer}.at-open[data-v-648f4e11]:hover{color:var(--color-text);background:var(--color-surface-sunken)}.at-type[data-v-648f4e11]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-bottom:6px}.at-task[data-v-648f4e11]{color:var(--color-text);white-space:pre-wrap;word-break:break-word}.at-task+.bb-code[data-v-648f4e11]{margin-top:10px}.bb-code[data-v-648f4e11]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md)}.chip[data-v-53896919]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.au-dismissed[data-v-53896919]{color:var(--color-text-muted);font:italic var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-list[data-v-53896919]{display:flex;flex-direction:column;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.au-block[data-v-53896919]{padding:4px 0}.au-block+.au-block[data-v-53896919]{margin-top:4px;padding-top:10px;border-top:1px dashed var(--color-line)}.au-q[data-v-53896919]{display:flex;align-items:baseline;gap:8px;margin-bottom:6px}.au-hdr[data-v-53896919]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:0 6px;flex:none}.au-qtext[data-v-53896919]{color:var(--color-text);font-weight:var(--weight-medium)}.au-opts[data-v-53896919]{display:flex;flex-direction:column;gap:4px}.au-opt[data-v-53896919]{display:flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid var(--color-line);border-radius:var(--radius-md);color:var(--color-text-faint)}.au-opt.sel[data-v-53896919]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.au-glyph[data-v-53896919]{font:var(--text-base) var(--font-mono);color:var(--color-text-faint);width:14px;text-align:center;flex:none}.au-opt.sel .au-glyph[data-v-53896919]{color:var(--color-accent-hover)}.au-label[data-v-53896919]{color:inherit}.au-desc[data-v-53896919]{color:var(--color-text-faint);font-size:var(--text-xs);margin-left:2px}.au-opt.sel .au-desc[data-v-53896919]{color:var(--color-text-muted)}.au-raw[data-v-53896919]{padding:11px 13px;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);font:var(--text-sm)/1.65 var(--font-mono);white-space:pre-wrap;word-break:break-word}.tool-output-block[data-v-262bbea0]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised)}.tool-output-block.scroll[data-v-262bbea0]{max-height:calc(var(--tool-output-visible-lines) * 1lh);overflow-y:auto;scrollbar-gutter:stable}.bb-empty[data-v-262bbea0]{color:var(--color-text-muted);font-style:italic}.bash-command[data-v-7768b9f1]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);white-space:pre-wrap}.diff-lines[data-v-f456050c]{padding:4px 0 12px;font-size:var(--ui-font-size);line-height:1.5;-webkit-overflow-scrolling:touch;width:max-content;min-width:100%}.dl[data-v-f456050c]{display:flex;align-items:flex-start;min-height:18px;white-space:pre;width:100%}.dl-gutter[data-v-f456050c]{flex:none;width:40px;padding:0 6px;text-align:right;color:var(--faint, #aeb4bc);background:var(--panel, #fafbfc);user-select:none;border-right:1px solid var(--line2, #eef1f4);font-variant-numeric:tabular-nums}.dl-gutter.new[data-v-f456050c]{border-right:1px solid var(--line, #e7eaee)}.dl-sign[data-v-f456050c]{flex:none;width:16px;text-align:center;color:var(--muted);user-select:none}.dl-text[data-v-f456050c]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.dl-add[data-v-f456050c]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.dl-add .dl-sign[data-v-f456050c]{color:var(--color-success)}.dl-del[data-v-f456050c]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.dl-del .dl-sign[data-v-f456050c]{color:var(--color-danger)}.dl-hunk[data-v-f456050c]{background:var(--panel2, #f3f5f8)}.dl-hunk .hunk-text[data-v-f456050c]{flex:1;padding:1px 12px;color:var(--muted, #8b929b);font-style:normal}@media(max-width:640px){.diff-lines[data-v-f456050c]{overflow-x:auto;font-size:var(--ui-font-size)}}.tl-name[data-v-85689153]{color:var(--color-text);font-weight:var(--weight-medium);flex:none}.tl-file[data-v-85689153]{color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-file[data-v-85689153]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-85689153]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-85689153]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-85689153]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-add[data-v-85689153]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-del[data-v-85689153]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.diffbar[data-v-85689153]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-85689153]{background:var(--color-success)}.seg-del[data-v-85689153]{background:var(--color-danger)}.diff-wrap[data-v-85689153]{margin-top:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);overflow-x:auto}.bb-summary[data-v-26ca25c1]{color:var(--color-text);border-bottom:1px dashed var(--color-line);padding-bottom:6px;margin-bottom:6px;word-break:break-all}.chip[data-v-26ca25c1]{color:var(--color-text-muted);font-size:var(--text-xs);flex:none}.file-list[data-v-6193bdd4]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-6193bdd4]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-6193bdd4]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-6193bdd4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill[data-v-967c8271]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-pill.pill-active[data-v-967c8271]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-967c8271]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-967c8271]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-budget[data-v-967c8271]{color:var(--color-text-muted)}.match-list[data-v-2e67b1f9]{display:flex;flex-direction:column;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);padding:var(--space-1);max-height:19.2lh;overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-2e67b1f9]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:var(--text-xs);line-height:1.6;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-2e67b1f9]{cursor:pointer}.match-row.link[data-v-2e67b1f9]:hover{background:var(--color-hover)}.match-row[data-v-2e67b1f9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-2e67b1f9]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-2e67b1f9]{color:var(--color-accent)}.mtext[data-v-2e67b1f9]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-tool[data-v-25ffa7b7]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-25ffa7b7]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-25ffa7b7]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-video-button[data-v-25ffa7b7]{position:relative;display:block}.media-video-tile[data-v-25ffa7b7]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-25ffa7b7]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-image[data-v-25ffa7b7]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-audio[data-v-25ffa7b7]{max-width:100%;border-radius:var(--radius-md)}.dynamic-workflow-card[data-v-83b861be]{margin:0;background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.dynamic-workflow-card.err[data-v-83b861be]{border-color:color-mix(in srgb,var(--color-danger) 25%,var(--bg))}.head[data-v-83b861be]{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:0 11px;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.head[data-v-83b861be]:hover,.dynamic-workflow-card.open>.head[data-v-83b861be]{background:var(--color-surface-sunken);color:var(--color-text)}.dynamic-workflow-card.err>.head[data-v-83b861be]{background:color-mix(in srgb,var(--color-danger) 4%,var(--bg))}.dynamic-workflow-card.err>.head[data-v-83b861be]:hover{background:color-mix(in srgb,var(--color-danger) 7%,var(--bg))}.head[data-v-83b861be]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-83b861be]{color:var(--color-text-faint);flex:none}.title[data-v-83b861be]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-83b861be]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-83b861be]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-83b861be]{margin-left:auto;display:flex;align-items:center;gap:8px;flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-83b861be]{display:inline-flex;align-items:center;flex:none}.status[data-v-83b861be]:has(>svg){color:var(--color-success)}.err .status[data-v-83b861be]:has(>svg){color:var(--color-danger)}.chip[data-v-83b861be]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-83b861be]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-83b861be]{margin-left:2px;color:var(--color-text-faint);flex:none}.body[data-v-83b861be]{border-top:1px solid var(--color-line);background:var(--color-surface-sunken)}.overview[data-v-83b861be]{padding:9px 11px 8px;border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.overview-line[data-v-83b861be]{display:flex;align-items:baseline;gap:8px}.big[data-v-83b861be]{font-family:var(--font-mono);font-weight:var(--weight-medium);color:var(--color-text);font-size:15px}.lbl[data-v-83b861be]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-83b861be]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:8px 0 4px;gap:2px}.seg>span[data-v-83b861be]{height:100%;border-radius:var(--radius-full);min-width:3px}.s-ok[data-v-83b861be]{background:var(--color-success)}.s-run[data-v-83b861be]{background:var(--color-accent)}.s-warn[data-v-83b861be]{background:var(--color-warning)}.s-fail[data-v-83b861be]{background:var(--color-danger)}.s-queue[data-v-83b861be]{background:var(--color-line)}.legend[data-v-83b861be]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-83b861be]{display:inline-flex;align-items:center;gap:5px;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.lg-dot[data-v-83b861be]{width:6px;height:6px;border-radius:var(--radius-full)}.member[data-v-83b861be]{position:relative;border-bottom:1px solid color-mix(in srgb,var(--color-line) 70%,transparent)}.member-saved[data-v-83b861be]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);cursor:pointer}.member-saved[data-v-83b861be]:hover{background:var(--color-hover);color:var(--color-text-muted)}.member-saved[data-v-83b861be]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-saved-car[data-v-83b861be]{color:var(--color-text-faint)}.member[data-v-83b861be]:last-child{border-bottom:none}.member-head[data-v-83b861be]{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:0 11px;border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-83b861be]:hover,.member.open .member-head[data-v-83b861be]{background:color-mix(in srgb,var(--color-surface) 55%,var(--bg))}.member-head[data-v-83b861be]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.row-dot[data-v-83b861be]{flex:none}.mname[data-v-83b861be]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-83b861be]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mphase[data-v-83b861be]{flex:none;margin-left:auto;font:var(--text-xs) var(--font-mono);color:var(--color-text-faint)}.phase-completed .mphase[data-v-83b861be]{color:var(--color-success)}.phase-failed .mphase[data-v-83b861be]{color:var(--color-danger)}.phase-working .mphase[data-v-83b861be]{color:var(--color-accent)}.phase-suspended .mphase[data-v-83b861be]{color:var(--color-warning)}.mcar[data-v-83b861be]{margin-left:4px;color:var(--color-text-faint);flex:none}.member-body[data-v-83b861be]{padding:4px 11px 10px 31px;color:var(--color-text-muted);font-size:var(--text-xs);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-83b861be]{padding:6px 11px 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-83b861be]{padding:9px 11px 10px;color:var(--color-text);font:var(--text-xs)/1.6 var(--font-mono);white-space:pre-wrap;word-break:break-word}.plan-review[data-v-2ff075e5]{color:var(--color-text-muted)}.plan-md[data-v-2ff075e5]{margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-path[data-v-2ff075e5]{display:grid;gap:var(--space-1);width:100%;margin-top:var(--space-2);padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text-muted);font:inherit;text-align:left;cursor:pointer}.plan-path[data-v-2ff075e5]:hover{background:var(--color-hover)}.plan-path[data-v-2ff075e5]:focus-visible{outline:var(--p-focus-ring)}.plan-path-value[data-v-2ff075e5]{color:var(--color-accent);word-break:break-all}.plan-option[data-v-2ff075e5]{display:grid;gap:var(--space-1);margin-top:var(--space-2)}.plan-option[data-v-2ff075e5]>:first-child{color:var(--color-text-muted)}.tl-name[data-v-5312d698]{color:var(--color-text);font-weight:var(--weight-medium);flex:none}.tl-file[data-v-5312d698]{color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-file[data-v-5312d698]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-file[data-v-5312d698]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-dim[data-v-5312d698]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-faint[data-v-5312d698]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.path-link[data-v-5312d698]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-5312d698]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-5312d698]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.read-line[data-v-5312d698]{display:flex;font-size:var(--text-xs)}.read-no[data-v-5312d698]{flex:none;min-width:4ch;padding-right:var(--space-2);text-align:right;color:var(--color-text-faint);font-variant-numeric:tabular-nums;user-select:none}.read-text[data-v-5312d698]{min-width:0;white-space:pre-wrap;word-break:break-word}.todo-bar[data-v-d7e35d4e]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-d7e35d4e]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-d7e35d4e]{display:grid;gap:var(--space-2)}.todo-row[data-v-d7e35d4e]{display:flex;align-items:center;gap:var(--space-2)}.todo-status[data-v-d7e35d4e]{display:inline-flex;color:var(--color-text-muted)}.todo-row[data-status=done][data-v-d7e35d4e]{color:var(--color-text-muted);text-decoration:line-through}.todo-row[data-status=done] .todo-status[data-v-d7e35d4e]{color:var(--color-success)}.todo-row[data-status=in_progress] .todo-status[data-v-d7e35d4e]{color:var(--color-accent)}.wf-glance[data-v-333157a5]{margin-bottom:var(--space-1)}.wf-main[data-v-333157a5]{color:var(--color-text);font-size:var(--text-sm);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-sub[data-v-333157a5]{color:var(--color-text-muted);font-size:var(--text-xs);line-height:var(--leading-prose);white-space:pre-wrap;word-break:break-word}.wf-status.success[data-v-333157a5]{color:var(--color-success)}.wf-status.danger[data-v-333157a5]{color:var(--color-danger)}.wf-status.warning[data-v-333157a5]{color:var(--color-warning)}.think[data-v-877ab21d]{margin:0}.think-head[data-v-877ab21d]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-877ab21d]:hover{color:var(--color-text)}.think-head.is-static[data-v-877ab21d],.think-head.is-static[data-v-877ab21d]:hover{cursor:default;color:var(--color-text-faint)}.think-head[data-v-877ab21d]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-877ab21d]{flex:none}.think-title[data-v-877ab21d]{font-weight:var(--weight-medium)}.think-time[data-v-877ab21d]{color:var(--color-text-faint);font-weight:400;flex:none}.think-car[data-v-877ab21d]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-877ab21d]{transform:rotate(90deg)}.think-body[data-v-877ab21d]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-877ab21d]{transition:none}.think-body.open[data-v-877ab21d]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-877ab21d]{min-height:0;overflow:hidden}.think-text[data-v-877ab21d]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-877ab21d]{color:var(--color-text-faint);line-height:var(--leading-normal)}.think.streaming .think-title[data-v-877ab21d]{animation:think-breathe-877ab21d 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-877ab21d{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-877ab21d]{animation:none}}.activity-run[data-v-1ed055a4]{display:flex;flex-direction:column;animation:pythinker-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-1ed055a4]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-1ed055a4]:hover{color:var(--color-text)}.ar-head[data-v-1ed055a4]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-1ed055a4]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-1ed055a4]{color:var(--color-success)}.ar-glyph.err[data-v-1ed055a4]{color:var(--color-danger)}.ar-glyph.run[data-v-1ed055a4]{color:var(--color-text-muted);animation:ar-breathe-1ed055a4 1.6s var(--ease-in-out) infinite}@keyframes ar-breathe-1ed055a4{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-1ed055a4]{animation:none}}.ar-sum[data-v-1ed055a4]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-car[data-v-1ed055a4]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-1ed055a4]{transform:rotate(90deg)}.ar-body[data-v-1ed055a4]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-1ed055a4]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-1ed055a4]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.ar-sep[data-v-1ed055a4],.ar-faint[data-v-1ed055a4]{color:var(--color-text-faint)}.ar-danger[data-v-1ed055a4]{color:var(--color-danger)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: hsl(var(--ms-muted));--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid var(--code-bg);color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-a7e90764]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-a7e90764]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-a7e90764]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-a7e90764]{animation-name:text-node-stream-update-fade-a-a7e90764}.text-node-stream-delta--b[data-v-a7e90764]{animation-name:text-node-stream-update-fade-b-a7e90764}@keyframes text-node-stream-update-fade-a-a7e90764{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-a7e90764{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-a7e90764]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-72200115]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-72200115]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-72200115]{transition:none}.code-editor-layer[data-v-72200115]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-72200115]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-72200115]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-72200115]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-72200115]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-72200115]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-72200115] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-72200115]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-72200115]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-72200115]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-72200115]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:transparent;color:var(--vscode-editor-foreground, inherit);backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-72200115] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-72200115]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-72200115]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-72200115] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-72200115] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-72200115]{background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-72200115]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-72200115]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-72200115]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-72200115 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-72200115]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-72200115],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-72200115]{animation:none}@keyframes code-skeleton-shimmer-72200115{0%{background-position:100% 0}to{background-position:0 0}}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-72200115] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-72200115] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-72200115] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-72200115] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-72200115] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-72200115] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-72200115] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-72200115] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-72200115] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-72200115] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-72200115] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-72200115] .markstream-inline-fold-proxy:hover,[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-72200115] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-0aff75e3]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-0aff75e3]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-0aff75e3]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-0aff75e3]{background:transparent}.mermaid-mode-btn[data-v-0aff75e3]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-0aff75e3]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-0aff75e3]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-0aff75e3]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-0aff75e3]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-0aff75e3]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-0aff75e3]:active{transform:scale(.98)}.mermaid-source-panel[data-v-0aff75e3]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-0aff75e3]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-0aff75e3]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-0aff75e3]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-0aff75e3]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-0aff75e3]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-0aff75e3] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-0aff75e3] svg{width:100%;height:auto;display:block}.fullscreen[data-v-0aff75e3]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-0aff75e3],.mermaid-dialog-leave-to[data-v-0aff75e3]{opacity:0}.mermaid-dialog-enter-active[data-v-0aff75e3],.mermaid-dialog-leave-active[data-v-0aff75e3]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-to .dialog-panel[data-v-0aff75e3]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-from .dialog-panel[data-v-0aff75e3]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-0aff75e3],.mermaid-dialog-leave-active .dialog-panel[data-v-0aff75e3]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-9fc85391]{font:400 15px/1.6 var(--font-ui);color:var(--color-text);word-break:break-word}.md[data-v-9fc85391] .markdown-renderer{font:400 15px/1.6 var(--font-ui);color:var(--color-text)}.md[data-v-9fc85391] .markstream-vue,.md[data-v-9fc85391] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-surface-sunken);--inline-code-fg: var(--color-fg);--inline-code-border: transparent}.md[data-v-9fc85391] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-9fc85391] .md-file-link:hover{color:var(--color-accent)}.md[data-v-9fc85391] .markdown-renderer p,.md[data-v-9fc85391] .markdown-renderer li,.md[data-v-9fc85391] .markdown-renderer blockquote,.md[data-v-9fc85391] .markdown-renderer td,.md[data-v-9fc85391] .markdown-renderer th{font-size:var(--content-font-size)}.md[data-v-9fc85391] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-9fc85391] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-9fc85391] h1,.md[data-v-9fc85391] h2,.md[data-v-9fc85391] h3,.md[data-v-9fc85391] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em;line-height:var(--leading-tight)}.md[data-v-9fc85391] h1{font-size:max(var(--text-xl),calc(var(--content-font-size) + 3px));border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-9fc85391] h2{font-size:max(var(--text-lg),calc(var(--content-font-size) + 2px))}.md[data-v-9fc85391] h3{font-size:max(var(--text-lg),calc(var(--content-font-size) + 1px))}.md[data-v-9fc85391] h4{font-size:max(var(--text-base),calc(var(--content-font-size) + 1px));color:var(--color-text-muted)}.md[data-v-9fc85391] p{margin:.8rem 0}.md[data-v-9fc85391] .node-slot+.node-slot{margin-top:.8rem}.md[data-v-9fc85391] ul,.md[data-v-9fc85391] ol{padding-left:1.4em;margin:.6em 0}.md[data-v-9fc85391] li{margin:.3em 0}.md[data-v-9fc85391] :not(pre)>code,.md[data-v-9fc85391] .inline-code{font:.9em var(--font-mono);background:var(--color-surface-sunken);color:var(--color-fg);padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-9fc85391] strong code,.md[data-v-9fc85391] strong .inline-code,.md[data-v-9fc85391] b code,.md[data-v-9fc85391] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-9fc85391] .code-block-container{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-9fc85391] .code-block-header{background:var(--color-surface);border-bottom:1px solid var(--color-line);padding:4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-9fc85391] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.md[data-v-9fc85391] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-9fc85391] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-9fc85391] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-9fc85391] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-9fc85391] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-9fc85391] .code-block-shell-content,.md[data-v-9fc85391] .markstream-pre{background:var(--color-surface-sunken)}.md[data-v-9fc85391] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-9fc85391] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-9fc85391] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-9fc85391] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-9fc85391] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-9fc85391] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-9fc85391] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-9fc85391] .markstream-pre,.md[data-v-9fc85391] .code-pre-fallback,.md[data-v-9fc85391] .code-block-shell-content pre:not(.shiki),.md[data-v-9fc85391] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-9fc85391] a{color:var(--color-accent);text-decoration:none}.md[data-v-9fc85391] a:hover{text-decoration:underline}.md[data-v-9fc85391] a.mention-pill{color:var(--color-text-muted);text-decoration:none}.md[data-v-9fc85391] a.mention-folder:hover{text-decoration:none}.md[data-v-9fc85391] .math-inline{vertical-align:baseline}.md-frontmatter[data-v-9fc85391]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-9fc85391] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-9fc85391] blockquote{margin:.5em 0;padding:4px 12px;border-left:1px solid var(--color-line);color:var(--color-text-muted)}.md[data-v-9fc85391] hr{border:none;border-top:1px solid var(--color-line);margin:.8em 0}.md[data-v-9fc85391] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-9fc85391] table:not(.table-node) th,.md[data-v-9fc85391] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-9fc85391] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-9fc85391] .table-node-wrapper{--table-cell-cap: var(--p-table-cell-max);--md-table-fade-bg: linear-gradient( to right, transparent, color-mix(in srgb, var(--color-bg) 65%, transparent) 55%, var(--color-bg) );width:100%;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative}.md[data-v-9fc85391] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-9fc85391] .table-node th,.md[data-v-9fc85391] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-9fc85391] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-9fc85391] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;background:var(--md-table-fade-bg);pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-9fc85391] .md-table-fade.md-table-toggle--show{display:block}.md[data-v-9fc85391] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-9fc85391] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-9fc85391] .md-table-toggle.md-table-toggle--show{display:inline-flex}.md[data-v-9fc85391] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-9fc85391] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-9fc85391] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-9fc85391] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-9fc85391] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-9fc85391] .md-table-toggle svg{display:block}.md[data-v-9fc85391] .table-node tbody tr:hover{background-color:transparent!important}.diff-wrap[data-v-9fc85391]{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-9fc85391]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-9fc85391]{margin-right:auto}.diff-copy[data-v-9fc85391]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-9fc85391]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-9fc85391]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-9fc85391]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-9fc85391]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-9fc85391]{display:block;width:100%;padding:0 14px}.diff-sign[data-v-9fc85391]{display:inline-block;width:14px;text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-9fc85391]{color:var(--color-text)}.diff-add[data-v-9fc85391]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-9fc85391]{color:var(--color-success)}.diff-del[data-v-9fc85391]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-9fc85391]{color:var(--color-danger)}.diff-hunk[data-v-9fc85391]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-9fc85391]{color:var(--color-text-muted)}.md[data-v-9fc85391],.md .markdown-renderer[data-v-9fc85391]{font-family:var(--sans)}.md .code-block-container[data-v-9fc85391],.md .diff-wrap[data-v-9fc85391]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-9fc85391],.md .inline-code[data-v-9fc85391]{border-radius:var(--radius-sm)}.activity-notice[data-v-5e7a6420]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.msg-time[data-v-6761370d]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;white-space:nowrap}.msg-time[data-v-6761370d]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.cn[data-v-d3807b0f]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-bubble[data-v-d3807b0f]{box-sizing:border-box;max-width:100%;padding:8px 14px;background:var(--color-accent-soft);border:1px solid var(--color-accent-bd);border-radius:var(--radius-xl) var(--radius-xl) var(--radius-sm) var(--radius-xl);box-shadow:var(--shadow-xs);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-title[data-v-d3807b0f]{font-weight:var(--weight-medium)}.cn-meta[data-v-d3807b0f]{display:flex;align-items:center;gap:6px;margin-top:4px;padding:0 4px;color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}.cn-meta-ico[data-v-d3807b0f]{flex:none;color:var(--color-text-faint)}.cn-meta-item[data-v-d3807b0f]{white-space:nowrap}.cn-status[data-v-d3807b0f]{display:inline-flex;align-items:center}.cn-status.ok[data-v-d3807b0f]{color:var(--color-success)}.cn-status.error[data-v-d3807b0f]{color:var(--color-danger)}.media-thumb[data-v-b4904b11]{position:relative;flex:none;display:inline-flex}.media-thumb-btn[data-v-b4904b11]{display:block;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:hidden;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out)}.media-thumb-btn[data-v-b4904b11]:hover{border-color:var(--color-line-strong)}.media-thumb-btn[data-v-b4904b11]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.media-thumb.is-error .media-thumb-btn[data-v-b4904b11]{border-color:var(--color-danger-bd)}.media-thumb-media[data-v-b4904b11]{display:block;width:var(--p-media-thumb-size);height:var(--p-media-thumb-size);object-fit:cover}.media-thumb-tile[data-v-b4904b11]{object-fit:none}.media-thumb-badge[data-v-b4904b11]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-thumb-badge.is-error[data-v-b4904b11]{color:var(--color-danger);border-color:var(--color-danger-bd)}.media-thumb-rm[data-v-b4904b11]{position:absolute;top:var(--space-1);right:var(--space-1);z-index:1;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:var(--color-scrim);color:var(--color-text-on-scrim);cursor:pointer}.media-thumb-rm[data-v-b4904b11]:hover{background:var(--color-text);color:var(--color-bg)}.media-thumb-rm[data-v-b4904b11]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-chip[data-v-fe5172dd]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px 5px;background:var(--color-bg);border:1px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-fe5172dd]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-fe5172dd]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-fe5172dd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-fe5172dd]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-fe5172dd] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-fe5172dd]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-fe5172dd]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-fe5172dd]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-fe5172dd]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-fe5172dd]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-fe5172dd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.turn-fold[data-v-2134c6e0]{display:flex;flex-direction:column}.tf-head[data-v-2134c6e0]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font:var(--text-sm)/1 var(--font-ui);text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-2134c6e0]:hover{color:var(--color-text)}.tf-head[data-v-2134c6e0]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-2134c6e0]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-2134c6e0]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-2134c6e0]{transform:rotate(90deg)}.tf-body[data-v-2134c6e0]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-2134c6e0]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-2134c6e0]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-2134c6e0],.tf-body-inner[data-v-2134c6e0]>.think,.tf-body-inner[data-v-2134c6e0]>.tool-group,.tf-body-inner[data-v-2134c6e0]>.agent-card,.tf-body-inner[data-v-2134c6e0]>.agent-group,.tf-body-inner[data-v-2134c6e0]>.box,.tf-body-inner[data-v-2134c6e0]>.dynamic-workflow-card,.tf-body-inner[data-v-2134c6e0]>.activity-run,.tf-body-inner[data-v-2134c6e0]>.media-tool{margin-top:var(--chat-block-gap)}.tf-body-inner .msg[data-v-2134c6e0]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-2134c6e0] p{margin:0}.tf-body-inner .msg[data-v-2134c6e0] p+p{margin-top:var(--space-2)}.ui-card[data-v-d2cab471]{background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-d2cab471]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-d2cab471]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:1px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-d2cab471]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-d2cab471]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:1px solid var(--color-line);background:var(--color-surface)}.turn-files[data-v-dbd50ff6]{margin-top:var(--chat-block-gap)}.turn-files[data-v-dbd50ff6] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-dbd50ff6] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-dbd50ff6] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-dbd50ff6]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-dbd50ff6]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-dbd50ff6]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-dbd50ff6],.tf-del[data-v-dbd50ff6]{font:var(--text-xs) var(--font-mono);flex:none}.tf-add[data-v-dbd50ff6]{color:var(--color-success)}.tf-del[data-v-dbd50ff6]{color:var(--color-danger)}.tf-list[data-v-dbd50ff6]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-dbd50ff6]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-dbd50ff6]{display:flex;align-items:baseline;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left;cursor:pointer}.tf-file[data-v-dbd50ff6]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-file[data-v-dbd50ff6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}span.tf-file[data-v-dbd50ff6]{cursor:default}span.tf-file[data-v-dbd50ff6]:hover{text-decoration:none}.tf-dir[data-v-dbd50ff6]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-dbd50ff6]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-dbd50ff6]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-dbd50ff6]:not(:disabled):active{transform:none}.tf-more-car[data-v-dbd50ff6]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-dbd50ff6]{transform:rotate(180deg)}.diffbar[data-v-dbd50ff6]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-dbd50ff6]{background:var(--color-success)}.seg-del[data-v-dbd50ff6]{background:var(--color-danger)}.mascot-apng[data-v-c03cab60]{display:inline-block;flex:none;image-rendering:pixelated}.working-indicator[data-v-52881756]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-52881756]{flex:none;width:40px}.wi-label[data-v-52881756]{animation:wi-breathe-52881756 1.6s var(--ease-in-out) infinite}@keyframes wi-breathe-52881756{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.wi-label[data-v-52881756]{animation:none}}.chat-empty[data-v-0f67514f]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-0f67514f]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-0f67514f]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-0f67514f]{font-size:var(--ui-font-size-sm)}.chat[data-v-0f67514f]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-0f67514f]{align-self:stretch}.open-unsupported[data-v-0f67514f]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:1px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:2}.chat>.u-turn[data-v-0f67514f],.chat>.a-msg[data-v-0f67514f],.chat>.compact-divider[data-v-0f67514f],.chat>.cron-notice[data-v-0f67514f],.chat>.sending-placeholder[data-v-0f67514f],.chat[data-v-0f67514f]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-0f67514f]{margin-top:10px}.chat>.u-turn[data-v-0f67514f]:first-child,.chat>.a-msg[data-v-0f67514f]:first-child,.chat>.compact-divider[data-v-0f67514f]:first-child,.chat>.cron-notice[data-v-0f67514f]:first-child,.chat>.sending-placeholder[data-v-0f67514f]:first-child,.chat[data-v-0f67514f]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-0f67514f]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-0f67514f]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-0f67514f]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:2px;margin-right:4px}.u-meta .u-edit[data-v-0f67514f]{min-height:22px;box-sizing:border-box}.u-text[data-v-0f67514f]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-0f67514f]{position:relative;display:flex;flex-direction:column}.u-text-wrap.is-clamped[data-v-0f67514f]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-0f67514f]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-0f67514f]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font:var(--ui-font-size-sm)/1 var(--font-ui);cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-0f67514f]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-0f67514f]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-0f67514f]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-0f67514f]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-0f67514f]{transform:rotate(180deg)}.u-edit[data-v-0f67514f]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-0f67514f]{display:block;flex:none}.u-edit[data-v-0f67514f]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-copy[data-v-0f67514f]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-0f67514f]{display:block;flex:none}.u-copy[data-v-0f67514f]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-0f67514f]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-0f67514f]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-0f67514f]{margin-top:8px}.compact-divider[data-v-0f67514f]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-0f67514f]:first-child{margin-top:0}.cd-line[data-v-0f67514f]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-0f67514f]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-0f67514f]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-0f67514f]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-0f67514f]{text-decoration:underline}.a-msg[data-v-0f67514f]{align-self:flex-start;max-width:94%;width:94%}.turn-failed[data-v-0f67514f]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--chat-turn-gap);padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-0f67514f]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger);flex:none}.tf-main[data-v-0f67514f]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-0f67514f]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-0f67514f]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.a-msg-ft[data-v-0f67514f]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-duration[data-v-0f67514f]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-0f67514f]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-0f67514f]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-0f67514f]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-0f67514f]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-0f67514f]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-0f67514f]{font-size:var(--ui-font-size);line-height:1.6;color:var(--color-text);font-weight:500}.a-msg .msg[data-v-0f67514f] p{margin:0}.a-msg .msg[data-v-0f67514f] p+p{margin-top:8px}.a-msg>.msg[data-v-0f67514f],.a-msg[data-v-0f67514f]>.think,.a-msg[data-v-0f67514f]>.tool-group,.a-msg[data-v-0f67514f]>.agent-card,.a-msg[data-v-0f67514f]>.agent-group,.a-msg[data-v-0f67514f]>.box,.a-msg[data-v-0f67514f]>.dynamic-workflow-card,.a-msg[data-v-0f67514f]>.media-tool{margin-top:var(--chat-block-gap)}.a-msg[data-v-0f67514f]>.turn-fold{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-0f67514f]:first-child,.a-msg[data-v-0f67514f]>.think:first-child,.a-msg[data-v-0f67514f]>.tool-group:first-child,.a-msg[data-v-0f67514f]>.agent-card:first-child,.a-msg[data-v-0f67514f]>.agent-group:first-child,.a-msg[data-v-0f67514f]>.box:first-child,.a-msg[data-v-0f67514f]>.dynamic-workflow-card:first-child,.a-msg[data-v-0f67514f]>.media-tool:first-child{margin-top:0}.a-msg[data-v-0f67514f]>.turn-fold:first-child{margin-top:0}.a-msg[data-v-0f67514f] code{font:.9em var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-0f67514f] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-0f67514f] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}.a-msg .msg[data-v-0f67514f] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}}.u-atts[data-v-0f67514f]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-0f67514f]{align-self:flex-start;padding:10px 0}.skill-act[data-v-0f67514f]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-0f67514f]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-0f67514f]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-0f67514f]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.chat[data-v-0f67514f]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-0f67514f]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-0f67514f]{width:100%;max-width:100%}.u-bub .u-text[data-v-0f67514f],.a-msg .msg[data-v-0f67514f]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-0f67514f] .md,.a-msg[data-v-0f67514f] .markdown-renderer,.a-msg[data-v-0f67514f] .code-block-container,.a-msg[data-v-0f67514f] .diff-wrap,.a-msg[data-v-0f67514f] pre{max-width:100%}.a-msg[data-v-0f67514f] .code-block-container pre,.a-msg[data-v-0f67514f] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-0f67514f] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-0f67514f]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-0f67514f]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-0f67514f]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-0f67514f],.chat-loading-text[data-v-0f67514f]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-0f67514f],.cd-btn[data-v-0f67514f]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-0f67514f]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px}.top-sentinel-loading[data-v-0f67514f]{opacity:.8}.top-sentinel-btn[data-v-0f67514f]{appearance:none;border:1px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-0f67514f]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-0f67514f]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-0f67514f]{background:transparent}.chat[data-v-0f67514f]{gap:0;padding:22px 20px 26px}.a-msg[data-v-0f67514f]{max-width:100%;width:100%}.chat>.q-stack[data-v-0f67514f]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-0f67514f]:first-child{margin-top:0}.q-stack[data-v-0f67514f]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-0f67514f]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-0f67514f]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-0f67514f]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-hint[data-v-0f67514f]{color:var(--color-text-faint)}.q-turn[data-v-0f67514f]{position:relative}.q-bub[data-v-0f67514f]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-surface-raised);border:1px dashed var(--color-accent-bd);padding:8px 8px 8px 6px;transition:border-color .12s ease,background .12s ease}.q-bub[data-v-0f67514f]:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}.q-grip[data-v-0f67514f]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-0f67514f]:hover{opacity:1}.q-grip[data-v-0f67514f]:active{cursor:grabbing}.q-body[data-v-0f67514f]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-0f67514f]{opacity:1}.q-body[data-v-0f67514f]:disabled{cursor:default}.q-text[data-v-0f67514f]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-0f67514f]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-0f67514f]{display:flex;gap:4px;flex:none}.q-img[data-v-0f67514f]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid var(--color-line)}.q-file[data-v-0f67514f]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:1px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-tag[data-v-0f67514f]{flex:none;padding:1px 6px;border-radius:var(--radius-full);font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium);line-height:1.4;white-space:nowrap}.q-tag-next[data-v-0f67514f]{color:var(--color-accent-hover);background:var(--color-accent-soft);border:1px solid var(--color-accent-bd)}.q-tag-idx[data-v-0f67514f]{color:var(--color-text-faint);background:var(--color-surface-sunken);border:1px solid var(--color-line)}.q-rm[data-v-0f67514f]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-0f67514f],.q-bub:focus-within .q-rm[data-v-0f67514f],.q-rm[data-v-0f67514f]:focus-visible{opacity:1}.q-rm[data-v-0f67514f]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-0f67514f]{opacity:.45}.q-turn.drop-before[data-v-0f67514f]:before,.q-turn.drop-after[data-v-0f67514f]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-0f67514f]:before{top:-5px}.q-turn.drop-after[data-v-0f67514f]:after{bottom:-5px}.chat-header[data-v-a0c7719c]{flex:none;display:flex;align-items:center;gap:14px;height:48px;padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0}.chat-header.macos-desktop[data-v-a0c7719c]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-a0c7719c],.chat-header.macos-desktop input[data-v-a0c7719c]{-webkit-app-region:no-drag}.ch-id[data-v-a0c7719c]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-a0c7719c]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-a0c7719c]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-a0c7719c]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-a0c7719c]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.ch-git[data-v-a0c7719c]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-a0c7719c]{color:var(--color-text)}.ch-branch[data-v-a0c7719c]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-a0c7719c]{color:var(--muted);font-style:italic}.ch-pill[data-v-a0c7719c]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:1px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-a0c7719c]{border-color:var(--line)}.ch-diff-pill[data-v-a0c7719c]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line))}.ch-ahead[data-v-a0c7719c]{color:var(--color-warning);flex:none}.ch-behind[data-v-a0c7719c]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-a0c7719c]{color:var(--color-success);flex:none}.ch-del[data-v-a0c7719c]{color:var(--color-danger);flex:none}.ch-spacer[data-v-a0c7719c]{flex:1;min-width:0}.ch-act-more.open[data-v-a0c7719c]{background:var(--color-surface-sunken);color:var(--color-text)}.ch-pr[data-v-a0c7719c]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:1px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-a0c7719c]{flex:none}.ch-pr.pr-open[data-v-a0c7719c]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-a0c7719c]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-a0c7719c]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-a0c7719c],.ch-pr.pr-unknown[data-v-a0c7719c]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.ch-pr[data-v-a0c7719c]:hover{border-color:var(--color-line-strong)}.ch-done-pill[data-v-a0c7719c]{cursor:default}.ch-done-pill[data-v-a0c7719c]:hover{border-color:var(--color-done-bd)}.ch-menu[data-v-a0c7719c]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}@media(max-width:980px){.ch-act-label[data-v-a0c7719c]{display:none}}@media(max-width:640px){.chat-header[data-v-a0c7719c]{display:none}}.slash-menu[data-menu-frame][data-v-d671dff5]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-scroll[data-v-d671dff5]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-d671dff5]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-d671dff5]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-d671dff5]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-d671dff5]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-d671dff5]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row)}.slash-item+.slash-item[data-v-d671dff5]{margin-top:var(--menu-rows-seam)}.slash-item[data-v-d671dff5]:hover{background:var(--color-hover)}.slash-item.active[data-v-d671dff5]{background:var(--color-selected)}.slash-name[data-v-d671dff5]{flex:none;max-width:60%;color:var(--color-text);font-weight:var(--weight-medium);min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-d671dff5]{font-weight:var(--weight-semibold)}.slash-desc[data-v-d671dff5]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-d671dff5]{font-weight:var(--weight-semibold)}.slash-empty[data-v-d671dff5]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-d671dff5]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}@media(max-width:520px){.slash-item[data-v-d671dff5]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-d671dff5]{max-width:none}}.mention-menu[data-menu-frame][data-v-1db50d1d]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-scroll[data-v-1db50d1d]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-1db50d1d]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-1db50d1d]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-1db50d1d]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-1db50d1d]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-1db50d1d]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-1db50d1d]{color:var(--color-text-muted)}.mention-spin[data-v-1db50d1d]{position:absolute;top:var(--space-2);right:var(--space-3);color:var(--color-text-muted);z-index:var(--z-raised)}.mention-item[data-v-1db50d1d]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);border-radius:var(--radius-menu-row);transition:opacity var(--duration-slow) var(--ease-out)}.mention-item+.mention-item[data-v-1db50d1d]{margin-top:var(--menu-rows-seam)}.mention-item[data-v-1db50d1d]:hover{background:var(--color-hover)}.mention-item.active[data-v-1db50d1d]{background:var(--color-selected)}.mention-item:hover .mention-icon[data-v-1db50d1d],.mention-item.active .mention-icon[data-v-1db50d1d],.mention-item:hover .mention-name[data-v-1db50d1d],.mention-item.active .mention-name[data-v-1db50d1d]{color:var(--color-text-strong)}.mention-item.stale[data-v-1db50d1d]{opacity:var(--opacity-stale)}@media(hover:none){.mention-item[data-v-1db50d1d]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-icon[data-v-1db50d1d]{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-faint);flex-shrink:0}.mention-icon[data-v-1db50d1d] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-name[data-v-1db50d1d]{color:var(--color-text);font-weight:var(--weight-medium);flex-shrink:0}.mention-name .mention-hit[data-v-1db50d1d]{color:var(--color-text-strong);font-weight:var(--weight-semibold)}.mention-meta[data-v-1db50d1d]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mention-meta .mention-hit[data-v-1db50d1d]{color:var(--color-text)}.ctx-ring[data-v-97f3cf66]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-97f3cf66]{stroke:var(--line)}.ctx-ring-fill[data-v-97f3cf66]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-seg[data-v-bffb3dae]{display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__item[data-v-bffb3dae]{border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg--md .ui-seg__item[data-v-bffb3dae]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-bffb3dae]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-bffb3dae]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-bffb3dae]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-bffb3dae]{background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-xs)}.ui-seg__item[data-v-bffb3dae]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.activity-spin[data-v-c12d8332]{--spinner-frame: 1.15em;display:inline-block;position:relative;width:var(--spinner-frame);height:var(--spinner-frame);font-size:var(--ui-font-size);line-height:1;user-select:none;vertical-align:-.1em}.activity-frame[data-v-c12d8332]{position:absolute;inset:0;display:block;text-align:center;opacity:0;animation-name:activity-frame-c12d8332;animation-duration:.64s;animation-timing-function:steps(1,end);animation-iteration-count:infinite;animation-delay:var(--spinner-frame-delay)}.activity-spin--fast .activity-frame[data-v-c12d8332]{animation-duration:.32s;animation-delay:var(--spinner-frame-fast-delay)}@keyframes activity-frame-c12d8332{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.activity-frame[data-v-c12d8332]{animation:none}.activity-frame[data-v-c12d8332]:first-child{opacity:1}}.menu-row[data-v-261bf74a]{width:100%;height:calc(var(--ui-font-size) + 13px);display:flex;align-items:center;gap:8px;box-sizing:border-box;padding:0 8px;border:0;border-radius:var(--r-md);background:none;color:var(--ink);font-family:inherit;font-size:calc(var(--ui-font-size) - 1px);font-weight:400;line-height:1;text-align:left;cursor:pointer}.menu-row[data-v-261bf74a]:hover{background:var(--hover)}.menu-row.active[data-v-261bf74a],.menu-row.selected[data-v-261bf74a]{background:color-mix(in srgb,var(--soft) 45%,var(--panel))}.menu-row[data-v-261bf74a]:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.menu-row.disabled[data-v-261bf74a],.menu-row[data-v-261bf74a]:disabled{opacity:.5;pointer-events:none}.leading[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 14px;width:14px;height:14px}.leading[data-v-261bf74a] svg{display:block;width:14px;height:14px}.label[data-v-261bf74a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.count[data-v-261bf74a]{flex:none;color:var(--muted)}.trailing[data-v-261bf74a]{display:inline-flex;align-items:center;justify-content:center;flex:none;margin-left:auto}.switch-toggle[data-v-169237c7]{position:relative;width:28px;height:16px;padding:0;border:0;border-radius:999px;background:none;cursor:pointer}.track[data-v-169237c7],.thumb[data-v-169237c7]{position:absolute;display:block}.track[data-v-169237c7]{inset:0;border-radius:999px;background:var(--line);transition:background-color .15s ease}.switch-toggle[aria-checked=true] .track[data-v-169237c7]{background:var(--blue)}.thumb[data-v-169237c7]{top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--panel);transition:transform .15s ease}.switch-toggle[aria-checked=true] .thumb[data-v-169237c7]{transform:translate(12px)}.switch-toggle[data-v-169237c7]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.switch-toggle[data-v-169237c7]:disabled{opacity:.5;cursor:not-allowed}.capability-control[data-v-ff3a96c4]{display:flex;align-items:center;flex:none;min-width:0}.capability-trigger[data-v-ff3a96c4]{display:inline-flex;align-items:center;gap:5px;flex:none;min-width:30px;height:30px;padding:2px 7px;border:0;border-radius:var(--r-sm);background:none;color:var(--muted);font:inherit;font-size:var(--ui-font-size);line-height:1;cursor:pointer;white-space:nowrap}.capability-trigger[data-v-ff3a96c4]:hover,.capability-trigger.open[data-v-ff3a96c4]{background:var(--soft);color:var(--ink)}.capability-trigger svg[data-v-ff3a96c4]{width:16px;height:16px;flex:none}.capability-panel[data-v-ff3a96c4]{width:280px;max-height:288px;overflow:hidden}.capability-viewport[data-v-ff3a96c4]{max-height:288px;overflow:hidden}.capability-track[data-v-ff3a96c4]{display:flex;align-items:flex-start;width:200%;transform:translate(0);transition:transform .15s ease}.capability-track.is-drilled[data-v-ff3a96c4]{transform:translate(-50%)}.capability-view[data-v-ff3a96c4]{flex:0 0 50%;min-width:0;max-height:288px;overflow-y:auto}.capability-group-title[data-v-ff3a96c4]{padding:6px 8px 2px;color:var(--ink);font-size:var(--ui-font-size-xs);font-weight:600}.capability-caption[data-v-ff3a96c4]{margin:0;padding:2px 8px 6px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.35}.capability-loading[data-v-ff3a96c4]{display:flex;align-items:center;min-height:27px;padding:0 8px 6px;color:var(--muted)}.capability-loading[data-v-ff3a96c4] .activity-spin{font-size:var(--ui-font-size-sm)}.chevron[data-v-ff3a96c4],.back-chevron[data-v-ff3a96c4]{display:block;width:14px;height:14px;color:var(--muted)}.capability-back[data-v-ff3a96c4]{margin-bottom:2px}@media(max-width:640px){.capability-trigger-label[data-v-ff3a96c4]{display:none}.capability-trigger[data-v-ff3a96c4]{padding:2px 6px}}.composer[data-v-e6685471]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer.drag-over[data-v-e6685471]{background:var(--color-accent-soft)}.drop-overlay[data-v-e6685471]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-e6685471]{opacity:1;visibility:visible}.drop-card[data-v-e6685471]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-e6685471]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-e6685471]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-e6685471]:focus-within:after{opacity:1}.att-strip[data-v-e6685471]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-e6685471]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-e6685471]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-e6685471]{padding-bottom:var(--space-6)}.att-more[data-v-e6685471]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-e6685471]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-e6685471]{gap:var(--space-2)}.att-scroll-content .att-chip[data-v-e6685471]{corner-shape:superellipse(1.5)}.att-scroll-content .att-tile[data-v-e6685471]{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-e6685471]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-e6685471]{display:none}.cin-wrap[data-v-e6685471]{position:relative;padding:14px 16px 8px}.input-row[data-v-e6685471]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-e6685471]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-e6685471]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-e6685471]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-e6685471]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-e6685471]::-webkit-scrollbar{display:none}.ph[data-v-e6685471]::placeholder{color:var(--muted)}.ph[data-v-e6685471]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-e6685471]{min-height:70vh;max-height:70vh}.compact-chip[data-v-e6685471]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-e6685471]:hover{background:var(--color-hover)}.composer-attach[data-v-e6685471]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-e6685471]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-e6685471]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-e6685471]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-e6685471]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-e6685471]{background:var(--color-menu-scrollbar-hover)}.am-row[data-v-e6685471]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:none;border-radius:var(--radius-menu-row);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-e6685471]:hover{background:var(--color-hover)}.am-row[data-v-e6685471]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-e6685471]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-e6685471],.am-row:focus-visible .am-icon[data-v-e6685471]{color:var(--color-text)}.am-icon[data-v-e6685471]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-e6685471]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-e6685471]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-e6685471]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-e6685471]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-e6685471]:active{transform:scale(.92)}.send[data-v-e6685471]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-e6685471]:disabled:active{transform:none}.send.is-starting[data-v-e6685471]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting .ui-spinner[data-v-e6685471]{color:var(--color-send-icon)}.send.is-starting .ui-spinner__track[data-v-e6685471]{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-e6685471]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-e6685471]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-e6685471]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-e6685471]:active{transform:scale(.92)}.stop svg[data-v-e6685471]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.toolbar[data-v-e6685471]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-e6685471]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-e6685471],.toolbar-right[data-v-e6685471]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-e6685471]{flex:0 1 auto;overflow:hidden}.toolbar-right[data-v-e6685471]{flex:1 1 0;justify-content:flex-end}.perm-pill[data-v-e6685471],.workflow-chip[data-v-e6685471],.model-pill[data-v-e6685471]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-e6685471]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-e6685471]:after,.workflow-chip[data-v-e6685471]:after,.model-pill[data-v-e6685471]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-e6685471]:hover:after,.workflow-chip[data-v-e6685471]:hover:after,.model-pill[data-v-e6685471]:hover:after{opacity:1}.perm-pill.open[data-v-e6685471],.model-pill.open[data-v-e6685471]{background:var(--color-accent-soft)}.workflow-chip[data-v-e6685471]{cursor:default}.perm-pill.perm-manual[data-v-e6685471]{color:var(--dim)}.perm-pill.perm-yolo[data-v-e6685471]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-e6685471]{color:var(--color-danger)}.perm-pill-icon[data-v-e6685471]{flex:none}@container (max-width: 620px){.perm-pill[data-v-e6685471]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.perm-pill-label[data-v-e6685471]{display:none}.workflow-chip[data-v-e6685471]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center}.workflow-label[data-v-e6685471]{display:none}}.ctx-group[data-v-e6685471]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-e6685471]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-e6685471]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-e6685471]:active{transform:scale(.97)}.model-pill[data-v-e6685471]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-e6685471]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.model-pill .think-suffix[data-v-e6685471]{color:var(--color-accent);font-weight:var(--weight-medium);flex-shrink:0}.model-pill .cv[data-v-e6685471]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-e6685471],.model-pill.open .cv[data-v-e6685471]{color:var(--dim)}.model-pill.open .cv[data-v-e6685471]{transform:rotate(180deg)}.model-dropdown[data-v-e6685471]{position:absolute;bottom:calc(100% + 4px);right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right}.composer-menu-pop-enter-active[data-v-e6685471]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-e6685471]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-e6685471],.composer-menu-pop-leave-to[data-v-e6685471]{opacity:0;transform:scale(.97) translateY(2px)}.md-list[data-v-e6685471]{display:flex;flex-direction:column;gap:1px;max-height:min(320px,40vh);overflow-y:auto;overscroll-behavior:contain}.md-section[data-v-e6685471]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-e6685471]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-e6685471]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-e6685471]{color:var(--color-text-strong)}.md-row[data-v-e6685471]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-e6685471]:disabled{cursor:default;opacity:.58}.md-row[data-v-e6685471]:disabled:hover{background:none}.md-row.is-current[data-v-e6685471]{background:var(--color-selected)}.md-note[data-v-e6685471]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-e6685471]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-e6685471]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-e6685471]{color:var(--dim)}.md-check[data-v-e6685471]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-e6685471]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-e6685471]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-e6685471]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-e6685471]{height:1px;background:var(--line);margin:3px 0}.md-thinking[data-v-e6685471]{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:var(--radius-sm)}.md-thinking .md-name[data-v-e6685471]{font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);flex:none}.md-thinking .md-note[data-v-e6685471],.md-thinking .ui-seg[data-v-e6685471]{margin-left:auto}.md-cache-note[data-v-e6685471]{width:0;min-width:100%;padding:2px 7px 4px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.perm-dropdown[data-v-e6685471]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-e6685471]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-e6685471]:hover,.pd-row.is-current[data-v-e6685471]{background:var(--color-hover)}.pd-icon[data-v-e6685471]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-e6685471]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-e6685471]{display:contents}.pd-name[data-v-e6685471]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-e6685471]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-e6685471]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-e6685471],.workflow-x[data-v-e6685471]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-e6685471]:before,.workflow-x[data-v-e6685471]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-e6685471]:before,.workflow-x[data-v-e6685471]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-e6685471]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-e6685471]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-e6685471]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-e6685471]{gap:6px;min-width:0}.send[data-v-e6685471]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-e6685471]{display:none}.send[data-v-e6685471]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-e6685471]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop svg[data-v-e6685471]{display:none}.stop[data-v-e6685471]:after{content:"■";font-size:17px;line-height:1}.perm-pill[data-v-e6685471],.wm-pill[data-v-e6685471]{display:none}.model-dropdown[data-v-e6685471]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.ph[data-v-e6685471]{font-size:16px}.model-pill[data-v-e6685471],.attach-btn[data-v-e6685471]{font-size:var(--ui-font-size)}.toolbar[data-v-e6685471]{gap:6px;min-width:0}.toolbar-left[data-v-e6685471],.toolbar-right[data-v-e6685471]{min-width:0}.model-pill[data-v-e6685471]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-e6685471]{max-width:min(40vw,170px)}.md-row[data-v-e6685471],.md-section[data-v-e6685471]{font-size:var(--ui-font-size)}.md-thinking[data-v-e6685471]{flex-wrap:wrap;row-gap:6px}.md-thinking .ui-seg[data-v-e6685471]{margin-left:0}.pd-name[data-v-e6685471]{font-size:var(--ui-font-size)}.pd-desc[data-v-e6685471]{font-size:var(--text-xs)}}.att-lightbox[data-v-e6685471]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;align-items:center;justify-content:center;padding:24px;background:#14171c9e}.att-lightbox-card[data-v-e6685471]{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:min(960px,calc(100vw - 48px));max-height:calc(100vh - 48px)}.att-lightbox-media[data-v-e6685471]{max-width:100%;max-height:calc(100vh - 96px);border-radius:6px;background:var(--bg);box-shadow:var(--shadow-xl);object-fit:contain}.att-lightbox-name[data-v-e6685471]{max-width:100%;color:var(--surface-light);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att-lightbox-close[data-v-e6685471]{position:absolute;top:-14px;right:-14px;width:28px;height:28px;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:#14171cd1;color:var(--surface-light);cursor:pointer}.appr[data-v-1c39b16f]{margin:var(--space-2) 0}.appr.ui-card[data-v-1c39b16f]{border-color:var(--color-warning-bd)}.appr[data-v-1c39b16f] .ui-card__head{background:var(--color-warning-soft);border-bottom-color:var(--color-warning-bd)}.appr.minimized[data-v-1c39b16f] .ui-card__body{display:none}.appr.minimized[data-v-1c39b16f] .ui-card__head{border-bottom:none}.ah[data-v-1c39b16f]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui);flex-wrap:nowrap}.ah-ic[data-v-1c39b16f]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-warning);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.akind[data-v-1c39b16f]{color:var(--color-warning);font-size:var(--text-base);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apath[data-v-1c39b16f]{color:var(--color-text);font:var(--text-sm) var(--font-mono);flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ah-path[data-v-1c39b16f]{margin-bottom:var(--space-2);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aw[data-v-1c39b16f],.minimized .amin[data-v-1c39b16f]{margin-left:auto}.diff[data-v-1c39b16f]{border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);overflow:hidden;font:var(--text-sm)/1.85 var(--font-mono);max-height:240px;overflow-y:auto}.diff.expanded[data-v-1c39b16f]{max-height:none}.dl[data-v-1c39b16f]{display:flex;padding:0 var(--space-3)}.dg[data-v-1c39b16f]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none}.dc[data-v-1c39b16f]{white-space:pre;font:inherit}.del[data-v-1c39b16f]{background:var(--color-danger-soft)}.del .dc[data-v-1c39b16f]{color:var(--color-danger)}.add[data-v-1c39b16f]{background:var(--color-success-soft)}.add .dc[data-v-1c39b16f]{color:var(--color-success)}.shell-cmd[data-v-1c39b16f]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-1c39b16f]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-1c39b16f]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-1c39b16f]{margin-top:var(--space-2);padding:var(--space-1) var(--space-3);border:1px solid var(--color-danger-bd);border-radius:var(--radius-sm);color:var(--color-danger);font:var(--text-sm) var(--font-ui);background:var(--color-danger-soft)}.body-file[data-v-1c39b16f]{border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.file-bar[data-v-1c39b16f]{padding:var(--space-1) var(--space-3);background:var(--color-surface);border-bottom:1px solid var(--color-line);font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.file-lang[data-v-1c39b16f]{letter-spacing:.04em}.file-content[data-v-1c39b16f]{padding:var(--space-2) 0;font:var(--text-sm)/1.7 var(--font-mono);background:var(--color-surface-sunken);max-height:240px;overflow-y:auto}.body-file.expanded .file-content[data-v-1c39b16f]{max-height:none}.file-line[data-v-1c39b16f]{display:flex;padding:0 var(--space-3)}.file-ln[data-v-1c39b16f]{width:30px;color:var(--color-text-muted);text-align:right;padding-right:var(--space-3);user-select:none;flex:none}.file-text[data-v-1c39b16f]{white-space:pre;font:inherit}.body-chip[data-v-1c39b16f]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-1c39b16f]{background:var(--color-surface-sunken);border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-1c39b16f]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-1c39b16f]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-1c39b16f]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-1c39b16f]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-1c39b16f]{color:var(--color-text)}.todo-done[data-v-1c39b16f]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-1c39b16f]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan[data-v-1c39b16f]{max-height:50vh;overflow-y:auto}.body-plan.expanded[data-v-1c39b16f]{max-height:none}.feedback-wrap[data-v-1c39b16f]{margin-top:var(--space-3)}.feedback-ta[data-v-1c39b16f]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-sm);resize:none;outline:none;color:var(--color-text);background:var(--color-surface-raised)}.feedback-ta[data-v-1c39b16f]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-1c39b16f]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.abtn[data-v-1c39b16f],.plan-actions[data-v-1c39b16f]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}.plan-actions[data-v-1c39b16f]{flex-wrap:wrap}.k[data-v-1c39b16f]{opacity:.75}@media(max-width:640px){.diff[data-v-1c39b16f],.file-content[data-v-1c39b16f]{overflow-x:auto;-webkit-overflow-scrolling:touch}.file-content[data-v-1c39b16f]{max-height:50vh}.abtn[data-v-1c39b16f],.plan-actions[data-v-1c39b16f]{flex-direction:column}.kbtn[data-v-1c39b16f]{width:100%;min-height:46px}}.goal-panel[data-v-81a928ba]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-81a928ba]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-81a928ba]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-bc8a415c]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-bc8a415c]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-bc8a415c],.plan-review-feedback[data-v-bc8a415c]{color:var(--color-text-muted)}.plan-review-label[data-v-bc8a415c]{flex:none}.plan-path-only[data-v-bc8a415c]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-bc8a415c]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-bc8a415c]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-bc8a415c]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-bc8a415c]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-29d475ec]{margin:var(--space-2) 0}.qcard.ui-card[data-v-29d475ec]{border-color:var(--color-accent-bd)}.qcard[data-v-29d475ec] .ui-card__head{background:var(--color-accent-soft);border-bottom-color:var(--color-accent-bd)}.qcard.minimized[data-v-29d475ec] .ui-card__body{display:none}.qcard.minimized[data-v-29d475ec] .ui-card__head{border-bottom:none}.qh[data-v-29d475ec]{display:flex;align-items:center;gap:var(--space-2);width:100%;font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.qh-ic[data-v-29d475ec]{width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;color:var(--color-accent);font-weight:var(--weight-semibold);font-size:15px;line-height:1;flex:none}.qtitle[data-v-29d475ec]{color:var(--color-accent-hover);font-size:var(--text-base);font-weight:var(--weight-semibold)}.qstep[data-v-29d475ec]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);margin-left:var(--space-1)}.qmin[data-v-29d475ec]{margin-left:auto}.qmin-peek[data-v-29d475ec]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.qbody[data-v-29d475ec]{color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qsteps[data-v-29d475ec]{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font-family:var(--font-ui)}.qstep-dot[data-v-29d475ec]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:var(--radius-full);border:1px solid var(--color-line);background:var(--color-surface);color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);cursor:pointer;padding:0;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.qstep-dot[data-v-29d475ec]:hover:not(.active){background:var(--color-surface-sunken)}.qstep-dot.active[data-v-29d475ec]{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-text-on-accent);font-weight:var(--weight-medium)}.qstep-dot.answered[data-v-29d475ec]:not(.active){border-color:var(--color-accent);color:var(--color-accent)}.qheader-chip[data-v-29d475ec]{margin-bottom:var(--space-2)}.qtext[data-v-29d475ec]{font-size:var(--text-base);color:var(--color-text);font-weight:var(--weight-medium);margin-bottom:var(--space-2);line-height:var(--leading-normal)}.qmdbody[data-v-29d475ec]{margin-bottom:var(--space-2)}.qopts[data-v-29d475ec]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2)}.qopt[data-v-29d475ec]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-29d475ec]:hover{background:var(--color-surface-sunken)}.qopt.selected[data-v-29d475ec]{border-color:var(--color-accent-bd);background:var(--color-accent-soft);color:var(--color-text)}.qopt-key[data-v-29d475ec]{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui);font-weight:var(--weight-medium);width:12px;flex:none;text-align:center}.qopt-glyph[data-v-29d475ec]{color:var(--color-accent-hover);font-size:var(--text-base);flex:none}.qopt-text[data-v-29d475ec]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-label[data-v-29d475ec]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-29d475ec]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui);font-weight:var(--weight-medium)}.chk[data-v-29d475ec],.rad[data-v-29d475ec]{font:var(--text-base) var(--font-mono)}.other-input[data-v-29d475ec]{flex:1;font:var(--text-base) var(--font-ui);border:none;border-bottom:1px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-29d475ec]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-29d475ec]{display:flex;justify-content:flex-end;gap:var(--space-2);width:100%}@media(max-width:640px){.qh[data-v-29d475ec]{flex-wrap:wrap;row-gap:var(--space-1)}.qtext[data-v-29d475ec]{font-size:var(--text-lg)}.qstep-dot[data-v-29d475ec]{width:28px;height:28px;font:var(--text-xs) var(--font-ui)}.qopt[data-v-29d475ec]{min-height:44px;padding:var(--space-3);font-size:var(--text-base);border-radius:var(--radius-md)}.qopt-desc[data-v-29d475ec]{font-size:var(--text-xs)}.other-input[data-v-29d475ec]{flex-basis:100%;min-height:28px}.qfoot[data-v-29d475ec]{flex-direction:column}.qfoot-btn[data-v-29d475ec]{width:100%;min-height:46px}.qfoot-main[data-v-29d475ec]{order:-1}}.status-glyph[data-v-f870866a]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f870866a]{color:var(--color-accent)}.status-glyph.s-done[data-v-f870866a]{color:var(--color-success)}.status-glyph.s-fail[data-v-f870866a]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f870866a]{color:var(--color-text-faint)}.sg-empty[data-v-b4cfb2fc]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-b4cfb2fc]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-b4cfb2fc]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-b4cfb2fc]{cursor:pointer}.sg-card.openable[data-v-b4cfb2fc]:hover{background:var(--color-selected-hover)}.sg-card[data-v-b4cfb2fc]:not(.openable){cursor:not-allowed}.sg-open[data-v-b4cfb2fc]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-b4cfb2fc]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-b4cfb2fc]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-b4cfb2fc]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-b4cfb2fc]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-b4cfb2fc]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-b4cfb2fc]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-b4cfb2fc]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-b4cfb2fc]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-b4cfb2fc]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-b4cfb2fc]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-b4cfb2fc]{display:flex;align-items:center}.sg-state[data-v-b4cfb2fc]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-b4cfb2fc]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-b4cfb2fc]{color:var(--color-danger)}.sg-time[data-v-b4cfb2fc]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-b4cfb2fc]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-b4cfb2fc],.sg-cancel[data-v-b4cfb2fc]:focus-visible{opacity:1}.sg-cancel[data-v-b4cfb2fc]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-b4cfb2fc]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.taskspane[data-v-ac309aaa]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-ac309aaa]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-ac309aaa]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-ac309aaa]{color:var(--color-danger)}.tp-main[data-v-ac309aaa]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-ac309aaa]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-ac309aaa]:hover{background:var(--color-hover)}.tp-row[data-v-ac309aaa]:not(.expandable){cursor:not-allowed}.tp-open[data-v-ac309aaa]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-ac309aaa]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-ac309aaa]{flex:none;color:var(--muted)}.tp-name[data-v-ac309aaa]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-ac309aaa]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-ac309aaa]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-ac309aaa]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-ac309aaa]{color:var(--color-text-muted)}.tp-fail[data-v-ac309aaa]{color:var(--color-danger)}.tp-time[data-v-ac309aaa]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-ac309aaa]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-ac309aaa]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-ac309aaa]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-ac309aaa]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-ac309aaa]{min-height:var(--touch-target-min)}}.tp-empty[data-v-ac309aaa]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-ac309aaa]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-ac309aaa]{font-size:var(--ui-font-size-sm)}}.todo-card[data-v-4e4d0054]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-4e4d0054]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-4e4d0054]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-4e4d0054]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-4e4d0054]{color:var(--color-text-muted)}.tc-glyph[data-v-4e4d0054]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-4e4d0054]{color:var(--color-success)}.tc-glyph.g-pending[data-v-4e4d0054]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-4e4d0054]{color:var(--color-text)}.tc-empty[data-v-4e4d0054]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-4e4d0054]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-4e4d0054]{font-size:var(--text-lg)}.tc-row[data-v-4e4d0054]{padding:var(--space-2) var(--space-3)}}.ui-pill[data-v-0fb1a50d]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-0fb1a50d]{cursor:pointer}button.ui-pill[data-v-0fb1a50d]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-0fb1a50d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-0fb1a50d]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-0fb1a50d]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-0fb1a50d] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.filter-control[data-v-658870b5]{display:inline-flex;min-width:0}.fc-chevron[data-v-658870b5]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-658870b5]{transform:rotate(180deg)}.fc-menu[data-v-658870b5]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-658870b5] .ui-menu{min-width:0}.fc-label[data-v-658870b5]{flex:1;white-space:nowrap}.filter-control[data-v-658870b5] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu[data-v-658870b5] .ui-icon[data-icon=circle-check]{transform:scale(.91)}.fc-check[data-v-658870b5]{color:var(--color-accent)}.wp-head-tab[data-v-408c4b07]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-408c4b07] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-408c4b07]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-408c4b07]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-408c4b07]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-408c4b07] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-408c4b07] .fc-trigger{min-height:var(--touch-target-min)}}.chat-dock[data-v-6b44ef59]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-6b44ef59]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-6b44ef59]{margin-left:auto;margin-right:auto}.chat-dock.align-mobile[data-v-6b44ef59]{max-width:none}.chat-dock[data-v-6b44ef59]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-6b44ef59]>*{position:relative;z-index:1}.dock-work-panel[data-v-6b44ef59]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-goal .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-subagent .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-bash .dock-work-head[data-v-6b44ef59]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-goal .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-subagent .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-bash .dock-work-body[data-v-6b44ef59]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-goal .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-plan .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-subagent .dock-work-head[data-v-6b44ef59],.dock-work-panel.panel-bash .dock-work-head[data-v-6b44ef59]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-goal .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-plan .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-subagent .dock-work-body[data-v-6b44ef59],.dock-work-panel.panel-bash .dock-work-body[data-v-6b44ef59]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-6b44ef59],.dock-work-panel.panel-bash[data-v-6b44ef59]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-head[data-v-6b44ef59]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-6b44ef59]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-6b44ef59]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-6b44ef59]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body .taskspane[data-v-6b44ef59]{border:none;background:transparent;padding:0}.dock-workbar[data-v-6b44ef59]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar .ui-pill[data-v-6b44ef59]{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar .ui-pill svg[data-v-6b44ef59]{width:1.5em;height:1.5em;color:inherit}.dock-workbar .ui-pill[data-v-6b44ef59]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar .ui-pill[data-v-6b44ef59]:hover:not(:disabled):after,.dock-workbar .ui-pill.is-active[data-v-6b44ef59]:after{opacity:1}.chat-dock.pills-compact .dock-workbar .ui-pill[data-v-6b44ef59]{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar .ui-pill>span[data-v-6b44ef59]{display:none}.dock-workbar .dw-count[data-v-6b44ef59]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-6b44ef59]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-6b44ef59]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-6b44ef59]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-6b44ef59]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-6b44ef59]{color:var(--color-danger)}.dock-approval[data-v-6b44ef59]{margin-top:8px}.chat-dock.has-approval[data-v-6b44ef59]{display:flex;flex-direction:column;max-height:calc(var(--app-height, 100dvh) - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-6b44ef59]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-6b44ef59]{min-height:0}@media(max-width:640px){.chat-dock[data-v-6b44ef59]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-6b44ef59]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}}.chat-dock:not(.align-mobile) .composer[data-v-6b44ef59]{padding-bottom:14px}.dock-panel-enter-active[data-v-6b44ef59]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-6b44ef59]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-6b44ef59],.dock-panel-leave-to[data-v-6b44ef59]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-f846d889]{position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);--toc-content-max: min( var(--p-content-max), calc(100cqi - var(--space-5) - var(--space-5)) );left:calc(50% + (var(--toc-content-max) / 2) + 14px);display:flex;flex-direction:column;justify-content:center;opacity:.5;transition:opacity var(--duration-base) var(--ease-out)}.conversation-toc[data-v-f846d889]:before{content:"";position:absolute;inset:0 -48px 0 -14px;z-index:0}.conversation-toc[data-v-f846d889]:hover,.conversation-toc[data-v-f846d889]:focus-within{opacity:1}.toc-scroll[data-v-f846d889]{position:relative;z-index:1;display:flex;flex-direction:column;gap:7px;padding:8px 0;max-height:calc(100vh - 200px);overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-f846d889]::-webkit-scrollbar{display:none}.toc-row[data-v-f846d889]{display:flex;align-items:center;gap:10px;height:18px;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;white-space:nowrap}.toc-row[data-v-f846d889]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.toc-bar[data-v-f846d889]{flex:none;width:3px;height:14px;border-radius:var(--radius-full);background:var(--color-accent);opacity:.3;transition:opacity var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.toc-label[data-v-f846d889]{display:block;max-width:0;overflow:hidden;opacity:0;text-overflow:ellipsis;transition:max-width .22s var(--ease-out),opacity var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.conversation-toc:hover .toc-bar[data-v-f846d889],.conversation-toc:focus-within .toc-bar[data-v-f846d889]{height:18px;opacity:.5}.conversation-toc:hover .toc-label[data-v-f846d889],.conversation-toc:focus-within .toc-label[data-v-f846d889]{max-width:220px;opacity:1}.toc-row.active .toc-bar[data-v-f846d889]{opacity:1;height:18px}.toc-row.active .toc-label[data-v-f846d889]{color:var(--color-accent);font-weight:var(--weight-medium)}.toc-row:hover .toc-bar[data-v-f846d889]{opacity:1}.toc-row:hover .toc-label[data-v-f846d889]{color:var(--color-text)}.conversation-toc.toc-clipped[data-v-f846d889]{visibility:hidden;pointer-events:none}.tsearch[data-v-d7187e08]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:pythinker-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-d7187e08]{top:var(--space-3)}.tsearch[data-v-d7187e08]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-d7187e08]:focus-within:after{opacity:1}.tsearch-main[data-v-d7187e08]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-d7187e08]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-d7187e08]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-d7187e08]:focus-visible{outline:none}.tsearch-input[data-v-d7187e08]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-d7187e08]{display:inline-flex;flex:none}.tsearch-sep[data-v-d7187e08]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-d7187e08]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-d7187e08]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-d7187e08]{grid-template-rows:1fr}.tsearch-foot[data-v-d7187e08]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-d7187e08]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-d7187e08]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-d7187e08]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-d7187e08]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.recent[data-v-cd5a729d]{flex:none;display:flex;flex-direction:column;margin:var(--space-4) var(--dock-inline-right, 16px) 0 var(--dock-inline-left, 16px)}.recent-caption[data-v-cd5a729d]{margin:0;padding:0 var(--space-2) var(--space-1);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;user-select:none}.recent-row[data-v-cd5a729d]{display:flex;width:100%;min-width:0;align-items:center;gap:var(--space-2);padding:6px var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.recent-row[data-v-cd5a729d]:hover{background:var(--color-hover)}.recent-row[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-ico[data-v-cd5a729d]{display:inline-flex;flex:none}.recent-ico--open[data-v-cd5a729d]{color:var(--color-success)}.recent-ico--done[data-v-cd5a729d]{color:var(--color-done)}.recent-title[data-v-cd5a729d]{flex:1;min-width:0;overflow:hidden;color:var(--color-text);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);text-overflow:ellipsis;white-space:nowrap}.recent-time[data-v-cd5a729d]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.recent-foot[data-v-cd5a729d]{display:flex;justify-content:center;margin-top:var(--space-2)}.recent-more[data-v-cd5a729d]{display:inline-flex;height:26px;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.recent-more[data-v-cd5a729d]:hover{background:var(--color-hover);color:var(--color-text)}.recent-more[data-v-cd5a729d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.recent-more svg[data-v-cd5a729d]{color:var(--color-text-faint)}.con[data-v-8e4bb730]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.panes[data-v-8e4bb730]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes.is-following[data-v-8e4bb730],.panes.history-prepending[data-v-8e4bb730]{overflow-anchor:none}.chat-layout[data-v-8e4bb730]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-8e4bb730]{flex:1;min-height:0;position:relative}.content-wrap[data-v-8e4bb730]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-8e4bb730]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-8e4bb730]{margin-left:0;margin-right:auto}.content-wrap.align-mobile[data-v-8e4bb730]{max-width:none}@media(max-width:640px){.con.mobile[data-v-8e4bb730]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-8e4bb730]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-8e4bb730]{width:100%;min-width:0}}.empty-spacer[data-v-8e4bb730]{flex:1}.empty-hint[data-v-8e4bb730]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui)}.empty-hint-title[data-v-8e4bb730]{display:inline-flex;align-items:center;gap:12px;font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-8e4bb730]{gap:9px;color:var(--dim);font-weight:400}.empty-hint-text[data-v-8e4bb730]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-add-workspace[data-v-8e4bb730]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--dim);font-family:var(--mono);font-size:var(--ui-font-size-sm);cursor:pointer}.empty-add-workspace[data-v-8e4bb730]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.empty-add-workspace[data-v-8e4bb730]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.empty-add-workspace svg[data-v-8e4bb730]{flex:none}.ws-pick[data-v-8e4bb730]{position:relative;font-family:var(--font-ui)}.ws-pick-btn[data-v-8e4bb730]{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:min(100%,calc(100vw - var(--space-8)));padding:5px 10px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--dim);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer}.ws-pick-btn[data-v-8e4bb730]:hover{border-color:var(--color-accent-bd);color:var(--color-text)}.ws-pick-name[data-v-8e4bb730]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-chev[data-v-8e4bb730]{flex:none;color:var(--muted);transition:transform .15s}.ws-pick-chev.open[data-v-8e4bb730]{transform:rotate(180deg)}.ws-pick-backdrop[data-v-8e4bb730]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-pick-menu[data-v-8e4bb730]{position:absolute;display:grid;grid-template-columns:minmax(0,1fr);left:50%;transform:translate(-50%);top:calc(100% + 6px);z-index:var(--z-dropdown);width:max-content;min-width:min(180px,calc(100cqw - var(--space-8)));max-width:calc(100cqw - var(--space-8));max-height:50vh;overflow:hidden auto;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:4px}.ws-pick-item[data-v-8e4bb730]{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-family:var(--font-ui)}.ws-pick-item[data-v-8e4bb730]:hover{background:var(--panel2)}.ws-pick-item.on[data-v-8e4bb730]{background:var(--color-accent-soft)}.ws-pick-item-name[data-v-8e4bb730]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ws-pick-item.on .ws-pick-item-name[data-v-8e4bb730]{color:var(--color-accent-hover)}.ws-pick-item-path[data-v-8e4bb730]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:475;color:var(--muted)}.ws-pick-item.ws-pick-more[data-v-8e4bb730]{flex-direction:row;align-items:center;justify-content:flex-start;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-item.ws-pick-more[data-v-8e4bb730]:hover{color:var(--color-text)}.ws-pick-item.ws-pick-more span[data-v-8e4bb730],.ws-pick-action span[data-v-8e4bb730]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-pick-divider[data-v-8e4bb730]{height:1px;margin:4px 6px;background:var(--line)}.ws-pick-action[data-v-8e4bb730]{display:flex;align-items:center;gap:7px;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:7px 10px;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-pick-action[data-v-8e4bb730]:hover{background:var(--panel2);color:var(--color-text)}.ws-pick-action svg[data-v-8e4bb730]{flex:none}.chat-scroll[data-v-8e4bb730]{display:flex;flex-direction:column}.mobile .panes[data-v-8e4bb730]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-8e4bb730]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--ui-font-size-sm);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-base)}.newmsg-pill[data-v-8e4bb730]:hover{background:var(--panel2)}.pill-chevron[data-v-8e4bb730]{width:12px;height:12px}.pill-enter-active[data-v-8e4bb730],.pill-leave-active[data-v-8e4bb730]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-8e4bb730],.pill-leave-to[data-v-8e4bb730]{opacity:0;transform:translate(-50%) translateY(8px)}.abort-toast[data-v-8e4bb730]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.abort-toast-text[data-v-8e4bb730]{display:flex;align-items:center;gap:8px}.abort-toast-enter-active[data-v-8e4bb730],.abort-toast-leave-active[data-v-8e4bb730]{transition:opacity .15s ease,transform .15s ease}.abort-toast-enter-from[data-v-8e4bb730],.abort-toast-leave-to[data-v-8e4bb730]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-8e4bb730]{background:var(--bg)}.newmsg-pill[data-v-8e4bb730]{font-family:var(--sans)}.media-lightbox[data-v-a5036dce]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-a5036dce]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-a5036dce]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl);touch-action:none}.media-lightbox-media[data-v-a5036dce]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain;transform-origin:center;user-select:none}.media-lightbox-close[data-v-a5036dce]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-a5036dce]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-a5036dce]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-preview-caption[data-v-a5036dce]{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.ui-panel-header[data-v-a01b4e04]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 6px 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface)}.ui-panel-header__title[data-v-a01b4e04]{flex:none;font:var(--weight-semibold) var(--text-xs) var(--font-mono);letter-spacing:.04em;color:var(--color-text)}.ui-panel-header__sub[data-v-a01b4e04]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-a01b4e04]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-a01b4e04]{flex-wrap:wrap;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px;gap:4px 6px}.ui-panel-header.wrap .ui-panel-header__close[data-v-a01b4e04]{margin-left:0}.file-preview[data-v-f6cbb2b4]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-f6cbb2b4],.fp-loading[data-v-f6cbb2b4]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-f6cbb2b4]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-f6cbb2b4]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-f6cbb2b4]{display:none}}.fp-lines[data-v-f6cbb2b4],.fp-size[data-v-f6cbb2b4]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-f6cbb2b4]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-f6cbb2b4]{flex:1;min-width:0;height:26px;border:1px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-f6cbb2b4]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-download[data-v-f6cbb2b4]{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-sm);color:var(--color-text-muted)}.fp-download[data-v-f6cbb2b4]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.fp-download[data-v-f6cbb2b4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.fp-download svg[data-v-f6cbb2b4]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.fp-check[data-v-f6cbb2b4]{color:var(--color-success)}.fp-body[data-v-f6cbb2b4]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));--fp-token-keyword: color-mix(in srgb, var(--color-accent) 68%, var(--color-danger));--fp-token-string: var(--color-success);--fp-token-literal: var(--color-accent-hover);--fp-token-tag: var(--color-warning);flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-f6cbb2b4]{padding:16px 20px}.fp-code[data-v-f6cbb2b4]{background:var(--bg)}.fp-line-table[data-v-f6cbb2b4]{display:table;width:100%;border-collapse:collapse;font-size:var(--ui-font-size);line-height:1.6}.fp-line-row[data-v-f6cbb2b4]{display:table-row}.fp-line-row.hit .fp-line-text[data-v-f6cbb2b4],.fp-table tr.hit td[data-v-f6cbb2b4]{background:var(--fp-search-hit-bg)}.fp-line-row.active .fp-line-text[data-v-f6cbb2b4],.fp-table tr.active td[data-v-f6cbb2b4]{background:var(--fp-search-active-bg)}.fp-line-row.target .fp-gutter[data-v-f6cbb2b4],.fp-line-row.target .fp-line-text[data-v-f6cbb2b4],.fp-table tr.target th[data-v-f6cbb2b4],.fp-table tr.target td[data-v-f6cbb2b4]{background:var(--color-accent-soft)}.fp-gutter[data-v-f6cbb2b4]{display:table-cell;width:44px;padding:0 10px 0 12px;text-align:right;color:var(--faint);user-select:none;font-size:var(--text-base);white-space:nowrap;border-right:1px solid var(--line2);vertical-align:top}.fp-line-text[data-v-f6cbb2b4]{display:table-cell;padding:0 12px;color:var(--color-text);white-space:pre;vertical-align:top}.fp-line-text[data-v-f6cbb2b4] .tok-key,.fp-line-text[data-v-f6cbb2b4] .tok-keyword{color:var(--fp-token-keyword);font-weight:500}.fp-line-text[data-v-f6cbb2b4] .tok-string{color:var(--fp-token-string)}.fp-line-text[data-v-f6cbb2b4] .tok-number,.fp-line-text[data-v-f6cbb2b4] .tok-literal{color:var(--fp-token-literal)}.fp-line-text[data-v-f6cbb2b4] .tok-comment{color:var(--muted);font-style:italic}.fp-line-text[data-v-f6cbb2b4] .tok-tag{color:var(--fp-token-tag);font-weight:500}.fp-line-text[data-v-f6cbb2b4] .tok-attr{color:var(--fp-token-literal)}.fp-html-frame[data-v-f6cbb2b4],.fp-pdf-frame[data-v-f6cbb2b4]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-f6cbb2b4]{background:var(--panel2)}.fp-table-wrap[data-v-f6cbb2b4]{background:var(--bg)}.fp-table[data-v-f6cbb2b4]{border-collapse:collapse;min-width:100%;font:12px/1.5 var(--mono)}.fp-table th[data-v-f6cbb2b4]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:1px solid var(--line2);user-select:none}.fp-table td[data-v-f6cbb2b4]{padding:2px 10px;border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-f6cbb2b4]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-f6cbb2b4]{max-width:100%;max-height:100%;object-fit:contain;border:1px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-f6cbb2b4]{max-width:none;max-height:none}.fp-binary-wrap[data-v-f6cbb2b4]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-f6cbb2b4]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-f6cbb2b4]{color:var(--faint);flex:none}.fp-error[data-v-f6cbb2b4]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-f6cbb2b4{to{transform:rotate(360deg)}}.spinner[data-v-f6cbb2b4]{display:inline-block;width:14px;height:14px;border:1.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-f6cbb2b4 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-f6cbb2b4]{display:none}.fp-markdown[data-v-f6cbb2b4]{padding:14px 16px}.fp-body.fp-code[data-v-f6cbb2b4]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-f6cbb2b4],.fp-loading[data-v-f6cbb2b4]{font-family:var(--sans)}.fp-binary-card[data-v-f6cbb2b4]{border:1px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-f6cbb2b4]{font-family:var(--sans)}.fp-image[data-v-f6cbb2b4]{border-radius:var(--radius-md)}.seg-btn[data-v-f6cbb2b4]{font-family:var(--sans)}.tp[data-v-e1ad626c]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-e1ad626c]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:425;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-b44fe40c]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-transcript[data-v-b44fe40c]{flex:1;min-height:0;overflow-y:auto}.agent-transcript[data-v-b44fe40c] .think-body,.agent-transcript[data-v-b44fe40c] .ar-body,.agent-transcript[data-v-b44fe40c] .tf-body,.agent-transcript[data-v-b44fe40c] .bb,.agent-transcript[data-v-b44fe40c] .tl-body{transition:none}.agent-error[data-v-b44fe40c]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-b44fe40c]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.fallback-lines[data-v-b44fe40c]{margin:0;color:var(--color-text-muted);font:var(--text-sm)/var(--leading-relaxed) var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere}.copy-menu[data-v-b44fe40c]{position:fixed;z-index:var(--z-dropdown)}.tdp[data-v-8b9af3ab]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.tdp-body[data-v-8b9af3ab]{flex:1;min-height:0;overflow:auto;font-family:var(--mono)}.tdp-output[data-v-8b9af3ab]{padding:8px 12px;color:var(--dim);font-size:var(--text-base);line-height:1.7;white-space:pre-wrap;word-break:break-word}.tdp-empty[data-v-8b9af3ab]{padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center}.hl-code[data-v-4878c39c]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-4878c39c]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-body[data-v-4878c39c]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-4878c39c]{padding-left:var(--space-3)}.hl-row[data-v-4878c39c]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-4878c39c]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-4878c39c]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-4878c39c]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-gutter+.hl-text[data-v-4878c39c]{padding-left:var(--space-2)}.row-add[data-v-4878c39c]{background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-4878c39c]{color:var(--color-success)}.row-del[data-v-4878c39c]{background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-4878c39c]{color:var(--color-danger)}.row-hunk[data-v-4878c39c]{background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-4878c39c]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-4878c39c]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-4878c39c]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.turn-diff-panel[data-v-67a3cc7e]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-surface)}.tdp-body[data-v-67a3cc7e]{min-height:0;overflow:auto;padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-3)}.tdp-file[data-v-67a3cc7e]{min-width:0;border:1px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden;background:var(--color-surface-raised)}.tdp-file-head[data-v-67a3cc7e]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--color-line)}.tdp-path[data-v-67a3cc7e]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--text-xs) var(--font-mono);color:var(--color-text-muted)}.tdp-diff[data-v-67a3cc7e]{overflow:auto;background:var(--color-surface)}.tdp-unavailable[data-v-67a3cc7e]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.tdp-unavailable p[data-v-67a3cc7e]{margin:0}.ui-thinking-indicator[data-v-ed8aef9e]{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:1;color:var(--color-accent);font-family:var(--font-mono);user-select:none;position:relative}.ui-thinking-indicator--sm[data-v-ed8aef9e]{width:14px;height:14px;font-size:14px}.ui-thinking-indicator--md[data-v-ed8aef9e]{width:18px;height:18px;font-size:18px}.ui-thinking-indicator--lg[data-v-ed8aef9e]{width:24px;height:24px;font-size:24px}.ui-thinking-indicator__frame[data-v-ed8aef9e]{position:absolute;inset:0;display:grid;place-items:center;opacity:0;animation:ui-thinking-indicator-frame-ed8aef9e .64s steps(1,end) infinite;animation-delay:var(--thinking-frame-delay)}.ui-thinking-indicator--fast .ui-thinking-indicator__frame[data-v-ed8aef9e]{animation-duration:.32s;animation-delay:var(--thinking-frame-fast-delay)}@keyframes ui-thinking-indicator-frame-ed8aef9e{0%,12.49%{opacity:1}12.5%,to{opacity:0}}@media(prefers-reduced-motion:reduce){.ui-thinking-indicator__frame[data-v-ed8aef9e]{animation:none}.ui-thinking-indicator__frame[data-v-ed8aef9e]:first-child{opacity:1}}.sc[data-v-4572766b]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-4572766b]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-4572766b]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-4572766b]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:1px solid var(--line);background:var(--panel)}.sc-input[data-v-4572766b]{flex:1;min-width:0;resize:none;border:1px solid var(--line);border-radius:var(--r-sm, 8px);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-4572766b]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-4572766b]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm, 8px);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-4572766b]:disabled{opacity:.4;cursor:default}.sc-send[data-v-4572766b]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-4572766b]{flex:none;padding:8px 12px 12px}.sc-body[data-v-4572766b] .sending-placeholder,.sc-body[data-v-4572766b] .sending-line{display:none}.changes-pane[data-v-67ba251c]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-67ba251c],.dv-change-count[data-v-67ba251c]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-67ba251c]{flex:1}.ch-head[data-v-67ba251c]{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden}.br-label[data-v-67ba251c]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px))}.br-name[data-v-67ba251c]{color:var(--color-accent);font-weight:500;font-size:var(--ui-font-size)}.sync-info[data-v-67ba251c]{display:flex;align-items:center;gap:4px}.ahead[data-v-67ba251c]{color:var(--color-accent);font-size:var(--text-base)}.behind[data-v-67ba251c]{color:var(--color-warning);font-size:var(--text-base)}.empty-head[data-v-67ba251c]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-67ba251c]{flex:1;overflow-y:auto;padding:4px 0}.ch-row[data-v-67ba251c]{display:flex;align-items:center;gap:10px;padding:6px 16px;cursor:pointer;font-size:var(--ui-font-size);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:inherit;color:inherit}.ch-row[data-v-67ba251c]:hover{background:var(--panel2, #f5f6f8)}.ch-row[data-v-67ba251c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-67ba251c]{padding:4px 0}.tree-list[data-v-67ba251c]{list-style:none;margin:0;padding:0}.tree-row[data-v-67ba251c]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 16px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--ui-font-size);color:inherit;cursor:pointer}.tree-row[data-v-67ba251c]:hover{background:var(--panel2, #f5f6f8)}.tree-row[data-v-67ba251c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-67ba251c]{color:var(--color-text);font-weight:500}.tree-file[data-v-67ba251c]{color:var(--color-text)}.tree-icon[data-v-67ba251c]{flex:none;color:var(--muted)}.tree-name[data-v-67ba251c]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-67ba251c]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-67ba251c]{background:color-mix(in srgb,var(--color-accent) 12%,var(--bg));color:var(--color-accent)}.badge.added[data-v-67ba251c]{background:color-mix(in srgb,var(--color-success) 10%,var(--bg));color:var(--color-success)}.badge.deleted[data-v-67ba251c]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger)}.badge.renamed[data-v-67ba251c]{background:color-mix(in srgb,var(--color-warning) 12%,var(--bg));color:var(--color-warning)}.badge.untracked[data-v-67ba251c]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.badge.conflicted[data-v-67ba251c]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-67ba251c]{background:var(--color-surface-sunken);color:var(--faint, #c0c5cc)}.badge.clean[data-v-67ba251c]{background:transparent;color:var(--faint, #c0c5cc)}.badge.unknown[data-v-67ba251c]{background:var(--color-surface-sunken);color:var(--muted, #9098a0)}.fpath[data-v-67ba251c]{color:var(--color-text);font-size:var(--ui-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.empty-state[data-v-67ba251c]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted, #9098a0);font-size:var(--ui-font-size);text-align:center;user-select:none}.diff-loading[data-v-67ba251c]{flex-direction:row;gap:var(--space-2)}.diff-head[data-v-67ba251c]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-67ba251c]{flex:1;min-height:0;overflow:auto}.diff-content-enter-active[data-v-67ba251c],.diff-content-leave-active[data-v-67ba251c]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-67ba251c],.diff-content-leave-to[data-v-67ba251c]{opacity:0}@media(max-width:640px){.ch-head[data-v-67ba251c]{padding:10px 14px}.ch-list[data-v-67ba251c]{padding:2px 0 12px}.ch-row[data-v-67ba251c]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--ui-font-size-sm)}.ch-row[data-v-67ba251c]:active{background:var(--panel2, #f5f6f8)}.badge[data-v-67ba251c]{width:18px;height:18px}.fpath[data-v-67ba251c]{font-size:var(--ui-font-size-sm)}.tree-row[data-v-67ba251c]{min-height:40px;padding:8px 14px}.diff-head[data-v-67ba251c]{padding:8px 12px;gap:10px}.diff-path[data-v-67ba251c]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-67ba251c],.br-label[data-v-67ba251c],.empty-head[data-v-67ba251c]{font-family:var(--sans)}.ch-row[data-v-67ba251c],.ct-row[data-v-67ba251c]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-67ba251c],.changed-tree .badge[data-v-67ba251c]{border-radius:var(--radius-sm)}.change-count[data-v-67ba251c]{font-family:var(--sans);border-radius:999px}.mp[data-v-92ec064d]{display:flex;flex-direction:column;gap:var(--space-2)}.search-wrap[data-v-92ec064d]{padding-bottom:var(--space-1)}.tab-strip[data-v-92ec064d]{display:flex;gap:var(--space-1);overflow-x:auto}.model-list[data-v-92ec064d]{display:flex;flex-direction:column;padding:var(--space-1) 0}.model-row[data-v-92ec064d]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-2);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.model-row[data-v-92ec064d]:hover,.model-row.is-selected[data-v-92ec064d]{background:var(--color-surface-sunken)}.model-row.is-current[data-v-92ec064d]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.check[data-v-92ec064d]{width:14px;height:14px;color:var(--color-accent);flex:none;display:flex;align-items:center;justify-content:center}.model-main[data-v-92ec064d]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-92ec064d]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-id[data-v-92ec064d]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-provider[data-v-92ec064d]{flex:none;max-width:110px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-ctx[data-v-92ec064d]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.caps[data-v-92ec064d]{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}.state-row[data-v-92ec064d]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-92ec064d]{color:var(--color-warning)}.empty[data-v-92ec064d]{padding:var(--space-5) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-92ec064d]{padding-top:var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:1px solid var(--color-line)}@media(max-width:640px){.model-provider[data-v-92ec064d],.caps[data-v-92ec064d]{display:none}}.ui-switch[data-v-d7337ade]{position:relative;width:36px;height:20px;flex:none;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-d7337ade]{background:var(--color-accent)}.ui-switch[data-v-d7337ade]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-d7337ade]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-d7337ade]{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--surface-light);box-shadow:var(--shadow-xs);transition:transform var(--duration-base) var(--ease-out)}.ui-switch.is-on .ui-switch__thumb[data-v-d7337ade]{background:var(--color-text-on-accent);transform:translate(16px)}.ui-select[data-v-77d887db]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background-color:var(--color-surface-raised);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right var(--space-3) center;background-size:16px 16px;box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);padding-right:calc(var(--space-3) + 16px + var(--space-2));cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-select--md[data-v-77d887db]{height:38px}.ui-select--sm[data-v-77d887db]{height:32px;font-size:var(--text-sm)}.ui-select[data-v-77d887db]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-select[data-v-77d887db]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select[data-v-77d887db]:disabled{opacity:.5;cursor:not-allowed}.ui-select.has-error[data-v-77d887db]{border-color:var(--color-danger)}.ui-select.has-error[data-v-77d887db]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}html[data-color-scheme=dark] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}@media(prefers-color-scheme:dark){html[data-color-scheme=system] .ui-select[data-v-77d887db]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa0a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E")}}.ui-field[data-v-bd93f701]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-bd93f701]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-bd93f701]{font-size:var(--text-xs);color:var(--color-danger)}.provider-form[data-v-e7c6ed44]{display:flex;flex-direction:column;gap:var(--space-4)}.provider-form__managed[data-v-e7c6ed44]{color:var(--color-text-muted);font-size:var(--text-sm)}.provider-form__fields[data-v-e7c6ed44]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}.provider-form__key[data-v-e7c6ed44]{position:relative}.provider-form__key[data-v-e7c6ed44] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.provider-form__eye[data-v-e7c6ed44]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.provider-form__models-head[data-v-e7c6ed44]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}.provider-form__models[data-v-e7c6ed44]{overflow-x:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.provider-form__model[data-v-e7c6ed44]{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(120px,.7fr) minmax(160px,1fr) 32px;gap:var(--space-2);align-items:center;padding:var(--space-2);border-top:1px solid var(--color-line)}.provider-form__model--head[data-v-e7c6ed44]{border-top:0;background:var(--color-surface-sunken);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.provider-form__error[data-v-e7c6ed44]{color:var(--color-danger);font-size:var(--text-sm)}.provider-form__actions[data-v-e7c6ed44]{display:flex;justify-content:flex-end;gap:var(--space-2)}@media(max-width:640px){.provider-form__fields[data-v-e7c6ed44]{grid-template-columns:1fr}}.add-provider-flow[data-v-f7a8fd45]{display:flex;flex-direction:column;gap:var(--space-4)}.add-provider-flow__section[data-v-f7a8fd45],.add-provider-flow__form[data-v-f7a8fd45]{display:flex;flex-direction:column;gap:var(--space-3)}.add-provider-flow__state[data-v-f7a8fd45]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-muted)}.add-provider-flow__catalog[data-v-f7a8fd45]{max-height:320px;overflow-y:auto;border:1px solid var(--color-line);border-radius:var(--radius-md)}.add-provider-flow__entry[data-v-f7a8fd45]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:36px;padding:var(--space-2) var(--space-3);border:0;border-top:1px solid var(--color-line);background:transparent;color:var(--color-text);text-align:left;cursor:pointer}.add-provider-flow__entry[data-v-f7a8fd45]:first-child{border-top:0}.add-provider-flow__entry[data-v-f7a8fd45]:hover:not(:disabled){background:var(--color-hover)}.add-provider-flow__entry[data-v-f7a8fd45]:disabled{opacity:.55;cursor:not-allowed}.add-provider-flow__entry>span[data-v-f7a8fd45]:last-child{color:var(--color-text-faint);font-size:var(--text-xs)}.add-provider-flow__name[data-v-f7a8fd45]{font-weight:var(--weight-medium)}.add-provider-flow__grow[data-v-f7a8fd45]{flex:1}.add-provider-flow__empty[data-v-f7a8fd45]{padding:var(--space-4);color:var(--color-text-muted);text-align:center}.add-provider-flow__back[data-v-f7a8fd45]{align-self:flex-start;display:inline-flex;align-items:center;gap:var(--space-1);padding:0;border:0;background:transparent;color:var(--color-text-muted);cursor:pointer}.add-provider-flow__back-icon[data-v-f7a8fd45]{transform:rotate(180deg)}.add-provider-flow__key[data-v-f7a8fd45]{position:relative}.add-provider-flow__key[data-v-f7a8fd45] .ui-input{padding-right:calc(var(--p-ic-sm) + var(--space-3))}.add-provider-flow__eye[data-v-f7a8fd45]{position:absolute;top:50%;right:var(--space-1);transform:translateY(-50%)}.add-provider-flow__note[data-v-f7a8fd45]{margin:0;color:var(--color-text-muted);font-size:var(--text-sm)}.add-provider-flow__warning[data-v-f7a8fd45]{color:var(--color-warning);font-size:var(--text-sm)}.add-provider-flow__error[data-v-f7a8fd45]{color:var(--color-danger);font-size:var(--text-sm)}.add-provider-flow__actions[data-v-f7a8fd45]{display:flex;justify-content:flex-end;gap:var(--space-2)}.providers-panel[data-v-b143e58f]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) 0}.providers-panel__heading h3[data-v-b143e58f]{margin:0;color:var(--color-text);font-size:var(--text-xl);font-weight:var(--weight-medium)}.providers-panel__heading p[data-v-b143e58f]{margin:var(--space-1) 0 0;color:var(--color-text-muted);font-size:var(--text-sm)}.providers-panel__state[data-v-b143e58f]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-5) 0;color:var(--color-text-muted)}.providers-panel__state--warning[data-v-b143e58f]{color:var(--color-warning)}.providers-panel__card[data-v-b143e58f]{overflow:hidden;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-bg)}.providers-panel__add[data-v-b143e58f]{border-style:dashed}.providers-panel__summary[data-v-b143e58f]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:54px;padding:var(--space-3) var(--space-4);border:0;background:transparent;color:var(--color-text);text-align:left;cursor:pointer}.providers-panel__summary[data-v-b143e58f]:hover{background:var(--color-hover)}.providers-panel__summary[data-v-b143e58f]:focus-visible{outline:none;box-shadow:inset var(--p-focus-ring)}.providers-panel__add-icon[data-v-b143e58f]{display:grid;place-items:center;width:24px;height:24px;border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent)}.providers-panel__grow[data-v-b143e58f]{flex:1}.providers-panel__identity[data-v-b143e58f]{display:flex;min-width:0;flex-direction:column;gap:var(--space-1)}.providers-panel__identity strong[data-v-b143e58f],.providers-panel__identity span[data-v-b143e58f]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.providers-panel__identity span[data-v-b143e58f],.providers-panel__count[data-v-b143e58f]{color:var(--color-text-muted);font-size:var(--text-xs)}.providers-panel__status[data-v-b143e58f]{display:block;width:8px;height:8px;border:1px solid var(--color-text-faint);border-radius:var(--radius-full)}.providers-panel__status.is-connected[data-v-b143e58f]{border-color:var(--color-success);background:var(--color-success)}.providers-panel__status.is-error[data-v-b143e58f]{border-color:var(--color-danger);background:var(--color-danger)}.providers-panel__summary[data-v-b143e58f] .ui-icon.is-rotated{transform:rotate(90deg)}.providers-panel__details[data-v-b143e58f]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-4);border-top:1px solid var(--color-line);background:var(--color-surface-sunken)}.providers-panel__model-list[data-v-b143e58f]{display:flex;flex-wrap:wrap;gap:var(--space-2)}.providers-panel__model-list code[data-v-b143e58f]{padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs)}.providers-panel__delete[data-v-b143e58f]{display:flex;justify-content:flex-start;padding-top:var(--space-3);border-top:1px solid var(--color-line)}@media(max-width:640px){.providers-panel__count[data-v-b143e58f]{display:none}.providers-panel__summary[data-v-b143e58f]{gap:var(--space-2);padding:var(--space-3)}}.sm-picker[data-v-57066bcd]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-57066bcd]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.sm-picker__trigger[data-v-57066bcd]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-57066bcd]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__trigger[data-v-57066bcd]:disabled{cursor:not-allowed;opacity:.6}.sm-picker__value[data-v-57066bcd]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value>span[data-v-57066bcd]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-57066bcd]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-57066bcd]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-fast) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-57066bcd]{transform:rotate(180deg)}.sm-picker__menu[data-v-57066bcd]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-57066bcd]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-57066bcd]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:1px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-57066bcd]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-57066bcd]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-57066bcd]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__option[data-v-57066bcd]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option[data-v-57066bcd]:hover,.sm-picker__option.is-active[data-v-57066bcd]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-57066bcd]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-57066bcd]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-57066bcd]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-57066bcd]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-57066bcd]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-8ba6a8d4]{display:flex;flex-direction:row;min-height:0;height:100%}.settings-tabs[data-v-8ba6a8d4]{display:flex;flex-direction:column;flex:none;width:148px;padding:var(--space-2);gap:2px;overflow-y:auto}.tab[data-v-8ba6a8d4]{text-align:left;display:flex;align-items:center;gap:var(--space-2);padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab .ui-icon[data-v-8ba6a8d4]{flex:none;color:var(--color-text-faint)}.tab.on .ui-icon[data-v-8ba6a8d4]{color:var(--color-accent)}.tab[data-v-8ba6a8d4]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.tab.on[data-v-8ba6a8d4]{background:var(--color-accent-soft);color:var(--color-accent);font-weight:var(--weight-medium)}.tab[data-v-8ba6a8d4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-8ba6a8d4]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) var(--space-5) var(--space-5) var(--space-6);flex:1;min-width:0}.panel[data-v-8ba6a8d4]{display:block}.sec[data-v-8ba6a8d4]{padding:var(--space-4) 0;border-bottom:1px solid var(--color-line)}.sec[data-v-8ba6a8d4]:last-child{border-bottom:none}.sec-head[data-v-8ba6a8d4]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-8ba6a8d4]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted)}.sec-head .sec-title[data-v-8ba6a8d4]{margin-bottom:0}.saving[data-v-8ba6a8d4]{flex:none;font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted)}.row[data-v-8ba6a8d4]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.rlabel[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);display:flex;flex-direction:column;gap:var(--space-1)}.rvalue[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-8ba6a8d4]{font-family:var(--font-mono);font-size:var(--text-xs)}.value-wrap[data-v-8ba6a8d4]{display:flex;align-items:center;gap:var(--space-1);max-width:60%;min-width:0;flex:none}.value-wrap .rvalue[data-v-8ba6a8d4]{max-width:100%}.hint[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.select-wrap[data-v-8ba6a8d4]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-8ba6a8d4]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text-muted);padding:var(--space-1) 0}.actions[data-v-8ba6a8d4]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}@media(max-width:640px){.sd[data-v-8ba6a8d4]{flex-direction:column}.settings-tabs[data-v-8ba6a8d4]{flex-direction:row;width:auto;padding:var(--space-2) var(--space-3);gap:var(--space-1);overflow-x:auto}.tab[data-v-8ba6a8d4]{white-space:nowrap;flex:none}.row[data-v-8ba6a8d4]{align-items:flex-start;flex-direction:column}.select-wrap[data-v-8ba6a8d4]{width:100%;max-width:none}}.setting-card[data-v-8ba6a8d4]{border:1px solid var(--color-line);border-radius:var(--radius-xl);overflow:hidden;background:var(--color-bg)}.panel-head[data-v-8ba6a8d4]{margin-bottom:var(--space-4)}.panel-kicker[data-v-8ba6a8d4]{font-size:var(--text-xs);letter-spacing:.05em;text-transform:uppercase;color:var(--color-text-faint);margin-bottom:var(--space-1)}.panel-title[data-v-8ba6a8d4]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-2xl);font-weight:var(--weight-semibold);letter-spacing:-.01em;color:var(--color-text)}.panel-desc[data-v-8ba6a8d4]{margin:0;font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-8ba6a8d4]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-8ba6a8d4]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:1px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-sm);background:var(--color-surface-raised);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-8ba6a8d4]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-8ba6a8d4]{width:15px;height:15px;flex:none}.archive-search input[data-v-8ba6a8d4]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-8ba6a8d4]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-8ba6a8d4]{margin-bottom:0}.archive-workspace[data-v-8ba6a8d4]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-8ba6a8d4]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-8ba6a8d4]{font-family:var(--font-mono);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-8ba6a8d4]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-regular);font-size:var(--text-xs);flex:none}.archive-row[data-v-8ba6a8d4]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:1px solid var(--color-line)}.archive-row[data-v-8ba6a8d4]:first-child{border-top:none}.archive-row[data-v-8ba6a8d4]:hover{background:var(--color-surface-sunken)}.archive-meta[data-v-8ba6a8d4]{min-width:0}.archive-name[data-v-8ba6a8d4]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-8ba6a8d4]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-mono)}.archive-draining[data-v-8ba6a8d4]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-sm)}.archive-empty[data-v-8ba6a8d4]{padding:var(--space-6) var(--space-4);border:1px solid var(--color-line);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-sm);text-align:center;background:var(--color-bg)}@media(max-width:640px){.archive-toolbar[data-v-8ba6a8d4]{flex-direction:column;align-items:stretch}.archive-search[data-v-8ba6a8d4]{min-width:0}}[data-v-8ba6a8d4] .ui-dialog{width:min(980px,96vw)}[data-v-8ba6a8d4] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.aw[data-v-09b74e91]{margin-left:calc(-1 * var(--space-5));margin-right:calc(-1 * var(--space-5));margin-bottom:calc(-1 * var(--space-4))}.crumbbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.crumbs[data-v-09b74e91]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-09b74e91]{color:var(--color-text-muted)}.crumb[data-v-09b74e91]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-09b74e91]:hover{color:var(--color-accent);background:var(--color-surface-sunken)}.crumb.last[data-v-09b74e91]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-5);border-bottom:1px solid var(--color-line)}.filter-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-09b74e91]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-09b74e91]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-09b74e91]{color:var(--color-text)}.filterbar.has-error[data-v-09b74e91]{border-bottom-color:var(--color-danger)}.filterbar.has-error .filter-icon[data-v-09b74e91]{color:var(--color-danger)}.folder-list[data-v-09b74e91]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-09b74e91],.fl-empty[data-v-09b74e91]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.fl-note[data-v-09b74e91]{padding:var(--space-2) var(--space-4);font-size:var(--text-sm);color:var(--color-text-muted)}.fl-error[data-v-09b74e91]{color:var(--color-danger)}.folder-row[data-v-09b74e91]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-1) var(--space-4);border-radius:var(--radius-md)}.folder-row[data-v-09b74e91]:hover{background:var(--color-surface-sunken)}.dir-icon[data-v-09b74e91]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-row:hover .dir-icon[data-v-09b74e91]{color:var(--color-accent)}.folder-name[data-v-09b74e91]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.degraded-hint[data-v-09b74e91]{padding:var(--space-6) var(--space-5);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.add-error[data-v-09b74e91]{margin:0 14px 8px;padding:6px 10px;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:#b3261e;background:#b3261e14;border:1px solid rgba(179,38,30,.25);border-radius:3px}.actions[data-v-09b74e91]{display:flex;justify-content:flex-end;gap:var(--space-3);padding:var(--space-4) var(--space-5)}.footer-hint[data-v-09b74e91]{padding:var(--space-2) var(--space-5);font-size:var(--text-xs);color:var(--color-text-muted);border-top:1px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-09b74e91]{min-height:44px}.crumbbar[data-v-09b74e91]{align-items:flex-start}.actions[data-v-09b74e91]{flex-wrap:wrap}}.confirm-dialog__message[data-v-074405fe]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-7992546c]{margin:0;padding:0}.row[data-v-7992546c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-7992546c]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-7992546c]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-7992546c],.row dd.workflow-on[data-v-7992546c]{color:var(--color-accent)}.ctx-text[data-v-7992546c]{flex:none}.bar[data-v-7992546c]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-7992546c]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-7992546c]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-7992546c]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-7992546c]{width:auto}.row dd[data-v-7992546c]{max-width:100%;flex-wrap:wrap}}.ui-toast[data-v-44bc260b]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-44bc260b]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-44bc260b]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-44bc260b]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-44bc260b]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-44bc260b]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-44bc260b]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-44bc260b]{flex:1;min-width:0}.ui-toast__title[data-v-44bc260b]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-44bc260b]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-44bc260b]{color:var(--color-danger)}.ui-toast__close[data-v-44bc260b]{flex:none;margin:-3px -4px 0 0}.toasts[data-v-6d8f28b8]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-6d8f28b8],.toast-leave-active[data-v-6d8f28b8]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-6d8f28b8],.toast-leave-to[data-v-6d8f28b8]{opacity:0;transform:translate(16px)}.toast-move[data-v-6d8f28b8]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-6d8f28b8]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-6d8f28b8]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-6d8f28b8]:hover{text-decoration:underline}.details[data-v-6d8f28b8]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:1px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-6d8f28b8]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-6d8f28b8]{color:var(--color-text-muted)}.detail-row dd[data-v-6d8f28b8]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-6d8f28b8]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-6d8f28b8]{grid-template-columns:1fr;gap:2px}}.update-toast[data-v-f7646e4e]{position:fixed;right:16px;bottom:152px;z-index:61;width:min(360px,calc(100vw - 32px));display:flex;flex-direction:column;gap:10px;padding:12px 13px;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 6px 22px #0000001f;font-size:var(--ui-font-size);line-height:1.45}.title[data-v-f7646e4e]{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.msg[data-v-f7646e4e]{margin-top:2px;color:var(--muted)}.acts[data-v-f7646e4e]{display:flex;justify-content:flex-end;gap:8px}.skip[data-v-f7646e4e],.go[data-v-f7646e4e]{padding:5px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--muted);font:inherit;font-size:var(--ui-font-size-xs);cursor:pointer}.skip[data-v-f7646e4e]:hover{color:var(--ink)}.go[data-v-f7646e4e]{border-color:transparent;background:var(--blue);color:#fff;font-weight:600}.go[data-v-f7646e4e]:disabled{opacity:.6;cursor:default}@media(max-width:640px){.update-toast[data-v-f7646e4e]{left:12px;right:12px;bottom:calc(150px + env(safe-area-inset-bottom));width:auto}}.ui-action-toast-host[data-v-9efa207b]{pointer-events:none}.ui-action-toast[data-v-9efa207b]{display:flex;align-items:center;gap:var(--space-3);min-width:260px;max-width:min(420px,calc(100vw - 32px));padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);box-shadow:var(--shadow-lg);color:var(--color-text);pointer-events:auto}.ui-action-toast__body[data-v-9efa207b]{flex:1;min-width:0;font-size:var(--text-sm)}.ui-action-toast__close[data-v-9efa207b]{flex:none}@media(max-width:640px){.ui-action-toast[data-v-9efa207b]{max-width:none;width:100%}}.window-controls[data-v-041ca08b]{position:fixed;top:12px;right:14px;z-index:60;display:flex;gap:8px;-webkit-app-region:no-drag}.wc[data-v-041ca08b]{width:14px;height:14px;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:transparent}.wc-close[data-v-041ca08b]{background:#ff5f57}.wc-min[data-v-041ca08b]{background:#febc2e}.wc-max[data-v-041ca08b]{background:#28c840}.window-controls:hover .wc[data-v-041ca08b]{color:#0000008c}.wc[data-v-041ca08b]:focus-visible{outline:2px solid var(--blue);outline-offset:2px;color:#0000008c}.topbar[data-v-27a83eb2]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:1px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-27a83eb2]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-27a83eb2]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-27a83eb2]{color:var(--color-text)}.tb-path .sl[data-v-27a83eb2]{color:var(--color-text-faint)}.tb-path .se[data-v-27a83eb2]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-27a83eb2]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-27a83eb2]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-27a83eb2]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-27a83eb2]{background:var(--color-success)}.topbar .tb-path[data-v-27a83eb2]{font-family:var(--sans)}.sheet-root[data-v-92ecd88c]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-92ecd88c]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-92ecd88c]{position:relative;background:var(--color-surface-raised);border:1px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-92ecd88c]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-92ecd88c]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-92ecd88c]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-92ecd88c]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-92ecd88c]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-92ecd88c],.sheet-leave-active[data-v-92ecd88c]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-92ecd88c],.sheet-leave-active .sheet-panel[data-v-92ecd88c]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-92ecd88c],.sheet-leave-to[data-v-92ecd88c]{opacity:0}.sheet-enter-from .sheet-panel[data-v-92ecd88c],.sheet-leave-to .sheet-panel[data-v-92ecd88c]{transform:translateY(102%)}.newrow[data-v-4c7bceaf]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-4c7bceaf]:hover,.newrow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-4c7bceaf]:hover{background:var(--color-surface-sunken)}.newrow.secondary[data-v-4c7bceaf]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-4c7bceaf]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-4c7bceaf]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-4c7bceaf]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-4c7bceaf]{padding-top:2px}.mgh[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-4c7bceaf]:hover,.mgh[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-4c7bceaf]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-4c7bceaf]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-4c7bceaf]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-4c7bceaf]{margin:-10px -12px -10px 0}.mgh-add[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.mgh-more[data-v-4c7bceaf]{margin:-10px -8px}.mgh-more[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.srow[data-v-4c7bceaf]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-4c7bceaf]:hover,.srow[data-v-4c7bceaf]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-4c7bceaf]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-4c7bceaf]{flex:1;min-width:0}.srow .m .t[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-4c7bceaf]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-4c7bceaf]{position:relative}.srow .m .t.run[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-4c7bceaf 1.4s ease-in-out infinite}@keyframes mRunPulse-4c7bceaf{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-4c7bceaf]{position:relative}.srow .m .t.aborted[data-v-4c7bceaf]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-4c7bceaf]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-4c7bceaf]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--surface-light);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-4c7bceaf]:active{color:var(--color-text);background:var(--color-surface-sunken)}.kmenu[data-v-4c7bceaf]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-4c7bceaf]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more[data-v-4c7bceaf]{display:flex;align-items:center;width:100%;min-height:44px;padding:var(--space-1) var(--m-pad) var(--space-1) var(--m-indent);background:none;border:none;color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-4c7bceaf]:active{color:var(--color-accent-hover);background:var(--color-surface-sunken)}.newrow[data-v-4c7bceaf]{font-family:var(--sans)}.mlist .srow[data-v-4c7bceaf]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-4c7bceaf]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-da4b6716]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-da4b6716]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-da4b6716]:hover:not(.read-only){background:var(--color-surface-sunken)}.srow[data-v-da4b6716]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-da4b6716]{cursor:default}.srow-main[data-v-da4b6716]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-da4b6716]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-da4b6716]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-da4b6716]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-da4b6716]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-da4b6716]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-da4b6716]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-da4b6716]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-da4b6716]{background:var(--color-accent)}.toggle[data-v-da4b6716]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:1px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-da4b6716]:after{left:21px}.srow.pref[data-v-da4b6716]{cursor:default}.goal-actions[data-v-da4b6716]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1)}.srow.acct.in .srow-label[data-v-da4b6716]{color:var(--color-accent-hover);font-weight:500}.srow.acct.out .srow-label[data-v-da4b6716]{color:var(--color-danger)}.ctx-meter[data-v-da4b6716]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-da4b6716]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-da4b6716]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-da4b6716],.cache-note[data-v-da4b6716]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-da4b6716]{flex:1 1 auto}.srow-sub[data-v-da4b6716]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-da4b6716]{flex-wrap:wrap}.srow.pref .srow-main[data-v-da4b6716]{flex:1 0 100%}.srow-val[data-v-da4b6716],.chev[data-v-da4b6716],.toggle[data-v-da4b6716],.ctx-meter[data-v-da4b6716],.goal-actions[data-v-da4b6716]{margin-top:2px}}.srow[data-v-da4b6716],.srow-sub[data-v-da4b6716],.srow-val[data-v-da4b6716],.cache-note[data-v-da4b6716]{font-family:var(--sans)}.arch-subhead[data-v-da4b6716]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-da4b6716]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-da4b6716]{font-size:20px}.arch-count[data-v-da4b6716]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-da4b6716]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-da4b6716]{flex:1;min-width:160px}.arch-row[data-v-da4b6716]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:1px solid var(--color-line)}.arch-row[data-v-da4b6716]:first-of-type{border-top:none}.arch-meta[data-v-da4b6716]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-da4b6716]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-da4b6716]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-da4b6716]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.wizard[data-v-043d59e7]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;flex-direction:column;overflow-y:auto;background:var(--color-bg);color:var(--color-text);font-family:var(--font-ui)}.wiz-body[data-v-043d59e7]{display:flex;flex:1;flex-direction:column;width:min(560px,100%);margin:0 auto;padding:max(var(--space-8),12vh) var(--space-5) var(--space-6)}.wiz-step[data-v-043d59e7]{display:flex;flex:1;min-height:0;width:100%;flex-direction:column;align-items:center}.wiz-step-fill[data-v-043d59e7]{display:flex;flex:1;min-height:0;width:100%;flex-direction:column;justify-content:center}.wiz-title[data-v-043d59e7]{margin:var(--space-4) 0 0;color:var(--color-text);font-size:var(--text-2xl);font-weight:var(--weight-semibold);line-height:var(--leading-tight);text-align:center}.wiz-sub[data-v-043d59e7]{max-width:460px;margin:var(--space-2) 0 var(--space-6);color:var(--color-text-muted);font-size:var(--text-base);line-height:var(--leading-normal);text-align:center}.pref-group[data-v-043d59e7]{width:100%;margin-bottom:var(--space-5)}.pref-label[data-v-043d59e7]{margin-bottom:var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);font-weight:var(--weight-medium)}.theme-cards[data-v-043d59e7]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);width:100%}.accent-cards[data-v-043d59e7]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-3);width:100%}.opt-card[data-v-043d59e7]{display:flex;align-items:center;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-043d59e7]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-043d59e7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-043d59e7]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-043d59e7]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.theme-card[data-v-043d59e7]{flex-direction:column;gap:var(--space-3);padding:var(--space-3)}.theme-preview[data-v-043d59e7]{display:flex;width:100%;aspect-ratio:16 / 10;overflow:hidden;border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md)}.theme-preview--light[data-v-043d59e7]{background:var(--surface-light)}.theme-preview--dark[data-v-043d59e7]{background:var(--surface-dark)}.theme-half[data-v-043d59e7]{display:flex;flex:1;min-width:0}.theme-half--light[data-v-043d59e7]{background:var(--surface-light)}.theme-half--dark[data-v-043d59e7]{background:var(--surface-dark)}.theme-side[data-v-043d59e7]{width:30%;flex:none;background:color-mix(in srgb,currentColor 7%,transparent)}.theme-preview--dark .theme-side[data-v-043d59e7],.theme-half--dark .theme-side[data-v-043d59e7]{background:color-mix(in srgb,var(--surface-light) 8%,transparent)}.theme-lines[data-v-043d59e7]{display:flex;flex:1;flex-direction:column;gap:6px;padding:14% 12%}.theme-lines span[data-v-043d59e7]{height:6px;border-radius:var(--radius-full);background:color-mix(in srgb,currentColor 16%,transparent)}.theme-preview--dark .theme-lines span[data-v-043d59e7],.theme-half--dark .theme-lines span[data-v-043d59e7]{background:color-mix(in srgb,var(--surface-light) 22%,transparent)}.theme-lines span[data-v-043d59e7]:nth-child(1){width:62%}.theme-lines span[data-v-043d59e7]:nth-child(2){width:88%}.theme-lines span[data-v-043d59e7]:nth-child(3){width:44%}.accent-card[data-v-043d59e7]{gap:var(--space-3);padding:var(--space-4)}.opt-radio[data-v-043d59e7]{display:inline-flex;width:18px;height:18px;flex:none;align-items:center;justify-content:center;border:var(--p-hairline) solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-surface-raised)}.opt-radio[data-v-043d59e7]:after{width:8px;height:8px;border-radius:var(--radius-full);background:transparent;content:""}.opt-radio.on[data-v-043d59e7]{border-color:var(--color-accent)}.opt-radio.on[data-v-043d59e7]:after{background:var(--color-accent)}.accent-swatch[data-v-043d59e7]{width:14px;height:14px;border-radius:var(--radius-full)}.accent-swatch--blue[data-v-043d59e7]{background:var(--accent-primary)}.accent-swatch--mono[data-v-043d59e7]{background:var(--color-text)}.wiz-foot[data-v-043d59e7]{display:flex;width:100%;margin-top:auto;padding:var(--space-8) 0 max(var(--space-8),8vh);flex-direction:column;align-items:center;gap:var(--space-2)}.wiz-primary[data-v-043d59e7]{min-width:140px}@media(max-width:640px){.theme-cards[data-v-043d59e7],.accent-cards[data-v-043d59e7]{grid-template-columns:1fr}}.gload[data-v-2468172e]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-2468172e]{width:120px;height:120px;object-fit:contain;animation:gload-pop-2468172e .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-xl);color:var(--muted);letter-spacing:.04em}.gload-issue[data-v-2468172e]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(480px,80vw);font-family:var(--sans);font-size:var(--text-base);color:var(--muted);text-align:center}.gload-issue-detail[data-v-2468172e]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);opacity:.8;word-break:break-word}@keyframes gload-pop-2468172e{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-2468172e]{animation:none}}.gload-text[data-v-2468172e]{font-family:var(--sans)}.kap-root[data-v-7bab00af]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-7bab00af]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--panel)}.kap-count[data-v-7bab00af]{color:var(--muted)}.kap-head-actions[data-v-7bab00af]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-7bab00af],.kap-view-toggle button[data-v-7bab00af]{padding:3px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-7bab00af]:hover,.kap-view-toggle button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-7bab00af],.kap-view-toggle button.on[data-v-7bab00af]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-7bab00af]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:1px solid var(--line)}.kap-filters select[data-v-7bab00af],.kap-filters input[type=text][data-v-7bab00af]{padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-7bab00af]{flex:1;min-width:120px}.kap-check[data-v-7bab00af]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-7bab00af]{display:flex;gap:0}.kap-view-toggle button[data-v-7bab00af]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-7bab00af]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-7bab00af]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-7bab00af]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:1px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-7bab00af]:hover{background:var(--panel2)}.kap-row.expanded[data-v-7bab00af]{background:var(--color-accent-soft)}.kap-ts[data-v-7bab00af]{flex:none;color:var(--muted)}.kap-badge[data-v-7bab00af]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-7bab00af]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-7bab00af]{background:var(--panel2);color:var(--muted)}.b-err[data-v-7bab00af]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-7bab00af]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-7bab00af]{border-bottom:1px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-7bab00af]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-7bab00af]{padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-7bab00af]:hover{color:var(--color-text)}.kap-detail pre[data-v-7bab00af]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-7bab00af]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-7bab00af]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-7bab00af]{width:100%;border-collapse:collapse}.kap-agg th[data-v-7bab00af],.kap-agg td[data-v-7bab00af]{padding:3px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-7bab00af]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-7bab00af]{text-align:right}.kap-agg .err[data-v-7bab00af]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-7bab00af]{word-break:break-all}.kap-fab[data-v-992ae84c]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-992ae84c]:hover{opacity:1;color:var(--color-accent)}.server-auth-overlay[data-v-82dad292]{position:fixed;inset:0;z-index:var(--z-max);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 70%,transparent)}.server-auth-card[data-v-82dad292]{width:480px;max-width:calc(100vw - 48px);background:var(--color-surface-raised);border:1px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);overflow:hidden;color:var(--color-text);font-family:var(--font-ui)}.server-auth-head[data-v-82dad292]{display:flex;flex-direction:column;padding:20px 22px 14px}.server-auth-title[data-v-82dad292]{margin:0;font-size:var(--text-lg);font-weight:var(--weight-medium);letter-spacing:-.01em;color:var(--color-text)}.server-auth-hint[data-v-82dad292]{margin:4px 0 0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-82dad292]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.server-auth-body[data-v-82dad292]{padding:4px 22px 18px}.server-auth-foot[data-v-82dad292]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.internal-build-tag[data-v-6eba49b4]{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:#f5a623;color:#3a2a00;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.4;white-space:nowrap;user-select:none}.gload-fade-leave-active[data-v-d64883cf]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-d64883cf]{opacity:0}.app-shell[data-v-d64883cf]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.auth-page[data-v-d64883cf]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--bg);color:var(--color-text);box-sizing:border-box}.auth-page-inner[data-v-d64883cf]{width:min(420px,100%);display:flex;flex-direction:column;align-items:flex-start;gap:18px}.auth-page-logo[data-v-d64883cf]{width:64px;height:44px;flex:none;cursor:pointer;user-select:none;-webkit-user-select:none;transition:transform .18s ease}.auth-page-logo[data-v-d64883cf]:hover{transform:scale(1.06)}.auth-page-copy[data-v-d64883cf]{display:flex;flex-direction:column;gap:8px}.auth-page-copy h1[data-v-d64883cf]{margin:0;font-family:var(--sans);font-size:30px;line-height:1.15;font-weight:500;letter-spacing:0;color:var(--color-text)}.auth-page-copy p[data-v-d64883cf]{margin:0;font-family:var(--sans);font-size:var(--ui-font-size-lg);line-height:1.55;color:var(--dim)}.app[data-v-d64883cf]{--preview-w: 460px;flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) 0 auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-d64883cf]>*{min-height:0;min-width:0}.app>.side[data-v-d64883cf]{grid-column:1}.side-handle[data-v-d64883cf]{grid-column:2}.app:not(.mobile)>.con[data-v-d64883cf]{grid-column:3}.preview-handle[data-v-d64883cf]{grid-column:4}.sidebar-toggle-btn[data-v-d64883cf]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-d64883cf .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-d64883cf]{left:72px;animation:none}@keyframes sidebar-toggle-btn-in-d64883cf{0%{opacity:0}}.new-chat-btn[data-v-d64883cf]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-d64883cf .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-d64883cf]{left:98px}.internal-build-fab[data-v-d64883cf]{position:absolute;right:var(--space-3);bottom:var(--space-3);z-index:var(--z-sticky);pointer-events:none}.app.mobile[data-v-d64883cf]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-d64883cf]{grid-column:5;min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1)}.global-preview.open[data-v-d64883cf]{width:var(--preview-w)}.global-preview.no-anim[data-v-d64883cf]{transition:none}.global-preview[data-v-d64883cf]:not(.mobile)>*{width:var(--preview-w);height:100%;box-sizing:border-box;border-left:1px solid var(--line)}.global-preview.mobile[data-v-d64883cf]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:2px solid var(--color-text)}.action-toast-stack[data-v-d64883cf]{position:fixed;right:var(--space-4);bottom:var(--space-4);z-index:var(--z-toast);display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-2);pointer-events:none}.session-action-undo[data-v-d64883cf]{margin-top:var(--space-2);padding:0;border:0;background:transparent;color:var(--color-accent);font:inherit;font-size:var(--text-sm);cursor:pointer}.session-action-undo[data-v-d64883cf]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(max-width:640px){.action-toast-stack[data-v-d64883cf]{right:var(--space-3);bottom:max(var(--space-3),var(--safe-bottom));left:var(--space-3);align-items:stretch}.auth-page[data-v-d64883cf]{align-items:flex-start;padding:max(48px,var(--safe-top)) max(20px,var(--safe-right)) max(24px,var(--safe-bottom)) max(20px,var(--safe-left))}.auth-page-copy h1[data-v-d64883cf]{font-size:26px}.auth-page-btn[data-v-d64883cf]{width:100%}}:root{--panel-head-h: 48px}.app.sidebar-collapsed .chat-header{padding-left:52px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:108px}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2) }.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:146px}.app.sidebar-collapsed .session-admin .sa-head{padding-left:78px}.app.sidebar-collapsed.windows-desktop .session-admin .sa-head{padding-left:var(--space-6)}.app.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:146px}.app.fullscreen.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:78px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .global-preview .ui-panel-header{-webkit-app-region:no-drag}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);--ink: var(--color-text);--fg: var(--color-text);--color-fg: var(--color-text);--border: var(--color-line);--surface-light: #ffffff;--surface-dark: #0d1117;--accent-primary: #1783ff;color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35) }}html[data-accent=mono]{--accent-primary: #171717;--color-accent: #171717;--color-accent-hover: #383838;--color-accent-soft: #f1f1f2;--color-accent-bd: #d4d4d8;--p-selection: rgba(23, 23, 23, .2);--blue: #171717;--blue2: #383838;--soft: #f1f1f2;--bd: #d4d4d8;--bluebg: #f4f4f5;--blueln: #e4e4e7;--logo: #171717 }html[data-color-scheme=dark][data-accent=mono]{--accent-primary: #e8eaed;--color-accent: #e8eaed;--color-accent-hover: #c9cdd4;--color-accent-soft: #21262d;--color-accent-bd: #444c56;--color-text-on-accent: var(--color-bg);--p-selection: rgba(232, 234, 237, .2);--blue: #e8eaed;--blue2: #c9cdd4;--soft: #21262d;--bd: #444c56;--bluebg: #21262d;--blueln: #30363d;--logo: #e8eaed }@media(prefers-color-scheme:dark){html[data-color-scheme=system][data-accent=mono]{--accent-primary: #e8eaed;--color-accent: #e8eaed;--color-accent-hover: #c9cdd4;--color-accent-soft: #21262d;--color-accent-bd: #444c56;--color-text-on-accent: var(--color-bg);--p-selection: rgba(232, 234, 237, .2);--blue: #e8eaed;--blue2: #c9cdd4;--soft: #21262d;--bd: #444c56;--bluebg: #21262d;--blueln: #30363d;--logo: #e8eaed }}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient(var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #f9fbfc;--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: var(--radius-sm);--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: var(--space-05);--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-lg) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-tooltip: .15s;--duration-spin: .7s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--p-scroll-seam-h: 18px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 296px;--p-media-thumb-size: 64px;--p-mention-tip-w: 320px;--p-mention-tip-vmargin: var(--space-3);--p-mention-tip-spinner-lift: -.1em;--opacity-stale: .55;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px }:root,html[data-font-scale=medium]{--base-font: 14px }html[data-font-scale=small]{--base-font: 12px }html[data-font-scale=large]{--base-font: 16px }html[data-font-scale=xlarge]{--base-font: 18px }.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32) }}:root{--color-sidebar-tint: rgba(255, 255, 255, .4) }html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25) }}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531 }html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55) }}::highlight(pythinker-transcript-search){background-color:var(--color-search-match)}::highlight(pythinker-transcript-search-current){background-color:var(--color-search-match-current)}.mention-pill{display:inline-flex;align-items:baseline;gap:var(--space-05);color:var(--color-text-muted);font-weight:var(--weight-ui-strong);white-space:nowrap;text-decoration:none;vertical-align:baseline;padding-inline:var(--space-05);transition:color var(--duration-fast) var(--ease-out)}.mention-pill:hover{color:var(--color-text)}.mention-pill:hover .mention-pill-icon{color:inherit}.mention-pill.mention-file,.mention-pill.mention-skill{cursor:pointer}.mention-pill.mention-file:hover,.mention-pill.mention-skill:hover{text-decoration:underline}.mention-pill:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-sm)}.ProseMirror .mention-pill,.ProseMirror .mention-pill:hover{cursor:text;text-decoration:none}a.mention-folder{cursor:default}.mention-pill.mention-skill.mention-inert,.mention-pill.mention-skill.mention-inert:hover{cursor:default;text-decoration:none}.mention-pill-name{max-width:24em;min-width:0;overflow:hidden;text-overflow:ellipsis}.mention-pill-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--muted);align-self:center;flex-shrink:0}.mention-pill-icon svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block;stroke:currentColor;stroke-width:var(--p-hairline)}.mention-pill.pill-in-selection{background:var(--p-selection);border-radius:var(--radius-sm)}.mention-tip{position:fixed;z-index:var(--z-tooltip);max-width:min(var(--p-mention-tip-w),calc(100vw - 2 * var(--p-mention-tip-vmargin)));padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:round(calc(var(--text-xs) * 1.5),1px);overflow-wrap:anywhere;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.mention-tip:not(.positioned){pointer-events:none}.mention-tip.positioned{opacity:1}.mention-tip-path{display:flex;align-items:flex-start;gap:var(--space-2)}.mention-tip-path-text{min-width:0}.mention-tip-sep{color:color-mix(in srgb,currentColor 45%,transparent)}.mention-tip-base{font-weight:var(--weight-semibold)}.mention-tip-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2)}.mention-tip-name{font-weight:var(--weight-semibold);overflow-wrap:anywhere}.mention-tip-open,.mention-tip-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-05);border:none;border-radius:var(--radius-xs);background:transparent;color:color-mix(in srgb,currentColor 65%,transparent);cursor:pointer;transition:color var(--duration-fast) var(--ease-out),background-color var(--duration-fast) var(--ease-out)}.mention-tip-open:hover,.mention-tip-copy:hover{color:var(--color-bg);background:color-mix(in srgb,var(--color-bg) 14%,transparent)}.mention-tip-open:focus-visible,.mention-tip-copy:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mention-tip-open svg,.mention-tip-copy svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-tip-copy{margin-top:calc(0px - var(--space-05));margin-right:calc(var(--space-05) - var(--space-2))}.mention-tip-desc{margin-top:var(--space-05);color:color-mix(in srgb,currentColor 78%,transparent);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.mention-tip-spinner{display:inline-block;width:calc(var(--space-2) + var(--space-05));height:calc(var(--space-2) + var(--space-05));margin-left:var(--space-1);vertical-align:var(--p-mention-tip-spinner-lift);border-radius:50%;border:var(--p-ring-stroke) solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;animation:mention-tip-spin var(--duration-spin) linear infinite}@keyframes mention-tip-spin{to{transform:rotate(360deg)}}.mention-pill.mention-missing,.mention-pill.mention-missing:hover{color:color-mix(in srgb,var(--color-text-muted) 55%,transparent);text-decoration:line-through}.mention-pill.mention-missing .mention-pill-icon{color:inherit}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px) }.ui-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:pythinker-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes pythinker-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes pythinker-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes pythinker-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:pythinker-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:pythinker-eye-blink 11s ease-in-out infinite}@keyframes pythinker-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes pythinker-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:pythinker-eye-blink-once .24s ease-in-out}@keyframes pythinker-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s }#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/pythinker-code/dist-web/assets/index10-Bl5Wp1VK.js b/apps/pythinker-code/dist-web/assets/index10-BQgn6eNW.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index10-Bl5Wp1VK.js rename to apps/pythinker-code/dist-web/assets/index10-BQgn6eNW.js index c9576b558..84296c314 100644 --- a/apps/pythinker-code/dist-web/assets/index10-Bl5Wp1VK.js +++ b/apps/pythinker-code/dist-web/assets/index10-BQgn6eNW.js @@ -1,2 +1,2 @@ -import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-ZOXJ8Du9.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`
      Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}
      `)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(` +import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-BMmTKsPq.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`
      Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}
      `)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(` `)},null,8,C1),e[21]||(e[21]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(r(),u("div",k1,[ge(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(r(),u("div",x1,[t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"":"is-active",Ee.value?"opacity-50 cursor-not-allowed":""]]),disabled:Ee.value,onClick:e[0]||(e[0]=()=>He("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,s(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,s(a)("common.preview")||"Preview")),onMouseleave:v,onBlur:v},[t("div",b1,[e[22]||(e[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,X(s(a)("common.preview")||"Preview"),1)])],42,y1),t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>He("source")),onMouseenter:e[4]||(e[4]=o=>h(o,s(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,s(a)("common.source")||"Source")),onMouseleave:v,onBlur:v},[t("div",M1,[e[23]||(e[23]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),t("span",null,X(s(a)("common.source")||"Source"),1)])],34)])):F("",!0),n.$slots["header-right"]?(r(),u("div",B1,[ge(n.$slots,"header-right",{},void 0,!0)])):(r(),u("div",F1,[l.showCollapseButton?(r(),u("button",{key:0,class:b(se),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onMouseleave:v,onBlur:v},[(r(),u("svg",{style:Ce({rotate:c.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[24]||(e[24]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,T1)):F("",!0),l.showCopyButton?(r(),u("button",{key:1,class:b(se),onClick:_e,onMouseenter:e[9]||(e[9]=o=>Te(o)),onFocus:e[10]||(e[10]=o=>Te(o)),onMouseleave:v,onBlur:v},[H.value?(r(),u("svg",$1,[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(r(),u("svg",H1,[...e[25]||(e[25]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):F("",!0),l.showExportButton?(r(),u("button",{key:2,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Ie,onMouseenter:e[11]||(e[11]=o=>h(o,s(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,s(a)("common.export")||"Export")),onMouseleave:v,onBlur:v},[...e[27]||(e[27]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,j1)):F("",!0),l.showFullscreenButton?(r(),u("button",{key:3,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Oe,onMouseenter:e[13]||(e[13]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onMouseleave:v,onBlur:v},[j.value?(r(),u("svg",E1,[...e[29]||(e[29]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(r(),u("svg",P1,[...e[28]||(e[28]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,L1)):F("",!0)]))])):F("",!0),t1(t("div",null,[k.value?(r(),u("div",z1,[t("pre",S1,X(z.value),1)])):(r(),u("div",Z1,[l.showZoomControls?(r(),u("div",V1,[t("div",D1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e,onMouseenter:e[15]||(e[15]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onMouseleave:v,onBlur:v},[...e[30]||(e[30]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je,onMouseenter:e[17]||(e[17]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onMouseleave:v,onBlur:v},[...e[31]||(e[31]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onMouseleave:v,onBlur:v},X(Math.round(100*M.value))+"% ",33)])])):F("",!0),t("div",{class:"infographic-preview relative transition-all overflow-hidden block",style:Ce({height:ce.value}),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},[L.value||S.value?F("",!0):(r(),u("pre",N1,X(z.value),1)),t("div",{class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":_.value}]),style:Ce(ze.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],36)]))],512),[[l1,!c.value]]),(r(),a1(c1,{to:"body"},[t("div",{class:b(["markstream-vue",{dark:l.isDark}])},[i1(u1,{name:"infographic-dialog",appear:""},{default:r1(()=>[j.value?(r(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:s1(ve,["self"])},[t("div",Y1,[t("div",_1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e},[...e[32]||(e[32]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je},[...e[33]||(e[33]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},X(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:ve},[...e[34]||(e[34]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:b(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!_.value,"cursor-grabbing":_.value}]),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},null,34)])])):F("",!0)]),_:1})],2)]))],10,p1))}}),[["__scopeId","data-v-de34ec4b"]]);ke.install=R=>{R.component(ke.__name,ke)};export{ke as default}; diff --git a/apps/pythinker-code/dist-web/assets/index11-CYg1-jUl.js b/apps/pythinker-code/dist-web/assets/index11-Dc3KsH1m.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index11-CYg1-jUl.js rename to apps/pythinker-code/dist-web/assets/index11-Dc3KsH1m.js index e9bb53716..9d6414589 100644 --- a/apps/pythinker-code/dist-web/assets/index11-CYg1-jUl.js +++ b/apps/pythinker-code/dist-web/assets/index11-Dc3KsH1m.js @@ -1,4 +1,4 @@ -import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-ZOXJ8Du9.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;zm in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% +import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as f,bl as Wn,af as Xn,bY as Vn,bE as I,az as Un,c8 as wn,aD as Zn,as as Y,aI as Kn,aL as M,u as C,aY as Rt,v as u,bk as w,bb as Ke,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-BMmTKsPq.js";import{i as At}from"./safeRaf-DGuzXxDK.js";function vl(d,m){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,m-12),m))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function fl(d){const m=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(m)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(m)}function ml(d){if(!d.includes(";"))return d;const m=d.indexOf(":");if(m===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,m))return d;const y=d.slice(0,m+1),z=d.slice(m+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||fl($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function Lt(d){if(_t(d)!=="sequencediagram")return d;const m=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;zm in d?hl(d,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[m]=y,Tn=(d,m)=>{for(var y in m||(m={}))wl.call(m,y)&&Mn(d,y,m[y]);if(bn)for(var y of bn(m))yl.call(m,y)&&Mn(d,y,m[y]);return d},T=(d,m,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,m)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Al=["aria-label","disabled"],Ll={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:m}){var y,z;const a=d,$=m,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=f(!1),P=f(typeof window>"u"),ee=Nn(),Ht=In(),Le=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Le.value,dompurifyConfig:Le.value==="strict"?Q:void 0,flowchart:Le.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var X;for(const J of W)(X=J.parentNode)==null||X.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ge(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Je=f(!1),V=f(!1),Qe=f(),Z=f(),v=f(),se=f(),et=f(null),En=qn(),je=f(null),xe=f(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,tt=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,tt+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++tt;yield Y(),t===tt&&((function(n=Nt.value){n&&Qe.value&&te?.reportHeight(n,Qe.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,tt+=1,te?.markSettled(e))}const Yt=f(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Le.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% `;return n.trim().startsWith("%%{")?n:r+n}function qt(){var e;return(function(t){const n=(function(){var r;const o=Z.value?getComputedStyle(Z.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=un();return ol(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:al(D.value))}function Wt(){return`${qt()}px`}const _e=f(null);function kt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Xt(){return a.loading!==!1&&(kt()||!!_e.value)}const B=f(1),_=f(0),H=f(0),nt=f(!1),lt=f({x:0,y:0}),x=f(!0),rt=f(!1),re=f(!1),de=f(null);let xt="",bt=!1,ve="";const ot=f(0),Mt=f(!1),$n=F(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),Pn=F(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),He=F(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Dn=F(()=>{var e;return Math.max(He.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Vt=F(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),fe=F(()=>a.loading!==!1);let Ne=null,Ie=null,Oe=null,Se=null,Ye=0;const Ut=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Zt=(z=globalThis.cancelIdleCallback)!=null?z:e=>clearTimeout(e);function b(e=ke){return!ue&&e===ke}function A(){return b()&&xe.value&&!V.value}function Tt(){Oe!=null&&(globalThis.clearTimeout(Oe),Oe=null),Se!=null&&(Zt(Se),Se=null)}function qe(){ue||Oe==null&&Se==null&&(Oe=globalThis.setTimeout(()=>{Oe=null,A()&&(Se=Ut(()=>{Se=null,A()&&gn()},{timeout:500}))},$n.value))}function We(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Kt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);We(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ue){if(a.loading||re.value||!A())return void Kt(Math.min(1200,Math.max(300,1.2*t)));qe()}},t)}const q=f(Wt()),at=f(q.value);let $e=null;const O=f(!1),K=f(!1),me=f({}),he=f(0);let U=null,Pe=null;const N=f(!1),Rn=F(()=>{var e,t;return!(V.value||x.value||P.value&&!re.value&&!de.value&&(O.value||N.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=f({zoom:1,translateX:0,translateY:0,containerHeight:q.value}),Gt=F(()=>a.enableWheelZoom?{wheel:Fn}:{}),G=F(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let De=null,it=null,Re=!1,Te=He.value,ne=null,ut=0,Ct=!0,st=0;function Ce(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((h,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),i(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),h(p))}).catch(p=>{o||(o=!0,s(),i(p))})})}function Jt(e){if(typeof document>"u"||!v.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,v.value)===!0)return N.value=!0,void L();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),we(v.value),v.value.appendChild(t);const l=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";q.value=l||"360px",at.value=q.value,N.value=!0,L()}function Qt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function en(e){return e?.name==="AbortError"}function Bt(e){return!Qt(e)&&!en(e)}typeof window<"u"&&I([()=>Qe.value,ee],([e,t])=>{var n;if((n=je.value)==null||n.destroy(),je.value=null,!t||xe.value)return void(xe.value=!0);if(!e)return void(xe.value=!1);const l=En(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});je.value=l,xe.value=l.isVisible.value,l.whenVisible.then(()=>{xe.value=!0})},{immediate:!0}),Un(()=>{var e;ue=!0,ke+=1,he.value+=1,(e=je.value)==null||e.destroy(),je.value=null,It(),Tt()});const ct=F(()=>a.showTooltips!==!1);function tn(e){return!e||e.disabled}function R(e,t,n="top"){if(!ct.value||tn(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;xn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){ct.value&&wn()}function nn(e){if(!ct.value||tn(e.currentTarget))return;const t=Je.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;xn(e.currentTarget,t,"top",!1,l,a.isDark)}function ln(e,t){const n={theme:t==="dark"?"dark":"default"};Le.value==="strict"&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%% `;return e.trimStart().startsWith("%%{")?e:l+e}function dt(){return Ct&&!x.value&&!O.value&&!N.value}function rn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Et(e){if(_t(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(rn(o))break;r.pop()}else r.pop()}return r.some(rn)?r.join(` `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(` diff --git a/apps/pythinker-code/dist-web/assets/index5-CCjgec83.js b/apps/pythinker-code/dist-web/assets/index5-Def2Zrxa.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/index5-CCjgec83.js rename to apps/pythinker-code/dist-web/assets/index5-Def2Zrxa.js index 79db15d2c..c7d54c7bf 100644 --- a/apps/pythinker-code/dist-web/assets/index5-CCjgec83.js +++ b/apps/pythinker-code/dist-web/assets/index5-Def2Zrxa.js @@ -1 +1 @@ -import c from"./CodeBlockNode-D0mkXbsY.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-ZOXJ8Du9.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; +import c from"./CodeBlockNode-CuG5i4rb.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-BMmTKsPq.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; diff --git a/apps/pythinker-code/dist-web/assets/index6-BCRHBZmN.js b/apps/pythinker-code/dist-web/assets/index6-DW8kHBOa.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index6-BCRHBZmN.js rename to apps/pythinker-code/dist-web/assets/index6-DW8kHBOa.js index a1887c84c..0f47aabc5 100644 --- a/apps/pythinker-code/dist-web/assets/index6-BCRHBZmN.js +++ b/apps/pythinker-code/dist-web/assets/index6-DW8kHBOa.js @@ -1 +1 @@ -import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-ZOXJ8Du9.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; +import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-BMmTKsPq.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; diff --git a/apps/pythinker-code/dist-web/assets/index7-BG8k65SW.js b/apps/pythinker-code/dist-web/assets/index7-60leHAn4.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index7-BG8k65SW.js rename to apps/pythinker-code/dist-web/assets/index7-60leHAn4.js index 2bf253904..f9702a35a 100644 --- a/apps/pythinker-code/dist-web/assets/index7-BG8k65SW.js +++ b/apps/pythinker-code/dist-web/assets/index7-60leHAn4.js @@ -1 +1 @@ -import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-ZOXJ8Du9.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; +import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-BMmTKsPq.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; diff --git a/apps/pythinker-code/dist-web/assets/index8-CS8VA94L.js b/apps/pythinker-code/dist-web/assets/index8-Q1qyQj7P.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index8-CS8VA94L.js rename to apps/pythinker-code/dist-web/assets/index8-Q1qyQj7P.js index 446208098..0cd73f2ad 100644 --- a/apps/pythinker-code/dist-web/assets/index8-CS8VA94L.js +++ b/apps/pythinker-code/dist-web/assets/index8-Q1qyQj7P.js @@ -1 +1 @@ -import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-ZOXJ8Du9.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; +import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-BMmTKsPq.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; diff --git a/apps/pythinker-code/dist-web/assets/infoDiagram-5YYISTIA-CCz_JQ8V.js b/apps/pythinker-code/dist-web/assets/infoDiagram-5YYISTIA-_4xxChMJ.js similarity index 67% rename from apps/pythinker-code/dist-web/assets/infoDiagram-5YYISTIA-CCz_JQ8V.js rename to apps/pythinker-code/dist-web/assets/infoDiagram-5YYISTIA-_4xxChMJ.js index 72c43866d..6d247a9d7 100644 --- a/apps/pythinker-code/dist-web/assets/infoDiagram-5YYISTIA-CCz_JQ8V.js +++ b/apps/pythinker-code/dist-web/assets/infoDiagram-5YYISTIA-_4xxChMJ.js @@ -1,2 +1,2 @@ -import{_ as a,l as s,L as o,e as i}from"./mermaid.core-DLN3CXA3.js";import{p as g}from"./wardley-L42UT6IY-Cwgryyvc.js";import"./index-ZOXJ8Du9.js";var p={parse:a(async r=>{const e=await g("info",r);s.debug(e)},"parse")},v={version:"11.15.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,n)=>{s.debug(`rendering info diagram +import{_ as a,l as s,L as o,e as i}from"./mermaid.core-Dza7SVX6.js";import{p as g}from"./wardley-L42UT6IY-Dr9wBWEv.js";import"./index-BMmTKsPq.js";var p={parse:a(async r=>{const e=await g("info",r);s.debug(e)},"parse")},v={version:"11.15.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,n)=>{s.debug(`rendering info diagram `+r);const t=o(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),l={draw:c},b={parser:p,db:m,renderer:l};export{b as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-YF4QCWOH-DFUiiMiU.js b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-YF4QCWOH-Dy_kalDP.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ishikawaDiagram-YF4QCWOH-DFUiiMiU.js rename to apps/pythinker-code/dist-web/assets/ishikawaDiagram-YF4QCWOH-Dy_kalDP.js index 59375d54f..67199d9a6 100644 --- a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-YF4QCWOH-DFUiiMiU.js +++ b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-YF4QCWOH-Dy_kalDP.js @@ -1,4 +1,4 @@ -import{_ as l,c as lt,a4 as ct,L as ut,al as dt,A as yt,k as ft,q as et,a as pt,b as gt,g as kt,s as mt,t as wt,e as _t}from"./mermaid.core-DLN3CXA3.js";import"./index-ZOXJ8Du9.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,W,N,Y,F={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: +import{_ as l,c as lt,a4 as ct,L as ut,al as dt,A as yt,k as ft,q as et,a as pt,b as gt,g as kt,s as mt,t as wt,e as _t}from"./mermaid.core-Dza7SVX6.js";import"./index-BMmTKsPq.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,W,N,Y,F={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: `+b.showPosition()+` Expecting `+U.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:U})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),f.push(b.yytext),r.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],F.$=f[f.length-V],F._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},H&&(F._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(F,[w,$,I,S.yy,N[1],f,r].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),r=r.slice(0,-1*V)),i.push(this.productions_[N[1]][0]),f.push(F.$),r.push(F._$),tt=v[i[i.length-2]][i[i.length-1]],i.push(tt);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===h.length?this.yylloc.first_column:0)+h[h.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/journeyDiagram-JHISSGLW-B7prU7-l.js b/apps/pythinker-code/dist-web/assets/journeyDiagram-JHISSGLW-DqDPR-oh.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/journeyDiagram-JHISSGLW-B7prU7-l.js rename to apps/pythinker-code/dist-web/assets/journeyDiagram-JHISSGLW-DqDPR-oh.js index b8da1d6ef..e1304543c 100644 --- a/apps/pythinker-code/dist-web/assets/journeyDiagram-JHISSGLW-B7prU7-l.js +++ b/apps/pythinker-code/dist-web/assets/journeyDiagram-JHISSGLW-DqDPR-oh.js @@ -1,4 +1,4 @@ -import{g as gt}from"./chunk-FMBD7UC4-Ox0c2nt2.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-ND2GUHAM-8Gq7_oIN.js";import{g as _t,s as vt,a as bt,b as wt,t as Tt,q as St,_ as s,c as R,d as X,e as $t,A as Mt}from"./mermaid.core-DLN3CXA3.js";import{d as it}from"./arc-BI4rSFfW.js";import"./index-ZOXJ8Du9.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: +import{g as gt}from"./chunk-FMBD7UC4-ZEd_TODf.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-ND2GUHAM-CeYe8rvb.js";import{g as _t,s as vt,a as bt,b as wt,t as Tt,q as St,_ as s,c as R,d as X,e as $t,A as Mt}from"./mermaid.core-Dza7SVX6.js";import{d as it}from"./arc-DI2D4QPc.js";import"./index-BMmTKsPq.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: `+_.showPosition()+` Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/kanban-definition-UN3LZRKU-BIGmwIqe.js b/apps/pythinker-code/dist-web/assets/kanban-definition-UN3LZRKU-DcgrNp3n.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/kanban-definition-UN3LZRKU-BIGmwIqe.js rename to apps/pythinker-code/dist-web/assets/kanban-definition-UN3LZRKU-DcgrNp3n.js index 0516e4c56..bb987d191 100644 --- a/apps/pythinker-code/dist-web/assets/kanban-definition-UN3LZRKU-BIGmwIqe.js +++ b/apps/pythinker-code/dist-web/assets/kanban-definition-UN3LZRKU-DcgrNp3n.js @@ -1,4 +1,4 @@ -import{_ as o,l as te,c as H,L as fe,ah as ye,ai as be,aj as me,af as _e,I as K,i as F,v as ke,J as Ee,ac as Se,ad as ce,ae as le}from"./mermaid.core-DLN3CXA3.js";import{g as Ne}from"./chunk-FMBD7UC4-Ox0c2nt2.js";import"./index-ZOXJ8Du9.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:G}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:G}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`: +import{_ as o,l as te,c as H,L as fe,ah as ye,ai as be,aj as me,af as _e,I as K,i as F,v as ke,J as Ee,ac as Se,ad as ce,ae as le}from"./mermaid.core-Dza7SVX6.js";import{g as Ne}from"./chunk-FMBD7UC4-ZEd_TODf.js";import"./index-BMmTKsPq.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:G}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:G}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`: `+b.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[E]||E,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(x[0]){case 1:r.push(E),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),E=null,se=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,se,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/linear-CPq1vSSR.js b/apps/pythinker-code/dist-web/assets/linear-BB9wM_yi.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/linear-CPq1vSSR.js rename to apps/pythinker-code/dist-web/assets/linear-BB9wM_yi.js index d1afa77db..18881fcb1 100644 --- a/apps/pythinker-code/dist-web/assets/linear-CPq1vSSR.js +++ b/apps/pythinker-code/dist-web/assets/linear-BB9wM_yi.js @@ -1 +1 @@ -import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-DLN3CXA3.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; +import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-Dza7SVX6.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; diff --git a/apps/pythinker-code/dist-web/assets/mermaid.core-DLN3CXA3.js b/apps/pythinker-code/dist-web/assets/mermaid.core-Dza7SVX6.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/mermaid.core-DLN3CXA3.js rename to apps/pythinker-code/dist-web/assets/mermaid.core-Dza7SVX6.js index 41d67cfbc..c4caceff4 100644 --- a/apps/pythinker-code/dist-web/assets/mermaid.core-DLN3CXA3.js +++ b/apps/pythinker-code/dist-web/assets/mermaid.core-Dza7SVX6.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-BYHCKpxZ.js","assets/graph--OzhPTMs.js","assets/layout-SsrduOYp.js","assets/index-ZOXJ8Du9.js","assets/index-DI8hwIbn.css","assets/cose-bilkent-S5V4N54A-udvWi3mN.js","assets/cytoscape.esm-nFXppDBa.js","assets/c4Diagram-AAUBKEIU-CjYtsINA.js","assets/chunk-ND2GUHAM-8Gq7_oIN.js","assets/flowDiagram-I6XJVG4X-Cj6V7iWh.js","assets/chunk-FMBD7UC4-Ox0c2nt2.js","assets/chunk-55IACEB6-C-SpyarN.js","assets/chunk-2J33WTMH-Ca8VIc2t.js","assets/channel-BOGVF8Ly.js","assets/erDiagram-TEJ5UH35-CYIY96xo.js","assets/gitGraphDiagram-PVQCEYII-CAxotu2m.js","assets/chunk-4BX2VUAB-pm1CuxH9.js","assets/chunk-QZHKN3VN-68eECBG3.js","assets/wardley-L42UT6IY-Cwgryyvc.js","assets/ganttDiagram-6RSMTGT7-DMnRKPEn.js","assets/linear-CPq1vSSR.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-CCz_JQ8V.js","assets/pieDiagram-4H26LBE5-CxGR0oGX.js","assets/arc-BI4rSFfW.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-bI88ym0r.js","assets/xychartDiagram-2RQKCTM6-Bpc09H3-.js","assets/requirementDiagram-4Y6WPE33-BMZCm0mi.js","assets/sequenceDiagram-3UESZ5HK-BUDBFiIt.js","assets/classDiagram-4FO5ZUOK-B4KLeIkj.js","assets/chunk-727SXJPM-ChulXrmT.js","assets/classDiagram-v2-Q7XG4LA2-B4KLeIkj.js","assets/stateDiagram-AJRCARHV-6VO5APFy.js","assets/chunk-AQP2D5EJ-B7YEeHDd.js","assets/stateDiagram-v2-BHNVJYJU-Cv36kbxe.js","assets/journeyDiagram-JHISSGLW-B7prU7-l.js","assets/timeline-definition-PNZ67QCA-C9UZd7_v.js","assets/mindmap-definition-RKZ34NQL-DpfCgIR2.js","assets/kanban-definition-UN3LZRKU-BIGmwIqe.js","assets/sankeyDiagram-5OEKKPKP-DvCK0RLW.js","assets/diagram-LMA3HP47-DlXqHg1j.js","assets/diagram-2AECGRRQ-C-O_ir29.js","assets/blockDiagram-GPEHLZMM-DUxh1qjd.js","assets/diagram-5GNKFQAL-CXTeZ9ti.js","assets/architectureDiagram-3BPJPVTR-C_j1myOw.js","assets/diagram-KO2AKTUF-C9y5FHUo.js","assets/ishikawaDiagram-YF4QCWOH-DFUiiMiU.js","assets/vennDiagram-CIIHVFJN-DMsJx58H.js","assets/diagram-OG6HWLK6-CE47zKRR.js","assets/wardleyDiagram-YWT4CUSO-Dir0ojk9.js"])))=>i.map(i=>d[i]); -import{bR as pt}from"./index-ZOXJ8Du9.js";function qm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bo={exports:{}},Wm=bo.exports,Fl;function zm(){return Fl||(Fl=1,(function(e,t){(function(r,i){e.exports=i()})(Wm,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var A=["th","st","nd","rd"],L=F%100;return"["+F+(A[(L-20)%10]||A[L]||A[0])+"]"}},k=function(F,A,L){var M=String(F);return!M||M.length>=A?F:""+Array(A+1-M.length).join(L)+F},w={s:k,z:function(F){var A=-F.utcOffset(),L=Math.abs(A),M=Math.floor(L/60),D=L%60;return(A<=0?"+":"-")+k(M,2,"0")+":"+k(D,2,"0")},m:function F(A,L){if(A.date()1)return F(Y[0])}else{var lt=A.name;_[lt]=A,D=lt}return!M&&D&&(S=D),D||!M&&S},I=function(F,A){if(B(F))return F.clone();var L=typeof A=="object"?A:{};return L.date=F,L.args=arguments,new H(L)},R=w;R.l=q,R.i=B,R.w=function(F,A){return I(F,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var H=(function(){function F(L){this.$L=q(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var A=F.prototype;return A.parse=function(L){this.$d=(function(M){var D=M.date,z=M.utc;if(D===null)return new Date(NaN);if(R.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var Y=D.match(y);if(Y){var lt=Y[2]-1||0,gt=(Y[7]||"0").substring(0,3);return z?new Date(Date.UTC(Y[1],lt,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,gt)):new Date(Y[1],lt,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,gt)}}return new Date(D)})(L),this.init()},A.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},A.$utils=function(){return R},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(L,M){var D=I(L);return this.startOf(M)<=D&&D<=this.endOf(M)},A.isAfter=function(L,M){return I(L)dc(e,"name",{value:t,configurable:!0}),Um=(e,t)=>{for(var r in t)dc(e,r,{get:t[r],enumerable:!0})},Re={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},N={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ln=p(function(e="fatal"){let t=Re.fatal;typeof e=="string"?e.toLowerCase()in Re&&(t=Re[e]):typeof e=="number"&&(t=e),N.trace=()=>{},N.debug=()=>{},N.info=()=>{},N.warn=()=>{},N.error=()=>{},N.fatal=()=>{},t<=Re.fatal&&(N.fatal=console.error?console.error.bind(console,se("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",se("FATAL"))),t<=Re.error&&(N.error=console.error?console.error.bind(console,se("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",se("ERROR"))),t<=Re.warn&&(N.warn=console.warn?console.warn.bind(console,se("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",se("WARN"))),t<=Re.info&&(N.info=console.info?console.info.bind(console,se("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",se("INFO"))),t<=Re.debug&&(N.debug=console.debug?console.debug.bind(console,se("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("DEBUG"))),t<=Re.trace&&(N.trace=console.debug?console.debug.bind(console,se("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("TRACE")))},"setLogLevel"),se=p(e=>`%c${Ym().format("ss.SSS")} : ${e} : `,"format");const ko={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return ko.hue2rgb(s,o,e+1/3)*255;case"g":return ko.hue2rgb(s,o,e)*255;case"b":return ko.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Gm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:ko,lang:jm,unit:Gm},Ze={};for(let e=0;e<=255;e++)Ze[e]=at.unit.dec2hex(e);const zt={ALL:0,RGB:1,HSL:2};class Xm{constructor(){this.type=zt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=zt.ALL}is(t){return this.type===t}}class Vm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Xm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(zt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(zt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(zt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(zt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(zt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(zt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ds=new Vm({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return ds.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(o*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},fr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(fr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(fr.re);if(!r)return;const[,i,o,s,a,n]=r;return ds.set({h:fr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Bi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Bi.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in Bi.colors)if(Bi.colors[r]===t)return r}},Ci={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ci.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return ds.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ae={format:{keyword:Bi,hex:Yr,rgb:Ci,rgba:Ci,hsl:fr,hsla:fr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||Ci.parse(e)||fr.parse(e)||Bi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(zt.HSL)||e.data.r===void 0?fr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ci.stringify(e):Yr.stringify(e)},uc=(e,t)=>{const r=Ae.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ae.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return uc(e,{a:t});const o=ds.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ae.stringify(o)},Zm=e=>{const{r:t,g:r,b:i}=Ae.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},Km=e=>Zm(e)>=.5,xe=e=>!Km(e),fc=(e,t,r)=>{const i=Ae.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ae.stringify(i)},$=(e,t)=>fc(e,"l",t),O=(e,t)=>fc(e,"l",-t),x=(e,t)=>{const r=Ae.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return uc(e,i)},Qm=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ae.parse(e),{r:n,g:l,b:c,a:h}=Ae.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,w=a*d+h*(1-d);return tr(C,b,k,w)},v=(e,t=100)=>{const r=Ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qm(r,e,t)};/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function Al(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);ri.map(i=>d[i]); +import{bR as pt}from"./index-BMmTKsPq.js";function qm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bo={exports:{}},Wm=bo.exports,Fl;function zm(){return Fl||(Fl=1,(function(e,t){(function(r,i){e.exports=i()})(Wm,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var A=["th","st","nd","rd"],L=F%100;return"["+F+(A[(L-20)%10]||A[L]||A[0])+"]"}},k=function(F,A,L){var M=String(F);return!M||M.length>=A?F:""+Array(A+1-M.length).join(L)+F},w={s:k,z:function(F){var A=-F.utcOffset(),L=Math.abs(A),M=Math.floor(L/60),D=L%60;return(A<=0?"+":"-")+k(M,2,"0")+":"+k(D,2,"0")},m:function F(A,L){if(A.date()1)return F(Y[0])}else{var lt=A.name;_[lt]=A,D=lt}return!M&&D&&(S=D),D||!M&&S},I=function(F,A){if(B(F))return F.clone();var L=typeof A=="object"?A:{};return L.date=F,L.args=arguments,new H(L)},R=w;R.l=q,R.i=B,R.w=function(F,A){return I(F,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var H=(function(){function F(L){this.$L=q(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var A=F.prototype;return A.parse=function(L){this.$d=(function(M){var D=M.date,z=M.utc;if(D===null)return new Date(NaN);if(R.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var Y=D.match(y);if(Y){var lt=Y[2]-1||0,gt=(Y[7]||"0").substring(0,3);return z?new Date(Date.UTC(Y[1],lt,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,gt)):new Date(Y[1],lt,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,gt)}}return new Date(D)})(L),this.init()},A.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},A.$utils=function(){return R},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(L,M){var D=I(L);return this.startOf(M)<=D&&D<=this.endOf(M)},A.isAfter=function(L,M){return I(L)dc(e,"name",{value:t,configurable:!0}),Um=(e,t)=>{for(var r in t)dc(e,r,{get:t[r],enumerable:!0})},Re={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},N={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ln=p(function(e="fatal"){let t=Re.fatal;typeof e=="string"?e.toLowerCase()in Re&&(t=Re[e]):typeof e=="number"&&(t=e),N.trace=()=>{},N.debug=()=>{},N.info=()=>{},N.warn=()=>{},N.error=()=>{},N.fatal=()=>{},t<=Re.fatal&&(N.fatal=console.error?console.error.bind(console,se("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",se("FATAL"))),t<=Re.error&&(N.error=console.error?console.error.bind(console,se("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",se("ERROR"))),t<=Re.warn&&(N.warn=console.warn?console.warn.bind(console,se("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",se("WARN"))),t<=Re.info&&(N.info=console.info?console.info.bind(console,se("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",se("INFO"))),t<=Re.debug&&(N.debug=console.debug?console.debug.bind(console,se("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("DEBUG"))),t<=Re.trace&&(N.trace=console.debug?console.debug.bind(console,se("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",se("TRACE")))},"setLogLevel"),se=p(e=>`%c${Ym().format("ss.SSS")} : ${e} : `,"format");const ko={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return ko.hue2rgb(s,o,e+1/3)*255;case"g":return ko.hue2rgb(s,o,e)*255;case"b":return ko.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Gm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:ko,lang:jm,unit:Gm},Ze={};for(let e=0;e<=255;e++)Ze[e]=at.unit.dec2hex(e);const zt={ALL:0,RGB:1,HSL:2};class Xm{constructor(){this.type=zt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=zt.ALL}is(t){return this.type===t}}class Vm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Xm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(zt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(zt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(zt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(zt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(zt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(zt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ds=new Vm({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return ds.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(o*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},fr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(fr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(fr.re);if(!r)return;const[,i,o,s,a,n]=r;return ds.set({h:fr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Bi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Bi.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in Bi.colors)if(Bi.colors[r]===t)return r}},Ci={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ci.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return ds.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ae={format:{keyword:Bi,hex:Yr,rgb:Ci,rgba:Ci,hsl:fr,hsla:fr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||Ci.parse(e)||fr.parse(e)||Bi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(zt.HSL)||e.data.r===void 0?fr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ci.stringify(e):Yr.stringify(e)},uc=(e,t)=>{const r=Ae.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ae.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return uc(e,{a:t});const o=ds.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ae.stringify(o)},Zm=e=>{const{r:t,g:r,b:i}=Ae.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},Km=e=>Zm(e)>=.5,xe=e=>!Km(e),fc=(e,t,r)=>{const i=Ae.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ae.stringify(i)},$=(e,t)=>fc(e,"l",t),O=(e,t)=>fc(e,"l",-t),x=(e,t)=>{const r=Ae.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return uc(e,i)},Qm=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ae.parse(e),{r:n,g:l,b:c,a:h}=Ae.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,w=a*d+h*(1-d);return tr(C,b,k,w)},v=(e,t=100)=>{const r=Ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qm(r,e,t)};/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function Al(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r2?i-2:0),s=2;s1?r-1:0),o=1;o"u"?null:Mt(BigInt.prototype.toString),Dl=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),Lt=Mt(Object.prototype.hasOwnProperty),hi=Mt(Object.prototype.toString),Pt=Mt(RegExp.prototype.test),ci=uy(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:xi;if(El&&El(e,null),!Gt(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(oy(t)||(t[i]=s),o=s)}e[o]=!0}return e}function fy(e){for(let t=0;t/g),by=ae(/\${[\w\W]*/g),ky=ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ty=ae(/^aria-[\-\w]+$/),Wl=ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wy=ae(/^(?:\w+script|data):/i),Sy=ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_y=ae(/^html$/i),vy=ae(/^[a-z][.\w]*(-[.\w]+)+$/i),Se={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},By=function(){return typeof window>"u"?null:window},Ly=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},zl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:By();const t=Q=>mc(Q);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Se.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,f=n.prototype,u=_e(f,"cloneNode"),g=_e(f,"remove"),m=_e(f,"nextSibling"),y=_e(f,"childNodes"),C=_e(f,"parentNode"),b=_e(f,"shadowRoot"),k=_e(f,"attributes"),w=a&&a.prototype?_e(a.prototype,"nodeType"):null,S=a&&a.prototype?_e(a.prototype,"nodeName"):null;if(typeof s=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let _,E="";const B=r,q=B.implementation,I=B.createNodeIterator,R=B.createDocumentFragment,H=B.getElementsByTagName,W=i.importNode;let F=zl();t.isSupported=typeof pc=="function"&&typeof C=="function"&&q&&q.createHTMLDocument!==void 0;const A=Cy,L=xy,M=by,D=ky,z=Ty,Y=wy,lt=Sy,gt=vy;let dt=Wl,tt=null;const mt=nt({},[...Rl,...zs,...Hs,...Ys,...Pl]);let G=null;const ct=nt({},[...Nl,...Us,...ql,...no]);let st=Object.seal(Pr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),kt=null,Tt=null;const wt=Object.seal(Pr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let le=!0,Ie=!0,vr=!1,cl=!0,Ve=!1,si=!0,nr=!1,As=!1,Es=!1,Br=!1,to=!1,eo=!1,dl=!0,ul=!1;const fl="user-content-";let Ms=!0,ai=!1,Lr={},ke=null;const $s=nt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let pl=null;const gl=nt({},["audio","video","img","source","image","track"]);let Os=null;const ml=nt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ro="http://www.w3.org/1998/Math/MathML",io="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml";let Fr=Te,Is=!1,Ds=null;const $m=nt({},[ro,io,Te],Ws);let Rs=nt({},["mi","mo","mn","ms","mtext"]),Ps=nt({},["annotation-xml"]);const Om=nt({},["title","style","font","a","script"]);let ni=null;const Im=["application/xhtml+xml","text/html"],Dm="text/html";let Ft=null,Ar=null;const Rm=r.createElement("form"),yl=function(T){return T instanceof RegExp||T instanceof Function},Ns=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ar&&Ar===T)return;(!T||typeof T!="object")&&(T={}),T=Wt(T),ni=Im.indexOf(T.PARSER_MEDIA_TYPE)===-1?Dm:T.PARSER_MEDIA_TYPE,Ft=ni==="application/xhtml+xml"?Ws:xi,tt=Lt(T,"ALLOWED_TAGS")&&Gt(T.ALLOWED_TAGS)?nt({},T.ALLOWED_TAGS,Ft):mt,G=Lt(T,"ALLOWED_ATTR")&&Gt(T.ALLOWED_ATTR)?nt({},T.ALLOWED_ATTR,Ft):ct,Ds=Lt(T,"ALLOWED_NAMESPACES")&&Gt(T.ALLOWED_NAMESPACES)?nt({},T.ALLOWED_NAMESPACES,Ws):$m,Os=Lt(T,"ADD_URI_SAFE_ATTR")&&Gt(T.ADD_URI_SAFE_ATTR)?nt(Wt(ml),T.ADD_URI_SAFE_ATTR,Ft):ml,pl=Lt(T,"ADD_DATA_URI_TAGS")&&Gt(T.ADD_DATA_URI_TAGS)?nt(Wt(gl),T.ADD_DATA_URI_TAGS,Ft):gl,ke=Lt(T,"FORBID_CONTENTS")&&Gt(T.FORBID_CONTENTS)?nt({},T.FORBID_CONTENTS,Ft):$s,kt=Lt(T,"FORBID_TAGS")&&Gt(T.FORBID_TAGS)?nt({},T.FORBID_TAGS,Ft):Wt({}),Tt=Lt(T,"FORBID_ATTR")&&Gt(T.FORBID_ATTR)?nt({},T.FORBID_ATTR,Ft):Wt({}),Lr=Lt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Wt(T.USE_PROFILES):T.USE_PROFILES:!1,le=T.ALLOW_ARIA_ATTR!==!1,Ie=T.ALLOW_DATA_ATTR!==!1,vr=T.ALLOW_UNKNOWN_PROTOCOLS||!1,cl=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ve=T.SAFE_FOR_TEMPLATES||!1,si=T.SAFE_FOR_XML!==!1,nr=T.WHOLE_DOCUMENT||!1,Br=T.RETURN_DOM||!1,to=T.RETURN_DOM_FRAGMENT||!1,eo=T.RETURN_TRUSTED_TYPE||!1,Es=T.FORCE_BODY||!1,dl=T.SANITIZE_DOM!==!1,ul=T.SANITIZE_NAMED_PROPS||!1,Ms=T.KEEP_CONTENT!==!1,ai=T.IN_PLACE||!1,dt=gy(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:Wl,Fr=typeof T.NAMESPACE=="string"?T.NAMESPACE:Te,Rs=Lt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Wt(T.MATHML_TEXT_INTEGRATION_POINTS):nt({},["mi","mo","mn","ms","mtext"]),Ps=Lt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Wt(T.HTML_INTEGRATION_POINTS):nt({},["annotation-xml"]);const P=Lt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Wt(T.CUSTOM_ELEMENT_HANDLING):Pr(null);if(st=Pr(null),Lt(P,"tagNameCheck")&&yl(P.tagNameCheck)&&(st.tagNameCheck=P.tagNameCheck),Lt(P,"attributeNameCheck")&&yl(P.attributeNameCheck)&&(st.attributeNameCheck=P.attributeNameCheck),Lt(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),Ve&&(Ie=!1),to&&(Br=!0),Lr&&(tt=nt({},Pl),G=Pr(null),Lr.html===!0&&(nt(tt,Rl),nt(G,Nl)),Lr.svg===!0&&(nt(tt,zs),nt(G,Us),nt(G,no)),Lr.svgFilters===!0&&(nt(tt,Hs),nt(G,Us),nt(G,no)),Lr.mathMl===!0&&(nt(tt,Ys),nt(G,ql),nt(G,no))),wt.tagCheck=null,wt.attributeCheck=null,Lt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?wt.tagCheck=T.ADD_TAGS:Gt(T.ADD_TAGS)&&(tt===mt&&(tt=Wt(tt)),nt(tt,T.ADD_TAGS,Ft))),Lt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?wt.attributeCheck=T.ADD_ATTR:Gt(T.ADD_ATTR)&&(G===ct&&(G=Wt(G)),nt(G,T.ADD_ATTR,Ft))),Lt(T,"ADD_URI_SAFE_ATTR")&&Gt(T.ADD_URI_SAFE_ATTR)&&nt(Os,T.ADD_URI_SAFE_ATTR,Ft),Lt(T,"FORBID_CONTENTS")&&Gt(T.FORBID_CONTENTS)&&(ke===$s&&(ke=Wt(ke)),nt(ke,T.FORBID_CONTENTS,Ft)),Lt(T,"ADD_FORBID_CONTENTS")&&Gt(T.ADD_FORBID_CONTENTS)&&(ke===$s&&(ke=Wt(ke)),nt(ke,T.ADD_FORBID_CONTENTS,Ft)),Ms&&(tt["#text"]=!0),nr&&nt(tt,["html","head","body"]),tt.table&&(nt(tt,["tbody"]),delete kt.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=T.TRUSTED_TYPES_POLICY,E=_.createHTML("")}else _===void 0&&(_=Ly(d,o)),_!==null&&typeof E=="string"&&(E=_.createHTML(""));(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&tt===mt&&(tt=Wt(tt)),F.uponSanitizeAttribute.length>0&&G===ct&&(G=Wt(G)),Zt&&Zt(T),Ar=T},Cl=nt({},[...zs,...Hs,...my]),xl=nt({},[...Ys,...yy]),Pm=function(T){let P=C(T);(!P||!P.tagName)&&(P={namespaceURI:Fr,tagName:"template"});const U=xi(T.tagName),xt=xi(P.tagName);return Ds[T.namespaceURI]?T.namespaceURI===io?P.namespaceURI===Te?U==="svg":P.namespaceURI===ro?U==="svg"&&(xt==="annotation-xml"||Rs[xt]):!!Cl[U]:T.namespaceURI===ro?P.namespaceURI===Te?U==="math":P.namespaceURI===io?U==="math"&&Ps[xt]:!!xl[U]:T.namespaceURI===Te?P.namespaceURI===io&&!Ps[xt]||P.namespaceURI===ro&&!Rs[xt]?!1:!xl[U]&&(Om[U]||!Cl[U]):!!(ni==="application/xhtml+xml"&&Ds[T.namespaceURI]):!1},he=function(T){$r(t.removed,{element:T});try{C(T).removeChild(T)}catch{g(T)}},lr=function(T,P){try{$r(t.removed,{attribute:P.getAttributeNode(T),from:P})}catch{$r(t.removed,{attribute:null,from:P})}if(P.removeAttribute(T),T==="is")if(Br||to)try{he(P)}catch{}else try{P.setAttribute(T,"")}catch{}},bl=function(T){let P=null,U=null;if(Es)T=""+T;else{const St=$l(T,/^[\r\n\t ]+/);U=St&&St[0]}ni==="application/xhtml+xml"&&Fr===Te&&(T=''+T+"");const xt=_?_.createHTML(T):T;if(Fr===Te)try{P=new h().parseFromString(xt,ni)}catch{}if(!P||!P.documentElement){P=q.createDocument(Fr,"template",null);try{P.documentElement.innerHTML=Is?E:xt}catch{}}const ut=P.body||P.documentElement;return T&&U&&ut.insertBefore(r.createTextNode(U),ut.childNodes[0]||null),Fr===Te?H.call(P,nr?"html":"body")[0]:nr?P.documentElement:ut},kl=function(T){return I.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Tl=function(T){T.normalize();const P=I.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let U=P.nextNode();for(;U;){let xt=U.data;Mr([A,L,M],ut=>{xt=Or(xt,ut," ")}),U.data=xt,U=P.nextNode()}},oo=function(T){const P=S?S(T):null;return typeof P!="string"||Ft(P)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==y(T)},li=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===Se.documentFragment}catch{return!1}},so=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function De(Q,T,P){Mr(Q,U=>{U.call(t,T,P,Ar)})}const wl=function(T){let P=null;if(De(F.beforeSanitizeElements,T,null),oo(T))return he(T),!0;const U=Ft(T.nodeName);if(De(F.uponSanitizeElement,T,{tagName:U,allowedTags:tt}),si&&T.hasChildNodes()&&!so(T.firstElementChild)&&Pt(/<[/\w!]/g,T.innerHTML)&&Pt(/<[/\w!]/g,T.textContent)||si&&T.namespaceURI===Te&&U==="style"&&so(T.firstElementChild)||T.nodeType===Se.progressingInstruction||si&&T.nodeType===Se.comment&&Pt(/<[/\w]/g,T.data))return he(T),!0;if(kt[U]||!(wt.tagCheck instanceof Function&&wt.tagCheck(U))&&!tt[U]){if(!kt[U]&&_l(U)&&(st.tagNameCheck instanceof RegExp&&Pt(st.tagNameCheck,U)||st.tagNameCheck instanceof Function&&st.tagNameCheck(U)))return!1;if(Ms&&!ke[U]){const ut=C(T),St=y(T);if(St&&ut){const oe=St.length;for(let we=oe-1;we>=0;--we){const ce=u(St[we],!0);ut.insertBefore(ce,m(T))}}}return he(T),!0}return(w?w(T):T.nodeType)===Se.element&&!Pm(T)||(U==="noscript"||U==="noembed"||U==="noframes")&&Pt(/<\/no(script|embed|frames)/i,T.innerHTML)?(he(T),!0):(Ve&&T.nodeType===Se.text&&(P=T.textContent,Mr([A,L,M],ut=>{P=Or(P,ut," ")}),T.textContent!==P&&($r(t.removed,{element:T.cloneNode()}),T.textContent=P)),De(F.afterSanitizeElements,T,null),!1)},Sl=function(T,P,U){if(Tt[P]||dl&&(P==="id"||P==="name")&&(U in r||U in Rm))return!1;const xt=G[P]||wt.attributeCheck instanceof Function&&wt.attributeCheck(P,T);if(!(Ie&&!Tt[P]&&Pt(D,P))){if(!(le&&Pt(z,P))){if(!xt||Tt[P]){if(!(_l(T)&&(st.tagNameCheck instanceof RegExp&&Pt(st.tagNameCheck,T)||st.tagNameCheck instanceof Function&&st.tagNameCheck(T))&&(st.attributeNameCheck instanceof RegExp&&Pt(st.attributeNameCheck,P)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(P,T))||P==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&Pt(st.tagNameCheck,U)||st.tagNameCheck instanceof Function&&st.tagNameCheck(U))))return!1}else if(!Os[P]){if(!Pt(dt,Or(U,lt,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&T!=="script"&&Ol(U,"data:")===0&&pl[T])){if(!(vr&&!Pt(Y,Or(U,lt,"")))){if(U)return!1}}}}}}return!0},Nm=nt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),_l=function(T){return!Nm[xi(T)]&&Pt(gt,T)},vl=function(T){De(F.beforeSanitizeAttributes,T,null);const P=T.attributes;if(!P||oo(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let xt=P.length;for(;xt--;){const ut=P[xt],St=ut.name,oe=ut.namespaceURI,we=ut.value,ce=Ft(St),qs=we;let Dt=St==="value"?qs:hy(qs);if(U.attrName=ce,U.attrValue=Dt,U.keepAttr=!0,U.forceKeepAttr=void 0,De(F.uponSanitizeAttribute,T,U),Dt=U.attrValue,ul&&(ce==="id"||ce==="name")&&Ol(Dt,fl)!==0&&(lr(St,T),Dt=fl+Dt),si&&Pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Dt)){lr(St,T);continue}if(ce==="attributename"&&$l(Dt,"href")){lr(St,T);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){lr(St,T);continue}if(!cl&&Pt(/\/>/i,Dt)){lr(St,T);continue}Ve&&Mr([A,L,M],Ll=>{Dt=Or(Dt,Ll," ")});const Bl=Ft(T.nodeName);if(!Sl(Bl,ce,Dt)){lr(St,T);continue}if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!oe)switch(d.getAttributeType(Bl,ce)){case"TrustedHTML":{Dt=_.createHTML(Dt);break}case"TrustedScriptURL":{Dt=_.createScriptURL(Dt);break}}if(Dt!==qs)try{oe?T.setAttributeNS(oe,St,Dt):T.setAttribute(St,Dt),oo(T)?he(T):Ml(t.removed)}catch{lr(St,T)}}De(F.afterSanitizeAttributes,T,null)},ao=function(T){let P=null;const U=kl(T);for(De(F.beforeSanitizeShadowDOM,T,null);P=U.nextNode();)if(De(F.uponSanitizeShadowNode,P,null),wl(P),vl(P),li(P.content)&&ao(P.content),(w?w(P):P.nodeType)===Se.element){const ut=b?b(P):P.shadowRoot;li(ut)&&(Er(ut),ao(ut))}De(F.afterSanitizeShadowDOM,T,null)},Er=function(T){const P=w?w(T):T.nodeType;if(P===Se.element){const ut=b?b(T):T.shadowRoot;li(ut)&&(Er(ut),ao(ut))}const U=y?y(T):T.childNodes;if(!U)return;const xt=[];Mr(U,ut=>{$r(xt,ut)});for(const ut of xt)Er(ut);if(P===Se.element){const ut=S?S(T):null;if(typeof ut=="string"&&Ft(ut)==="template"){const St=T.content;li(St)&&Er(St)}}};return t.sanitize=function(Q){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,U=null,xt=null,ut=null;if(Is=!Q,Is&&(Q=""),typeof Q!="string"&&!so(Q)&&(Q=py(Q),typeof Q!="string"))throw ci("dirty is not a string, aborting");if(!t.isSupported)return Q;if(As||Ns(T),t.removed=[],typeof Q=="string"&&(ai=!1),ai){const we=S?S(Q):Q.nodeName;if(typeof we=="string"){const ce=Ft(we);if(!tt[ce]||kt[ce])throw ci("root node is forbidden and cannot be sanitized in-place")}if(oo(Q))throw ci("root node is clobbered and cannot be sanitized in-place");Er(Q)}else if(so(Q))P=bl(""),U=P.ownerDocument.importNode(Q,!0),U.nodeType===Se.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?P=U:P.appendChild(U),Er(U);else{if(!Br&&!Ve&&!nr&&Q.indexOf("<")===-1)return _&&eo?_.createHTML(Q):Q;if(P=bl(Q),!P)return Br?null:eo?E:""}P&&Es&&he(P.firstChild);const St=kl(ai?Q:P);for(;xt=St.nextNode();)wl(xt),vl(xt),li(xt.content)&&ao(xt.content);if(ai)return Ve&&Tl(Q),Q;if(Br){if(Ve&&Tl(P),to)for(ut=R.call(P.ownerDocument);P.firstChild;)ut.appendChild(P.firstChild);else ut=P;return(G.shadowroot||G.shadowrootmode)&&(ut=W.call(i,ut,!0)),ut}let oe=nr?P.outerHTML:P.innerHTML;return nr&&tt["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&Pt(_y,P.ownerDocument.doctype.name)&&(oe=" `+oe),Ve&&Mr([A,L,M],we=>{oe=Or(oe,we," ")}),_&&eo?_.createHTML(oe):oe},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ns(Q),As=!0},t.clearConfig=function(){Ar=null,As=!1},t.isValidAttribute=function(Q,T,P){Ar||Ns({});const U=Ft(Q),xt=Ft(T);return Sl(U,xt,P)},t.addHook=function(Q,T){typeof T=="function"&&$r(F[Q],T)},t.removeHook=function(Q,T){if(T!==void 0){const P=ny(F[Q],T);return P===-1?void 0:ly(F[Q],P,1)[0]}return Ml(F[Q])},t.removeHooks=function(Q){F[Q]=[]},t.removeAllHooks=function(){F=zl()},t}var Gr=mc(),yc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Li=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fy=/\s*%%.*\n/gm,Cc=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Cr={},hn=p(function(e,t){e=e.replace(yc,"").replace(Li,"").replace(Fy,` `);for(const[r,{detector:i}]of Object.entries(Cr))if(i(e,t))return r;throw new Cc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ha=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)xc(t,r,i)},"registerLazyLoadedDiagrams"),xc=p((e,t,r)=>{Cr[e]&&N.warn(`Detector with key ${e} already exists. Overwriting.`),Cr[e]={detector:t,loader:r},N.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Ay=p(e=>Cr[e].loader,"getDiagramLoader"),ca=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>ca(e,s,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=ca(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Ot=ca,Me="#ffffff",$e="#f2f2f2",ot=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Ey=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,10)):(this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},My=p(e=>{const t=new Ey;return t.calculate(e),t},"getThemeVariables"),$y=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(v("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=O("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=O(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||$(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=$(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=$(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=$(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=v(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Oy=p(e=>{const t=new $y;return t.calculate(e),t},"getThemeVariables"),Iy=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||O(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||O(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Dy=p(e=>{const t=new Iy;return t.calculate(e),t},"getThemeVariables"),Ry=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=$("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.primaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=O(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||O(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||O(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Py=p(e=>{const t=new Ry;return t.calculate(e),t},"getThemeVariables"),Ny=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=$(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||$(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=$(this.contrast,55),this.border2=this.contrast,this.actorBorder=$(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},qy=p(e=>{const t=new Ny;return t.calculate(e),t},"getThemeVariables"),Wy=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||$(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||x(e,{h:30}),this.cScale4=this.cScale4||x(e,{h:60}),this.cScale5=this.cScale5||x(e,{h:90}),this.cScale6=this.cScale6||x(e,{h:120}),this.cScale7=this.cScale7||x(e,{h:150}),this.cScale8=this.cScale8||x(e,{h:210,l:150}),this.cScale9=this.cScale9||x(e,{h:270}),this.cScale10=this.cScale10||x(e,{h:300}),this.cScale11=this.cScale11||x(e,{h:330}),this.darkMode)for(let o=0;o{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},zy=p(e=>{const t=new Wy;return t.calculate(e),t},"getThemeVariables"),Hy=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(v("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Yy=p(e=>{const t=new Hy;return t.calculate(e),t},"getThemeVariables"),Uy=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||$(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},jy=p(e=>{const t=new Uy;return t.calculate(e),t},"getThemeVariables"),Gy=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(v("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Xy=p(e=>{const t=new Gy;return t.calculate(e),t},"getThemeVariables"),Vy=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||$(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Zy=p(e=>{const t=new Vy;return t.calculate(e),t},"getThemeVariables"),Ky=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$(v("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||$(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Qy=p(e=>{const t=new Ky;return t.calculate(e),t},"getThemeVariables"),We={base:{getThemeVariables:My},dark:{getThemeVariables:Oy},default:{getThemeVariables:Dy},forest:{getThemeVariables:Py},neutral:{getThemeVariables:qy},neo:{getThemeVariables:zy},"neo-dark":{getThemeVariables:Yy},redux:{getThemeVariables:jy},"redux-dark":{getThemeVariables:Xy},"redux-color":{getThemeVariables:Zy},"redux-dark-color":{getThemeVariables:Qy}},jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},bc={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:We.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},eventmodeling:{...jt.eventmodeling},treeView:{...jt.treeView,useWidth:void 0},radar:{...jt.radar},ishikawa:{...jt.ishikawa},sankey:{...jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn}},kc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...kc(e[i],"")]:[...r,t+i],[]),"keyify"),Jy=new Set(kc(bc,"")),Tc=bc,Oo=p(e=>{if(N.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Oo(t));return}for(const t of Object.keys(e)){if(N.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Jy.has(t)||e[t]==null){N.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const o of Object.keys(e[t]))(typeof e[t][o]!="string"||!i.test(e[t][o]))&&(N.debug("sanitize deleting invalid color:",o,e[t][o]),delete e[t][o])}else N.debug("sanitizing object",t),Oo(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(N.debug("sanitizing css option",t),e[t]=wc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}N.debug("After sanitization",e)}},"sanitizeDirective"),wc=p(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Jt=Ot({},Xr),Io,xr=[],Fi=Ot({},Xr),us=p((e,t)=>{let r=Ot({},e),i={};for(const o of t)vc(o),i=Ot(i,o);if(r=Ot(r,i),i.theme&&i.theme in We){const o=Ot({},Io),s=Ot(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in We&&(r.themeVariables=We[r.theme].getThemeVariables(s))}return Fi=r,Lc(Fi),Fi},"updateCurrentConfig"),t0=p(e=>(Jt=Ot({},Xr),Jt=Ot(Jt,e),e.theme&&We[e.theme]&&(Jt.themeVariables=We[e.theme].getThemeVariables(e.themeVariables)),us(Jt,xr),Jt),"setSiteConfig"),e0=p(e=>{Io=Ot({},e)},"saveConfigFromInitialize"),r0=p(e=>(Jt=Ot(Jt,e),us(Jt,xr),Jt),"updateSiteConfig"),Sc=p(()=>Ot({},Jt),"getSiteConfig"),_c=p(e=>(Lc(e),Ot(Fi,e),vt()),"setConfig"),vt=p(()=>Ot({},Fi),"getConfig"),vc=p(e=>{e&&(["secure",...Jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(N.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&vc(e[t])}))},"sanitize"),i0=p(e=>{Oo(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),xr.push(e),us(Jt,xr)},"addDirective"),Do=p((e=Jt)=>{xr=[],us(e,xr)},"reset"),o0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Hl={},Bc=p(e=>{Hl[e]||(N.warn(o0[e]),Hl[e]=!0)},"issueWarning"),Lc=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Bc("LAZY_LOAD_DEPRECATED")},"checkConfig"),xB=p(()=>{let e={};Io&&(e=Ot(e,Io));for(const t of xr)e=Ot(e,t);return e},"getUserDefinedConfig"),Kt=p(e=>(e.flowchart?.htmlLabels!=null&&Bc("FLOWCHART_HTML_LABELS_DEPRECATED"),je(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ui=//gi,s0=p(e=>e?Ec(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),a0=(()=>{let e=!1;return()=>{e||(Fc(),e=!0)}})();function Fc(){const e="data-temp-href-target";Gr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Gr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Fc,"setupDompurifyHooks");var Ac=p(e=>(a0(),Gr.sanitize(e)),"removeScript"),Yl=p((e,t)=>{if(Kt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Ac(e):r!=="loose"&&(e=Ec(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=c0(e))}return e},"sanitizeMore"),Ce=p((e,t)=>e&&(t.dompurifyConfig?e=Gr.sanitize(Yl(e,t),t.dompurifyConfig).toString():e=Gr.sanitize(Yl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),n0=p((e,t)=>typeof e=="string"?Ce(e,t):e.flat().map(r=>Ce(r,t)),"sanitizeTextOrArray"),l0=p(e=>Ui.test(e),"hasBreaks"),h0=p(e=>e.split(Ui),"splitBreaks"),c0=p(e=>e.replace(/#br#/g,"
      "),"placeholderToBreak"),Ec=p(e=>e.replace(Ui,"#br#"),"breakToPlaceholder"),d0=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),u0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),f0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ul=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),p0=p((e,t)=>{const r=da(e,"~"),i=da(t,"~");return r===1&&i===1},"shouldCombineSets"),g0=p(e=>{const t=da(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),jl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ua=/\$\$(.*)\$\$/g,$i=p(e=>(e.match(ua)?.length??0)>0,"hasKatex"),bB=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Mc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),m0=p(async(e,t)=>{if(!$i(e))return e;if(!(jl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ua,"MathML is unsupported in this environment.");{const{default:r}=await pt(async()=>{const{default:o}=await import("./katex-HP8lGamR.js");return{default:o}},[]),i=t.forceLegacyMathML||!jl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ui).map(o=>$i(o)?`
      ${o}
      `:`
      ${o}
      `).join("").replace(ua,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Mc=p(async(e,t)=>Ce(await m0(e,t),t),"renderKatexSanitized"),ji={getRows:s0,sanitizeText:Ce,sanitizeTextOrArray:n0,hasBreaks:l0,splitBreaks:h0,lineBreakRegex:Ui,removeScript:Ac,getUrl:d0,evaluate:je,getMax:u0,getMin:f0},y0=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),C0=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),$c=p(function(e,t,r,i){const o=C0(t,r,i);y0(e,o)},"configureSvgSize"),x0=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;N.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;N.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,N.info(`Calculated bounds: ${n}x${l}`),$c(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),To={};function fa(e){return[...e.cssRules].map(t=>t.cssText).join(` @@ -297,8 +297,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let o="

      An error L0,20`)},"requirement_arrow"),jw=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Gw=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Xw=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),Vw={extension:Bw,composition:Lw,aggregation:Fw,dependency:Aw,lollipop:Ew,point:Mw,circle:$w,cross:Ow,barb:Iw,barbNeo:Dw,only_one:Rw,zero_or_one:Pw,one_or_more:Nw,zero_or_more:qw,only_one_neo:Ww,zero_or_one_neo:zw,one_or_more_neo:Hw,zero_or_more_neo:Yw,requirement_arrow:Uw,requirement_contains:Gw,requirement_arrow_neo:jw,requirement_contains_neo:Xw},Zw=vw,Kw={common:ji,getConfig:vt,insertCluster:XT,insertEdge:_w,insertEdgeLabel:xw,insertMarkers:Zw,insertNode:Fg,interpolateToCurve:Nn,labelHelper:rt,log:N,positionEdgeLabel:bw},Hi={},$g=p(e=>{for(const t of e)Hi[t.name]=t},"registerLayoutLoaders"),Qw=p(()=>{$g([{name:"dagre",loader:p(async()=>await pt(()=>import("./dagre-BM42HDAG-BYHCKpxZ.js"),__vite__mapDeps([0,1,2,3,4])),"loader")},{name:"cose-bilkent",loader:p(async()=>await pt(()=>import("./cose-bilkent-S5V4N54A-udvWi3mN.js"),__vite__mapDeps([5,6,3,4])),"loader")}])},"registerDefaultLayoutLoaders");Qw();var UB=p(async(e,t)=>{if(!(e.layoutAlgorithm in Hi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Hi[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Kw,{algorithm:r.algorithm})},"render"),jB=p((e="",{fallback:t="dagre"}={})=>{if(e in Hi)return e;if(t in Hi)return N.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),al="comm",Og="rule",Ig="decl",Jw="@media",tS="@import",eS="@supports",rS="@namespace",en="@keyframes",Dg="@layer",iS="@scope",oS=Math.abs,Mi=String.fromCharCode;function Rg(e){return e.trim()}function rn(e,t,r){return e.replace(t,r)}function jr(e,t){return e.charCodeAt(t)|0}function Jr(e,t,r){return e.slice(t,r)}function Le(e){return e.length}function Pg(e){return e.length}function xo(e,t){return t.push(e),e}var Bs=1,ti=1,Ng=0,ne=0,Et=0,oi="";function nl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Bs,column:ti,length:a,return:"",siblings:n}}function sS(){return Et}function aS(){return Et=ne>0?jr(oi,--ne):0,ti--,Et===10&&(ti=1,Bs--),Et}function ye(){return Et=ne2||Yi(Et)>3?"":" "}function cS(e,t){for(;--t&&ye()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return Ls(e,Mo()+(t<6&&Je()==32&&ye()==32))}function on(e){for(;ye();)switch(Et){case e:return ne;case 34:case 39:e!==34&&e!==39&&on(Et);break;case 40:e===41&&on(e);break;case 92:ye();break}return ne}function dS(e,t){for(;ye()&&e+Et!==57;)if(e+Et===84&&Je()===47)break;return"/*"+Ls(t,ne-1)+"*"+Mi(e===47?e:ye())}function uS(e){for(;!Yi(Je());)ye();return Ls(e,ne)}function fS(e){return lS($o("",null,null,null,[""],e=nS(e),0,[0],e))}function $o(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,w="",S=o,_=s,E=i,B=w;y;)switch(g=k,k=ye()){case 40:g!=108&&jr(B,d-1)==58?(b++,B+="("):B+=sa(k);break;case 41:b--,B+=")";break;case 34:case 39:case 91:B+=sa(k);break;case 9:case 10:case 13:case 32:if(b>0){B+=Mi(k);break}B+=hS(g);break;case 92:B+=cS(Mo()-1,7);continue;case 47:switch(Je()){case 42:case 47:xo(pS(dS(ye(),Mo()),t,r,l),l),(Yi(g||1)==5||Yi(Je()||1)==5)&&Le(B)&&Jr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=Le(B)*C;case 125*m:case 59:case 0:if(b>0&&k){B+=Mi(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(B=rn(B,/\f/g,"")),u>0&&(Le(B)-d||m===0)&&xo(u>32?ac(B+";",i,r,d-1,l):ac(rn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(xo(E=sc(B,t,r,c,h,o,n,w,S=[],_=[],d,s),s),k===123)if(h===0)$o(B,t,E,E,S,s,d,n,_);else{switch(f){case 99:if(jr(B,3)===110)break;case 108:if(jr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?$o(e,E,E,i&&xo(sc(e,E,E,0,0,o,n,w,o,S=[],d,_),_),o,_,d,n,i?S:_):$o(B,E,E,E,[""],_,0,n,_)}}c=h=u=0,m=C=1,w=B="",d=a;break;case 58:d=1+Le(B),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&aS()==125)continue}switch(B+=Mi(k),k*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Le(B)-1)*C,C=1;break;case 64:Je()===45&&(B+=sa(ye())),f=Je(),h=d=Le(w=B+=uS(Mo())),k++;break;case 45:g===45&&Le(B)==2&&(m=0)}}return s}function sc(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=Pg(u),m=0,y=0,C=0;m0?u[b]+" "+k:rn(k,/&\f/g,u[b])))&&(l[C++]=w);return nl(e,t,r,o===0?Og:n,l,c,h,d)}function pS(e,t,r,i){return nl(e,t,r,al,Mi(sS()),Jr(e,2,-2),0,i)}function ac(e,t,r,i,o){return nl(e,t,r,Ig,Jr(e,0,i),Jr(e,i+1,-1),i,o)}function sn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),CS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-CjYtsINA.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]));return{id:qg,diagram:e}},"loader"),xS={id:qg,detector:yS,loader:CS},bS=xS,Wg="flowchart",kS=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),TS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-Cj6V7iWh.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:Wg,diagram:e}},"loader"),wS={id:Wg,detector:kS,loader:TS},SS=wS,zg="flowchart-v2",_S=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),vS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-Cj6V7iWh.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:zg,diagram:e}},"loader"),BS={id:zg,detector:_S,loader:vS},LS=BS,Hg="er",FS=p(e=>/^\s*erDiagram/.test(e),"detector"),AS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-CYIY96xo.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,3,4]));return{id:Hg,diagram:e}},"loader"),ES={id:Hg,detector:FS,loader:AS},MS=ES,Yg="gitGraph",$S=p(e=>/^\s*gitGraph/.test(e),"detector"),OS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-CAxotu2m.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]));return{id:Yg,diagram:e}},"loader"),IS={id:Yg,detector:$S,loader:OS},DS=IS,Ug="gantt",RS=p(e=>/^\s*gantt/.test(e),"detector"),PS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DMnRKPEn.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,4]));return{id:Ug,diagram:e}},"loader"),NS={id:Ug,detector:RS,loader:PS},qS=NS,jg="info",WS=p(e=>/^\s*info/.test(e),"detector"),zS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-CCz_JQ8V.js");return{diagram:t}},__vite__mapDeps([23,18,3,4]));return{id:jg,diagram:e}},"loader"),HS={id:jg,detector:WS,loader:zS},Gg="pie",YS=p(e=>/^\s*pie/.test(e),"detector"),US=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-CxGR0oGX.js");return{diagram:t}},__vite__mapDeps([24,16,18,3,4,25,26,21]));return{id:Gg,diagram:e}},"loader"),jS={id:Gg,detector:YS,loader:US},Xg="quadrantChart",GS=p(e=>/^\s*quadrantChart/.test(e),"detector"),XS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-bI88ym0r.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,3,4]));return{id:Xg,diagram:e}},"loader"),VS={id:Xg,detector:GS,loader:XS},ZS=VS,Vg="xychart",KS=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),QS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-Bpc09H3-.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,3,4]));return{id:Vg,diagram:e}},"loader"),JS={id:Vg,detector:KS,loader:QS},t_=JS,Zg="requirement",e_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),r_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-BMZCm0mi.js");return{diagram:t}},__vite__mapDeps([29,11,12,3,4]));return{id:Zg,diagram:e}},"loader"),i_={id:Zg,detector:e_,loader:r_},o_=i_,Kg="sequence",s_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),a_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-BUDBFiIt.js");return{diagram:t}},__vite__mapDeps([30,8,17,3,4]));return{id:Kg,diagram:e}},"loader"),n_={id:Kg,detector:s_,loader:a_},l_=n_,Qg="class",h_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),c_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-B4KLeIkj.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,3,4]));return{id:Qg,diagram:e}},"loader"),d_={id:Qg,detector:h_,loader:c_},u_=d_,Jg="classDiagram",f_=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),p_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-B4KLeIkj.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,3,4]));return{id:Jg,diagram:e}},"loader"),g_={id:Jg,detector:f_,loader:p_},m_=g_,tm="state",y_=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),C_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-6VO5APFy.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,1,2,3,4]));return{id:tm,diagram:e}},"loader"),x_={id:tm,detector:y_,loader:C_},b_=x_,em="stateDiagram",k_=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),T_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-Cv36kbxe.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,3,4]));return{id:em,diagram:e}},"loader"),w_={id:em,detector:k_,loader:T_},S_=w_,rm="journey",__=p(e=>/^\s*journey/.test(e),"detector"),v_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-B7prU7-l.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,3,4]));return{id:rm,diagram:e}},"loader"),B_={id:rm,detector:__,loader:v_},L_=B_,F_=p((e,t,r)=>{N.debug(`rendering svg for syntax error -`);const i=ck(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),$c(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),im={draw:F_},A_=im,E_={db:{},renderer:im,parser:{parse:p(()=>{},"parse")}},M_=E_,om="flowchart-elk",$_=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),O_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-Cj6V7iWh.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:om,diagram:e}},"loader"),I_={id:om,detector:$_,loader:O_},D_=I_,sm="timeline",R_=p(e=>/^\s*timeline/.test(e),"detector"),P_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-C9UZd7_v.js");return{diagram:t}},__vite__mapDeps([38,25,3,4]));return{id:sm,diagram:e}},"loader"),N_={id:sm,detector:R_,loader:P_},q_=N_,am="mindmap",W_=p(e=>/^\s*mindmap/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-DpfCgIR2.js");return{diagram:t}},__vite__mapDeps([39,11,12,3,4]));return{id:am,diagram:e}},"loader"),H_={id:am,detector:W_,loader:z_},Y_=H_,nm="kanban",U_=p(e=>/^\s*kanban/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-BIGmwIqe.js");return{diagram:t}},__vite__mapDeps([40,10,3,4]));return{id:nm,diagram:e}},"loader"),G_={id:nm,detector:U_,loader:j_},X_=G_,lm="sankey",V_=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-DvCK0RLW.js");return{diagram:t}},__vite__mapDeps([41,26,21,3,4]));return{id:lm,diagram:e}},"loader"),K_={id:lm,detector:V_,loader:Z_},Q_=K_,hm="packet",J_=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-DlXqHg1j.js");return{diagram:t}},__vite__mapDeps([42,16,18,3,4]));return{id:hm,diagram:e}},"loader"),ev={id:hm,detector:J_,loader:tv},cm="radar",rv=p(e=>/^\s*radar-beta/.test(e),"detector"),iv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-C-O_ir29.js");return{diagram:t}},__vite__mapDeps([43,16,18,3,4]));return{id:cm,diagram:e}},"loader"),ov={id:cm,detector:rv,loader:iv},dm="block",sv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),av=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-DUxh1qjd.js");return{diagram:t}},__vite__mapDeps([44,10,1,13,3,4]));return{id:dm,diagram:e}},"loader"),nv={id:dm,detector:sv,loader:av},lv=nv,um="treeView",hv=p(e=>/^\s*treeView-beta/.test(e),"detector"),cv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-CXTeZ9ti.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,3,4]));return{id:um,diagram:e}},"loader"),dv={id:um,detector:hv,loader:cv},uv=dv,fm="architecture",fv=p(e=>/^\s*architecture/.test(e),"detector"),pv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-C_j1myOw.js");return{diagram:t}},__vite__mapDeps([46,16,18,3,4,6]));return{id:fm,diagram:e}},"loader"),gv={id:fm,detector:fv,loader:pv},mv=gv,pm="eventmodeling",yv=p(e=>/^\s*eventmodeling/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-C9y5FHUo.js");return{diagram:t}},__vite__mapDeps([47,16,18,3,4]));return{id:pm,diagram:e}},"loader"),xv={id:pm,detector:yv,loader:Cv},bv=xv,gm="ishikawa",kv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Tv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-DFUiiMiU.js");return{diagram:t}},__vite__mapDeps([48,3,4]));return{id:gm,diagram:e}},"loader"),wv={id:gm,detector:kv,loader:Tv},mm="venn",Sv=p(e=>/^\s*venn-beta/.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-DMsJx58H.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:mm,diagram:e}},"loader"),vv={id:mm,detector:Sv,loader:_v},Bv=vv,ym="treemap",Lv=p(e=>/^\s*treemap/.test(e),"detector"),Fv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-CE47zKRR.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,3,4,22,26,21]));return{id:ym,diagram:e}},"loader"),Av={id:ym,detector:Lv,loader:Fv},Cm="wardley-beta",Ev=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Mv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-Dir0ojk9.js");return{diagram:t}},__vite__mapDeps([51,16,18,3,4]));return{id:Cm,diagram:e}},"loader"),$v={id:Cm,detector:Ev,loader:Mv},Ov=$v,nc=!1,Fs=p(()=>{nc||(nc=!0,Po("error",M_,e=>e.toLowerCase().trim()==="error"),Po("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ha(D_,Y_,mv),ha(bS,X_,m_,u_,MS,qS,HS,jS,o_,l_,LS,SS,q_,DS,S_,b_,L_,ZS,Q_,ev,t_,lv,bv,uv,ov,wv,Av,Bv,Ov))},"addDiagrams"),Iv=p(async()=>{N.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Cr).map(async([r,{detector:i,loader:o}])=>{if(o)try{pa(r)}catch{try{const{diagram:s,id:a}=await o();Po(a,s,i)}catch(s){throw N.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Cr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){N.error(`Failed to load ${t.length} external diagrams`);for(const r of t)N.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Dv="graphics-document document";function xm(e,t){e.attr("role",Dv),t!==""&&e.attr("aria-roledescription",t)}p(xm,"setA11yDiagramInfo");function bm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(bm,"addSVGa11yTitleDescription");var an=class km{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=vt(),o=hn(t,i);t=p2(t)+` + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Gw=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Xw=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),Vw={extension:Bw,composition:Lw,aggregation:Fw,dependency:Aw,lollipop:Ew,point:Mw,circle:$w,cross:Ow,barb:Iw,barbNeo:Dw,only_one:Rw,zero_or_one:Pw,one_or_more:Nw,zero_or_more:qw,only_one_neo:Ww,zero_or_one_neo:zw,one_or_more_neo:Hw,zero_or_more_neo:Yw,requirement_arrow:Uw,requirement_contains:Gw,requirement_arrow_neo:jw,requirement_contains_neo:Xw},Zw=vw,Kw={common:ji,getConfig:vt,insertCluster:XT,insertEdge:_w,insertEdgeLabel:xw,insertMarkers:Zw,insertNode:Fg,interpolateToCurve:Nn,labelHelper:rt,log:N,positionEdgeLabel:bw},Hi={},$g=p(e=>{for(const t of e)Hi[t.name]=t},"registerLayoutLoaders"),Qw=p(()=>{$g([{name:"dagre",loader:p(async()=>await pt(()=>import("./dagre-BM42HDAG-CQ5sq_l2.js"),__vite__mapDeps([0,1,2,3,4])),"loader")},{name:"cose-bilkent",loader:p(async()=>await pt(()=>import("./cose-bilkent-S5V4N54A-lwbIYhF_.js"),__vite__mapDeps([5,6,3,4])),"loader")}])},"registerDefaultLayoutLoaders");Qw();var UB=p(async(e,t)=>{if(!(e.layoutAlgorithm in Hi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Hi[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Kw,{algorithm:r.algorithm})},"render"),jB=p((e="",{fallback:t="dagre"}={})=>{if(e in Hi)return e;if(t in Hi)return N.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),al="comm",Og="rule",Ig="decl",Jw="@media",tS="@import",eS="@supports",rS="@namespace",en="@keyframes",Dg="@layer",iS="@scope",oS=Math.abs,Mi=String.fromCharCode;function Rg(e){return e.trim()}function rn(e,t,r){return e.replace(t,r)}function jr(e,t){return e.charCodeAt(t)|0}function Jr(e,t,r){return e.slice(t,r)}function Le(e){return e.length}function Pg(e){return e.length}function xo(e,t){return t.push(e),e}var Bs=1,ti=1,Ng=0,ne=0,Et=0,oi="";function nl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Bs,column:ti,length:a,return:"",siblings:n}}function sS(){return Et}function aS(){return Et=ne>0?jr(oi,--ne):0,ti--,Et===10&&(ti=1,Bs--),Et}function ye(){return Et=ne2||Yi(Et)>3?"":" "}function cS(e,t){for(;--t&&ye()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return Ls(e,Mo()+(t<6&&Je()==32&&ye()==32))}function on(e){for(;ye();)switch(Et){case e:return ne;case 34:case 39:e!==34&&e!==39&&on(Et);break;case 40:e===41&&on(e);break;case 92:ye();break}return ne}function dS(e,t){for(;ye()&&e+Et!==57;)if(e+Et===84&&Je()===47)break;return"/*"+Ls(t,ne-1)+"*"+Mi(e===47?e:ye())}function uS(e){for(;!Yi(Je());)ye();return Ls(e,ne)}function fS(e){return lS($o("",null,null,null,[""],e=nS(e),0,[0],e))}function $o(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,w="",S=o,_=s,E=i,B=w;y;)switch(g=k,k=ye()){case 40:g!=108&&jr(B,d-1)==58?(b++,B+="("):B+=sa(k);break;case 41:b--,B+=")";break;case 34:case 39:case 91:B+=sa(k);break;case 9:case 10:case 13:case 32:if(b>0){B+=Mi(k);break}B+=hS(g);break;case 92:B+=cS(Mo()-1,7);continue;case 47:switch(Je()){case 42:case 47:xo(pS(dS(ye(),Mo()),t,r,l),l),(Yi(g||1)==5||Yi(Je()||1)==5)&&Le(B)&&Jr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*m:n[c++]=Le(B)*C;case 125*m:case 59:case 0:if(b>0&&k){B+=Mi(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(B=rn(B,/\f/g,"")),u>0&&(Le(B)-d||m===0)&&xo(u>32?ac(B+";",i,r,d-1,l):ac(rn(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(xo(E=sc(B,t,r,c,h,o,n,w,S=[],_=[],d,s),s),k===123)if(h===0)$o(B,t,E,E,S,s,d,n,_);else{switch(f){case 99:if(jr(B,3)===110)break;case 108:if(jr(B,2)===97)break;default:h=0;case 100:case 109:case 115:}h?$o(e,E,E,i&&xo(sc(e,E,E,0,0,o,n,w,o,S=[],d,_),_),o,_,d,n,i?S:_):$o(B,E,E,E,[""],_,0,n,_)}}c=h=u=0,m=C=1,w=B="",d=a;break;case 58:d=1+Le(B),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&aS()==125)continue}switch(B+=Mi(k),k*m){case 38:C=h>0?1:(B+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Le(B)-1)*C,C=1;break;case 64:Je()===45&&(B+=sa(ye())),f=Je(),h=d=Le(w=B+=uS(Mo())),k++;break;case 45:g===45&&Le(B)==2&&(m=0)}}return s}function sc(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=Pg(u),m=0,y=0,C=0;m0?u[b]+" "+k:rn(k,/&\f/g,u[b])))&&(l[C++]=w);return nl(e,t,r,o===0?Og:n,l,c,h,d)}function pS(e,t,r,i){return nl(e,t,r,al,Mi(sS()),Jr(e,2,-2),0,i)}function ac(e,t,r,i,o){return nl(e,t,r,Ig,Jr(e,0,i),Jr(e,i+1,-1),i,o)}function sn(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),CS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-CqrVzD0s.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]));return{id:qg,diagram:e}},"loader"),xS={id:qg,detector:yS,loader:CS},bS=xS,Wg="flowchart",kS=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),TS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-J83xwYVI.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:Wg,diagram:e}},"loader"),wS={id:Wg,detector:kS,loader:TS},SS=wS,zg="flowchart-v2",_S=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),vS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-J83xwYVI.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:zg,diagram:e}},"loader"),BS={id:zg,detector:_S,loader:vS},LS=BS,Hg="er",FS=p(e=>/^\s*erDiagram/.test(e),"detector"),AS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-DqreqXxL.js");return{diagram:t}},__vite__mapDeps([14,11,12,13,3,4]));return{id:Hg,diagram:e}},"loader"),ES={id:Hg,detector:FS,loader:AS},MS=ES,Yg="gitGraph",$S=p(e=>/^\s*gitGraph/.test(e),"detector"),OS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-BuZXSVal.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]));return{id:Yg,diagram:e}},"loader"),IS={id:Yg,detector:$S,loader:OS},DS=IS,Ug="gantt",RS=p(e=>/^\s*gantt/.test(e),"detector"),PS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-LeaK0Z0S.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,3,4]));return{id:Ug,diagram:e}},"loader"),NS={id:Ug,detector:RS,loader:PS},qS=NS,jg="info",WS=p(e=>/^\s*info/.test(e),"detector"),zS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-_4xxChMJ.js");return{diagram:t}},__vite__mapDeps([23,18,3,4]));return{id:jg,diagram:e}},"loader"),HS={id:jg,detector:WS,loader:zS},Gg="pie",YS=p(e=>/^\s*pie/.test(e),"detector"),US=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-DSc9x7rN.js");return{diagram:t}},__vite__mapDeps([24,16,18,3,4,25,26,21]));return{id:Gg,diagram:e}},"loader"),jS={id:Gg,detector:YS,loader:US},Xg="quadrantChart",GS=p(e=>/^\s*quadrantChart/.test(e),"detector"),XS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-BQOrZ1N0.js");return{diagram:t}},__vite__mapDeps([27,20,21,22,3,4]));return{id:Xg,diagram:e}},"loader"),VS={id:Xg,detector:GS,loader:XS},ZS=VS,Vg="xychart",KS=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),QS=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-RQQvYamz.js");return{diagram:t}},__vite__mapDeps([28,21,26,20,22,3,4]));return{id:Vg,diagram:e}},"loader"),JS={id:Vg,detector:KS,loader:QS},t_=JS,Zg="requirement",e_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),r_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-CHMFEDkl.js");return{diagram:t}},__vite__mapDeps([29,11,12,3,4]));return{id:Zg,diagram:e}},"loader"),i_={id:Zg,detector:e_,loader:r_},o_=i_,Kg="sequence",s_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),a_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-DUpWmDG7.js");return{diagram:t}},__vite__mapDeps([30,8,17,3,4]));return{id:Kg,diagram:e}},"loader"),n_={id:Kg,detector:s_,loader:a_},l_=n_,Qg="class",h_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),c_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-2GxwnCPM.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,11,12,3,4]));return{id:Qg,diagram:e}},"loader"),d_={id:Qg,detector:h_,loader:c_},u_=d_,Jg="classDiagram",f_=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),p_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-2GxwnCPM.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,11,12,3,4]));return{id:Jg,diagram:e}},"loader"),g_={id:Jg,detector:f_,loader:p_},m_=g_,tm="state",y_=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),C_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CPSVffGI.js");return{diagram:t}},__vite__mapDeps([34,35,11,12,1,2,3,4]));return{id:tm,diagram:e}},"loader"),x_={id:tm,detector:y_,loader:C_},b_=x_,em="stateDiagram",k_=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),T_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-DoCeX-_x.js");return{diagram:t}},__vite__mapDeps([36,35,11,12,3,4]));return{id:em,diagram:e}},"loader"),w_={id:em,detector:k_,loader:T_},S_=w_,rm="journey",__=p(e=>/^\s*journey/.test(e),"detector"),v_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-DqDPR-oh.js");return{diagram:t}},__vite__mapDeps([37,10,8,25,3,4]));return{id:rm,diagram:e}},"loader"),B_={id:rm,detector:__,loader:v_},L_=B_,F_=p((e,t,r)=>{N.debug(`rendering svg for syntax error +`);const i=ck(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),$c(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),im={draw:F_},A_=im,E_={db:{},renderer:im,parser:{parse:p(()=>{},"parse")}},M_=E_,om="flowchart-elk",$_=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),O_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-J83xwYVI.js");return{diagram:t}},__vite__mapDeps([9,10,8,11,12,13,3,4]));return{id:om,diagram:e}},"loader"),I_={id:om,detector:$_,loader:O_},D_=I_,sm="timeline",R_=p(e=>/^\s*timeline/.test(e),"detector"),P_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-CFXewIop.js");return{diagram:t}},__vite__mapDeps([38,25,3,4]));return{id:sm,diagram:e}},"loader"),N_={id:sm,detector:R_,loader:P_},q_=N_,am="mindmap",W_=p(e=>/^\s*mindmap/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-BVhOkDo4.js");return{diagram:t}},__vite__mapDeps([39,11,12,3,4]));return{id:am,diagram:e}},"loader"),H_={id:am,detector:W_,loader:z_},Y_=H_,nm="kanban",U_=p(e=>/^\s*kanban/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-DcgrNp3n.js");return{diagram:t}},__vite__mapDeps([40,10,3,4]));return{id:nm,diagram:e}},"loader"),G_={id:nm,detector:U_,loader:j_},X_=G_,lm="sankey",V_=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-CPPhgIGR.js");return{diagram:t}},__vite__mapDeps([41,26,21,3,4]));return{id:lm,diagram:e}},"loader"),K_={id:lm,detector:V_,loader:Z_},Q_=K_,hm="packet",J_=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-D0dO95EA.js");return{diagram:t}},__vite__mapDeps([42,16,18,3,4]));return{id:hm,diagram:e}},"loader"),ev={id:hm,detector:J_,loader:tv},cm="radar",rv=p(e=>/^\s*radar-beta/.test(e),"detector"),iv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-CpdoZfbi.js");return{diagram:t}},__vite__mapDeps([43,16,18,3,4]));return{id:cm,diagram:e}},"loader"),ov={id:cm,detector:rv,loader:iv},dm="block",sv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),av=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-7dIEisVf.js");return{diagram:t}},__vite__mapDeps([44,10,1,13,3,4]));return{id:dm,diagram:e}},"loader"),nv={id:dm,detector:sv,loader:av},lv=nv,um="treeView",hv=p(e=>/^\s*treeView-beta/.test(e),"detector"),cv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-BBcandbe.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,3,4]));return{id:um,diagram:e}},"loader"),dv={id:um,detector:hv,loader:cv},uv=dv,fm="architecture",fv=p(e=>/^\s*architecture/.test(e),"detector"),pv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-DrgTjmD3.js");return{diagram:t}},__vite__mapDeps([46,16,18,3,4,6]));return{id:fm,diagram:e}},"loader"),gv={id:fm,detector:fv,loader:pv},mv=gv,pm="eventmodeling",yv=p(e=>/^\s*eventmodeling/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-D8nRxl1j.js");return{diagram:t}},__vite__mapDeps([47,16,18,3,4]));return{id:pm,diagram:e}},"loader"),xv={id:pm,detector:yv,loader:Cv},bv=xv,gm="ishikawa",kv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Tv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-Dy_kalDP.js");return{diagram:t}},__vite__mapDeps([48,3,4]));return{id:gm,diagram:e}},"loader"),wv={id:gm,detector:kv,loader:Tv},mm="venn",Sv=p(e=>/^\s*venn-beta/.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-DIdMGm9k.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:mm,diagram:e}},"loader"),vv={id:mm,detector:Sv,loader:_v},Bv=vv,ym="treemap",Lv=p(e=>/^\s*treemap/.test(e),"detector"),Fv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-DeIk_zMC.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,3,4,22,26,21]));return{id:ym,diagram:e}},"loader"),Av={id:ym,detector:Lv,loader:Fv},Cm="wardley-beta",Ev=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Mv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-CsBGD_RZ.js");return{diagram:t}},__vite__mapDeps([51,16,18,3,4]));return{id:Cm,diagram:e}},"loader"),$v={id:Cm,detector:Ev,loader:Mv},Ov=$v,nc=!1,Fs=p(()=>{nc||(nc=!0,Po("error",M_,e=>e.toLowerCase().trim()==="error"),Po("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ha(D_,Y_,mv),ha(bS,X_,m_,u_,MS,qS,HS,jS,o_,l_,LS,SS,q_,DS,S_,b_,L_,ZS,Q_,ev,t_,lv,bv,uv,ov,wv,Av,Bv,Ov))},"addDiagrams"),Iv=p(async()=>{N.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Cr).map(async([r,{detector:i,loader:o}])=>{if(o)try{pa(r)}catch{try{const{diagram:s,id:a}=await o();Po(a,s,i)}catch(s){throw N.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Cr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){N.error(`Failed to load ${t.length} external diagrams`);for(const r of t)N.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Dv="graphics-document document";function xm(e,t){e.attr("role",Dv),t!==""&&e.attr("aria-roledescription",t)}p(xm,"setA11yDiagramInfo");function bm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(bm,"addSVGa11yTitleDescription");var an=class km{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=vt(),o=hn(t,i);t=p2(t)+` `;try{pa(o)}catch{const c=Ay(o);if(!c)throw new Cc(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();Po(h,d)}const{db:s,parser:a,renderer:n,init:l}=pa(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new km(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},lc=[],Rv=p(()=>{lc.forEach(e=>{e()}),lc=[]},"attachFunctions"),Pv=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Tm(e){const t=e.match(yc);if(!t)return{text:e,metadata:{}};let r=y1(t[1],{schema:m1})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Tm,"extractFrontMatter");var Nv=p(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),qv=p(e=>{const{text:t,metadata:r}=Tm(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),Wv=p(e=>{const t=ge.detectInit(e)??{},r=ge.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:e2(e),directive:t}},"processDirectives");function ll(e){const t=Nv(e),r=qv(t),i=Wv(r.text),o=Yn(r.config,i.directive);return e=Pv(i.text),{code:e,title:r.title,config:o}}p(ll,"preprocessDiagram");function wm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(wm,"toBase64");var zv=5e4,Hv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Yv="sandbox",Uv="loose",jv="http://www.w3.org/2000/svg",Gv="http://www.w3.org/1999/xlink",Xv="http://www.w3.org/1999/xhtml",Vv="100%",Zv="100%",Kv="border:0;margin:0;",Qv="margin:0",Jv="allow-top-navigation-by-user-activation allow-popups",tB='The "iframe" tag is not supported by your browser.',eB=["foreignobject"],rB=["dominant-baseline"];function hl(e){const t=ll(e);return Do(),i0(t.config??{}),t}p(hl,"processAndSetConfigs");async function Sm(e,t){Fs();try{const{code:r,config:i}=hl(e);return{diagramType:(await vm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Sm,"parse");var hc=p((e,t,r=[])=>{const i=wc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),iB=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Kt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{wh(l.styles)||n.forEach(c=>{r.insertRule(hc(l.id,c,l.styles),r.cssRules.length)}),wh(l.textStyles)||r.insertRule(hc(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=fa(o)+` `}else i+=`${e.themeCSS} diff --git a/apps/pythinker-code/dist-web/assets/mindmap-definition-RKZ34NQL-DpfCgIR2.js b/apps/pythinker-code/dist-web/assets/mindmap-definition-RKZ34NQL-BVhOkDo4.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/mindmap-definition-RKZ34NQL-DpfCgIR2.js rename to apps/pythinker-code/dist-web/assets/mindmap-definition-RKZ34NQL-BVhOkDo4.js index fd36b2e2b..5f3a4578f 100644 --- a/apps/pythinker-code/dist-web/assets/mindmap-definition-RKZ34NQL-DpfCgIR2.js +++ b/apps/pythinker-code/dist-web/assets/mindmap-definition-RKZ34NQL-BVhOkDo4.js @@ -1,4 +1,4 @@ -import{g as oe}from"./chunk-55IACEB6-C-SpyarN.js";import{s as ae}from"./chunk-2J33WTMH-Ca8VIc2t.js";import{_ as l,l as I,p as ce,r as le,F as he,I as G,c as B,i as F,b3 as de,ac as ge,ad as ue,ae as pe}from"./mermaid.core-DLN3CXA3.js";import"./index-ZOXJ8Du9.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],C=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:C,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:C,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,z,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: +import{g as oe}from"./chunk-55IACEB6-anBFgZU6.js";import{s as ae}from"./chunk-2J33WTMH-VeUyViKL.js";import{_ as l,l as I,p as ce,r as le,F as he,I as G,c as B,i as F,b3 as de,ac as ge,ad as ue,ae as pe}from"./mermaid.core-Dza7SVX6.js";import"./index-BMmTKsPq.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],C=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:C,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:C,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,z,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: `+y.showPosition()+` Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(b==Q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:W,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(S[0]){case 1:o.push(b),p.push(y.yytext),r.push(y.yylloc),o.push(S[1]),b=null,K=y.yyleng,u=y.yytext,M=y.yylineno,W=y.yylloc;break;case 2:if(x=this.productions_[S[1]][1],O.$=p[p.length-x],O._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},se&&(O._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(O,[u,K,M,L.yy,S[1],p,r].concat(ie)),typeof z<"u")return z;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[S[1]][0]),p.push(O.$),r.push(O._$),ee=$[o[o.length-2]][o[o.length-1]],o.push(ee);break;case 3:return!0}}return!0},"parse")},te=(function(){var D={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/pieDiagram-4H26LBE5-CxGR0oGX.js b/apps/pythinker-code/dist-web/assets/pieDiagram-4H26LBE5-DSc9x7rN.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/pieDiagram-4H26LBE5-CxGR0oGX.js rename to apps/pythinker-code/dist-web/assets/pieDiagram-4H26LBE5-DSc9x7rN.js index 66a5c0744..6a853a249 100644 --- a/apps/pythinker-code/dist-web/assets/pieDiagram-4H26LBE5-CxGR0oGX.js +++ b/apps/pythinker-code/dist-web/assets/pieDiagram-4H26LBE5-DSc9x7rN.js @@ -1,4 +1,4 @@ -import{Q as S,T as R,b2 as J,g as K,s as Y,a as tt,b as et,t as at,q as rt,_ as d,l as W,c as nt,H as it,L as st,a4 as ot,e as lt,A as ct,I as ut}from"./mermaid.core-DLN3CXA3.js";import{p as dt}from"./chunk-4BX2VUAB-pm1CuxH9.js";import{p as pt}from"./wardley-L42UT6IY-Cwgryyvc.js";import{d as P}from"./arc-BI4rSFfW.js";import{o as gt}from"./ordinal-Cboi1Yqb.js";import"./index-ZOXJ8Du9.js";import"./init-Gi6I4Gst.js";function ft(t,a){return at?1:a>=t?0:NaN}function ht(t){return t}function mt(){var t=ht,a=ft,f=null,y=S(0),s=S(R),p=S(0);function o(e){var n,l=(e=J(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+y.apply(this,arguments),w=Math.min(R,Math.max(-R,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/l,p.apply(this,arguments)),$=D*(w<0?-1:1),u;for(n=0;n0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),n=0,h=v?(w-l*$)/v:0;n0?u*h:0)+$,i[g]={data:e[g],index:n,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),o):y},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:S(+e),o):p},o}var vt=ut.pie,z={sections:new Map,showData:!1},T=z.sections,F=z.showData,xt=structuredClone(vt),St=d(()=>structuredClone(xt),"getConfig"),yt=d(()=>{T=new Map,F=z.showData,ct()},"clear"),wt=d(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),W.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),At=d(()=>T,"getSections"),Ct=d(t=>{F=t},"setShowData"),Dt=d(()=>F,"getShowData"),_={getConfig:St,clear:yt,setDiagramTitle:rt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:K,addSection:wt,getSections:At,setShowData:Ct,getShowData:Dt},$t=d((t,a)=>{dt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:d(async t=>{const a=await pt("pie",t);W.debug(a),$t(a,_)},"parse")},bt=d(t=>` +import{Q as S,T as R,b2 as J,g as K,s as Y,a as tt,b as et,t as at,q as rt,_ as d,l as W,c as nt,H as it,L as st,a4 as ot,e as lt,A as ct,I as ut}from"./mermaid.core-Dza7SVX6.js";import{p as dt}from"./chunk-4BX2VUAB-Df7H4Pbw.js";import{p as pt}from"./wardley-L42UT6IY-Dr9wBWEv.js";import{d as P}from"./arc-DI2D4QPc.js";import{o as gt}from"./ordinal-Cboi1Yqb.js";import"./index-BMmTKsPq.js";import"./init-Gi6I4Gst.js";function ft(t,a){return at?1:a>=t?0:NaN}function ht(t){return t}function mt(){var t=ht,a=ft,f=null,y=S(0),s=S(R),p=S(0);function o(e){var n,l=(e=J(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+y.apply(this,arguments),w=Math.min(R,Math.max(-R,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/l,p.apply(this,arguments)),$=D*(w<0?-1:1),u;for(n=0;n0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),n=0,h=v?(w-l*$)/v:0;n0?u*h:0)+$,i[g]={data:e[g],index:n,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),o):y},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:S(+e),o):p},o}var vt=ut.pie,z={sections:new Map,showData:!1},T=z.sections,F=z.showData,xt=structuredClone(vt),St=d(()=>structuredClone(xt),"getConfig"),yt=d(()=>{T=new Map,F=z.showData,ct()},"clear"),wt=d(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),W.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),At=d(()=>T,"getSections"),Ct=d(t=>{F=t},"setShowData"),Dt=d(()=>F,"getShowData"),_={getConfig:St,clear:yt,setDiagramTitle:rt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:K,addSection:wt,getSections:At,setShowData:Ct,getShowData:Dt},$t=d((t,a)=>{dt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:d(async t=>{const a=await pt("pie",t);W.debug(a),$t(a,_)},"parse")},bt=d(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/quadrantDiagram-W4KKPZXB-bI88ym0r.js b/apps/pythinker-code/dist-web/assets/quadrantDiagram-W4KKPZXB-BQOrZ1N0.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/quadrantDiagram-W4KKPZXB-bI88ym0r.js rename to apps/pythinker-code/dist-web/assets/quadrantDiagram-W4KKPZXB-BQOrZ1N0.js index 09155460c..f311a9ad6 100644 --- a/apps/pythinker-code/dist-web/assets/quadrantDiagram-W4KKPZXB-bI88ym0r.js +++ b/apps/pythinker-code/dist-web/assets/quadrantDiagram-W4KKPZXB-BQOrZ1N0.js @@ -1,4 +1,4 @@ -import{s as Se,g as _e,t as ee,q as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,d as vt,e as Pe,A as ve,I as z,i as Ce,a1 as Le}from"./mermaid.core-DLN3CXA3.js";import{l as te}from"./linear-CPq1vSSR.js";import"./index-ZOXJ8Du9.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: +import{s as Se,g as _e,t as ee,q as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,d as vt,e as Pe,A as ve,I as z,i as Ce,a1 as Le}from"./mermaid.core-Dza7SVX6.js";import{l as te}from"./linear-BB9wM_yi.js";import"./index-BMmTKsPq.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: `+D.showPosition()+` Expecting `+yt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(B==Zt?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Pt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:kt,expected:yt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:u.push(B),A.push(D.yytext),e.push(D.yylloc),u.push(W[1]),B=null,Kt=D.yyleng,n=D.yytext,gt=D.yylineno,kt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=A[A.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},me&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(rt,[n,Kt,gt,j.yy,W[1],A,e].concat(qe)),typeof Ft<"u")return Ft;M&&(u=u.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),A.push(rt.$),e.push(rt._$),$t=ht[u[u.length-2]][u[u.length-1]],u.push($t);break;case 3:return!0}}return!0},"parse")},ye=(function(){var Y={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/requirementDiagram-4Y6WPE33-BMZCm0mi.js b/apps/pythinker-code/dist-web/assets/requirementDiagram-4Y6WPE33-CHMFEDkl.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/requirementDiagram-4Y6WPE33-BMZCm0mi.js rename to apps/pythinker-code/dist-web/assets/requirementDiagram-4Y6WPE33-CHMFEDkl.js index be4ff8d66..8b7292b11 100644 --- a/apps/pythinker-code/dist-web/assets/requirementDiagram-4Y6WPE33-BMZCm0mi.js +++ b/apps/pythinker-code/dist-web/assets/requirementDiagram-4Y6WPE33-CHMFEDkl.js @@ -1,4 +1,4 @@ -import{g as Ge}from"./chunk-55IACEB6-C-SpyarN.js";import{s as ze}from"./chunk-2J33WTMH-Ca8VIc2t.js";import{_ as h,F as Ye,b as Xe,a as Je,s as Ze,g as et,q as tt,t as st,c as Te,l as Ne,A as it,E as rt,p as nt,r as at,u as lt}from"./mermaid.core-DLN3CXA3.js";import"./index-ZOXJ8Du9.js";var qe=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(G.yy[Se]=this.yy[Se]);y.setInput(r,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,m.length=m.length-I,t.length=t.length-I}h(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}h(Pe,"lex");for(var b,z,N,Ie,J={},ge,F,Ue,ye;;){if(z=c[c.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((b===null||typeof b>"u")&&(b=Pe()),N=me[z]&&me[z][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[z])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: +import{g as Ge}from"./chunk-55IACEB6-anBFgZU6.js";import{s as ze}from"./chunk-2J33WTMH-VeUyViKL.js";import{_ as h,F as Ye,b as Xe,a as Je,s as Ze,g as et,q as tt,t as st,c as Te,l as Ne,A as it,E as rt,p as nt,r as at,u as lt}from"./mermaid.core-Dza7SVX6.js";import"./index-BMmTKsPq.js";var qe=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(G.yy[Se]=this.yy[Se]);y.setInput(r,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,m.length=m.length-I,t.length=t.length-I}h(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}h(Pe,"lex");for(var b,z,N,Ie,J={},ge,F,Ue,ye;;){if(z=c[c.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((b===null||typeof b>"u")&&(b=Pe()),N=me[z]&&me[z][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[z])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: `+y.showPosition()+` Expecting `+ye.join(", ")+", got '"+(this.terminals_[b]||b)+"'":ke="Parse error on line "+(Re+1)+": Unexpected "+(b==$e?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(ke,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:be,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+b);switch(N[0]){case 1:c.push(b),m.push(y.yytext),t.push(y.yylloc),c.push(N[1]),b=null,Fe=y.yyleng,l=y.yytext,Re=y.yylineno,be=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=m[m.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ie=this.performAction.apply(J,[l,Fe,Re,G.yy,N[1],m,t].concat(Ke)),typeof Ie<"u")return Ie;F&&(c=c.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[N[1]][0]),m.push(J.$),t.push(J._$),Ue=me[c[c.length-2]][c[c.length-1]],c.push(Ue);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var $={EOF:1,parseError:h(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:h(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:h(function(r){var a=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(r){this.unput(this.match.slice(r))},"less"),pastInput:h(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sankeyDiagram-5OEKKPKP-DvCK0RLW.js b/apps/pythinker-code/dist-web/assets/sankeyDiagram-5OEKKPKP-CPPhgIGR.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sankeyDiagram-5OEKKPKP-DvCK0RLW.js rename to apps/pythinker-code/dist-web/assets/sankeyDiagram-5OEKKPKP-CPPhgIGR.js index 5355875f6..499a04dd0 100644 --- a/apps/pythinker-code/dist-web/assets/sankeyDiagram-5OEKKPKP-DvCK0RLW.js +++ b/apps/pythinker-code/dist-web/assets/sankeyDiagram-5OEKKPKP-CPPhgIGR.js @@ -1,4 +1,4 @@ -import{q as kt,t as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,B as St,d as G,af as wt,A as Lt,k as Et}from"./mermaid.core-DLN3CXA3.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-ZOXJ8Du9.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function Dt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=Dt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;rc.length)-1)),$(f);for(let c=0;c0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function j({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function j(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(j,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +import{q as kt,t as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,B as St,d as G,af as wt,A as Lt,k as Et}from"./mermaid.core-Dza7SVX6.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-BMmTKsPq.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function Dt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=Dt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;rc.length)-1)),$(f);for(let c=0;c0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function j({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function j(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(j,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: `+S.showPosition()+` Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},R&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat($)),typeof n<"u")return n;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:y(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:y(function(o,a){return this.yy=a||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:y(function(o){var a=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(o){this.unput(this.match.slice(o))},"less"),pastInput:y(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sequenceDiagram-3UESZ5HK-BUDBFiIt.js b/apps/pythinker-code/dist-web/assets/sequenceDiagram-3UESZ5HK-DUpWmDG7.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sequenceDiagram-3UESZ5HK-BUDBFiIt.js rename to apps/pythinker-code/dist-web/assets/sequenceDiagram-3UESZ5HK-DUpWmDG7.js index 86a8ae698..655c0858a 100644 --- a/apps/pythinker-code/dist-web/assets/sequenceDiagram-3UESZ5HK-BUDBFiIt.js +++ b/apps/pythinker-code/dist-web/assets/sequenceDiagram-3UESZ5HK-DUpWmDG7.js @@ -1,4 +1,4 @@ -import{_ as g,o as tr,c as $,d as Mt,l as at,j as Ce,e as er,f as rr,k as P,b as ke,s as ar,q as sr,a as ir,g as nr,t as or,v as cr,J as lr,A as hr,i as Bt,u as Z,a2 as Q,a3 as wt,a4 as Me,a5 as dr,F as Yt,a6 as Tr,a7 as Be}from"./mermaid.core-DLN3CXA3.js";import{a as pr,b as ee,g as dt,d as Er,e as re,f as ae}from"./chunk-ND2GUHAM-8Gq7_oIN.js";import{I as ur}from"./chunk-QZHKN3VN-68eECBG3.js";import"./index-ZOXJ8Du9.js";var $t=(function(){var e=g(function(ut,w,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=w);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],E=[1,14],T=[1,15],l=[1,17],x=[1,18],u=[1,19],O=[1,25],p=[1,26],f=[1,27],_=[1,28],I=[1,29],L=[1,30],b=[1,31],S=[1,32],A=[1,33],N=[1,34],B=[1,35],V=[1,36],q=[1,37],U=[1,38],G=[1,39],X=[1,40],j=[1,42],H=[1,43],st=[1,44],tt=[1,45],it=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Nt=[1,74],m=[1,80],D=[1,81],lt=[1,82],et=[1,83],W=[1,84],se=[1,85],ie=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],mt=[4,5,17,51,53,54],Pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ht=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],zt=[5,52],K=[70,71,72,73],ot=[1,151],Ut={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:g(function(w,v,k,y,z,c,At){var d=c.length-1;switch(z){case 3:return y.apply(c[d]),c[d];case 4:case 10:this.$=[];break;case 5:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 6:case 7:case 12:case 13:this.$=c[d];break;case 8:case 9:case 14:this.$=[];break;case 16:c[d].type="createParticipant",this.$=c[d];break;case 17:c[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-1].actor};break;case 30:y.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 31:y.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 32:this.$=c[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[d].trim(),y.setAccDescription(this.$);break;case 35:c[d-1].unshift({type:"loopStart",loopText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 36:c[d-1].unshift({type:"rectStart",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[d-1];break;case 37:c[d-1].unshift({type:"optStart",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"altStart",altText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"breakStart",breakText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 44:this.$=c[d-3].concat([{type:"option",optionText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 46:this.$=c[d-3].concat([{type:"and",parText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.PAR_AND},c[d]]);break;case 48:this.$=c[d-3].concat([{type:"else",altText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.ALT_ELSE},c[d]]);break;case 49:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 50:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 51:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 52:case 57:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 53:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 58:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 59:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 63:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 66:this.$=[c[d-2],c[d]];break;case 67:this.$=c[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor}];break;case 71:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-4].actor}];break;case 72:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor}];break;case 73:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-4].actor}];break;case 74:this.$=[c[d-5],c[d-1],{type:"addMessage",from:c[d-5].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-5].actor}];break;case 75:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 76:this.$={type:"addParticipant",actor:c[d-1],config:c[d]};break;case 77:this.$=c[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[d].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},e(C,[2,5]),{9:48,13:13,14:E,15:T,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Nt},{23:75,55:76,73:Nt},{23:77,73:Y},{69:78,72:[1,79],78:m,79:D,80:lt,81:et,82:W,83:se,84:ie,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(mt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Pt,i,{7:120}),e(Pt,i,{7:121}),e(Pt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ht,i,{43:125,7:126}),e(Ht,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Pt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(zt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:m,79:D,80:lt,81:et,82:W,83:se,84:ie,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(K,[2,79]),e(K,[2,80]),e(K,[2,81]),e(K,[2,82]),e(K,[2,83]),e(K,[2,84]),e(K,[2,85]),e(K,[2,86]),e(K,[2,87]),e(K,[2,88]),e(K,[2,89]),e(K,[2,90]),e(K,[2,91]),e(K,[2,92]),e(K,[2,93]),e(K,[2,94]),e(K,[2,95]),e(K,[2,96]),e(K,[2,97]),e(K,[2,98]),e(K,[2,99]),e(K,[2,100]),e(K,[2,101]),e(K,[2,102]),e(K,[2,103]),e(K,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,161],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,162],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,163],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{17:[1,164]},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[2,47],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,50:[1,165],51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{17:[1,166]},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[2,45],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,49:[1,167],51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[2,43],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,48:[1,170],51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,171],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(zt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(mt,[2,11]),{13:186,51:U,53:G,54:X},e(mt,[2,13]),e(mt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(mt,[2,12]),e(me,i,{7:124,41:201}),e(Ht,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(zt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:g(function(w,v){if(v.recoverable)this.trace(w);else{var k=new Error(w);throw k.hash=v,k}},"parseError"),parse:g(function(w){var v=this,k=[0],y=[],z=[null],c=[],At=this.table,d="",Dt=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(gt.yy[Gt]=this.yy[Gt]);J.setInput(w,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Xt=J.yylloc;c.push(Xt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(nt){k.length=k.length-2*nt,z.length=z.length-nt,c.length=c.length-nt}g(je,"popStack");function Ne(){var nt;return nt=y.pop()||J.lex()||we,typeof nt!="number"&&(nt instanceof Array&&(y=nt,nt=y.pop()),nt=v.symbols_[nt]||nt),nt}g(Ne,"lex");for(var rt,xt,ct,Jt,Ot={},vt,Tt,Pe,Ct;;){if(xt=k[k.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=At[xt]&&At[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var Zt="";Ct=[];for(vt in At[xt])this.terminals_[vt]&&vt>Ze&&Ct.push("'"+this.terminals_[vt]+"'");J.showPosition?Zt="Parse error on line "+(Dt+1)+`: +import{_ as g,o as tr,c as $,d as Mt,l as at,j as Ce,e as er,f as rr,k as P,b as ke,s as ar,q as sr,a as ir,g as nr,t as or,v as cr,J as lr,A as hr,i as Bt,u as Z,a2 as Q,a3 as wt,a4 as Me,a5 as dr,F as Yt,a6 as Tr,a7 as Be}from"./mermaid.core-Dza7SVX6.js";import{a as pr,b as ee,g as dt,d as Er,e as re,f as ae}from"./chunk-ND2GUHAM-CeYe8rvb.js";import{I as ur}from"./chunk-QZHKN3VN-B6GDpV6h.js";import"./index-BMmTKsPq.js";var $t=(function(){var e=g(function(ut,w,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=w);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],E=[1,14],T=[1,15],l=[1,17],x=[1,18],u=[1,19],O=[1,25],p=[1,26],f=[1,27],_=[1,28],I=[1,29],L=[1,30],b=[1,31],S=[1,32],A=[1,33],N=[1,34],B=[1,35],V=[1,36],q=[1,37],U=[1,38],G=[1,39],X=[1,40],j=[1,42],H=[1,43],st=[1,44],tt=[1,45],it=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Nt=[1,74],m=[1,80],D=[1,81],lt=[1,82],et=[1,83],W=[1,84],se=[1,85],ie=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],mt=[4,5,17,51,53,54],Pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ht=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],zt=[5,52],K=[70,71,72,73],ot=[1,151],Ut={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:g(function(w,v,k,y,z,c,At){var d=c.length-1;switch(z){case 3:return y.apply(c[d]),c[d];case 4:case 10:this.$=[];break;case 5:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 6:case 7:case 12:case 13:this.$=c[d];break;case 8:case 9:case 14:this.$=[];break;case 16:c[d].type="createParticipant",this.$=c[d];break;case 17:c[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-1].actor};break;case 30:y.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 31:y.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 32:this.$=c[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[d].trim(),y.setAccDescription(this.$);break;case 35:c[d-1].unshift({type:"loopStart",loopText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 36:c[d-1].unshift({type:"rectStart",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[d-1];break;case 37:c[d-1].unshift({type:"optStart",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"altStart",altText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"breakStart",breakText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 44:this.$=c[d-3].concat([{type:"option",optionText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 46:this.$=c[d-3].concat([{type:"and",parText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.PAR_AND},c[d]]);break;case 48:this.$=c[d-3].concat([{type:"else",altText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.ALT_ELSE},c[d]]);break;case 49:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 50:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 51:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 52:case 57:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 53:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 58:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 59:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 63:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 66:this.$=[c[d-2],c[d]];break;case 67:this.$=c[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor}];break;case 71:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-4].actor}];break;case 72:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor}];break;case 73:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-4].actor}];break;case 74:this.$=[c[d-5],c[d-1],{type:"addMessage",from:c[d-5].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-5].actor}];break;case 75:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 76:this.$={type:"addParticipant",actor:c[d-1],config:c[d]};break;case 77:this.$=c[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[d].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},e(C,[2,5]),{9:48,13:13,14:E,15:T,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Nt},{23:75,55:76,73:Nt},{23:77,73:Y},{69:78,72:[1,79],78:m,79:D,80:lt,81:et,82:W,83:se,84:ie,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(mt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Pt,i,{7:120}),e(Pt,i,{7:121}),e(Pt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ht,i,{43:125,7:126}),e(Ht,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Pt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(zt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:m,79:D,80:lt,81:et,82:W,83:se,84:ie,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(K,[2,79]),e(K,[2,80]),e(K,[2,81]),e(K,[2,82]),e(K,[2,83]),e(K,[2,84]),e(K,[2,85]),e(K,[2,86]),e(K,[2,87]),e(K,[2,88]),e(K,[2,89]),e(K,[2,90]),e(K,[2,91]),e(K,[2,92]),e(K,[2,93]),e(K,[2,94]),e(K,[2,95]),e(K,[2,96]),e(K,[2,97]),e(K,[2,98]),e(K,[2,99]),e(K,[2,100]),e(K,[2,101]),e(K,[2,102]),e(K,[2,103]),e(K,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,161],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,162],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,163],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{17:[1,164]},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[2,47],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,50:[1,165],51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{17:[1,166]},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[2,45],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,49:[1,167],51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[2,43],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,48:[1,170],51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{4:o,5:s,8:8,9:10,10:n,13:13,14:E,15:T,17:[1,171],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:S,40:A,42:N,44:B,45:V,47:q,51:U,53:G,54:X,56:j,61:H,62:st,63:tt,64:it,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(zt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(mt,[2,11]),{13:186,51:U,53:G,54:X},e(mt,[2,13]),e(mt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(mt,[2,12]),e(me,i,{7:124,41:201}),e(Ht,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(zt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:g(function(w,v){if(v.recoverable)this.trace(w);else{var k=new Error(w);throw k.hash=v,k}},"parseError"),parse:g(function(w){var v=this,k=[0],y=[],z=[null],c=[],At=this.table,d="",Dt=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(gt.yy[Gt]=this.yy[Gt]);J.setInput(w,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Xt=J.yylloc;c.push(Xt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(nt){k.length=k.length-2*nt,z.length=z.length-nt,c.length=c.length-nt}g(je,"popStack");function Ne(){var nt;return nt=y.pop()||J.lex()||we,typeof nt!="number"&&(nt instanceof Array&&(y=nt,nt=y.pop()),nt=v.symbols_[nt]||nt),nt}g(Ne,"lex");for(var rt,xt,ct,Jt,Ot={},vt,Tt,Pe,Ct;;){if(xt=k[k.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=At[xt]&&At[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var Zt="";Ct=[];for(vt in At[xt])this.terminals_[vt]&&vt>Ze&&Ct.push("'"+this.terminals_[vt]+"'");J.showPosition?Zt="Parse error on line "+(Dt+1)+`: `+J.showPosition()+` Expecting `+Ct.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":Zt="Parse error on line "+(Dt+1)+": Unexpected "+(rt==we?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError(Zt,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Xt,expected:Ct})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:k.push(rt),z.push(J.yytext),c.push(J.yylloc),k.push(ct[1]),rt=null,Se=J.yyleng,d=J.yytext,Dt=J.yylineno,Xt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Ot.$=z[z.length-Tt],Ot._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},$e&&(Ot._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Jt=this.performAction.apply(Ot,[d,Se,Dt,gt.yy,ct[1],z,c].concat(Qe)),typeof Jt<"u")return Jt;Tt&&(k=k.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),k.push(this.productions_[ct[1]][0]),z.push(Ot.$),c.push(Ot._$),Pe=At[k[k.length-2]][k[k.length-1]],k.push(Pe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var ut={EOF:1,parseError:g(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:g(function(w,v){return this.yy=v||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var v=w.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:g(function(w){var v=w.length,k=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),v=new Array(w.length+1).join("-");return w+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-AJRCARHV-6VO5APFy.js b/apps/pythinker-code/dist-web/assets/stateDiagram-AJRCARHV-CPSVffGI.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/stateDiagram-AJRCARHV-6VO5APFy.js rename to apps/pythinker-code/dist-web/assets/stateDiagram-AJRCARHV-CPSVffGI.js index ae7ec7a1e..d2f324529 100644 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-AJRCARHV-6VO5APFy.js +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-AJRCARHV-CPSVffGI.js @@ -1 +1 @@ -import{s as R,a as W,S as N}from"./chunk-AQP2D5EJ-B7YEeHDd.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a9 as _,aa as U,a6 as C,u as F}from"./mermaid.core-DLN3CXA3.js";import{G as O}from"./graph--OzhPTMs.js";import{l as J}from"./layout-SsrduOYp.js";import"./chunk-55IACEB6-C-SpyarN.js";import"./chunk-2J33WTMH-Ca8VIc2t.js";import"./index-ZOXJ8Du9.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
      ");p=p.replace(/\n/g,"
      ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram}; +import{s as R,a as W,S as N}from"./chunk-AQP2D5EJ-936iwDDD.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a9 as _,aa as U,a6 as C,u as F}from"./mermaid.core-Dza7SVX6.js";import{G as O}from"./graph--OzhPTMs.js";import{l as J}from"./layout-SsrduOYp.js";import"./chunk-55IACEB6-anBFgZU6.js";import"./chunk-2J33WTMH-VeUyViKL.js";import"./index-BMmTKsPq.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
      ");p=p.replace(/\n/g,"
      ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-Cv36kbxe.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-Cv36kbxe.js deleted file mode 100644 index eb62c0a25..000000000 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-Cv36kbxe.js +++ /dev/null @@ -1 +0,0 @@ -import{s as e,b as r,a,S as s}from"./chunk-AQP2D5EJ-B7YEeHDd.js";import{_ as i}from"./mermaid.core-DLN3CXA3.js";import"./chunk-55IACEB6-C-SpyarN.js";import"./chunk-2J33WTMH-Ca8VIc2t.js";import"./index-ZOXJ8Du9.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-DoCeX-_x.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-DoCeX-_x.js new file mode 100644 index 000000000..411a99c49 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-DoCeX-_x.js @@ -0,0 +1 @@ +import{s as e,b as r,a,S as s}from"./chunk-AQP2D5EJ-936iwDDD.js";import{_ as i}from"./mermaid.core-Dza7SVX6.js";import"./chunk-55IACEB6-anBFgZU6.js";import"./chunk-2J33WTMH-VeUyViKL.js";import"./index-BMmTKsPq.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/timeline-definition-PNZ67QCA-C9UZd7_v.js b/apps/pythinker-code/dist-web/assets/timeline-definition-PNZ67QCA-CFXewIop.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/timeline-definition-PNZ67QCA-C9UZd7_v.js rename to apps/pythinker-code/dist-web/assets/timeline-definition-PNZ67QCA-CFXewIop.js index 618fe511c..85488ca19 100644 --- a/apps/pythinker-code/dist-web/assets/timeline-definition-PNZ67QCA-C9UZd7_v.js +++ b/apps/pythinker-code/dist-web/assets/timeline-definition-PNZ67QCA-CFXewIop.js @@ -1,4 +1,4 @@ -import{_ as o,F as pt,ac as Rt,ad as Ct,ae as Wt,c as gt,l as E,L as Pt,a4 as Bt,af as ft,d as X,E as Vt,ag as Ft,A as zt}from"./mermaid.core-DLN3CXA3.js";import{d as ot}from"./arc-BI4rSFfW.js";import"./index-ZOXJ8Du9.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var U=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,Z,j;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";j=[];for(G in S[$])this.terminals_[G]&&G>W&&j.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: +import{_ as o,F as pt,ac as Rt,ad as Ct,ae as Wt,c as gt,l as E,L as Pt,a4 as Bt,af as ft,d as X,E as Vt,ag as Ft,A as zt}from"./mermaid.core-Dza7SVX6.js";import{d as ot}from"./arc-DI2D4QPc.js";import"./index-BMmTKsPq.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var U=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,Z,j;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";j=[];for(G in S[$])this.terminals_[G]&&G>W&&j.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: `+w.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,R=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],C.$=x[x.length-B],C._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},U&&(C._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(C,[v,R,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(C.$),u.push(C._$),Z=S[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/vennDiagram-CIIHVFJN-DMsJx58H.js b/apps/pythinker-code/dist-web/assets/vennDiagram-CIIHVFJN-DIdMGm9k.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/vennDiagram-CIIHVFJN-DMsJx58H.js rename to apps/pythinker-code/dist-web/assets/vennDiagram-CIIHVFJN-DIdMGm9k.js index fed0df69c..37e73dc84 100644 --- a/apps/pythinker-code/dist-web/assets/vennDiagram-CIIHVFJN-DMsJx58H.js +++ b/apps/pythinker-code/dist-web/assets/vennDiagram-CIIHVFJN-DIdMGm9k.js @@ -1,4 +1,4 @@ -import{aU as Gt,s as Wt,g as Kt,t as Ht,q as Yt,a as Xt,b as Zt,_ as w,F as wt,L as Jt,d as ot,al as Qt,ac as $t,ad as te,ae as ee,e as ne,A as se,H as ie,I as oe}from"./mermaid.core-DLN3CXA3.js";import"./index-ZOXJ8Du9.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Et(e);for(let u=0;ur.angle-u.angle);let h=e[e.length-1];for(let u=0;ux.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;uMath.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u=0&&(n=r),Math.abs(h)ct(n))}function $(t,n){let s=0;for(let e=0;ev.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx=1)break;for(let f=1;fc+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r{const y={};for(let d=0;dxt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;uc===h?0:co.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;dy.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;bt[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const R={};let _=!1;E.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=E.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(` +import{aU as Gt,s as Wt,g as Kt,t as Ht,q as Yt,a as Xt,b as Zt,_ as w,F as wt,L as Jt,d as ot,al as Qt,ac as $t,ad as te,ae as ee,e as ne,A as se,H as ie,I as oe}from"./mermaid.core-Dza7SVX6.js";import"./index-BMmTKsPq.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Et(e);for(let u=0;ur.angle-u.angle);let h=e[e.length-1];for(let u=0;ux.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;uMath.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u=0&&(n=r),Math.abs(h)ct(n))}function $(t,n){let s=0;for(let e=0;ev.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx=1)break;for(let f=1;fc+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r{const y={};for(let d=0;dxt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;uc===h?0:co.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;dy.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;bt[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const U={};f.forEach(k=>{k.label&&(U[k.sets]=k.label)});function j(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const R={};let _=!1;E.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=E.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(` M`,t,n),e.push(` m`,-s,0),e.push(` a`,s,s,0,1,0,s*2,0),e.push(` diff --git a/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C6xa6Xt4.js b/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C95Vw23-.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C6xa6Xt4.js rename to apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C95Vw23-.js index f35c7d7e5..fa07518d3 100644 --- a/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C6xa6Xt4.js +++ b/apps/pythinker-code/dist-web/assets/vue.runtime.esm-bundler-C95Vw23-.js @@ -1,4 +1,4 @@ -import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-ZOXJ8Du9.js";/** +import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-BMmTKsPq.js";/** * vue v3.5.35 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/apps/pythinker-code/dist-web/assets/wardley-L42UT6IY-Cwgryyvc.js b/apps/pythinker-code/dist-web/assets/wardley-L42UT6IY-Dr9wBWEv.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/wardley-L42UT6IY-Cwgryyvc.js rename to apps/pythinker-code/dist-web/assets/wardley-L42UT6IY-Dr9wBWEv.js index 5740df4b1..aa97bf6eb 100644 --- a/apps/pythinker-code/dist-web/assets/wardley-L42UT6IY-Cwgryyvc.js +++ b/apps/pythinker-code/dist-web/assets/wardley-L42UT6IY-Dr9wBWEv.js @@ -1,4 +1,4 @@ -import{bR as qt}from"./index-ZOXJ8Du9.js";var Qb=Object.create,Es=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,Yd=Object.getOwnPropertyNames,tw=Object.getPrototypeOf,rw=Object.prototype.hasOwnProperty,i=(e,t)=>Es(e,"name",{value:t,configurable:!0}),nw=(e,t)=>function(){return e&&(t=(0,e[Yd(e)[0]])(e=0)),t},V=(e,t)=>function(){return t||(0,e[Yd(e)[0]])((t={exports:{}}).exports,t),t.exports},Kr=(e,t)=>{for(var r in t)Es(e,r,{get:t[r],enumerable:!0})},Xd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yd(t))!rw.call(e,a)&&a!==r&&Es(e,a,{get:()=>t[a],enumerable:!(n=ew(t,a))||n.enumerable});return e},$l=(e,t,r)=>(Xd(e,t,"default"),r),Jd=(e,t,r)=>(r=e!=null?Qb(tw(e)):{},Xd(Es(r,"default",{value:e,enumerable:!0}),e)),Zd=e=>Xd(Es({},"__esModule",{value:!0}),e),Al={};Kr(Al,{AnnotatedTextEdit:()=>dr,ChangeAnnotation:()=>tn,ChangeAnnotationIdentifier:()=>je,CodeAction:()=>Ou,CodeActionContext:()=>Pu,CodeActionKind:()=>ku,CodeActionTriggerKind:()=>Gi,CodeDescription:()=>cu,CodeLens:()=>Lu,Color:()=>fo,ColorInformation:()=>nu,ColorPresentation:()=>au,Command:()=>en,CompletionItem:()=>Tu,CompletionItemKind:()=>pu,CompletionItemLabelDetails:()=>vu,CompletionItemTag:()=>mu,CompletionList:()=>Ru,CreateFile:()=>ua,DeleteFile:()=>fa,Diagnostic:()=>Di,DiagnosticRelatedInformation:()=>po,DiagnosticSeverity:()=>ou,DiagnosticTag:()=>lu,DocumentHighlight:()=>Cu,DocumentHighlightKind:()=>_u,DocumentLink:()=>Mu,DocumentSymbol:()=>Nu,DocumentUri:()=>eu,EOL:()=>bg,FoldingRange:()=>su,FoldingRangeKind:()=>iu,FormattingOptions:()=>Du,Hover:()=>$u,InlayHint:()=>qu,InlayHintKind:()=>go,InlayHintLabelPart:()=>yo,InlineCompletionContext:()=>Ju,InlineCompletionItem:()=>Vu,InlineCompletionList:()=>Hu,InlineCompletionTriggerKind:()=>Yu,InlineValueContext:()=>Ku,InlineValueEvaluatableExpression:()=>Bu,InlineValueText:()=>Uu,InlineValueVariableLookup:()=>zu,InsertReplaceEdit:()=>gu,InsertTextFormat:()=>hu,InsertTextMode:()=>yu,Location:()=>Li,LocationLink:()=>ru,MarkedString:()=>Fi,MarkupContent:()=>pa,MarkupKind:()=>mo,OptionalVersionedTextDocumentIdentifier:()=>xi,ParameterInformation:()=>Au,Position:()=>ie,Range:()=>ee,RenameFile:()=>da,SelectedCompletionInfo:()=>Xu,SelectionRange:()=>xu,SemanticTokenModifiers:()=>Gu,SemanticTokenTypes:()=>Fu,SemanticTokens:()=>ju,SignatureInformation:()=>Eu,StringValue:()=>Wu,SymbolInformation:()=>wu,SymbolKind:()=>Su,SymbolTag:()=>bu,TextDocument:()=>Qu,TextDocumentEdit:()=>Mi,TextDocumentIdentifier:()=>uu,TextDocumentItem:()=>fu,TextEdit:()=>Vt,URI:()=>uo,VersionedTextDocumentIdentifier:()=>du,WorkspaceChange:()=>Sg,WorkspaceEdit:()=>ho,WorkspaceFolder:()=>Zu,WorkspaceSymbol:()=>Iu,integer:()=>tu,uinteger:()=>Oi});var eu,uo,tu,Oi,ie,ee,Li,ru,fo,nu,au,iu,su,po,ou,lu,cu,Di,en,Vt,tn,je,dr,Mi,ua,da,fa,ho,Ei,kc,Sg,uu,du,xi,fu,mo,pa,pu,hu,mu,gu,yu,vu,Tu,Ru,Fi,$u,Au,Eu,_u,Cu,Su,bu,wu,Iu,Nu,ku,Gi,Pu,Ou,Lu,Du,Mu,xu,Fu,Gu,ju,Uu,zu,Bu,Ku,go,yo,qu,Wu,Vu,Hu,Yu,Xu,Ju,Zu,bg,Qu,Mh,$,_s=nw({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(eu||(eu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(uo||(uo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(tu||(tu={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Oi||(Oi={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Oi.MAX_VALUE),a===Number.MAX_VALUE&&(a=Oi.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&$.uinteger(a.line)&&$.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if($.uinteger(n)&&$.uinteger(a)&&$.uinteger(s)&&$.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(ee||(ee={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&($.string(a.uri)||$.undefined(a.uri))}i(r,"is"),e.is=r})(Li||(Li={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.targetRange)&&$.string(a.targetUri)&&ee.is(a.targetSelectionRange)&&(ee.is(a.originSelectionRange)||$.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(ru||(ru={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.numberRange(a.red,0,1)&&$.numberRange(a.green,0,1)&&$.numberRange(a.blue,0,1)&&$.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(fo||(fo={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ee.is(a.range)&&fo.is(a.color)}i(r,"is"),e.is=r})(nu||(nu={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.undefined(a.textEdit)||Vt.is(a))&&($.undefined(a.additionalTextEdits)||$.typedArray(a.additionalTextEdits,Vt.is))}i(r,"is"),e.is=r})(au||(au={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(iu||(iu={})),(function(e){function t(n,a,s,o,l,c){const u={startLine:n,endLine:a};return $.defined(s)&&(u.startCharacter=s),$.defined(o)&&(u.endCharacter=o),$.defined(l)&&(u.kind=l),$.defined(c)&&(u.collapsedText=c),u}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.uinteger(a.startLine)&&$.uinteger(a.startLine)&&($.undefined(a.startCharacter)||$.uinteger(a.startCharacter))&&($.undefined(a.endCharacter)||$.uinteger(a.endCharacter))&&($.undefined(a.kind)||$.string(a.kind))}i(r,"is"),e.is=r})(su||(su={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&Li.is(a.location)&&$.string(a.message)}i(r,"is"),e.is=r})(po||(po={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ou||(ou={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(lu||(lu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&$.string(n.href)}i(t,"is"),e.is=t})(cu||(cu={})),(function(e){function t(n,a,s,o,l,c){let u={range:n,message:a};return $.defined(s)&&(u.severity=s),$.defined(o)&&(u.code=o),$.defined(l)&&(u.source=l),$.defined(c)&&(u.relatedInformation=c),u}i(t,"create"),e.create=t;function r(n){var a;let s=n;return $.defined(s)&&ee.is(s.range)&&$.string(s.message)&&($.number(s.severity)||$.undefined(s.severity))&&($.integer(s.code)||$.string(s.code)||$.undefined(s.code))&&($.undefined(s.codeDescription)||$.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&($.string(s.source)||$.undefined(s.source))&&($.undefined(s.relatedInformation)||$.typedArray(s.relatedInformation,po.is))}i(r,"is"),e.is=r})(Di||(Di={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return $.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.title)&&$.string(a.command)}i(r,"is"),e.is=r})(en||(en={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return $.objectLiteral(o)&&$.string(o.newText)&&ee.is(o.range)}i(a,"is"),e.is=a})(Vt||(Vt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&($.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(tn||(tn={})),(function(e){function t(r){const n=r;return $.string(n)}i(t,"is"),e.is=t})(je||(je={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Vt.is(o)&&(tn.is(o.annotationId)||je.is(o.annotationId))}i(a,"is"),e.is=a})(dr||(dr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&xi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(Mi||(Mi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&$.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(ua||(ua={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&$.string(a.oldUri)&&$.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(da||(da={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&$.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||$.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||$.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(fa||(fa={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>$.string(a.kind)?ua.is(a)||da.is(a)||fa.is(a):Mi.is(a)))}i(t,"is"),e.is=t})(ho||(ho={})),Ei=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Vt.insert(e,t):je.is(r)?(a=r,n=dr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Vt.replace(e,t):je.is(r)?(a=r,n=dr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Vt.del(e):je.is(t)?(n=t,r=dr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=dr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},kc=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(je.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Sg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new kc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Mi.is(t)){const r=new Ei(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new Ei(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(xi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new Ei(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new Ei(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kc,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ua.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=ua.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;tn.is(r)||je.is(r)?a=r:n=r;let s,o;if(a===void 0?s=da.create(e,t,n):(o=je.is(a)?a:this._changeAnnotations.manage(a),s=da.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=fa.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=fa.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)}i(r,"is"),e.is=r})(uu||(uu={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.integer(a.version)}i(r,"is"),e.is=r})(du||(du={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&(a.version===null||$.integer(a.version))}i(r,"is"),e.is=r})(xi||(xi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.string(a.languageId)&&$.integer(a.version)&&$.string(a.text)}i(r,"is"),e.is=r})(fu||(fu={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(mo||(mo={})),(function(e){function t(r){const n=r;return $.objectLiteral(r)&&mo.is(n.kind)&&$.string(n.value)}i(t,"is"),e.is=t})(pa||(pa={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(pu||(pu={})),(function(e){e.PlainText=1,e.Snippet=2})(hu||(hu={})),(function(e){e.Deprecated=1})(mu||(mu={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&$.string(a.newText)&&ee.is(a.insert)&&ee.is(a.replace)}i(r,"is"),e.is=r})(gu||(gu={})),(function(e){e.asIs=1,e.adjustIndentation=2})(yu||(yu={})),(function(e){function t(r){const n=r;return n&&($.string(n.detail)||n.detail===void 0)&&($.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(vu||(vu={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(Tu||(Tu={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(Ru||(Ru={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return $.string(a)||$.objectLiteral(a)&&$.string(a.language)&&$.string(a.value)}i(r,"is"),e.is=r})(Fi||(Fi={})),(function(e){function t(r){let n=r;return!!n&&$.objectLiteral(n)&&(pa.is(n.contents)||Fi.is(n.contents)||$.typedArray(n.contents,Fi.is))&&(r.range===void 0||ee.is(r.range))}i(t,"is"),e.is=t})($u||($u={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Au||(Au={})),(function(e){function t(r,n,...a){let s={label:r};return $.defined(n)&&(s.documentation=n),$.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Eu||(Eu={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(_u||(_u={})),(function(e){function t(r,n){let a={range:r};return $.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Cu||(Cu={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Su||(Su={})),(function(e){e.Deprecated=1})(bu||(bu={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(wu||(wu={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Iu||(Iu={})),(function(e){function t(n,a,s,o,l,c){let u={name:n,detail:a,kind:s,range:o,selectionRange:l};return c!==void 0&&(u.children=c),u}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.name)&&$.number(a.kind)&&ee.is(a.range)&&ee.is(a.selectionRange)&&(a.detail===void 0||$.string(a.detail))&&(a.deprecated===void 0||$.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Nu||(Nu={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ku||(ku={})),(function(e){e.Invoked=1,e.Automatic=2})(Gi||(Gi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.typedArray(a.diagnostics,Di.is)&&(a.only===void 0||$.typedArray(a.only,$.string))&&(a.triggerKind===void 0||a.triggerKind===Gi.Invoked||a.triggerKind===Gi.Automatic)}i(r,"is"),e.is=r})(Pu||(Pu={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):en.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.title)&&(a.diagnostics===void 0||$.typedArray(a.diagnostics,Di.is))&&(a.kind===void 0||$.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||en.is(a.command))&&(a.isPreferred===void 0||$.boolean(a.isPreferred))&&(a.edit===void 0||ho.is(a.edit))}i(r,"is"),e.is=r})(Ou||(Ou={})),(function(e){function t(n,a){let s={range:n};return $.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.command)||en.is(a.command))}i(r,"is"),e.is=r})(Lu||(Lu={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.uinteger(a.tabSize)&&$.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(Du||(Du={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.target)||$.string(a.target))}i(r,"is"),e.is=r})(Mu||(Mu={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(xu||(xu={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Fu||(Fu={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Gu||(Gu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(ju||(ju={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.string(a.text)}i(r,"is"),e.is=r})(Uu||(Uu={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.boolean(a.caseSensitiveLookup)&&($.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(zu||(zu={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&($.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(Bu||(Bu={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.defined(a)&&ee.is(n.stoppedLocation)}i(r,"is"),e.is=r})(Ku||(Ku={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(go||(go={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.location===void 0||Li.is(a.location))&&(a.command===void 0||en.is(a.command))}i(r,"is"),e.is=r})(yo||(yo={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ie.is(a.position)&&($.string(a.label)||$.typedArray(a.label,yo.is))&&(a.kind===void 0||go.is(a.kind))&&a.textEdits===void 0||$.typedArray(a.textEdits,Vt.is)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.paddingLeft===void 0||$.boolean(a.paddingLeft))&&(a.paddingRight===void 0||$.boolean(a.paddingRight))}i(r,"is"),e.is=r})(qu||(qu={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(Wu||(Wu={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(Vu||(Vu={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(Hu||(Hu={})),(function(e){e.Invoked=0,e.Automatic=1})(Yu||(Yu={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(Xu||(Xu={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Ju||(Ju={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&uo.is(n.uri)&&$.string(n.name)}i(t,"is"),e.is=t})(Zu||(Zu={})),bg=[` +import{bR as qt}from"./index-BMmTKsPq.js";var Qb=Object.create,Es=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,Yd=Object.getOwnPropertyNames,tw=Object.getPrototypeOf,rw=Object.prototype.hasOwnProperty,i=(e,t)=>Es(e,"name",{value:t,configurable:!0}),nw=(e,t)=>function(){return e&&(t=(0,e[Yd(e)[0]])(e=0)),t},V=(e,t)=>function(){return t||(0,e[Yd(e)[0]])((t={exports:{}}).exports,t),t.exports},Kr=(e,t)=>{for(var r in t)Es(e,r,{get:t[r],enumerable:!0})},Xd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yd(t))!rw.call(e,a)&&a!==r&&Es(e,a,{get:()=>t[a],enumerable:!(n=ew(t,a))||n.enumerable});return e},$l=(e,t,r)=>(Xd(e,t,"default"),r),Jd=(e,t,r)=>(r=e!=null?Qb(tw(e)):{},Xd(Es(r,"default",{value:e,enumerable:!0}),e)),Zd=e=>Xd(Es({},"__esModule",{value:!0}),e),Al={};Kr(Al,{AnnotatedTextEdit:()=>dr,ChangeAnnotation:()=>tn,ChangeAnnotationIdentifier:()=>je,CodeAction:()=>Ou,CodeActionContext:()=>Pu,CodeActionKind:()=>ku,CodeActionTriggerKind:()=>Gi,CodeDescription:()=>cu,CodeLens:()=>Lu,Color:()=>fo,ColorInformation:()=>nu,ColorPresentation:()=>au,Command:()=>en,CompletionItem:()=>Tu,CompletionItemKind:()=>pu,CompletionItemLabelDetails:()=>vu,CompletionItemTag:()=>mu,CompletionList:()=>Ru,CreateFile:()=>ua,DeleteFile:()=>fa,Diagnostic:()=>Di,DiagnosticRelatedInformation:()=>po,DiagnosticSeverity:()=>ou,DiagnosticTag:()=>lu,DocumentHighlight:()=>Cu,DocumentHighlightKind:()=>_u,DocumentLink:()=>Mu,DocumentSymbol:()=>Nu,DocumentUri:()=>eu,EOL:()=>bg,FoldingRange:()=>su,FoldingRangeKind:()=>iu,FormattingOptions:()=>Du,Hover:()=>$u,InlayHint:()=>qu,InlayHintKind:()=>go,InlayHintLabelPart:()=>yo,InlineCompletionContext:()=>Ju,InlineCompletionItem:()=>Vu,InlineCompletionList:()=>Hu,InlineCompletionTriggerKind:()=>Yu,InlineValueContext:()=>Ku,InlineValueEvaluatableExpression:()=>Bu,InlineValueText:()=>Uu,InlineValueVariableLookup:()=>zu,InsertReplaceEdit:()=>gu,InsertTextFormat:()=>hu,InsertTextMode:()=>yu,Location:()=>Li,LocationLink:()=>ru,MarkedString:()=>Fi,MarkupContent:()=>pa,MarkupKind:()=>mo,OptionalVersionedTextDocumentIdentifier:()=>xi,ParameterInformation:()=>Au,Position:()=>ie,Range:()=>ee,RenameFile:()=>da,SelectedCompletionInfo:()=>Xu,SelectionRange:()=>xu,SemanticTokenModifiers:()=>Gu,SemanticTokenTypes:()=>Fu,SemanticTokens:()=>ju,SignatureInformation:()=>Eu,StringValue:()=>Wu,SymbolInformation:()=>wu,SymbolKind:()=>Su,SymbolTag:()=>bu,TextDocument:()=>Qu,TextDocumentEdit:()=>Mi,TextDocumentIdentifier:()=>uu,TextDocumentItem:()=>fu,TextEdit:()=>Vt,URI:()=>uo,VersionedTextDocumentIdentifier:()=>du,WorkspaceChange:()=>Sg,WorkspaceEdit:()=>ho,WorkspaceFolder:()=>Zu,WorkspaceSymbol:()=>Iu,integer:()=>tu,uinteger:()=>Oi});var eu,uo,tu,Oi,ie,ee,Li,ru,fo,nu,au,iu,su,po,ou,lu,cu,Di,en,Vt,tn,je,dr,Mi,ua,da,fa,ho,Ei,kc,Sg,uu,du,xi,fu,mo,pa,pu,hu,mu,gu,yu,vu,Tu,Ru,Fi,$u,Au,Eu,_u,Cu,Su,bu,wu,Iu,Nu,ku,Gi,Pu,Ou,Lu,Du,Mu,xu,Fu,Gu,ju,Uu,zu,Bu,Ku,go,yo,qu,Wu,Vu,Hu,Yu,Xu,Ju,Zu,bg,Qu,Mh,$,_s=nw({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(eu||(eu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(uo||(uo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(tu||(tu={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Oi||(Oi={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Oi.MAX_VALUE),a===Number.MAX_VALUE&&(a=Oi.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&$.uinteger(a.line)&&$.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if($.uinteger(n)&&$.uinteger(a)&&$.uinteger(s)&&$.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(ee||(ee={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&($.string(a.uri)||$.undefined(a.uri))}i(r,"is"),e.is=r})(Li||(Li={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.targetRange)&&$.string(a.targetUri)&&ee.is(a.targetSelectionRange)&&(ee.is(a.originSelectionRange)||$.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(ru||(ru={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.numberRange(a.red,0,1)&&$.numberRange(a.green,0,1)&&$.numberRange(a.blue,0,1)&&$.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(fo||(fo={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ee.is(a.range)&&fo.is(a.color)}i(r,"is"),e.is=r})(nu||(nu={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.undefined(a.textEdit)||Vt.is(a))&&($.undefined(a.additionalTextEdits)||$.typedArray(a.additionalTextEdits,Vt.is))}i(r,"is"),e.is=r})(au||(au={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(iu||(iu={})),(function(e){function t(n,a,s,o,l,c){const u={startLine:n,endLine:a};return $.defined(s)&&(u.startCharacter=s),$.defined(o)&&(u.endCharacter=o),$.defined(l)&&(u.kind=l),$.defined(c)&&(u.collapsedText=c),u}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.uinteger(a.startLine)&&$.uinteger(a.startLine)&&($.undefined(a.startCharacter)||$.uinteger(a.startCharacter))&&($.undefined(a.endCharacter)||$.uinteger(a.endCharacter))&&($.undefined(a.kind)||$.string(a.kind))}i(r,"is"),e.is=r})(su||(su={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&Li.is(a.location)&&$.string(a.message)}i(r,"is"),e.is=r})(po||(po={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ou||(ou={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(lu||(lu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&$.string(n.href)}i(t,"is"),e.is=t})(cu||(cu={})),(function(e){function t(n,a,s,o,l,c){let u={range:n,message:a};return $.defined(s)&&(u.severity=s),$.defined(o)&&(u.code=o),$.defined(l)&&(u.source=l),$.defined(c)&&(u.relatedInformation=c),u}i(t,"create"),e.create=t;function r(n){var a;let s=n;return $.defined(s)&&ee.is(s.range)&&$.string(s.message)&&($.number(s.severity)||$.undefined(s.severity))&&($.integer(s.code)||$.string(s.code)||$.undefined(s.code))&&($.undefined(s.codeDescription)||$.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&($.string(s.source)||$.undefined(s.source))&&($.undefined(s.relatedInformation)||$.typedArray(s.relatedInformation,po.is))}i(r,"is"),e.is=r})(Di||(Di={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return $.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.title)&&$.string(a.command)}i(r,"is"),e.is=r})(en||(en={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return $.objectLiteral(o)&&$.string(o.newText)&&ee.is(o.range)}i(a,"is"),e.is=a})(Vt||(Vt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.string(a.label)&&($.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&($.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(tn||(tn={})),(function(e){function t(r){const n=r;return $.string(n)}i(t,"is"),e.is=t})(je||(je={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Vt.is(o)&&(tn.is(o.annotationId)||je.is(o.annotationId))}i(a,"is"),e.is=a})(dr||(dr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&xi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(Mi||(Mi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&$.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(ua||(ua={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&$.string(a.oldUri)&&$.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(da||(da={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&$.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||$.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||$.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(fa||(fa={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>$.string(a.kind)?ua.is(a)||da.is(a)||fa.is(a):Mi.is(a)))}i(t,"is"),e.is=t})(ho||(ho={})),Ei=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Vt.insert(e,t):je.is(r)?(a=r,n=dr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Vt.replace(e,t):je.is(r)?(a=r,n=dr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Vt.del(e):je.is(t)?(n=t,r=dr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=dr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},kc=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(je.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Sg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new kc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Mi.is(t)){const r=new Ei(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new Ei(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(xi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new Ei(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new Ei(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kc,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ua.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=ua.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;tn.is(r)||je.is(r)?a=r:n=r;let s,o;if(a===void 0?s=da.create(e,t,n):(o=je.is(a)?a:this._changeAnnotations.manage(a),s=da.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=fa.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=fa.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)}i(r,"is"),e.is=r})(uu||(uu={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.integer(a.version)}i(r,"is"),e.is=r})(du||(du={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&(a.version===null||$.integer(a.version))}i(r,"is"),e.is=r})(xi||(xi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.string(a.languageId)&&$.integer(a.version)&&$.string(a.text)}i(r,"is"),e.is=r})(fu||(fu={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(mo||(mo={})),(function(e){function t(r){const n=r;return $.objectLiteral(r)&&mo.is(n.kind)&&$.string(n.value)}i(t,"is"),e.is=t})(pa||(pa={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(pu||(pu={})),(function(e){e.PlainText=1,e.Snippet=2})(hu||(hu={})),(function(e){e.Deprecated=1})(mu||(mu={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&$.string(a.newText)&&ee.is(a.insert)&&ee.is(a.replace)}i(r,"is"),e.is=r})(gu||(gu={})),(function(e){e.asIs=1,e.adjustIndentation=2})(yu||(yu={})),(function(e){function t(r){const n=r;return n&&($.string(n.detail)||n.detail===void 0)&&($.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(vu||(vu={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(Tu||(Tu={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(Ru||(Ru={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return $.string(a)||$.objectLiteral(a)&&$.string(a.language)&&$.string(a.value)}i(r,"is"),e.is=r})(Fi||(Fi={})),(function(e){function t(r){let n=r;return!!n&&$.objectLiteral(n)&&(pa.is(n.contents)||Fi.is(n.contents)||$.typedArray(n.contents,Fi.is))&&(r.range===void 0||ee.is(r.range))}i(t,"is"),e.is=t})($u||($u={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Au||(Au={})),(function(e){function t(r,n,...a){let s={label:r};return $.defined(n)&&(s.documentation=n),$.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Eu||(Eu={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(_u||(_u={})),(function(e){function t(r,n){let a={range:r};return $.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Cu||(Cu={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Su||(Su={})),(function(e){e.Deprecated=1})(bu||(bu={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(wu||(wu={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Iu||(Iu={})),(function(e){function t(n,a,s,o,l,c){let u={name:n,detail:a,kind:s,range:o,selectionRange:l};return c!==void 0&&(u.children=c),u}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.name)&&$.number(a.kind)&&ee.is(a.range)&&ee.is(a.selectionRange)&&(a.detail===void 0||$.string(a.detail))&&(a.deprecated===void 0||$.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Nu||(Nu={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ku||(ku={})),(function(e){e.Invoked=1,e.Automatic=2})(Gi||(Gi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.typedArray(a.diagnostics,Di.is)&&(a.only===void 0||$.typedArray(a.only,$.string))&&(a.triggerKind===void 0||a.triggerKind===Gi.Invoked||a.triggerKind===Gi.Automatic)}i(r,"is"),e.is=r})(Pu||(Pu={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):en.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.title)&&(a.diagnostics===void 0||$.typedArray(a.diagnostics,Di.is))&&(a.kind===void 0||$.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||en.is(a.command))&&(a.isPreferred===void 0||$.boolean(a.isPreferred))&&(a.edit===void 0||ho.is(a.edit))}i(r,"is"),e.is=r})(Ou||(Ou={})),(function(e){function t(n,a){let s={range:n};return $.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.command)||en.is(a.command))}i(r,"is"),e.is=r})(Lu||(Lu={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.uinteger(a.tabSize)&&$.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(Du||(Du={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.target)||$.string(a.target))}i(r,"is"),e.is=r})(Mu||(Mu={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(xu||(xu={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Fu||(Fu={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Gu||(Gu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(ju||(ju={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.string(a.text)}i(r,"is"),e.is=r})(Uu||(Uu={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&$.boolean(a.caseSensitiveLookup)&&($.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(zu||(zu={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&ee.is(a.range)&&($.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(Bu||(Bu={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.defined(a)&&ee.is(n.stoppedLocation)}i(r,"is"),e.is=r})(Ku||(Ku={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(go||(go={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.location===void 0||Li.is(a.location))&&(a.command===void 0||en.is(a.command))}i(r,"is"),e.is=r})(yo||(yo={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ie.is(a.position)&&($.string(a.label)||$.typedArray(a.label,yo.is))&&(a.kind===void 0||go.is(a.kind))&&a.textEdits===void 0||$.typedArray(a.textEdits,Vt.is)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.paddingLeft===void 0||$.boolean(a.paddingLeft))&&(a.paddingRight===void 0||$.boolean(a.paddingRight))}i(r,"is"),e.is=r})(qu||(qu={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(Wu||(Wu={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(Vu||(Vu={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(Hu||(Hu={})),(function(e){e.Invoked=0,e.Automatic=1})(Yu||(Yu={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(Xu||(Xu={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Ju||(Ju={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&uo.is(n.uri)&&$.string(n.name)}i(t,"is"),e.is=t})(Zu||(Zu={})),bg=[` `,`\r `,"\r"],(function(e){function t(s,o,l,c){return new Mh(s,o,l,c)}i(t,"create"),e.create=t;function r(s){let o=s;return!!($.defined(o)&&$.string(o.uri)&&($.undefined(o.languageId)||$.string(o.languageId))&&$.uinteger(o.lineCount)&&$.func(o.getText)&&$.func(o.positionAt)&&$.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),c=a(o,(d,f)=>{let h=d.range.start.line-f.range.start.line;return h===0?d.range.start.character-f.range.start.character:h}),u=l.length;for(let d=c.length-1;d>=0;d--){let f=c[d],h=s.offsetAt(f.range.start),y=s.offsetAt(f.range.end);if(y<=u)l=l.substring(0,h)+f.newText+l.substring(y,l.length);else throw new Error("Overlapping edit");u=h}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,c=s.slice(0,l),u=s.slice(l);a(c,o),a(u,o);let d=0,f=0,h=0;for(;d{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(Ft(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,B=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,B,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Bt("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),It()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:Tt,getAccTitle:zt,setDiagramTitle:Lt,getDiagramTitle:Nt,getAccDescription:Mt,setAccDescription:St},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map +import{s as St,g as Mt,t as Nt,q as Lt,a as zt,b as Tt,_ as u,a1 as At,F as Xt,H as U,l as K,L as Et,e as Yt,A as It,c as j}from"./mermaid.core-Dza7SVX6.js";import{p as Ft}from"./chunk-4BX2VUAB-Df7H4Pbw.js";import{p as Bt}from"./wardley-L42UT6IY-Dr9wBWEv.js";import"./index-BMmTKsPq.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(Ft(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,B=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,B,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Bt("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),It()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:Tt,getAccTitle:zt,setDiagramTitle:Lt,getDiagramTitle:Nt,getAccDescription:Mt,setAccDescription:St},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map `+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),B=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Et(n);E.selectAll("*").remove(),Yt(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;B&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(B);const L=u(t=>a.padding+t/100*Y,"projectX"),z=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const F=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:L(t.x),y:z(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=L(t.targetX),i=z(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:L(i.x),y:z(i.y)}));if(o.length>1)for(let i=0;i{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=L(g.annotationsBox.x),o=z(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=L(s.x),i=z(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=L(s.x),i=z(s.y),p=60,l=30,f=20,h=` M ${o} ${i-l/2} L ${o+p-f} ${i-l/2} diff --git a/apps/pythinker-code/dist-web/assets/xychartDiagram-2RQKCTM6-Bpc09H3-.js b/apps/pythinker-code/dist-web/assets/xychartDiagram-2RQKCTM6-RQQvYamz.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/xychartDiagram-2RQKCTM6-Bpc09H3-.js rename to apps/pythinker-code/dist-web/assets/xychartDiagram-2RQKCTM6-RQQvYamz.js index 01bfcf8c5..4386c1139 100644 --- a/apps/pythinker-code/dist-web/assets/xychartDiagram-2RQKCTM6-Bpc09H3-.js +++ b/apps/pythinker-code/dist-web/assets/xychartDiagram-2RQKCTM6-RQQvYamz.js @@ -1,4 +1,4 @@ -import{s as ei,g as si,t as Lt,q as ni,a as ai,b as ri,_ as a,l as Et,L as oi,e as hi,A as li,F as dt,i as ci,H as It,I as ui,a1 as gi,am as xi,a9 as Tt}from"./mermaid.core-DLN3CXA3.js";import{i as di}from"./init-Gi6I4Gst.js";import{o as fi}from"./ordinal-Cboi1Yqb.js";import{l as Dt}from"./linear-CPq1vSSR.js";import"./index-ZOXJ8Du9.js";import"./defaultLocale-DX6XiGOO.js";function pi(t,i,e){t=+t,i=+i,e=(n=arguments.length)<2?(i=t,t=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((i-t)/e))|0,g=new Array(n);++s"u"&&(T.yylloc={});var rt=T.yylloc;r.push(rt);var ti=T.options&&T.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ii(B){u.length=u.length-2*B,w.length=w.length-B,r.length=r.length-B}a(ii,"popStack");function kt(){var B;return B=x.pop()||T.lex()||_t,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=l.symbols_[B]||B),B}a(kt,"lex");for(var M,q,z,ot,G={},it,N,Rt,et;;){if(q=u[u.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=kt()),z=Q[q]&&Q[q][M]),typeof z>"u"||!z.length||!z[0]){var ht="";et=[];for(it in Q[q])this.terminals_[it]&&it>Zt&&et.push("'"+this.terminals_[it]+"'");T.showPosition?ht="Parse error on line "+(tt+1)+`: +import{s as ei,g as si,t as Lt,q as ni,a as ai,b as ri,_ as a,l as Et,L as oi,e as hi,A as li,F as dt,i as ci,H as It,I as ui,a1 as gi,am as xi,a9 as Tt}from"./mermaid.core-Dza7SVX6.js";import{i as di}from"./init-Gi6I4Gst.js";import{o as fi}from"./ordinal-Cboi1Yqb.js";import{l as Dt}from"./linear-BB9wM_yi.js";import"./index-BMmTKsPq.js";import"./defaultLocale-DX6XiGOO.js";function pi(t,i,e){t=+t,i=+i,e=(n=arguments.length)<2?(i=t,t=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((i-t)/e))|0,g=new Array(n);++s"u"&&(T.yylloc={});var rt=T.yylloc;r.push(rt);var ti=T.options&&T.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ii(B){u.length=u.length-2*B,w.length=w.length-B,r.length=r.length-B}a(ii,"popStack");function kt(){var B;return B=x.pop()||T.lex()||_t,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=l.symbols_[B]||B),B}a(kt,"lex");for(var M,q,z,ot,G={},it,N,Rt,et;;){if(q=u[u.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=kt()),z=Q[q]&&Q[q][M]),typeof z>"u"||!z.length||!z[0]){var ht="";et=[];for(it in Q[q])this.terminals_[it]&&it>Zt&&et.push("'"+this.terminals_[it]+"'");T.showPosition?ht="Parse error on line "+(tt+1)+`: `+T.showPosition()+` Expecting `+et.join(", ")+", got '"+(this.terminals_[M]||M)+"'":ht="Parse error on line "+(tt+1)+": Unexpected "+(M==_t?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(ht,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:rt,expected:et})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:u.push(M),w.push(T.yytext),r.push(T.yylloc),u.push(z[1]),M=null,St=T.yyleng,d=T.yytext,tt=T.yylineno,rt=T.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=w[w.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ti&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),ot=this.performAction.apply(G,[d,St,tt,$.yy,z[1],w,r].concat(Jt)),typeof ot<"u")return ot;N&&(u=u.slice(0,-1*N*2),w=w.slice(0,-1*N),r=r.slice(0,-1*N)),u.push(this.productions_[z[1]][0]),w.push(G.$),r.push(G._$),Rt=Q[u[u.length-2]][u[u.length-1]],u.push(Rt);break;case 3:return!0}}return!0},"parse")},_=(function(){var F={EOF:1,parseError:a(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:a(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:a(function(o){var l=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(o){this.unput(this.match.slice(o))},"less"),pastInput:a(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/index.html b/apps/pythinker-code/dist-web/index.html index 3aad331a5..b26329f93 100644 --- a/apps/pythinker-code/dist-web/index.html +++ b/apps/pythinker-code/dist-web/index.html @@ -17,8 +17,8 @@ the server's Content-Security-Policy forbids inline scripts. --> Pythinker Code Web - - + +

      From 2ca8060f723004e5ad3b71cc1ab8ca3f96aff1e8 Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 21 Aug 2026 19:17:47 -0400 Subject: [PATCH 07/15] chore(web): drop the retired thinking variant from the legacy DetailTarget union types.ts declares an unused duplicate of the detail-layer union (the live one lives in useFilePreview.ts); remove the retired 'thinking' member there too so no declaration still mentions the old side panel. --- apps/pythinker-web/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/pythinker-web/src/types.ts b/apps/pythinker-web/src/types.ts index b7a9986d1..2f0b1535a 100644 --- a/apps/pythinker-web/src/types.ts +++ b/apps/pythinker-web/src/types.ts @@ -363,7 +363,7 @@ export interface ConversationStatus { /** Kind of the global right-side detail layer. Only one detail is visible at a * time; opening a new one closes the previous. */ -export type DetailTarget = 'file' | 'diff' | 'thinking' | 'compaction' | 'agent' | 'btw'; +export type DetailTarget = 'file' | 'diff' | 'compaction' | 'agent' | 'btw'; export interface ActivationBadges { plan: boolean; From c2c7fe28c57523834ec976e9379540508799c649 Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 21 Aug 2026 20:21:20 -0400 Subject: [PATCH 08/15] fix(oauth): refresh models.dev-sourced providers on the scheduled model-catalog pass Providers imported from the models.dev catalog carry a modelsDev source blob, but the refresh orchestrator only recognized apiJson registries, so their model lists were frozen at import time. Handle modelsDev groups as a dedicated refresh branch: aliases sync against a fresh catalog fetch (new models added, removed dropped, field-level merge preserving user extras), provider records are never rewritten, directory siblings are never auto-imported, and an entry with no usable models fails safe instead of wiping config. The server's models.dev import route now also stamps the source blob so its imports are refreshable too. --- .changeset/modelsdev-catalog-refresh.md | 5 + .../kosongConfig/modelsDevImportService.ts | 6 +- packages/oauth/package.json | 1 + packages/oauth/src/managed-pythinker-code.ts | 11 +- packages/oauth/src/models-dev-catalog.ts | 136 +++++++ packages/oauth/src/refreshProviderModels.ts | 140 ++++++- .../oauth/test/models-dev-refresh.test.ts | 383 ++++++++++++++++++ pnpm-lock.yaml | 3 + 8 files changed, 678 insertions(+), 7 deletions(-) create mode 100644 .changeset/modelsdev-catalog-refresh.md create mode 100644 packages/oauth/src/models-dev-catalog.ts create mode 100644 packages/oauth/test/models-dev-refresh.test.ts diff --git a/.changeset/modelsdev-catalog-refresh.md b/.changeset/modelsdev-catalog-refresh.md new file mode 100644 index 000000000..ca2f5fb8e --- /dev/null +++ b/.changeset/modelsdev-catalog-refresh.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Refresh model lists for providers imported from the models.dev catalog so newly released models appear automatically. diff --git a/packages/agent-core-v2/src/app/kosongConfig/modelsDevImportService.ts b/packages/agent-core-v2/src/app/kosongConfig/modelsDevImportService.ts index 965385ac4..624ecc1ef 100644 --- a/packages/agent-core-v2/src/app/kosongConfig/modelsDevImportService.ts +++ b/packages/agent-core-v2/src/app/kosongConfig/modelsDevImportService.ts @@ -35,6 +35,7 @@ import { } from './modelsDevImport'; import { getModelsDevCatalog, + MODELS_DEV_URL, modelsDevEntry, modelsDevModelToRecord, toModelsDevProviderItem, @@ -173,6 +174,7 @@ export class ModelsDevImportService implements IModelsDevImportService { const provider: ProviderConfig = { type: resolution.wire }; provider.baseUrl = resolution.baseUrl; provider.apiKey = options.apiKey ?? existing?.apiKey; + provider.source = { kind: 'modelsDev', url: MODELS_DEV_URL }; await config.replace(PROVIDERS_SECTION, { ...providers, [targetId]: provider }); const records = config.inspect(MODELS_SECTION).userValue ?? {}; @@ -215,10 +217,10 @@ export class ModelsDevImportService implements IModelsDevImportService { userAgent: await this.outboundUserAgent(), signal: AbortSignal.timeout(UPSTREAM_FETCH_TIMEOUT_MS), }); - } catch (err) { + } catch (error) { throw new Error2( codes.REGISTRY_IMPORT_INVALID, - `custom registry at ${url} cannot be imported: ${truncateUpstreamMessage(err)}`, + `custom registry at ${url} cannot be imported: ${truncateUpstreamMessage(error)}`, ); } if (Object.keys(entries).length === 0) { diff --git a/packages/oauth/package.json b/packages/oauth/package.json index 438b6e20b..93f06fe4a 100644 --- a/packages/oauth/package.json +++ b/packages/oauth/package.json @@ -45,6 +45,7 @@ "clean": "rm -rf dist" }, "dependencies": { + "@pymodel/kosong": "workspace:^", "proper-lockfile": "^4.1.2", "zod": "catalog:" }, diff --git a/packages/oauth/src/managed-pythinker-code.ts b/packages/oauth/src/managed-pythinker-code.ts index 102f2c72c..276cf8656 100644 --- a/packages/oauth/src/managed-pythinker-code.ts +++ b/packages/oauth/src/managed-pythinker-code.ts @@ -151,10 +151,15 @@ export interface ManagedPythinkerModelAlias { provider: string; model: string; maxContextSize: number; + maxInputSize?: number | undefined; + maxOutputSize?: number | undefined; capabilities?: string[] | undefined; supportEfforts?: readonly string[] | undefined; defaultEffort?: string | undefined; displayName?: string | undefined; + reasoningKey?: string | undefined; + offEffort?: string | undefined; + baseUrl?: string | undefined; protocol?: ManagedPythinkerCodeProtocol; betaApi?: boolean; adaptiveThinking?: boolean | undefined; @@ -312,9 +317,9 @@ export function pythinkerCodeEnvOAuthHost(env: ManagedPythinkerEnv = process.env } // Base URLs that share the default `oauth/pythinker-code` credential slot. -const SHARED_DEFAULT_BASE_URLS: readonly string[] = [ +const SHARED_DEFAULT_BASE_URLS: readonly string[] = new Set([ normalizeEndpoint(DEFAULT_PYTHINKER_CODE_BASE_URL), -]; +]); export function resolvePythinkerCodeOAuthKey(options: { readonly oauthHost?: string | undefined; @@ -324,7 +329,7 @@ export function resolvePythinkerCodeOAuthKey(options: { const baseUrl = defaultBaseUrl(options.baseUrl); const defaultOauthHost = normalizeEndpoint(DEFAULT_PYTHINKER_CODE_OAUTH_HOST); - if (oauthHost === defaultOauthHost && SHARED_DEFAULT_BASE_URLS.includes(baseUrl)) { + if (oauthHost === defaultOauthHost && SHARED_DEFAULT_BASE_URLS.has(baseUrl)) { return PYTHINKER_CODE_OAUTH_KEY; } diff --git a/packages/oauth/src/models-dev-catalog.ts b/packages/oauth/src/models-dev-catalog.ts new file mode 100644 index 000000000..b94c78629 --- /dev/null +++ b/packages/oauth/src/models-dev-catalog.ts @@ -0,0 +1,136 @@ +import { + catalogProviderModels, + type CatalogModel, + type CatalogProviderEntry, +} from '@pymodel/kosong'; + +import { readApiErrorMessage } from './api-error'; +import type { ManagedPythinkerModelAlias } from './managed-pythinker-code'; +import { isRecord } from './utils'; + +/** + * models.dev directory documents are public and large, so refresh treats a + * `modelsDev` source differently from a private api.json registry: entries + * are never auto-added as new providers, and the stored provider record + * (wire, endpoint, credentials) is never rewritten — only model aliases sync. + */ +export const MODELS_DEV_CATALOG_URL = 'https://models.dev/api.json'; + +/** Remote-owned alias fields written by {@link modelsDevProviderAliases}. */ +export const MODELS_DEV_MODEL_FIELDS: ReadonlySet = new Set([ + 'provider', + 'model', + 'maxContextSize', + 'maxInputSize', + 'maxOutputSize', + 'capabilities', + 'displayName', + 'reasoningKey', + 'supportEfforts', + 'offEffort', + 'protocol', + 'baseUrl', +]); + +export interface ModelsDevSource { + readonly url: string; +} + +export class ModelsDevCatalogError extends Error { + readonly status: number; + + constructor(message: string, status: number) { + super(message); + this.name = 'ModelsDevCatalogError'; + this.status = status; + } +} + +export function parseModelsDevSource(source: unknown): ModelsDevSource | undefined { + if (!isRecord(source)) return undefined; + if (source['kind'] !== 'modelsDev') return undefined; + const url = source['url']; + if (typeof url !== 'string' || url.length === 0) return undefined; + return { url }; +} + +function capabilityToStrings(capability: CatalogModel['capability']): string[] | undefined { + const caps: string[] = []; + if (capability.image_in) caps.push('image_in'); + if (capability.video_in) caps.push('video_in'); + if (capability.audio_in) caps.push('audio_in'); + if (capability.thinking) caps.push('thinking'); + if (capability.tool_use) caps.push('tool_use'); + if (capability.dynamically_loaded_tools === true) caps.push('dynamically_loaded_tools'); + return caps.length > 0 ? caps : undefined; +} + +/** + * Normalizes one catalog entry into refreshed aliases keyed by + * `${providerId}/${modelId}`, mirroring the field set the catalog importers + * write. Optional fields are assigned only when upstream declares them so a + * refresh never clobbers a stored value with an implicit undefined. Returns + * an empty record when the entry is unusable (not an object or no importable + * models); callers treat that as "nothing known upstream". + */ +export function modelsDevProviderAliases( + providerId: string, + entry: unknown, +): Record { + if (!isRecord(entry)) return {}; + const models = catalogProviderModels(entry as CatalogProviderEntry); + const out: Record = {}; + for (const model of models) { + const caps = capabilityToStrings(model.capability); + const capabilities = + model.alwaysThinking === true + ? caps?.map((cap) => (cap === 'thinking' ? 'always_thinking' : cap)) + : caps; + const alias: ManagedPythinkerModelAlias = { + provider: providerId, + model: model.id, + maxContextSize: model.capability.max_context_tokens, + }; + if (model.capability.max_input_tokens !== undefined) { + alias.maxInputSize = model.capability.max_input_tokens; + } + if (model.maxOutputSize !== undefined) alias.maxOutputSize = model.maxOutputSize; + if (capabilities !== undefined) alias.capabilities = [...capabilities]; + if (model.name !== undefined) alias.displayName = model.name; + if (model.reasoningKey !== undefined) alias.reasoningKey = model.reasoningKey; + if (model.supportEfforts !== undefined) alias.supportEfforts = [...model.supportEfforts]; + if (model.offEffort !== undefined) alias.offEffort = model.offEffort; + if (model.protocol !== undefined) alias.protocol = model.protocol; + if (model.baseUrl !== undefined) alias.baseUrl = model.baseUrl; + out[`${providerId}/${model.id}`] = alias; + } + return out; +} + +/** + * Fetches a models.dev-style catalog document keyed by top-level provider id. + * The directory needs no credentials, so no Authorization header is sent even + * when the configured provider carries one. + */ +export async function fetchModelsDevCatalog( + url: string, + options: { signal?: AbortSignal; fetchImpl?: typeof fetch; userAgent?: string } = {}, +): Promise> { + const { signal, fetchImpl = fetch, userAgent } = options; + const headers: Record = { Accept: 'application/json' }; + if (userAgent !== undefined) headers['User-Agent'] = userAgent; + + const response = await fetchImpl(url, { headers, ...(signal !== undefined ? { signal } : {}) }); + if (!response.ok) { + throw new ModelsDevCatalogError( + await readApiErrorMessage(response, `Failed to fetch models.dev catalog at ${url} (HTTP ${response.status}).`), + response.status, + ); + } + + const payload: unknown = await response.json(); + if (!isRecord(payload)) { + throw new ModelsDevCatalogError(`Unexpected models.dev response at ${url}: expected a JSON object.`, 200); + } + return payload; +} diff --git a/packages/oauth/src/refreshProviderModels.ts b/packages/oauth/src/refreshProviderModels.ts index 5428b3bf2..3b255d98a 100644 --- a/packages/oauth/src/refreshProviderModels.ts +++ b/packages/oauth/src/refreshProviderModels.ts @@ -4,6 +4,13 @@ import { removeCustomRegistryProvider, type CustomRegistrySource, } from './custom-registry'; +import { mergeRefreshedModelAlias } from './model-alias-merge'; +import { + fetchModelsDevCatalog, + MODELS_DEV_MODEL_FIELDS, + parseModelsDevSource, + modelsDevProviderAliases, +} from './models-dev-catalog'; import { applyManagedApiKeyProviderModels, applyManagedPythinkerCodeConfig, @@ -334,6 +341,30 @@ function clearDefaultThinkingWhenDefaultRemoved( } } +/** + * Syncs one provider's aliases against upstream-generated ones: prefixed + * aliases are upstream-owned (gone from upstream = deleted, new = added, + * retained = merged field-by-field so user tweaks on remote-owned fields + * lose to fresh metadata while everything else survives). + */ +function applyModelsDevAliases( + config: ManagedPythinkerConfigShape, + providerId: string, + aliases: Record, +): void { + const models = config.models ?? {}; + const upstreamKeys = new Set(Object.keys(aliases)); + for (const [key, raw] of Object.entries(models)) { + if ((raw as ManagedPythinkerModelAlias).provider === providerId && !upstreamKeys.has(key)) { + delete models[key]; + } + } + for (const [key, alias] of Object.entries(aliases)) { + models[key] = mergeRefreshedModelAlias(models[key], alias, MODELS_DEV_MODEL_FIELDS); + } + config.models = models; +} + function pickDefaultModel( config: ManagedPythinkerConfigShape, providerId: string, @@ -357,7 +388,7 @@ function pickDefaultModel( /** * Refresh remote model metadata for the configured providers and persist any - * changes through the host. Handles four provider kinds, in order: + * changes through the host. Handles five provider kinds, in order: * * 1. Managed Pythinker Code (OAuth) — `GET /models` against the runtime endpoint. * 2. Open platforms (moonshot-cn, moonshot-ai, …) — platform catalog fetch. @@ -616,7 +647,9 @@ export async function refreshProviderModels( } // --------------------------------------------------------------------------- - // 3. Custom Registry providers (grouped by URL, with API-key candidates) + // 3. Custom Registry providers (grouped by URL, with API-key candidates). + // Private registries only — models.dev directory providers are handled by + // branch 3.5 below, which never rewrites provider records nor adds siblings. // --------------------------------------------------------------------------- const customSources = new Map< string, @@ -762,5 +795,108 @@ export async function refreshProviderModels( } } + // --------------------------------------------------------------------------- + // 3.5. models.dev directory providers (`source.kind = 'modelsDev'`) + // + // Providers imported from the public models.dev catalog (CLI catalog flow + // and the server import route) carry this source blob. Deliberately unlike + // private api.json registries: entries are never auto-added as new providers + // (the directory lists hundreds), the stored provider record is never + // rewritten, no Authorization header is sent upstream, and an entry whose + // models are all unusable is reported as a failure instead of wiping local + // aliases. A provider id missing from the document means it disappeared + // upstream and is removed like branch 3 does. + // --------------------------------------------------------------------------- + const modelsDevGroups = new Map(); + for (const providerId of Object.keys(config.providers)) { + if (targetId !== undefined && targetId !== providerId) continue; + const provider = readProvider(config, providerId); + if (provider === undefined) continue; + const source = parseModelsDevSource(provider.source); + if (source === undefined) continue; + const group = modelsDevGroups.get(source.url); + if (group !== undefined) { + group.push(providerId); + } else { + modelsDevGroups.set(source.url, [providerId]); + } + } + + for (const [url, providerIds] of modelsDevGroups) { + try { + const document = await fetchModelsDevCatalog(url, { userAgent: host.userAgent }); + const next = structuredClone(config); + const providersToRemoveBeforeSet = new Set(); + const changedProviders: Array<{ + readonly providerId: string; + readonly providerName: string; + readonly added: number; + readonly removed: number; + }> = []; + for (const providerId of providerIds) { + if (!Object.prototype.hasOwnProperty.call(document, providerId)) { + const oldIds = collectModelIdsForAliases(config, providerAliasKeys(config, providerId)); + removeCustomRegistryProvider(next, providerId); + changedProviders.push({ + providerId, + providerName: providerId, + added: 0, + removed: oldIds.size, + }); + providersToRemoveBeforeSet.add(providerId); + continue; + } + const aliases = modelsDevProviderAliases(providerId, document[providerId]); + if (Object.keys(aliases).length === 0) { + failed.push({ + provider: providerId, + reason: `models.dev entry ${providerId} lists no usable models`, + }); + continue; + } + applyModelsDevAliases(next, providerId, aliases); + const refreshedAliasKeys = providerRefreshAliasKeys(config, next, providerId, `${providerId}/`); + restoreProviderAliases( + next, + preserveUserProviderAliases(config, providerId, refreshedAliasKeys), + ); + if (providerModelsEqual(config, next, providerId, refreshedAliasKeys)) { + unchanged.push(providerId); + continue; + } + const { added, removed } = computeChanges( + collectModelIdsForAliases(config, refreshedAliasKeys), + collectModelIdsForAliases(next, refreshedAliasKeys), + ); + changedProviders.push({ providerId, providerName: providerId, added, removed }); + providersToRemoveBeforeSet.add(providerId); + } + if (changedProviders.length > 0) { + restoreDefaultSelection(next, config.defaultModel, config.thinking?.enabled); + clampDanglingDefault(next); + clearDefaultThinkingWhenDefaultRemoved(next, config.defaultModel); + for (const providerId of providersToRemoveBeforeSet) { + await host.removeProvider(providerId); + } + config = await host.setConfig({ + providers: next.providers, + models: next.models, + defaultModel: next.defaultModel, + thinking: next.thinking, + }); + for (const change of changedProviders) { + changed.push(change); + } + } + } catch (error) { + for (const providerId of providerIds) { + failed.push({ + provider: providerId, + reason: error instanceof Error ? error.message : String(error), + }); + } + } + } + return { changed, unchanged, failed }; } diff --git a/packages/oauth/test/models-dev-refresh.test.ts b/packages/oauth/test/models-dev-refresh.test.ts new file mode 100644 index 000000000..5b807cfb7 --- /dev/null +++ b/packages/oauth/test/models-dev-refresh.test.ts @@ -0,0 +1,383 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; + +import type { ManagedPythinkerConfigShape, ManagedPythinkerModelAlias } from '../src/managed-pythinker-code'; +import { + fetchModelsDevCatalog, + MODELS_DEV_CATALOG_URL, + modelsDevProviderAliases, + parseModelsDevSource, +} from '../src/models-dev-catalog'; +import { refreshProviderModels, type RefreshProviderHost } from '../src/refreshProviderModels'; + +const PROVIDER_ID = 'opencode-go'; +const PROVIDER_SOURCE = { kind: 'modelsDev', url: MODELS_DEV_CATALOG_URL }; + +function makeProviderRecord() { + return { + type: 'openai', + baseUrl: 'https://opencode.example.test/zen/go/v1', + apiKey: 'sk-opencode-test', + source: { ...PROVIDER_SOURCE }, + } satisfies Record; +} + +/** + * Base state mirrors a real import snapshot: upstream-seeded aliases only + * (ox-alpha has not been imported yet) plus one bare-keyed user alias that + * refreshes must preserve. + */ +function makeBaseConfig(): ManagedPythinkerConfigShape { + const doc = makeDocument(); + const entry = doc[PROVIDER_ID] as Record; + const upstreamModels = entry['models'] as Record; + delete upstreamModels['ox-alpha-free']; + const seeded = modelsDevProviderAliases(PROVIDER_ID, entry); + return { + providers: { [PROVIDER_ID]: makeProviderRecord() }, + models: { + ...seeded, + 'my-favorite': { + provider: PROVIDER_ID, + model: 'gpt-5-x', + maxContextSize: 400000, + displayName: 'User-made alias', + }, + }, + defaultModel: `${PROVIDER_ID}/deepseek-v4-flash`, + thinking: { enabled: true }, + }; +} + +function makeDocument(): Record { + return { + [PROVIDER_ID]: { + id: PROVIDER_ID, + name: 'OpenCode Go', + api: 'https://opencode.example.test/zen/go/v1', + npm: '@ai-sdk/openai', + models: { + 'deepseek-v4-flash': { + id: 'deepseek-v4-flash', + name: 'DeepSeek V4 Flash', + limit: { context: 1000000, output: 384000 }, + tool_call: true, + interleaved: { field: 'reasoning_content' }, + modalities: { input: ['text'], output: ['text'] }, + }, + 'ox-alpha-free': { + id: 'ox-alpha-free', + name: 'Ox Alpha Free (Unlimited)', + limit: { context: 262144, output: 65536 }, + tool_call: true, + reasoning: true, + reasoning_options: [{ type: 'effort', values: ['low', 'high', 'max'] }], + modalities: { input: ['text', 'image', 'video'], output: ['text'] }, + }, + }, + }, + 'brand-new-guy': { + id: 'brand-new-guy', + name: 'Brand New Guy', + api: 'https://new.example.test/v1', + models: { m1: { id: 'm1', name: 'M1', limit: { context: 1000 } } }, + }, + }; +} + +function jsonResponse(body: unknown, status = 200): Response { + return new Response(JSON.stringify(body), { + status, + headers: { 'Content-Type': 'application/json' }, + }); +} + +interface HostCalls { + requests: string[]; + removeProvider: string[]; + setConfigPatches: ManagedPythinkerConfigShape[]; +} + +function makeHost(initial: ManagedPythinkerConfigShape): { + host: RefreshProviderHost; + calls: HostCalls; +} { + let current = structuredClone(initial); + const calls: HostCalls = { requests: [], removeProvider: [], setConfigPatches: [] }; + const host: RefreshProviderHost = { + getConfig: async () => structuredClone(current), + removeProvider: async (providerId) => { + calls.removeProvider.push(providerId); + delete current.providers[providerId]; + for (const [key, raw] of Object.entries(current.models ?? {})) { + if ((raw as ManagedPythinkerModelAlias).provider === providerId) delete current.models?.[key]; + } + return structuredClone(current); + }, + setConfig: async (patch) => { + calls.setConfigPatches.push(structuredClone(patch)); + if (patch.providers !== undefined) current.providers = structuredClone(patch.providers); + if (patch.models !== undefined) current.models = structuredClone(patch.models); + if ('defaultModel' in patch) current.defaultModel = patch.defaultModel; + if ('thinking' in patch) current.thinking = structuredClone(patch.thinking); + return structuredClone(current); + }, + resolveOAuthToken: async () => 'token', + userAgent: 'pythinker-code-cli/test', + }; + return { host, calls }; +} + +function lastPatch(calls: HostCalls): ManagedPythinkerConfigShape { + const patch = calls.setConfigPatches.at(-1); + expect(patch).toBeDefined(); + return patch as ManagedPythinkerConfigShape; +} + +afterEach(() => { + vi.unstubAllGlobals(); +}); + +describe('refreshProviderModels modelsDev directory providers', () => { + it('adds an upstream model and preserves user aliases and the provider record', async () => { + const document = makeDocument(); + const fetchMock = vi.fn(async (input: string, _init?: RequestInit) => { + calls.requests.push(input); + return jsonResponse(document); + }); + vi.stubGlobal('fetch', fetchMock); + + const base = makeBaseConfig(); + const { host, calls } = makeHost(base); + const result = await refreshProviderModels(host); + + expect(result.failed).toEqual([]); + expect(result.changed).toEqual([ + { providerId: PROVIDER_ID, providerName: PROVIDER_ID, added: 1, removed: 0 }, + ]); + expect(result.unchanged).toEqual([]); + + expect(calls.requests).toEqual([MODELS_DEV_CATALOG_URL]); + const init = fetchMock.mock.calls[0]?.[1]; + expect(init?.headers).toMatchObject({ + Accept: 'application/json', + 'User-Agent': 'pythinker-code-cli/test', + }); + expect(JSON.stringify(init?.headers)).not.toContain('Authorization'); + + expect(calls.removeProvider).toEqual([PROVIDER_ID]); + expect(calls.setConfigPatches).toHaveLength(1); + const patch = lastPatch(calls); + + expect(Object.keys(patch.models ?? {})).toContain(`${PROVIDER_ID}/ox-alpha-free`); + const added = patch.models?.[`${PROVIDER_ID}/ox-alpha-free`] as ManagedPythinkerModelAlias; + expect(added.model).toBe('ox-alpha-free'); + expect(added.maxContextSize).toBe(262144); + expect(added.maxOutputSize).toBe(65536); + expect(added.supportEfforts).toEqual(['low', 'high', 'max']); + expect(added.displayName).toBe('Ox Alpha Free (Unlimited)'); + expect(added.capabilities).toEqual(['image_in', 'video_in', 'always_thinking', 'tool_use']); + expect(Object.keys(patch.models ?? {})).toContain(`${PROVIDER_ID}/deepseek-v4-flash`); + + expect(patch.models?.['my-favorite'] as ManagedPythinkerModelAlias | undefined).toEqual( + base.models?.['my-favorite'], + ); + + const providerPatch = patch.providers?.[PROVIDER_ID] as Record | undefined; + expect(providerPatch).toBeDefined(); + expect(providerPatch).toEqual(makeProviderRecord()); + + expect(patch.defaultModel).toBe(`${PROVIDER_ID}/deepseek-v4-flash`); + expect(patch.thinking).toEqual({ enabled: true }); + }); + + it('removes a provider that vanished from the directory and clamps the dangling default', async () => { + vi.stubGlobal( + 'fetch', + vi.fn(async () => jsonResponse({ 'brand-new-guy': makeDocument()['brand-new-guy'] })), + ); + const base = makeBaseConfig(); + base.defaultModel = `${PROVIDER_ID}/deepseek-v4-flash`; + + const { host, calls } = makeHost(base); + const result = await refreshProviderModels(host); + + expect(result.changed).toEqual([ + { providerId: PROVIDER_ID, providerName: PROVIDER_ID, added: 0, removed: 2 }, + ]); + expect(calls.removeProvider).toEqual([PROVIDER_ID]); + expect(calls.setConfigPatches).toHaveLength(1); + const patch = lastPatch(calls); + expect(patch.providers?.[PROVIDER_ID]).toBeUndefined(); + expect(patch.defaultModel).toBeUndefined(); + expect(patch.thinking).toBeUndefined(); + }); + + it('reports a failure without writing when an entry lists no usable models', async () => { + const document = makeDocument(); + const entry = document[PROVIDER_ID] as Record; + entry['models'] = Object.fromEntries( + Object.entries(entry['models'] as Record).map(([key, value]) => [ + key, + { ...(value as Record), status: 'deprecated' }, + ]), + ); + vi.stubGlobal('fetch', vi.fn(async () => jsonResponse(document))); + + const { host, calls } = makeHost(makeBaseConfig()); + const result = await refreshProviderModels(host); + + expect(result.failed).toEqual([ + { provider: PROVIDER_ID, reason: `models.dev entry ${PROVIDER_ID} lists no usable models` }, + ]); + expect(result.changed).toEqual([]); + expect(calls.removeProvider).toEqual([]); + expect(calls.setConfigPatches).toEqual([]); + }); + + it('never auto-adds directory siblings as configured providers', async () => { + vi.stubGlobal('fetch', vi.fn(async () => jsonResponse(makeDocument()))); + + const { host, calls } = makeHost(makeBaseConfig()); + await refreshProviderModels(host); + + const patch = lastPatch(calls); + expect(patch.providers?.['brand-new-guy']).toBeUndefined(); + expect(Object.keys(patch.models ?? {}).some((key) => key.startsWith('brand-new-guy/'))).toBe(false); + }); + + it('is a no-op write when upstream matches local state', async () => { + const document = makeDocument(); + const entry = document[PROVIDER_ID] as Record; + const upstreamModels = entry['models'] as Record; + delete upstreamModels['ox-alpha-free']; + vi.stubGlobal('fetch', vi.fn(async () => jsonResponse(document))); + + const { host, calls } = makeHost(makeBaseConfig()); + const result = await refreshProviderModels(host); + + expect(result.unchanged).toEqual([PROVIDER_ID]); + expect(result.changed).toEqual([]); + expect(calls.setConfigPatches).toEqual([]); + expect(calls.removeProvider).toEqual([]); + }); + + it('scopes a targeted refresh to the requested provider only', async () => { + vi.stubGlobal('fetch', vi.fn(async () => jsonResponse(makeDocument()))); + const base = makeBaseConfig(); + base.providers['other-go'] = { + type: 'openai', + apiKey: 'sk-other', + source: { kind: 'modelsDev', url: MODELS_DEV_CATALOG_URL }, + }; + base.models = { + ...base.models, + 'other-go/m1': { provider: 'other-go', model: 'm1', maxContextSize: 128000 }, + }; + + const { host, calls } = makeHost(base); + const result = await refreshProviderModels(host, { providerId: PROVIDER_ID }); + + expect(result.changed).toHaveLength(1); + expect(result.changed[0]?.providerId).toBe(PROVIDER_ID); + const patch = lastPatch(calls); + expect(patch.models?.['other-go/m1']).toEqual({ + provider: 'other-go', + model: 'm1', + maxContextSize: 128000, + }); + expect(patch.providers?.['other-go']).toEqual(base.providers['other-go']); + }); + + it('skips the directory entirely under the oauth scope', async () => { + const fetchMock = vi.fn(); + vi.stubGlobal('fetch', fetchMock); + const { host, calls } = makeHost(makeBaseConfig()); + const result = await refreshProviderModels(host, { scope: 'oauth' }); + expect(result).toEqual({ changed: [], unchanged: [], failed: [] }); + expect(fetchMock).not.toHaveBeenCalled(); + expect(calls.setConfigPatches).toEqual([]); + }); + + it('reports upstream fetch failures per provider without touching config', async () => { + vi.stubGlobal('fetch', vi.fn(async () => new Response('boom', { status: 503 }))); + const { host, calls } = makeHost(makeBaseConfig()); + const result = await refreshProviderModels(host); + expect(result.failed).toHaveLength(1); + expect(result.failed[0]?.provider).toBe(PROVIDER_ID); + expect(result.failed[0]?.reason).toContain('503'); + expect(calls.setConfigPatches).toEqual([]); + expect(calls.removeProvider).toEqual([]); + }); + + it('keeps private apiJson registry behavior intact: siblings are discovered', async () => { + const registry = { + acme: { + id: 'acme', + name: 'Acme', + api: 'https://acme.example.test/v1', + type: 'openai', + models: { m1: { id: 'm1', name: 'M1' } }, + }, + 'acme-new-sibling': { + id: 'acme-new-sibling', + name: 'Acme New Sibling', + api: 'https://acme.example.test/v1', + type: 'openai', + models: { s1: { id: 's1', name: 'S1' } }, + }, + }; + vi.stubGlobal('fetch', vi.fn(async () => jsonResponse(registry))); + + const { host, calls } = makeHost({ + providers: { + acme: { + type: 'openai', + apiKey: 'sk-acme', + source: { kind: 'apiJson', url: 'https://registry.example.test/api.json', apiKey: '' }, + }, + }, + models: {}, + }); + await refreshProviderModels(host); + + expect(calls.setConfigPatches.length).toBeGreaterThan(0); + expect(lastPatch(calls).providers?.['acme-new-sibling']).toBeDefined(); + }); +}); + +describe('parseModelsDevSource', () => { + it('accepts modelsDev blobs with or without an apiKey', () => { + expect(parseModelsDevSource({ kind: 'modelsDev', url: MODELS_DEV_CATALOG_URL })).toEqual({ + url: MODELS_DEV_CATALOG_URL, + }); + expect(parseModelsDevSource({ kind: 'modelsDev', url: MODELS_DEV_CATALOG_URL, apiKey: 'sk-x' })).toEqual({ + url: MODELS_DEV_CATALOG_URL, + }); + }); + + it('rejects everything else', () => { + expect(parseModelsDevSource(undefined)).toBeUndefined(); + expect(parseModelsDevSource('nope')).toBeUndefined(); + expect(parseModelsDevSource({ kind: 'apiJson', url: MODELS_DEV_CATALOG_URL })).toBeUndefined(); + expect(parseModelsDevSource({ kind: 'modelsDev' })).toBeUndefined(); + expect(parseModelsDevSource({ kind: 'modelsDev', url: '' })).toBeUndefined(); + }); +}); + +describe('fetchModelsDevCatalog', () => { + it('sends no Authorization header even when credentials exist on the provider', async () => { + const fetchMock = vi.fn(async (_input: string, _init?: RequestInit) => jsonResponse({})); + await fetchModelsDevCatalog(MODELS_DEV_CATALOG_URL, { + fetchImpl: fetchMock as unknown as typeof fetch, + userAgent: 'pythinker-code-cli/test', + }); + const init = fetchMock.mock.calls[0]?.[1]; + expect(init?.headers).toEqual({ Accept: 'application/json', 'User-Agent': 'pythinker-code-cli/test' }); + }); + + it('rejects non-object payloads loudly', async () => { + await expect( + fetchModelsDevCatalog(MODELS_DEV_CATALOG_URL, { fetchImpl: async () => jsonResponse([]) }), + ).rejects.toThrow('expected a JSON object'); + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed9b5fc90..c75212c52 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1012,6 +1012,9 @@ importers: packages/oauth: dependencies: + '@pymodel/kosong': + specifier: workspace:^ + version: link:../kosong proper-lockfile: specifier: ^4.1.2 version: 4.1.2 From d90dc7d62cf2dd91f8a5ca3823d68b4df079a76b Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 21 Aug 2026 21:02:42 -0400 Subject: [PATCH 09/15] fix(web): report task background flag so foreground subagents never dock as running --- apps/pythinker-web/src/api/daemon/mappers.ts | 10 +++---- apps/pythinker-web/src/lib/taskMerge.ts | 14 +++++++-- .../test/daemon-contracts.test.ts | 23 +++++++++++++++ apps/pythinker-web/test/lib-logic.test.ts | 29 +++++++++++++++++++ packages/agent-gateway/src/protocol/task.ts | 1 + packages/agent-gateway/src/routes/tasks.ts | 1 + packages/agent-gateway/test/tasks.test.ts | 19 ++++++++++++ 7 files changed, 90 insertions(+), 7 deletions(-) diff --git a/apps/pythinker-web/src/api/daemon/mappers.ts b/apps/pythinker-web/src/api/daemon/mappers.ts index 326e9d7bd..bf6f0b936 100644 --- a/apps/pythinker-web/src/api/daemon/mappers.ts +++ b/apps/pythinker-web/src/api/daemon/mappers.ts @@ -389,11 +389,11 @@ export function toAppTask(wire: WireTask): AppTask { suspendedReason: wire.suspended_reason, dynamicWorkflowIndex: wire.dynamic_workflow_index, swarmIndex: wire.swarm_index, - // The snapshot's subagent roster carries the explicit flag. REST `/tasks` - // does not, but its background-task store only holds detached tasks, so any - // subagent it returns is a background subagent (foreground ones never - // persist there) — hence the `?? true` fallback for that path. - runInBackground: wire.run_in_background ?? (wire.kind === 'subagent' ? true : undefined), + // Explicit on every wire surface that returns subagents (snapshot roster + // and REST /tasks). Never guess: defaulting a missing flag to true made the + // dock claim foreground workflow agents as background rows that no terminal + // event would ever complete. + runInBackground: wire.run_in_background, // outputLines starts undefined; populated by eventReducer via task.progress events }; } diff --git a/apps/pythinker-web/src/lib/taskMerge.ts b/apps/pythinker-web/src/lib/taskMerge.ts index 8c818d049..2a220e787 100644 --- a/apps/pythinker-web/src/lib/taskMerge.ts +++ b/apps/pythinker-web/src/lib/taskMerge.ts @@ -20,17 +20,27 @@ import type { AppTask } from '../api/types'; * (`backgroundTaskId` links the two, set from the `task.started` * registration). Fold the REST copy into the WS-owned row so one agent does * not surface as two rows; REST still corrects a terminal status the WS row - * may have missed while disconnected. + * may have missed while disconnected. When that explicit link was never + * learned (e.g. the `task.started` frame raced the page load), fall back to + * matching on the agent id both rows carry. */ export function keepLiveSubagents(restBased: AppTask[], existing: AppTask[]): AppTask[] { const restIds = new Set(restBased.map((t) => t.id)); const liveSubagents = existing.filter((t) => t.kind === 'subagent' && !restIds.has(t.id)); if (liveSubagents.length === 0) return restBased; const restById = new Map(restBased.map((t) => [t.id, t] as const)); + const restByAgentId = new Map(); + for (const t of restBased) { + if (t.kind === 'subagent' && t.agentId !== undefined && !restByAgentId.has(t.agentId)) { + restByAgentId.set(t.agentId, t); + } + } const foldedRestIds = new Set(); const merged = liveSubagents.map((live) => { const rest = - live.backgroundTaskId !== undefined ? restById.get(live.backgroundTaskId) : undefined; + (live.backgroundTaskId !== undefined ? restById.get(live.backgroundTaskId) : undefined) ?? + restByAgentId.get(live.id) ?? + (live.agentId !== undefined ? restByAgentId.get(live.agentId) : undefined); if (rest === undefined) return live; foldedRestIds.add(rest.id); // True when the fold — not the event stream — is what makes the row terminal. diff --git a/apps/pythinker-web/test/daemon-contracts.test.ts b/apps/pythinker-web/test/daemon-contracts.test.ts index 5b293e859..0c3be58ab 100644 --- a/apps/pythinker-web/test/daemon-contracts.test.ts +++ b/apps/pythinker-web/test/daemon-contracts.test.ts @@ -101,6 +101,29 @@ describe('dynamic workflow daemon contracts', () => { ); }); + it('maps run_in_background explicitly instead of defaulting subagents to background', () => { + const foreground = toAppTask({ + id: 'task_fg', + session_id: 'ses_1', + kind: 'subagent', + description: 'Foreground review', + status: 'running', + created_at: now, + run_in_background: false, + }); + const background = toAppTask({ + id: 'task_bg', + session_id: 'ses_1', + kind: 'subagent', + description: 'Background review', + status: 'running', + created_at: now, + run_in_background: true, + }); + expect(foreground.runInBackground).toBe(false); + expect(background.runInBackground).toBe(true); + }); + it('loads one subagent transcript from the agent-scoped transcript route', async () => { const fetchMock = vi.fn().mockResolvedValueOnce(okEnvelope({ agent_id: 'agent_1', diff --git a/apps/pythinker-web/test/lib-logic.test.ts b/apps/pythinker-web/test/lib-logic.test.ts index b87b658ed..170d686d3 100644 --- a/apps/pythinker-web/test/lib-logic.test.ts +++ b/apps/pythinker-web/test/lib-logic.test.ts @@ -887,4 +887,33 @@ describe('keepLiveSubagents', () => { expect(merged?.outputPreview).toBe('final result'); expect(merged?.outputBytes).toBe(200); }); + + it('folds a REST foreground copy into the WS row by agent id', () => { + // Foreground workflow agents also appear in REST /tasks while running, + // keyed by their task id; only the agent id links them to the WS row. + const live = subagent('agent-1', { + runInBackground: false, + outputLines: ['step 1'], + }); + const rest = [ + subagent('task-5', { runInBackground: false, agentId: 'agent-1' }), + ]; + const merged = keepLiveSubagents(rest, [live]); + expect(merged).toHaveLength(1); + expect(merged[0]?.id).toBe('agent-1'); + expect(merged[0]?.runInBackground).toBe(false); + expect(merged[0]?.outputLines).toEqual(['step 1']); + }); + + it('folds the REST copy into the row matched via its own agentId field', () => { + // A WS row whose id is neither the REST task id nor the agent id (late + // synthesized row) still folds when it carries the agent id. + const live = subagent('synth-1', { agentId: 'agent-1' }); + const rest = [ + subagent('task-5', { runInBackground: false, agentId: 'agent-1' }), + ]; + const merged = keepLiveSubagents(rest, [live]); + expect(merged).toHaveLength(1); + expect(merged[0]?.id).toBe('synth-1'); + }); }); diff --git a/packages/agent-gateway/src/protocol/task.ts b/packages/agent-gateway/src/protocol/task.ts index f1c9420c5..1f0309530 100644 --- a/packages/agent-gateway/src/protocol/task.ts +++ b/packages/agent-gateway/src/protocol/task.ts @@ -30,5 +30,6 @@ export const taskSchema = z.object({ agent_id: z.string().optional(), subagent_type: z.string().optional(), parent_tool_call_id: z.string().optional(), + run_in_background: z.boolean().optional(), }); export type Task = z.infer; diff --git a/packages/agent-gateway/src/routes/tasks.ts b/packages/agent-gateway/src/routes/tasks.ts index a714e6c66..834135e5c 100644 --- a/packages/agent-gateway/src/routes/tasks.ts +++ b/packages/agent-gateway/src/routes/tasks.ts @@ -272,6 +272,7 @@ function toWireTask( status, created_at: createdIso, started_at: createdIso, + run_in_background: info.detached !== false, }; if (info.endedAt !== null && info.endedAt !== undefined) { base.completed_at = new Date(info.endedAt).toISOString(); diff --git a/packages/agent-gateway/test/tasks.test.ts b/packages/agent-gateway/test/tasks.test.ts index bf04d31e1..dd713f1da 100644 --- a/packages/agent-gateway/test/tasks.test.ts +++ b/packages/agent-gateway/test/tasks.test.ts @@ -38,6 +38,7 @@ interface TaskWire { agent_id?: string; subagent_type?: string; parent_tool_call_id?: string; + run_in_background?: boolean; } interface ListWire { @@ -214,6 +215,7 @@ describe('server-v2 /api/v1/sessions/{sid}/tasks', () => { agent_id: 'sub-1', subagent_type: 'explore', parent_tool_call_id: 'call-parent-1', + run_in_background: true, }); expect(byId.get(agentId)?.command).toBeUndefined(); @@ -231,6 +233,23 @@ describe('server-v2 /api/v1/sessions/{sid}/tasks', () => { expect(byId.get(questionId)?.parent_tool_call_id).toBeUndefined(); }); + it('reports run_in_background false for a foreground (non-detached) task', async () => { + const id = await createSession(); + const tasks = await mainAgentTasks(id); + const foregroundId = tasks.registerTask(fakeTask('agent'), { detached: false }); + await flush(); + + const listed = await getJson(`/api/v1/sessions/${id}/tasks`); + expect(listed.body.code).toBe(0); + const entry = listed.body.data.items.find((t) => t.id === foregroundId); + expect(entry).toMatchObject({ kind: 'subagent', status: 'running' }); + expect(entry?.run_in_background).toBe(false); + + const got = await getJson(`/api/v1/sessions/${id}/tasks/${foregroundId}`); + expect(got.body.code).toBe(0); + expect(got.body.data.run_in_background).toBe(false); + }); + it('filters the list by wire status', async () => { const id = await createSession(); const tasks = await mainAgentTasks(id); From 3fdab2cbf7382a35d396bee5eaf7bb5cdd85fa78 Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 21 Aug 2026 23:28:18 -0400 Subject: [PATCH 10/15] fix(core-v2): abort stalled LLM streams with a configurable idle watchdog --- .../agent-core-v2/docs/config-manifest.toml | 12 +- .../agent/llmRequester/llmRequesterService.ts | 65 +++++++++- .../src/app/kosongConfig/configSection.ts | 10 ++ .../llmRequester/llmRequesterService.test.ts | 113 +++++++++++++++++- 4 files changed, 195 insertions(+), 5 deletions(-) diff --git a/packages/agent-core-v2/docs/config-manifest.toml b/packages/agent-core-v2/docs/config-manifest.toml index 059544d36..3cc3cfd21 100644 --- a/packages/agent-core-v2/docs/config-manifest.toml +++ b/packages/agent-core-v2/docs/config-manifest.toml @@ -8,7 +8,7 @@ # commented "# field: type" lines describe the remaining schema fields. # Values resolve as: default -> config.toml -> env overlay -> memory. -# Index (26 sections · 2 overlay(s)) +# Index (27 sections · 2 overlay(s)) # advisor src/session/advisor/configSection.ts # background src/agent/task/configSection.ts # builtinProductSkills src/app/skillCatalog/configSection.ts @@ -21,6 +21,7 @@ # hooks src/features/externalHooks/configSection.ts # identity src/app/agentIdentity/configSection.ts # image src/agent/media/configSection.ts +# llm src/app/kosongConfig/configSection.ts # loopControl src/agent/loop/configSection.ts # mcp src/app/mcpConfig/configSection.ts # mergeAllAvailableSkills src/app/skillCatalog/configSection.ts @@ -187,6 +188,15 @@ extra_skill_dirs = [] # max_edge_px: integer # read_byte_budget: integer +# ########################################################################## +# llm +# owner: src/app/kosongConfig/configSection.ts +# scope: core +# ########################################################################## + +[llm] +# request_idle_timeout_ms: integer + # ########################################################################## # loopControl (config.toml: loop_control) # owner: src/agent/loop/configSection.ts diff --git a/packages/agent-core-v2/src/agent/llmRequester/llmRequesterService.ts b/packages/agent-core-v2/src/agent/llmRequester/llmRequesterService.ts index 45dc08dbe..db4a6003b 100644 --- a/packages/agent-core-v2/src/agent/llmRequester/llmRequesterService.ts +++ b/packages/agent-core-v2/src/agent/llmRequester/llmRequesterService.ts @@ -19,6 +19,7 @@ import { IConfigService } from '#/app/config/config'; import { APIRequestTooLargeError, APIStatusError, + APITimeoutError, classifyApiError, isImageFormatError, isRecoverableRequestStructureError, @@ -41,7 +42,7 @@ import type { ModelOverrides } from '#/kosong/model/model.types'; import { IModelService } from '#/kosong/model/model'; import { completionBudgetParams, resolveCompletionBudget } from '#/kosong/model/completionBudget'; import { resolveThinkingKeep, type ThinkingConfig } from '#/kosong/model/thinking'; -import { THINKING_SECTION } from '#/app/kosongConfig/configSection'; +import { THINKING_SECTION, LLM_SECTION, type LlmConfig } from '#/app/kosongConfig/configSection'; import type { Protocol } from '#/kosong/protocol/protocol'; import type { ApiErrorEvent } from '#/app/telemetry/events'; import { ITelemetryService } from '#/app/telemetry/telemetry'; @@ -71,7 +72,7 @@ import { type LlmRequestPayload, type LlmRequestToolSchema, } from './llmRequestOps'; -import { isAbortError } from '#/_base/utils/abort'; +import { isAbortError, linkAbortSignal } from '#/_base/utils/abort'; import { ErrorCodes, Error2, unwrapErrorCause } from '#/errors'; import { retryErrorFields } from '#/_base/utils/retry'; @@ -82,6 +83,10 @@ const EMPTY_TOOL_PARAMETERS: Record = { const noopOnPart: AgentLLMRequestPartHandler = () => {}; +const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 180_000; + +const STREAM_STALL_REASON = { reason: 'llm-stream-idle-timeout' }; + interface ResolvedLLMRequest { readonly requester: ModelRequester; readonly model: Model; @@ -363,11 +368,19 @@ export class AgentLLMRequesterService implements IAgentLLMRequesterService { onRequestTrace(normalized); }; + const idleTimeoutMs = + this.config.get(LLM_SECTION)?.requestIdleTimeoutMs ?? + DEFAULT_STREAM_IDLE_TIMEOUT_MS; + const stall = createStreamStallWatchdog(idleTimeoutMs); + const unlinkOuter = + signal === undefined ? undefined : linkAbortSignal(signal, stall.controller); + try { - for await (const event of request.requester.request(input, signal, { + for await (const event of request.requester.request(input, stall.signal, { ...request.params, onTraceId: setTraceId, })) { + stall.touch(); switch (event.type) { case 'part': await onPart(this.normalizeStreamPart(toolCallIds, event.part)); @@ -408,8 +421,17 @@ export class AgentLLMRequesterService implements IAgentLLMRequesterService { } } catch (error) { toolCallIds.rollback(); + if (stall.fired && signal?.aborted !== true) { + throw new APITimeoutError( + `LLM provider stream stalled: no events received for ${String(Math.round(idleTimeoutMs / 1000))}s.`, + ); + } throw error; } + finally { + stall.dispose(); + unlinkOuter?.(); + } void this.usage.record( this.scopeContext.agentContext, @@ -833,6 +855,43 @@ function fingerprint(content: string): string { return createHash('sha256').update(content).digest('hex'); } +interface StreamStallWatchdog { + readonly controller: AbortController; + readonly signal: AbortSignal; + readonly fired: boolean; + touch(): void; + dispose(): void; +} + +function createStreamStallWatchdog(idleTimeoutMs: number): StreamStallWatchdog { + const controller = new AbortController(); + let timer: ReturnType | undefined; + let fired = false; + const arm = (): void => { + if (idleTimeoutMs <= 0) return; + if (timer !== undefined) clearTimeout(timer); + timer = setTimeout(() => { + timer = undefined; + fired = true; + controller.abort(STREAM_STALL_REASON); + }, idleTimeoutMs); + timer.unref?.(); + }; + arm(); + return { + controller, + signal: controller.signal, + get fired() { + return fired; + }, + touch: arm, + dispose: () => { + if (timer !== undefined) clearTimeout(timer); + timer = undefined; + }, + }; +} + function apiStatusCode(error: unknown): number | undefined { const raw = unwrapErrorCause(error); if (raw instanceof APIStatusError) return raw.statusCode; diff --git a/packages/agent-core-v2/src/app/kosongConfig/configSection.ts b/packages/agent-core-v2/src/app/kosongConfig/configSection.ts index d32ce6973..34375538e 100644 --- a/packages/agent-core-v2/src/app/kosongConfig/configSection.ts +++ b/packages/agent-core-v2/src/app/kosongConfig/configSection.ts @@ -295,3 +295,13 @@ export const ModelCatalogConfigSchema = z.object({ export type ModelCatalogConfig = z.infer; registerConfigSection(MODEL_CATALOG_SECTION, ModelCatalogConfigSchema); + +export const LLM_SECTION = 'llm'; + +export const LlmConfigSchema = z.object({ + requestIdleTimeoutMs: z.number().int().min(0).optional(), +}); + +export type LlmConfig = z.infer; + +registerConfigSection(LLM_SECTION, LlmConfigSchema); diff --git a/packages/agent-core-v2/test/agent/llmRequester/llmRequesterService.test.ts b/packages/agent-core-v2/test/agent/llmRequester/llmRequesterService.test.ts index 5df2000f8..7906c99a1 100644 --- a/packages/agent-core-v2/test/agent/llmRequester/llmRequesterService.test.ts +++ b/packages/agent-core-v2/test/agent/llmRequester/llmRequesterService.test.ts @@ -24,6 +24,7 @@ import { IAgentToolSelectService } from '#/agent/toolSelect/toolSelect'; import { IAgentMediaResolverService } from '#/agent/media/mediaResolver'; import { ISessionUsageService } from '#/session/usage/sessionUsage'; import { IConfigService } from '#/app/config/config'; +import type { LlmConfig } from '#/app/kosongConfig/configSection'; import type { Event2 } from '#/app/event/event2'; import { IEventBus } from '#/app/event/eventBus'; import { @@ -31,6 +32,7 @@ import { APIEmptyResponseError, APIRequestTooLargeError, APIStatusError, + APITimeoutError, } from '#/kosong/contract/errors'; import { emptyUsage, type TokenUsage } from '#/kosong/contract/usage'; import { @@ -160,6 +162,7 @@ function createService( readonly thinkingLevel?: ThinkingEffort; readonly mediaResolver?: Partial; readonly contextMessages?: Message[]; + readonly llmConfig?: LlmConfig; } = {}, ) { const ix = disposables.add(new TestInstantiationService()); @@ -202,7 +205,8 @@ function createService( }; const tools = { list: () => [] }; const config: Partial = { - get: (() => undefined) as IConfigService['get'], + get: ((domain: string) => + domain === 'llm' ? options.llmConfig : undefined) as IConfigService['get'], }; const log = { info: () => undefined, warn: () => undefined }; const telemetryRecords: TelemetryRecord[] = []; @@ -912,3 +916,110 @@ describe('AgentLLMRequesterService tool call id normalization', () => { expect(result.message.toolCalls[0]!.id).toBe('Bash_0__2'); }); }); + +function createStallingRequester(options: { + readonly hangForever?: boolean; + readonly partGapMs?: number; + readonly partCount?: number; +} = {}): ModelRequester { + const model: Model = { + id: 'm', + name: 'wire-model', + aliases: [], + protocol: 'anthropic', + baseUrl: 'https://example.test', + headers: {}, + capabilities, + maxContextSize: 1000, + alwaysThinking: false, + providerName: 'p', + authProvider: { getAuth: async () => undefined }, + }; + return { + model, + request: async function* (_input, signal) { + const partCount = options.partCount ?? 0; + const rejectOnAbort = (): Promise => { + if (signal?.aborted === true) { + return Promise.reject(signal.reason ?? new Error('aborted')); + } + const aborted = new Promise((_, reject) => { + signal?.addEventListener( + 'abort', + () => reject(signal.reason ?? new Error('aborted')), + { once: true }, + ); + }); + void aborted.catch(() => {}); + return aborted; + }; + for (let index = 0; index < partCount; index += 1) { + yield { + type: 'part', + part: { type: 'text', text: `chunk ${index}` }, + } satisfies ModelRequestEvent; + await new Promise((resolve) => setTimeout(resolve, options.partGapMs ?? 0)); + } + if (options.hangForever === true) { + await rejectOnAbort(); + } + yield { + type: 'finish', + message: { role: 'assistant', content: [{ type: 'text', text: 'ok' }], toolCalls: [] }, + providerFinishReason: 'completed', + rawFinishReason: 'stop', + id: 'resp-1', + }; + }, + }; +} + +describe('AgentLLMRequesterService stream stall watchdog', () => { + afterEach(() => { + vi.useRealTimers(); + }); + + it('fails a stream that never delivers events with APITimeoutError', async () => { + vi.useFakeTimers(); + const { service } = createService(createStallingRequester({ hangForever: true }), undefined, { + llmConfig: { requestIdleTimeoutMs: 1_000 }, + }); + + const pending = service.request(); + const settled = expect(pending).rejects.toThrow(APITimeoutError); + await vi.advanceTimersByTimeAsync(1_500); + await settled; + }); + + it('keeps a slow but progressing stream alive until it finishes', async () => { + vi.useFakeTimers(); + const { service } = createService( + createStallingRequester({ partGapMs: 600, partCount: 3 }), + undefined, + { llmConfig: { requestIdleTimeoutMs: 1_000 } }, + ); + + const pending = service.request(); + for (let tick = 0; tick < 20; tick += 1) { + await vi.advanceTimersByTimeAsync(300); + } + const result = await pending; + expect(result.message.content).toEqual([{ type: 'text', text: 'ok' }]); + }); + + it('surfaces an outer user abort instead of the idle timeout', async () => { + vi.useFakeTimers(); + const controller = new AbortController(); + const { service } = createService(createStallingRequester({ hangForever: true }), undefined, { + llmConfig: { requestIdleTimeoutMs: 60_000 }, + }); + + const pending = service.request({}, undefined, controller.signal); + const settled = expect(pending).rejects.toThrow('user cancelled'); + controller.abort(new Error('user cancelled')); + await vi.advanceTimersByTimeAsync(100); + await settled; + const error = await pending.catch((caught: unknown) => caught); + expect(error).not.toBeInstanceOf(APITimeoutError); + }); +}); From f5e54a0f903a75f01b5b24ead706a42ad65110a0 Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 21 Aug 2026 23:28:18 -0400 Subject: [PATCH 11/15] feat(web): file-type icons, onboarding refresh, and rebuilt bundle --- .changeset/subagent-cards-stuck-running.md | 5 + ...-CuG5i4rb.js => CodeBlockNode-CWWX6v_C.js} | 4 +- ...hcAOkq.js => DesignSystemView-D-vmFZBh.js} | 2 +- ...ooltip-CQOv8A5U.js => Tooltip-CaPKESQ9.js} | 2 +- .../{arc-DI2D4QPc.js => arc-C0kd501p.js} | 2 +- ... architectureDiagram-3BPJPVTR-Bbumbe5O.js} | 2 +- ...f.js => blockDiagram-GPEHLZMM-CYOlWnRw.js} | 2 +- ...zD0s.js => c4Diagram-AAUBKEIU-n7KpkP5u.js} | 2 +- .../dist-web/assets/channel-DmsKuGC5.js | 1 + .../dist-web/assets/channel-efrhVSpc.js | 1 - ...VeUyViKL.js => chunk-2J33WTMH-DtergGMb.js} | 2 +- ...Df7H4Pbw.js => chunk-4BX2VUAB-DHez2dpA.js} | 2 +- ...anBFgZU6.js => chunk-55IACEB6-BuzvVrQ6.js} | 2 +- ...BrYyR5Bn.js => chunk-727SXJPM-CnzKhSUz.js} | 2 +- ...936iwDDD.js => chunk-AQP2D5EJ-Wd9kV9EQ.js} | 2 +- ...ZEd_TODf.js => chunk-FMBD7UC4-B_DrLljO.js} | 2 +- ...CeYe8rvb.js => chunk-ND2GUHAM-B0b4a7yH.js} | 2 +- ...B6GDpV6h.js => chunk-QZHKN3VN-SK1ytu-J.js} | 2 +- .../assets/classDiagram-4FO5ZUOK-2GxwnCPM.js | 1 - .../assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js | 1 + .../classDiagram-v2-Q7XG4LA2-2GxwnCPM.js | 1 - .../classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js | 1 + ..._.js => cose-bilkent-S5V4N54A-C4dXj3jJ.js} | 2 +- ...CQ5sq_l2.js => dagre-BM42HDAG-nD5EHTND.js} | 2 +- ...doZfbi.js => diagram-2AECGRRQ-LJvPRmt6.js} | 2 +- ...candbe.js => diagram-5GNKFQAL-B0JKA6yS.js} | 2 +- ...nRxl1j.js => diagram-KO2AKTUF-y70M5fzs.js} | 2 +- ...dO95EA.js => diagram-LMA3HP47-BRRoF6Yv.js} | 2 +- ...Ik_zMC.js => diagram-OG6HWLK6-CGgx3Kmb.js} | 2 +- ...qXxL.js => erDiagram-TEJ5UH35-BLZpvXyd.js} | 2 +- ...VI.js => flowDiagram-I6XJVG4X-DFhQq6QC.js} | 2 +- ...S.js => ganttDiagram-6RSMTGT7-CqxQlRCC.js} | 2 +- ...s => gitGraphDiagram-PVQCEYII-DY42jPcw.js} | 2 +- .../dist-web/assets/index-BMmTKsPq.js | 432 - .../dist-web/assets/index-DIKFd2HX.js | 788 ++ .../{index-Cm2yfvYH.js => index-Do14PFFJ.js} | 2 +- .../dist-web/assets/index-Dtbq6GMe.css | 1 + .../{index-6eeNofm6.js => index-PV1tBcd1.js} | 2 +- .../{index-PS4nWdvH.js => index-h7JVUjRK.js} | 4 +- .../dist-web/assets/index-wWN4iTUD.css | 1 - ...ndex10-BQgn6eNW.js => index10-B-QFuB1E.js} | 2 +- ...ndex11-Dc3KsH1m.js => index11-Bg3KTJTT.js} | 2 +- ...{index5-Def2Zrxa.js => index5-C6_B7c7s.js} | 2 +- ...{index6-DW8kHBOa.js => index6-CbqH2xuy.js} | 2 +- ...{index7-60leHAn4.js => index7-jzQI_2EW.js} | 2 +- ...{index8-Q1qyQj7P.js => index8-AKH_K48q.js} | 2 +- ...MJ.js => infoDiagram-5YYISTIA-D-gF4cvM.js} | 2 +- ...s => ishikawaDiagram-YF4QCWOH-DnTmC5d1.js} | 2 +- ...js => journeyDiagram-JHISSGLW-BwbHSZEo.js} | 2 +- ...=> kanban-definition-UN3LZRKU-DhFyuXPF.js} | 2 +- ...{linear-BB9wM_yi.js => linear-CU8cUEmf.js} | 2 +- ...e-Dza7SVX6.js => mermaid.core-Br9os_fu.js} | 8 +- ...> mindmap-definition-RKZ34NQL-C1ndCtIg.js} | 2 +- ...7rN.js => pieDiagram-4H26LBE5-DBtWVqxn.js} | 2 +- ...s => quadrantDiagram-W4KKPZXB-CXPNjDUM.js} | 2 +- ...> requirementDiagram-4Y6WPE33-DlRBE0As.js} | 2 +- ....js => sankeyDiagram-5OEKKPKP-CY9osFgO.js} | 2 +- ...s => sequenceDiagram-3UESZ5HK-BXlYwX6o.js} | 2 +- ...I.js => stateDiagram-AJRCARHV-BXAoQHsC.js} | 2 +- .../stateDiagram-v2-BHNVJYJU-C0UVZ_Zs.js | 1 + .../stateDiagram-v2-BHNVJYJU-DoCeX-_x.js | 1 - ... timeline-definition-PNZ67QCA-c27EAyQ1.js} | 2 +- ...9k.js => vennDiagram-CIIHVFJN-DGd15xGp.js} | 2 +- ...js => vue.runtime.esm-bundler-BsPCY7QS.js} | 2 +- ...9wBWEv.js => wardley-L42UT6IY-Bnsl155y.js} | 2 +- ...js => wardleyDiagram-YWT4CUSO-C3z-e_Vs.js} | 2 +- ...js => xychartDiagram-2RQKCTM6-CGUbgI42.js} | 2 +- apps/pythinker-code/dist-web/index.html | 4 +- apps/pythinker-web/package.json | 6 +- .../scripts/generate-file-icons.mjs | 128 + .../src/components/PythinkerLogo.vue | 6 +- .../src/components/chat/ActivityRun.vue | 23 +- .../src/components/chat/Composer.vue | 23 +- .../src/components/chat/ThinkingBlock.vue | 5 +- .../src/components/chat/TurnFilesSummary.vue | 4 + .../src/components/chat/WorkingIndicator.vue | 10 +- .../components/chat/tool-calls/EditTool.vue | 11 + .../components/chat/tool-calls/ReadTool.vue | 11 + .../src/components/settings/Onboarding.vue | 440 +- .../components/settings/ProvidersPanel.vue | 342 +- .../components/settings/SettingsDialog.vue | 2 +- apps/pythinker-web/src/components/ui/Icon.vue | 17 +- .../src/components/ui/ThinkingBulb.vue | 156 + .../composables/client/useWorkspaceState.ts | 63 + .../src/composables/usePythinkerWebClient.ts | 32 +- .../src/i18n/locales/en/onboarding.ts | 10 +- .../src/i18n/locales/en/providers.ts | 2 + .../src/icons/pythinker/cute-bot.svg | 106 + .../src/icons/pythinker/folder-open.svg | 61 +- .../src/icons/pythinker/loading-spinner.svg | 53 + .../src/icons/pythinker/search.svg | 58 +- .../src/icons/pythinker/setting.svg | 26 +- .../src/icons/pythinker/terminal.svg | 131 + .../src/icons/pythinker/thinking.svg | 4 +- apps/pythinker-web/src/lib/fileIcons.test.ts | 72 + apps/pythinker-web/src/lib/fileIcons.ts | 104 + apps/pythinker-web/src/lib/fileIconsData.ts | 9210 +++++++++++++++++ apps/pythinker-web/src/lib/icons.test.ts | 94 +- apps/pythinker-web/src/lib/icons.ts | 131 +- apps/pythinker-web/src/style.css | 37 + .../test/workspace-state.test.ts | 96 + pnpm-lock.yaml | 91 +- 102 files changed, 12076 insertions(+), 846 deletions(-) create mode 100644 .changeset/subagent-cards-stuck-running.md rename apps/pythinker-code/dist-web/assets/{CodeBlockNode-CuG5i4rb.js => CodeBlockNode-CWWX6v_C.js} (99%) rename apps/pythinker-code/dist-web/assets/{DesignSystemView-NShcAOkq.js => DesignSystemView-D-vmFZBh.js} (99%) rename apps/pythinker-code/dist-web/assets/{Tooltip-CQOv8A5U.js => Tooltip-CaPKESQ9.js} (98%) rename apps/pythinker-code/dist-web/assets/{arc-DI2D4QPc.js => arc-C0kd501p.js} (98%) rename apps/pythinker-code/dist-web/assets/{architectureDiagram-3BPJPVTR-DrgTjmD3.js => architectureDiagram-3BPJPVTR-Bbumbe5O.js} (99%) rename apps/pythinker-code/dist-web/assets/{blockDiagram-GPEHLZMM-7dIEisVf.js => blockDiagram-GPEHLZMM-CYOlWnRw.js} (99%) rename apps/pythinker-code/dist-web/assets/{c4Diagram-AAUBKEIU-CqrVzD0s.js => c4Diagram-AAUBKEIU-n7KpkP5u.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js delete mode 100644 apps/pythinker-code/dist-web/assets/channel-efrhVSpc.js rename apps/pythinker-code/dist-web/assets/{chunk-2J33WTMH-VeUyViKL.js => chunk-2J33WTMH-DtergGMb.js} (87%) rename apps/pythinker-code/dist-web/assets/{chunk-4BX2VUAB-Df7H4Pbw.js => chunk-4BX2VUAB-DHez2dpA.js} (71%) rename apps/pythinker-code/dist-web/assets/{chunk-55IACEB6-anBFgZU6.js => chunk-55IACEB6-BuzvVrQ6.js} (72%) rename apps/pythinker-code/dist-web/assets/{chunk-727SXJPM-BrYyR5Bn.js => chunk-727SXJPM-CnzKhSUz.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-AQP2D5EJ-936iwDDD.js => chunk-AQP2D5EJ-Wd9kV9EQ.js} (99%) rename apps/pythinker-code/dist-web/assets/{chunk-FMBD7UC4-ZEd_TODf.js => chunk-FMBD7UC4-B_DrLljO.js} (83%) rename apps/pythinker-code/dist-web/assets/{chunk-ND2GUHAM-CeYe8rvb.js => chunk-ND2GUHAM-B0b4a7yH.js} (96%) rename apps/pythinker-code/dist-web/assets/{chunk-QZHKN3VN-B6GDpV6h.js => chunk-QZHKN3VN-SK1ytu-J.js} (67%) delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-2GxwnCPM.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js delete mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-2GxwnCPM.js create mode 100644 apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js rename apps/pythinker-code/dist-web/assets/{cose-bilkent-S5V4N54A-lwbIYhF_.js => cose-bilkent-S5V4N54A-C4dXj3jJ.js} (99%) rename apps/pythinker-code/dist-web/assets/{dagre-BM42HDAG-CQ5sq_l2.js => dagre-BM42HDAG-nD5EHTND.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-2AECGRRQ-CpdoZfbi.js => diagram-2AECGRRQ-LJvPRmt6.js} (96%) rename apps/pythinker-code/dist-web/assets/{diagram-5GNKFQAL-BBcandbe.js => diagram-5GNKFQAL-B0JKA6yS.js} (90%) rename apps/pythinker-code/dist-web/assets/{diagram-KO2AKTUF-D8nRxl1j.js => diagram-KO2AKTUF-y70M5fzs.js} (98%) rename apps/pythinker-code/dist-web/assets/{diagram-LMA3HP47-D0dO95EA.js => diagram-LMA3HP47-BRRoF6Yv.js} (93%) rename apps/pythinker-code/dist-web/assets/{diagram-OG6HWLK6-DeIk_zMC.js => diagram-OG6HWLK6-CGgx3Kmb.js} (97%) rename apps/pythinker-code/dist-web/assets/{erDiagram-TEJ5UH35-DqreqXxL.js => erDiagram-TEJ5UH35-BLZpvXyd.js} (99%) rename apps/pythinker-code/dist-web/assets/{flowDiagram-I6XJVG4X-J83xwYVI.js => flowDiagram-I6XJVG4X-DFhQq6QC.js} (99%) rename apps/pythinker-code/dist-web/assets/{ganttDiagram-6RSMTGT7-LeaK0Z0S.js => ganttDiagram-6RSMTGT7-CqxQlRCC.js} (99%) rename apps/pythinker-code/dist-web/assets/{gitGraphDiagram-PVQCEYII-BuZXSVal.js => gitGraphDiagram-PVQCEYII-DY42jPcw.js} (99%) delete mode 100644 apps/pythinker-code/dist-web/assets/index-BMmTKsPq.js create mode 100644 apps/pythinker-code/dist-web/assets/index-DIKFd2HX.js rename apps/pythinker-code/dist-web/assets/{index-Cm2yfvYH.js => index-Do14PFFJ.js} (99%) create mode 100644 apps/pythinker-code/dist-web/assets/index-Dtbq6GMe.css rename apps/pythinker-code/dist-web/assets/{index-6eeNofm6.js => index-PV1tBcd1.js} (99%) rename apps/pythinker-code/dist-web/assets/{index-PS4nWdvH.js => index-h7JVUjRK.js} (99%) delete mode 100644 apps/pythinker-code/dist-web/assets/index-wWN4iTUD.css rename apps/pythinker-code/dist-web/assets/{index10-BQgn6eNW.js => index10-B-QFuB1E.js} (99%) rename apps/pythinker-code/dist-web/assets/{index11-Dc3KsH1m.js => index11-Bg3KTJTT.js} (99%) rename apps/pythinker-code/dist-web/assets/{index5-Def2Zrxa.js => index5-C6_B7c7s.js} (95%) rename apps/pythinker-code/dist-web/assets/{index6-DW8kHBOa.js => index6-CbqH2xuy.js} (98%) rename apps/pythinker-code/dist-web/assets/{index7-60leHAn4.js => index7-jzQI_2EW.js} (98%) rename apps/pythinker-code/dist-web/assets/{index8-Q1qyQj7P.js => index8-AKH_K48q.js} (99%) rename apps/pythinker-code/dist-web/assets/{infoDiagram-5YYISTIA-_4xxChMJ.js => infoDiagram-5YYISTIA-D-gF4cvM.js} (67%) rename apps/pythinker-code/dist-web/assets/{ishikawaDiagram-YF4QCWOH-Dy_kalDP.js => ishikawaDiagram-YF4QCWOH-DnTmC5d1.js} (99%) rename apps/pythinker-code/dist-web/assets/{journeyDiagram-JHISSGLW-DqDPR-oh.js => journeyDiagram-JHISSGLW-BwbHSZEo.js} (98%) rename apps/pythinker-code/dist-web/assets/{kanban-definition-UN3LZRKU-DcgrNp3n.js => kanban-definition-UN3LZRKU-DhFyuXPF.js} (99%) rename apps/pythinker-code/dist-web/assets/{linear-BB9wM_yi.js => linear-CU8cUEmf.js} (98%) rename apps/pythinker-code/dist-web/assets/{mermaid.core-Dza7SVX6.js => mermaid.core-Br9os_fu.js} (99%) rename apps/pythinker-code/dist-web/assets/{mindmap-definition-RKZ34NQL-BVhOkDo4.js => mindmap-definition-RKZ34NQL-C1ndCtIg.js} (98%) rename apps/pythinker-code/dist-web/assets/{pieDiagram-4H26LBE5-DSc9x7rN.js => pieDiagram-4H26LBE5-DBtWVqxn.js} (93%) rename apps/pythinker-code/dist-web/assets/{quadrantDiagram-W4KKPZXB-BQOrZ1N0.js => quadrantDiagram-W4KKPZXB-CXPNjDUM.js} (99%) rename apps/pythinker-code/dist-web/assets/{requirementDiagram-4Y6WPE33-CHMFEDkl.js => requirementDiagram-4Y6WPE33-DlRBE0As.js} (99%) rename apps/pythinker-code/dist-web/assets/{sankeyDiagram-5OEKKPKP-CPPhgIGR.js => sankeyDiagram-5OEKKPKP-CY9osFgO.js} (99%) rename apps/pythinker-code/dist-web/assets/{sequenceDiagram-3UESZ5HK-DUpWmDG7.js => sequenceDiagram-3UESZ5HK-BXlYwX6o.js} (99%) rename apps/pythinker-code/dist-web/assets/{stateDiagram-AJRCARHV-CPSVffGI.js => stateDiagram-AJRCARHV-BXAoQHsC.js} (97%) create mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-C0UVZ_Zs.js delete mode 100644 apps/pythinker-code/dist-web/assets/stateDiagram-v2-BHNVJYJU-DoCeX-_x.js rename apps/pythinker-code/dist-web/assets/{timeline-definition-PNZ67QCA-CFXewIop.js => timeline-definition-PNZ67QCA-c27EAyQ1.js} (99%) rename apps/pythinker-code/dist-web/assets/{vennDiagram-CIIHVFJN-DIdMGm9k.js => vennDiagram-CIIHVFJN-DGd15xGp.js} (99%) rename apps/pythinker-code/dist-web/assets/{vue.runtime.esm-bundler-C95Vw23-.js => vue.runtime.esm-bundler-BsPCY7QS.js} (98%) rename apps/pythinker-code/dist-web/assets/{wardley-L42UT6IY-Dr9wBWEv.js => wardley-L42UT6IY-Bnsl155y.js} (99%) rename apps/pythinker-code/dist-web/assets/{wardleyDiagram-YWT4CUSO-CsBGD_RZ.js => wardleyDiagram-YWT4CUSO-C3z-e_Vs.js} (99%) rename apps/pythinker-code/dist-web/assets/{xychartDiagram-2RQKCTM6-RQQvYamz.js => xychartDiagram-2RQKCTM6-CGUbgI42.js} (99%) create mode 100644 apps/pythinker-web/scripts/generate-file-icons.mjs create mode 100644 apps/pythinker-web/src/components/ui/ThinkingBulb.vue create mode 100644 apps/pythinker-web/src/icons/pythinker/cute-bot.svg create mode 100644 apps/pythinker-web/src/icons/pythinker/loading-spinner.svg create mode 100644 apps/pythinker-web/src/icons/pythinker/terminal.svg create mode 100644 apps/pythinker-web/src/lib/fileIcons.test.ts create mode 100644 apps/pythinker-web/src/lib/fileIcons.ts create mode 100644 apps/pythinker-web/src/lib/fileIconsData.ts diff --git a/.changeset/subagent-cards-stuck-running.md b/.changeset/subagent-cards-stuck-running.md new file mode 100644 index 000000000..d00f5d4f7 --- /dev/null +++ b/.changeset/subagent-cards-stuck-running.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix subagent cards in the web session view staying Running after they finish. diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-CuG5i4rb.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-CWWX6v_C.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/CodeBlockNode-CuG5i4rb.js rename to apps/pythinker-code/dist-web/assets/CodeBlockNode-CWWX6v_C.js index 4885e752f..eb05f7792 100644 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-CuG5i4rb.js +++ b/apps/pythinker-code/dist-web/assets/CodeBlockNode-CWWX6v_C.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-PS4nWdvH.js","assets/index-BMmTKsPq.js","assets/index-wWN4iTUD.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-BMmTKsPq.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-PS4nWdvH.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-h7JVUjRK.js","assets/index-DIKFd2HX.js","assets/index-Dtbq6GMe.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-DIKFd2HX.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-h7JVUjRK.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-NShcAOkq.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-D-vmFZBh.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/DesignSystemView-NShcAOkq.js rename to apps/pythinker-code/dist-web/assets/DesignSystemView-D-vmFZBh.js index f402a1244..5f3411177 100644 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-NShcAOkq.js +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-D-vmFZBh.js @@ -1,4 +1,4 @@ -import{M as x,aD as k,aI as C,aL as e,u as d,v as t,G as s,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as B,cz as b,cA as S}from"./index-BMmTKsPq.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},ea={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},da={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},sa={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},va={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ca={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(ya,{emit:y}){const w=y;function p(){w("close")}let c=null;function h(v){v.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;c=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>c.observe(i)),v.length&&v[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),c&&(c.disconnect(),c=null)}),(v,a)=>(e(),d("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=s('
      ',1)),t("main",A,[t("div",M,[a[44]||(a[44]=s('
      ● Design System · v1.0

      Pythinker Web Design System

      This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

      Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
      i
      This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
      01

      Design Principles

      Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

      • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
      • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
      • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
      • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
      • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
      • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
      • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
      Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
      i
      Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
      ',2)),t("section",H,[a[7]||(a[7]=s(`
      02

      Design Tokens

      Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

      i
      Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

      Color

      Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

      i
      The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
      bg
      #ffffff / #121212
      surface
      #fafbfc / #1f1f1f
      surface-sunken
      #f3f5f8 / #121212
      selected
      #eceff3 / #2d333b
      fg
      #14171c / #e8eaed
      fg-muted
      #6b7280 / #9aa0a8
      line
      #e7eaee / #2d333b
      accent (KMBlue)
      #1783ff / #58a6ff
      accent-soft
      #e8f3ff / rgba(88,166,255,.14)
      TokenLightDarkUsage
      --color-bg#ffffff#121212Page background
      --color-surface#fafbfc#1f1f1fPanel / sidebar / card head
      --color-surface-raised#ffffff#292929Raised card / dialog / input
      --color-text#14171c#e8eaedBody text / headings
      --color-text-muted#6b7280#9aa0a8Secondary text / placeholder
      --color-line#e7eaee#2d333bDivider / card border
      --color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
      --color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
      --color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
      --color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
      --color-sidebar-bg#fbfaf9#181817Sidebar surface — one step off --color-bg so the session column reads as its own plane
      --color-accent#1783ff#58a6ffPrimary action / link / focus
      --color-success#0e7a38#3fb950Success / pass
      --color-warning#a9610a#d29922Warning / pending
      --color-danger#c0392b#f85149Danger / error / abort

      Surface usage

      The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

      TokenLightDarkUsage
      --p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
      --p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
      --p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
      --p-bg#ffffff#121212Page background

      Focus ring

      All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

      TokenValueUsage
      --p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
      --p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

      Text selection

      The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

      Disabled state

      All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

      Font families

      Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

      --font-ui · UI & body (Inter first)

      Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

      --font-ui
      --font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
      +import{M as x,aD as k,aI as C,aL as e,u as d,v as t,G as s,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as B,cz as b,cA as S}from"./index-DIKFd2HX.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},ea={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},da={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},sa={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},va={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ca={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(ya,{emit:y}){const w=y;function p(){w("close")}let c=null;function h(v){v.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;c=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>c.observe(i)),v.length&&v[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),c&&(c.disconnect(),c=null)}),(v,a)=>(e(),d("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=s('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=s('
      ● Design System · v1.0

      Pythinker Web Design System

      This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

      Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
      i
      This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
      01

      Design Principles

      Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

      • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
      • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
      • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
      • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
      • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
      • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
      • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
      Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
      i
      Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
      ',2)),t("section",H,[a[7]||(a[7]=s(`
      02

      Design Tokens

      Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

      i
      Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

      Color

      Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

      i
      The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
      bg
      #ffffff / #121212
      surface
      #fafbfc / #1f1f1f
      surface-sunken
      #f3f5f8 / #121212
      selected
      #eceff3 / #2d333b
      fg
      #14171c / #e8eaed
      fg-muted
      #6b7280 / #9aa0a8
      line
      #e7eaee / #2d333b
      accent (KMBlue)
      #1783ff / #58a6ff
      accent-soft
      #e8f3ff / rgba(88,166,255,.14)
      TokenLightDarkUsage
      --color-bg#ffffff#121212Page background
      --color-surface#fafbfc#1f1f1fPanel / sidebar / card head
      --color-surface-raised#ffffff#292929Raised card / dialog / input
      --color-text#14171c#e8eaedBody text / headings
      --color-text-muted#6b7280#9aa0a8Secondary text / placeholder
      --color-line#e7eaee#2d333bDivider / card border
      --color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
      --color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
      --color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
      --color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
      --color-sidebar-bg#fbfaf9#181817Sidebar surface — one step off --color-bg so the session column reads as its own plane
      --color-accent#1783ff#58a6ffPrimary action / link / focus
      --color-success#0e7a38#3fb950Success / pass
      --color-warning#a9610a#d29922Warning / pending
      --color-danger#c0392b#f85149Danger / error / abort

      Surface usage

      The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

      TokenLightDarkUsage
      --p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
      --p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
      --p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
      --p-bg#ffffff#121212Page background

      Focus ring

      All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

      TokenValueUsage
      --p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
      --p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

      Text selection

      The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

      Disabled state

      All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

      Font families

      Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

      --font-ui · UI & body (Inter first)

      Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

      --font-ui
      --font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
             "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
             -apple-system, BlinkMacSystemFont, "Segoe UI",
             Roboto, Ubuntu, sans-serif,
      diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-CQOv8A5U.js b/apps/pythinker-code/dist-web/assets/Tooltip-CaPKESQ9.js
      similarity index 98%
      rename from apps/pythinker-code/dist-web/assets/Tooltip-CQOv8A5U.js
      rename to apps/pythinker-code/dist-web/assets/Tooltip-CaPKESQ9.js
      index 22927b7d6..e48bdc6b3 100644
      --- a/apps/pythinker-code/dist-web/assets/Tooltip-CQOv8A5U.js
      +++ b/apps/pythinker-code/dist-web/assets/Tooltip-CaPKESQ9.js
      @@ -1 +1 @@
      -import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-BMmTKsPq.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
      +import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-DIKFd2HX.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
      diff --git a/apps/pythinker-code/dist-web/assets/arc-DI2D4QPc.js b/apps/pythinker-code/dist-web/assets/arc-C0kd501p.js
      similarity index 98%
      rename from apps/pythinker-code/dist-web/assets/arc-DI2D4QPc.js
      rename to apps/pythinker-code/dist-web/assets/arc-C0kd501p.js
      index 7bd8ebd2e..a52acf233 100644
      --- a/apps/pythinker-code/dist-web/assets/arc-DI2D4QPc.js
      +++ b/apps/pythinker-code/dist-web/assets/arc-C0kd501p.js
      @@ -1 +1 @@
      -import{M as ln,N as an,O as Y,P as O,Q,R as un,S as y,T as tn,V as j,W as _,X as rn,Y as o,Z as on,$ as sn,a0 as fn}from"./mermaid.core-Dza7SVX6.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*ur*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),sy))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(Wy?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),sy))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(Wy?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(S,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),b=N.length,A=0;AT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,b,A,S,V,X=this.nodes,Z=X.length,D=0;DN&&(l=N),TA&&(g=A),dN&&(l=N),TA&&(g=A),d=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},w.exports=s}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),s=v.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,v=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],s=i[1]/v;i[0]t)return i[0]=f,i[1]=o,i[2]=v,i[3]=X,!1;if(rv)return i[0]=s,i[1]=r,i[2]=S,i[3]=t,!1;if(fv?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>v?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=V,i[3]=X,m=!0):(i[2]=S,i[3]=A,m=!0):E===y&&(v>f?(i[2]=b,i[3]=A,m=!0):(i[2]=Z,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:Q=A,x=v+-_/y,i[2]=x,i[3]=Q;break;case 2:x=Z,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=v+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,b=void 0,A=void 0,S=void 0,V=void 0,X=void 0,Z=void 0;return N=s-v,A=r-t,V=t*v-r*s,b=T-c,S=o-l,X=l*c-o*T,Z=N*S-b*A,Z===0?null:(g=(A*X-S*V)/Z,d=(b*V-N*X)/Z,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var s=0;s"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(N.push(A[0]);N.length>0&&c;){var S=N[0];N.splice(0,1),d.add(S);for(var V=S.getEdges(),g=0;g-1&&A.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(X,1);var Z=b.getNeighborsList();Z.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&S.push(n),T.set(n,p)}})}l=l.concat(S),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},w.exports=s}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||N>=g[0].length)){for(var b=0;br}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var U={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,b=i(551).Layout,A=i(551).Integer,S=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,Z=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),B=O[tt],O[tt]=O[H],O[H]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var Y=function(H,B){var tt=[],ht=[],J=new Z,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(M.y)),I=Math.floor(M.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(E-p)/Y,J=O;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;EQ&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return IR&&(R=$.getWidth())});var W=I/y,x=M/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return R>rt&&(rt=R),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function($,O){var H=W;return M.idealRowWidth?(H=I,H($.id,O.id)):H($,O)});for(var x=0,Q=0,z=0;z0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;RM&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)Y[0]+=this.grid[rt][M-1].length+this.grid[rt][M].length-1;if(I0)for(var rt=M;rt<=R;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=A.MAX_VALUE,O,H,B=0;B{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(s,o,c,l){f.call(this,s,o,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?N[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?N[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(P){var k=0,K=0,q=0,at=0;if(P.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?k++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?q++:at++}),k>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,P){E[P]=[F.position.x,F.position.y],y[P]=[d[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var P=l.alignmentConstraint.vertical,k=function(et){var j=new Set;P[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).x,P[et].forEach(function(pt){E[F]=[wt,N[g.get(pt)]],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},K=0;K0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).y,q[et].forEach(function(pt){E[F]=[d[g.get(pt)],wt],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,Y=rt);if(z0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,P){var k={x:d[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,q=X(K,k);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(F,P){d[P]+=Et.x}),N.forEach(function(F,P){N[P]+=Et.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(P){var k=new Set;Dt[P].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=Z(k).x,k.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=N[g.get(K.values().next().value)]:q=Z(k).y,k.forEach(function(at){R.has(at)||(N[g.get(at)]=q)})},Ft=0;Ft{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,G){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(b){T=!0,g=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var M=0;M1){N=g[0],b=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),X},v.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,b=void 0;try{for(var A=s.nodeIndexes[Symbol.iterator](),S;!(d=(S=A.next()).done);d=!0){var V=S.value,X=f(V,2),Z=X[0],D=X[1],_=o.cy.getElementById(Z);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;ml&&(l=p),Eg&&(g=y)}}}catch(x){N=!0,b=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw b}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+M})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=Y),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,b=void 0,A=void 0,S=void 0,V=t.descendants().not(":parent"),X=V.length,Z=0;ZN&&(l=N),TA&&(g=A),d{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var b=d.cy,A=d.eles,S=A.nodes(),V=A.edges(),X=void 0,Z=void 0,D=void 0,_={};d.randomize&&(X=N.nodeIndexes,Z=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(b,A),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(S),M,d),y(M,R,V),I(M,d),M.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,b){for(var A=0;A0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(S,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(o(A))}),A.quality=="default"||A.quality=="proof"){var M=S.collection();if(A.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var rt=M.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(M),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){A.eles=vt,Z.push(l(A,X[it])),t.relocateComponent(_[it],Z[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else Z[it][Ot.id()]&&mt.nodes.push({x:Z[it][Ot.id()].getLeft(),y:Z[it][Ot.id()].getTop(),width:Z[it][Ot.id()].getWidth(),height:Z[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else Z[it][Et.id()]&&Z[it][Dt.id()]&&mt.edges.push({startX:Z[it][Et.id()].getCenterX(),startY:Z[it][Et.id()].getCenterY(),endX:Z[it][Dt.id()].getCenterX(),endY:Z[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var tt=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(Z[vt]).forEach(function(it){var gt=Z[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=o(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(Z.push(l(A,X[0])),t.relocateComponent(_[0],Z[0],A)):t.relocateComponent(_[0],X[0],A)}var J=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return Z.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(S,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});A.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,A,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,b=new Map,A=[],S=[],V=[],X=[],Z=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,M=o.nodeSeparation,R=void 0,W=function(){for(var P=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=A[nt],lt=0;ltut&&(ut=Z[Lt],wt=Lt)}return wt},Q=function(P){var k=void 0;if(P){k=Math.floor(Math.random()*m);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(k.isParent()?A[P].push(b.get(k.id())):A[P].push(k.id()))})});var Nt=function(P){var k=N.get(P),K=void 0;d.get(P).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,A[k].push(K),A[N.get(K)].push(P)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=Be(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,G)=>C-G+2,"L"),R:dt((C,G)=>C-2,"R"),T:dt((C,G)=>C-G+2,"T"),B:dt((C,G)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const G=C;return G==="L"||G==="R"||G==="T"||G==="B"},"isArchitectureDirection"),Wt=dt(function(C){const G=C;return G==="L"||G==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const G=C;return G==="T"||G==="B"},"isArchitectureDirectionY"),me=dt(function(C,G){const w=Wt(C)&&qt(G),U=qt(C)&&Wt(G);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const G=C[0],w=C[1],U=Wt(G)&&qt(w),L=qt(G)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,G){const w=`${C}${G}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,G],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),G+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),G]:Wt(L)?[C+(L==="L"?1:-1),G+(U==="T"?1:-1)]:[C,G+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,G){return me(C,G)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=ir.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=qe,this.getAccTitle=Qe,this.setDiagramTitle=Je,this.getDiagramTitle=Ke,this.getAccDescription=je,this.setAccDescription=_e,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tr()}addService({id:C,icon:G,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:G,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:G}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(G!==void 0){if(C===G)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[G]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:G}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:G,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:G,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:G,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[G]===void 0&&this.groups[G]===void 0)throw new Error(`The right-hand id [${G}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[G].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${G}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:G,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[G]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[G].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},G=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const s=Ar(r.lhsDir,r.rhsDir);s!=="bend"&&(C[v]??={},C[v][t]=s,C[t]??={},C[t][v]=s)}if(r.lhsId===e){const s=pe(r.lhsDir,r.rhsDir);s&&(f[s]=r.rhsId)}else{const s=pe(r.rhsDir,r.lhsDir);s&&(f[s]=r.lhsId)}return f},{}),a),{}),w=Object.keys(G)[0],U={[w]:1},L=Object.keys(G).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=G[f],[v,t]=e[f];Object.entries(r).forEach(([s,o])=>{U[o]||(e[o]=Lr([v,t],s),i.push(o))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:G,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,G){this.elements[C]=G}getElementById(C){return this.elements[C]}getConfig(){return er({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,G)=>{lr(C,G),C.groups.map(w=>G.addGroup(w)),C.services.map(w=>G.addService({...w,type:"service"})),C.junctions.map(w=>G.addJunction({...w,type:"junction"})),C.edges.map(w=>G.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const G=await fr("architecture",C);Re.debug(G);const w=Pe.parser?.yy;if(!(w instanceof be))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dr(G,w)},"parse")},xr=dt(C=>`
      +import{b4 as Be,_ as dt,L as ke,af as Ze,l as Re,b as qe,a as Qe,q as Je,t as Ke,g as je,s as _e,A as tr,H as er,F as rr,I as ir,c as ye,aO as Ee,b5 as ve,i as ar,d as nr,y as or,b6 as sr,b7 as hr}from"./mermaid.core-Br9os_fu.js";import{p as lr}from"./chunk-4BX2VUAB-DHez2dpA.js";import{p as fr}from"./wardley-L42UT6IY-Bnsl155y.js";import{c as Se}from"./cytoscape.esm-nFXppDBa.js";import"./index-DIKFd2HX.js";var se={exports:{}},he={exports:{}},le={exports:{}},cr=le.exports,we;function gr(){return we||(we=1,(function(C,G){(function(U,L){C.exports=L()})(cr,function(){return(function(w){var U={};function L(u){if(U[u])return U[u].exports;var h=U[u]={i:u,l:!1,exports:{}};return w[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=w,L.c=U,L.i=function(u){return u},L.d=function(u,h,a){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(w,U,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,w.exports=u}),(function(w,U,L){var u=L(2),h=L(8),a=L(9);function e(f,r,v){u.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(f,r){for(var v=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(v.getOwner()==r)return v;if(v.getOwner()==t)break;v=v.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=e}),(function(w,U,L){function u(h){this.vGraphObject=h}w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(13),e=L(0),i=L(16),f=L(5);function r(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(u.prototype);for(var v in u)r[v]=u[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},r.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},r.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(S,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),b=N.length,A=0;AT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,b,A,S,V,X=this.nodes,Z=X.length,D=0;DN&&(l=N),TA&&(g=A),dN&&(l=N),TA&&(g=A),d=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},w.exports=s}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),s=v.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(e){if(e instanceof u){var i=e;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var r,v=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],s=i[1]/v;i[0]t)return i[0]=f,i[1]=o,i[2]=v,i[3]=X,!1;if(rv)return i[0]=s,i[1]=r,i[2]=S,i[3]=t,!1;if(fv?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>v?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=V,i[3]=X,m=!0):(i[2]=S,i[3]=A,m=!0):E===y&&(v>f?(i[2]=b,i[3]=A,m=!0):(i[2]=Z,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:Q=A,x=v+-_/y,i[2]=x,i[3]=Q;break;case 2:x=Z,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=v+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,b=void 0,A=void 0,S=void 0,V=void 0,X=void 0,Z=void 0;return N=s-v,A=r-t,V=t*v-r*s,b=T-c,S=o-l,X=l*c-o*T,Z=N*S-b*A,Z===0?null:(g=(A*X-S*V)/Z,d=(b*V-N*X)/Z,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var s=0;s"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(N.push(A[0]);N.length>0&&c;){var S=N[0];N.splice(0,1),d.add(S);for(var V=S.getEdges(),g=0;g-1&&A.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(X,1);var Z=b.getNeighborsList();Z.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&S.push(n),T.set(n,p)}})}l=l.concat(S),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},w.exports=s}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||N>=g[0].length)){for(var b=0;br}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var U={45:((a,e,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,b=i(551).Layout,A=i(551).Integer,S=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,Z=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),B=O[tt],O[tt]=O[H],O[H]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var Y=function(H,B){var tt=[],ht=[],J=new Z,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(M.y)),I=Math.floor(M.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(E-p)/Y,J=O;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;EQ&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return IR&&(R=$.getWidth())});var W=I/y,x=M/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return R>rt&&(rt=R),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function($,O){var H=W;return M.idealRowWidth?(H=I,H($.id,O.id)):H($,O)});for(var x=0,Q=0,z=0;z0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;RM&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)Y[0]+=this.grid[rt][M-1].length+this.grid[rt][M].length-1;if(I0)for(var rt=M;rt<=R;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=A.MAX_VALUE,O,H,B=0;B{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(s,o,c,l){f.call(this,s,o,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?N[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?N[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(P){var k=0,K=0,q=0,at=0;if(P.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?k++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?q++:at++}),k>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,P){E[P]=[F.position.x,F.position.y],y[P]=[d[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var P=l.alignmentConstraint.vertical,k=function(et){var j=new Set;P[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).x,P[et].forEach(function(pt){E[F]=[wt,N[g.get(pt)]],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},K=0;K0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).y,q[et].forEach(function(pt){E[F]=[d[g.get(pt)],wt],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,Y=rt);if(z0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,P){var k={x:d[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,q=X(K,k);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(F,P){d[P]+=Et.x}),N.forEach(function(F,P){N[P]+=Et.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(P){var k=new Set;Dt[P].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=Z(k).x,k.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=N[g.get(K.values().next().value)]:q=Z(k).y,k.forEach(function(at){R.has(at)||(N[g.get(at)]=q)})},Ft=0;Ft{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,G){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(b){T=!0,g=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var M=0;M1){N=g[0],b=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),X},v.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,b=void 0;try{for(var A=s.nodeIndexes[Symbol.iterator](),S;!(d=(S=A.next()).done);d=!0){var V=S.value,X=f(V,2),Z=X[0],D=X[1],_=o.cy.getElementById(Z);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;ml&&(l=p),Eg&&(g=y)}}}catch(x){N=!0,b=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw b}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+M})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=Y),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,b=void 0,A=void 0,S=void 0,V=t.descendants().not(":parent"),X=V.length,Z=0;ZN&&(l=N),TA&&(g=A),d{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var b=d.cy,A=d.eles,S=A.nodes(),V=A.edges(),X=void 0,Z=void 0,D=void 0,_={};d.randomize&&(X=N.nodeIndexes,Z=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(b,A),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(S),M,d),y(M,R,V),I(M,d),M.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,b){for(var A=0;A0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(S,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(o(A))}),A.quality=="default"||A.quality=="proof"){var M=S.collection();if(A.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var rt=M.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(M),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){A.eles=vt,Z.push(l(A,X[it])),t.relocateComponent(_[it],Z[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else Z[it][Ot.id()]&&mt.nodes.push({x:Z[it][Ot.id()].getLeft(),y:Z[it][Ot.id()].getTop(),width:Z[it][Ot.id()].getWidth(),height:Z[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else Z[it][Et.id()]&&Z[it][Dt.id()]&&mt.edges.push({startX:Z[it][Et.id()].getCenterX(),startY:Z[it][Et.id()].getCenterY(),endX:Z[it][Dt.id()].getCenterX(),endY:Z[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var tt=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(Z[vt]).forEach(function(it){var gt=Z[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=o(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(Z.push(l(A,X[0])),t.relocateComponent(_[0],Z[0],A)):t.relocateComponent(_[0],X[0],A)}var J=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return Z.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(S,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});A.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,A,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,b=new Map,A=[],S=[],V=[],X=[],Z=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,M=o.nodeSeparation,R=void 0,W=function(){for(var P=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=A[nt],lt=0;ltut&&(ut=Z[Lt],wt=Lt)}return wt},Q=function(P){var k=void 0;if(P){k=Math.floor(Math.random()*m);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(k.isParent()?A[P].push(b.get(k.id())):A[P].push(k.id()))})});var Nt=function(P){var k=N.get(P),K=void 0;d.get(P).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,A[k].push(K),A[N.get(K)].push(P)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=Be(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,G)=>C-G+2,"L"),R:dt((C,G)=>C-2,"R"),T:dt((C,G)=>C-G+2,"T"),B:dt((C,G)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const G=C;return G==="L"||G==="R"||G==="T"||G==="B"},"isArchitectureDirection"),Wt=dt(function(C){const G=C;return G==="L"||G==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const G=C;return G==="T"||G==="B"},"isArchitectureDirectionY"),me=dt(function(C,G){const w=Wt(C)&&qt(G),U=qt(C)&&Wt(G);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const G=C[0],w=C[1],U=Wt(G)&&qt(w),L=qt(G)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,G){const w=`${C}${G}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,G],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),G+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),G]:Wt(L)?[C+(L==="L"?1:-1),G+(U==="T"?1:-1)]:[C,G+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,G){return me(C,G)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=ir.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=qe,this.getAccTitle=Qe,this.setDiagramTitle=Je,this.getDiagramTitle=Ke,this.getAccDescription=je,this.setAccDescription=_e,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tr()}addService({id:C,icon:G,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:G,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:G}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(G!==void 0){if(C===G)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[G]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:G}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:G,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:G,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:G,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[G]===void 0&&this.groups[G]===void 0)throw new Error(`The right-hand id [${G}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[G].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${G}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:G,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[G]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[G].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},G=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const s=Ar(r.lhsDir,r.rhsDir);s!=="bend"&&(C[v]??={},C[v][t]=s,C[t]??={},C[t][v]=s)}if(r.lhsId===e){const s=pe(r.lhsDir,r.rhsDir);s&&(f[s]=r.rhsId)}else{const s=pe(r.rhsDir,r.lhsDir);s&&(f[s]=r.lhsId)}return f},{}),a),{}),w=Object.keys(G)[0],U={[w]:1},L=Object.keys(G).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=G[f],[v,t]=e[f];Object.entries(r).forEach(([s,o])=>{U[o]||(e[o]=Lr([v,t],s),i.push(o))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:G,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,G){this.elements[C]=G}getElementById(C){return this.elements[C]}getConfig(){return er({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,G)=>{lr(C,G),C.groups.map(w=>G.addGroup(w)),C.services.map(w=>G.addService({...w,type:"service"})),C.junctions.map(w=>G.addJunction({...w,type:"junction"})),C.edges.map(w=>G.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const G=await fr("architecture",C);Re.debug(G);const w=Pe.parser?.yy;if(!(w instanceof be))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dr(G,w)},"parse")},xr=dt(C=>`
         .edge {
           stroke-width: ${C.archEdgeWidth};
           stroke: ${C.archEdgeColor};
      diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-7dIEisVf.js b/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-CYOlWnRw.js
      similarity index 99%
      rename from apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-7dIEisVf.js
      rename to apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-CYOlWnRw.js
      index 038b24245..c4e64cbbf 100644
      --- a/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-7dIEisVf.js
      +++ b/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-CYOlWnRw.js
      @@ -1,4 +1,4 @@
      -import{g as pe}from"./chunk-FMBD7UC4-ZEd_TODf.js";import{an as fe,ao as Ut,ap as xe,aq as ye,ar as be,as as we,at as me,au as Se,av as Le,aw as ke,ax as ve,ay as Ee,az as _e,aA as Te,aB as De,aC as Be,aD as Ne,aE as Ie,aF as Ce,aG as Oe,aH as Re,aI as Ae,aJ as ze,aK as Me,aL as Pe,_ as d,F as at,d as D,e as Fe,l as k,A as We,C as Ye,aM as He,a9 as Ke,aa as Ue,c as A,a6 as Xe,aN as P,aO as vt,aP as $,aQ as Ve,u as tt,k as je,aR as Ge,i as Ot,aS as Rt,aT as Ze}from"./mermaid.core-Dza7SVX6.js";import{G as qe}from"./graph--OzhPTMs.js";import{c as Je}from"./channel-efrhVSpc.js";import"./index-BMmTKsPq.js";function Qe(e){return Array.isArray(e)}function $e(e){if(fe(e))return e;const t=Ut(e);if(!tr(e))return{};if(Qe(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(xe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?rr(i,e):yt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return yt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ar(a,e),yt(a,e),er(a,e),a}function tr(e){switch(Ut(e)){case Pe:case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:return!0;default:return!1}}function yt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function er(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function ar(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=d(function(T,m,u,y){for(u=u||{},y=T.length;y--;u[T[y]]=m);return u},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],g=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],b=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(m,u,y,L,E,h,W){var f=h.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",h[f-1]),L.setHierarchy(h[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:L.getLogger().debug("Rule: link: ",h[f],m),this.$={edgeTypeStr:h[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:const O=parseInt(h[f]),q=L.generateId();this.$={id:q,type:"space",label:"",width:O,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);const j=L.edgeStrToEdgeData(h[f-1].edgeTypeStr),st=L.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),dt=L.edgeStrToThickness(h[f-1].edgeTypeStr),R=L.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:dt,pattern:R,directions:h[f].directions,arrowTypeEnd:j,arrowTypeStart:st},{id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:L.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]),L.generateId(),this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);const G=L.generateId();this.$={id:G,type:"composite",label:"",children:h[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(g,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(o,[2,16],{14:22,15:p,16:b}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(w,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(g,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(m,u){if(u.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=u,y}},"parseError"),parse:d(function(m){var u=this,y=[0],L=[],E=[null],h=[],W=this.table,f="",O=0,q=0,j=2,st=1,dt=h.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(G.yy[ut]=this.yy[ut]);R.setInput(m,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var pt=R.yylloc;h.push(pt);var de=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(Y){y.length=y.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}d(ue,"popStack");function It(){var Y;return Y=L.pop()||R.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(L=Y,Y=L.pop()),Y=u.symbols_[Y]||Y),Y}d(It,"lex");for(var F,J,K,ft,Q={},it,Z,Ct,nt;;){if(J=y[y.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=It()),K=W[J]&&W[J][F]),typeof K>"u"||!K.length||!K[0]){var xt="";nt=[];for(it in W[J])this.terminals_[it]&&it>j&&nt.push("'"+this.terminals_[it]+"'");R.showPosition?xt="Parse error on line "+(O+1)+`:
      +import{g as pe}from"./chunk-FMBD7UC4-B_DrLljO.js";import{an as fe,ao as Ut,ap as xe,aq as ye,ar as be,as as we,at as me,au as Se,av as Le,aw as ke,ax as ve,ay as Ee,az as _e,aA as Te,aB as De,aC as Be,aD as Ne,aE as Ie,aF as Ce,aG as Oe,aH as Re,aI as Ae,aJ as ze,aK as Me,aL as Pe,_ as d,F as at,d as D,e as Fe,l as k,A as We,C as Ye,aM as He,a9 as Ke,aa as Ue,c as A,a6 as Xe,aN as P,aO as vt,aP as $,aQ as Ve,u as tt,k as je,aR as Ge,i as Ot,aS as Rt,aT as Ze}from"./mermaid.core-Br9os_fu.js";import{G as qe}from"./graph--OzhPTMs.js";import{c as Je}from"./channel-DmsKuGC5.js";import"./index-DIKFd2HX.js";function Qe(e){return Array.isArray(e)}function $e(e){if(fe(e))return e;const t=Ut(e);if(!tr(e))return{};if(Qe(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(xe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?rr(i,e):yt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return yt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ar(a,e),yt(a,e),er(a,e),a}function tr(e){switch(Ut(e)){case Pe:case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:return!0;default:return!1}}function yt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function er(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function ar(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=d(function(T,m,u,y){for(u=u||{},y=T.length;y--;u[T[y]]=m);return u},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],g=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],b=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(m,u,y,L,E,h,W){var f=h.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",h[f-1]),L.setHierarchy(h[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:L.getLogger().debug("Rule: link: ",h[f],m),this.$={edgeTypeStr:h[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:const O=parseInt(h[f]),q=L.generateId();this.$={id:q,type:"space",label:"",width:O,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);const j=L.edgeStrToEdgeData(h[f-1].edgeTypeStr),st=L.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),dt=L.edgeStrToThickness(h[f-1].edgeTypeStr),R=L.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:dt,pattern:R,directions:h[f].directions,arrowTypeEnd:j,arrowTypeStart:st},{id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:L.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]),L.generateId(),this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);const G=L.generateId();this.$={id:G,type:"composite",label:"",children:h[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(g,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(o,[2,16],{14:22,15:p,16:b}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(w,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(g,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(m,u){if(u.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=u,y}},"parseError"),parse:d(function(m){var u=this,y=[0],L=[],E=[null],h=[],W=this.table,f="",O=0,q=0,j=2,st=1,dt=h.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(G.yy[ut]=this.yy[ut]);R.setInput(m,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var pt=R.yylloc;h.push(pt);var de=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(Y){y.length=y.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}d(ue,"popStack");function It(){var Y;return Y=L.pop()||R.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(L=Y,Y=L.pop()),Y=u.symbols_[Y]||Y),Y}d(It,"lex");for(var F,J,K,ft,Q={},it,Z,Ct,nt;;){if(J=y[y.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=It()),K=W[J]&&W[J][F]),typeof K>"u"||!K.length||!K[0]){var xt="";nt=[];for(it in W[J])this.terminals_[it]&&it>j&&nt.push("'"+this.terminals_[it]+"'");R.showPosition?xt="Parse error on line "+(O+1)+`:
       `+R.showPosition()+`
       Expecting `+nt.join(", ")+", got '"+(this.terminals_[F]||F)+"'":xt="Parse error on line "+(O+1)+": Unexpected "+(F==st?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(xt,{text:R.match,token:this.terminals_[F]||F,line:R.yylineno,loc:pt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(K[0]){case 1:y.push(F),E.push(R.yytext),h.push(R.yylloc),y.push(K[1]),F=null,q=R.yyleng,f=R.yytext,O=R.yylineno,pt=R.yylloc;break;case 2:if(Z=this.productions_[K[1]][1],Q.$=E[E.length-Z],Q._$={first_line:h[h.length-(Z||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Z||1)].first_column,last_column:h[h.length-1].last_column},de&&(Q._$.range=[h[h.length-(Z||1)].range[0],h[h.length-1].range[1]]),ft=this.performAction.apply(Q,[f,q,O,G.yy,K[1],E,h].concat(dt)),typeof ft<"u")return ft;Z&&(y=y.slice(0,-1*Z*2),E=E.slice(0,-1*Z),h=h.slice(0,-1*Z)),y.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),Ct=W[y[y.length-2]][y[y.length-1]],y.push(Ct);break;case 3:return!0}}return!0},"parse")},_=(function(){var T={EOF:1,parseError:d(function(u,y){if(this.yy.parser)this.yy.parser.parseError(u,y);else throw new Error(u)},"parseError"),setInput:d(function(m,u){return this.yy=u||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var u=m.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var u=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===L.length?this.yylloc.first_column:0)+L[L.length-y.length].length-y[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
       `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),u=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
      diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-CqrVzD0s.js b/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-n7KpkP5u.js
      similarity index 99%
      rename from apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-CqrVzD0s.js
      rename to apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-n7KpkP5u.js
      index 204027620..5cf716edd 100644
      --- a/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-CqrVzD0s.js
      +++ b/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-n7KpkP5u.js
      @@ -1,4 +1,4 @@
      -import{g as Oe,d as Re}from"./chunk-ND2GUHAM-CeYe8rvb.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-Dza7SVX6.js";import"./index-BMmTKsPq.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`:
      +import{g as Oe,d as Re}from"./chunk-ND2GUHAM-B0b4a7yH.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-Br9os_fu.js";import"./index-DIKFd2HX.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`:
       `+D.showPosition()+`
       Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,re=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,re,Et,At.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},Ae=(function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
       `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
      diff --git a/apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js b/apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js
      new file mode 100644
      index 000000000..922c921c2
      --- /dev/null
      +++ b/apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js
      @@ -0,0 +1 @@
      +import{U as a,D as n}from"./mermaid.core-Br9os_fu.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
      diff --git a/apps/pythinker-code/dist-web/assets/channel-efrhVSpc.js b/apps/pythinker-code/dist-web/assets/channel-efrhVSpc.js
      deleted file mode 100644
      index 7228dcdea..000000000
      --- a/apps/pythinker-code/dist-web/assets/channel-efrhVSpc.js
      +++ /dev/null
      @@ -1 +0,0 @@
      -import{U as a,D as n}from"./mermaid.core-Dza7SVX6.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-VeUyViKL.js b/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-DtergGMb.js
      similarity index 87%
      rename from apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-VeUyViKL.js
      rename to apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-DtergGMb.js
      index 3925f14e5..27c488914 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-VeUyViKL.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-DtergGMb.js
      @@ -1 +1 @@
      -import{_ as a,e as w,l as x}from"./mermaid.core-Dza7SVX6.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s};
      +import{_ as a,e as w,l as x}from"./mermaid.core-Br9os_fu.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s};
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-Df7H4Pbw.js b/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DHez2dpA.js
      similarity index 71%
      rename from apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-Df7H4Pbw.js
      rename to apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DHez2dpA.js
      index 28f182a55..c98415776 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-Df7H4Pbw.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DHez2dpA.js
      @@ -1 +1 @@
      -import{_ as i}from"./mermaid.core-Dza7SVX6.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
      +import{_ as i}from"./mermaid.core-Br9os_fu.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-anBFgZU6.js b/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-BuzvVrQ6.js
      similarity index 72%
      rename from apps/pythinker-code/dist-web/assets/chunk-55IACEB6-anBFgZU6.js
      rename to apps/pythinker-code/dist-web/assets/chunk-55IACEB6-BuzvVrQ6.js
      index f9956ed53..be51350c5 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-anBFgZU6.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-BuzvVrQ6.js
      @@ -1 +1 @@
      -import{_ as a,d as o}from"./mermaid.core-Dza7SVX6.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};
      +import{_ as a,d as o}from"./mermaid.core-Br9os_fu.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-BrYyR5Bn.js b/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CnzKhSUz.js
      similarity index 99%
      rename from apps/pythinker-code/dist-web/assets/chunk-727SXJPM-BrYyR5Bn.js
      rename to apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CnzKhSUz.js
      index 71b343fe9..2d34e84d1 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-BrYyR5Bn.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CnzKhSUz.js
      @@ -1,4 +1,4 @@
      -import{g as tt}from"./chunk-FMBD7UC4-ZEd_TODf.js";import{c as st}from"./chunk-ND2GUHAM-CeYe8rvb.js";import{g as it}from"./chunk-55IACEB6-anBFgZU6.js";import{s as at}from"./chunk-2J33WTMH-VeUyViKL.js";import{_ as f,l as Ie,c as F,p as rt,r as nt,u as Oe,d as de,z as ut,b as lt,a as ct,s as ot,g as ht,q as dt,t as pt,k as I,A as At,y as ft,i as gt,a8 as G}from"./mermaid.core-Dza7SVX6.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],ne=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,u,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:re},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(ne,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(ne,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(ne,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:g,56:N},{45:163,51:re},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(ne,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],u=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=u.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
      +import{g as tt}from"./chunk-FMBD7UC4-B_DrLljO.js";import{c as st}from"./chunk-ND2GUHAM-B0b4a7yH.js";import{g as it}from"./chunk-55IACEB6-BuzvVrQ6.js";import{s as at}from"./chunk-2J33WTMH-DtergGMb.js";import{_ as f,l as Ie,c as F,p as rt,r as nt,u as Oe,d as de,z as ut,b as lt,a as ct,s as ot,g as ht,q as dt,t as pt,k as I,A as At,y as ft,i as gt,a8 as G}from"./mermaid.core-Br9os_fu.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],ne=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,u,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:re},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(ne,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(ne,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(ne,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:g,56:N},{45:163,51:re},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(ne,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],u=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=u.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`:
       `+D.showPosition()+`
       Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===u.length?this.yylloc.first_column:0)+u[u.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
       `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-936iwDDD.js b/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-Wd9kV9EQ.js
      similarity index 99%
      rename from apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-936iwDDD.js
      rename to apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-Wd9kV9EQ.js
      index 200fc8910..847f3c841 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-936iwDDD.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-Wd9kV9EQ.js
      @@ -1,4 +1,4 @@
      -import{g as Zt}from"./chunk-55IACEB6-anBFgZU6.js";import{s as te}from"./chunk-2J33WTMH-VeUyViKL.js";import{_ as f,l as _,c as w,r as ee,u as se,a as ie,b as re,g as ae,s as ne,q as oe,t as le,ab as ce,k as W,A as he}from"./mermaid.core-Dza7SVX6.js";var Dt=(function(){var t=f(function(Y,a,c,r){for(c=c||{},r=Y.length;r--;c[Y[r]]=a);return c},"o"),e=[1,2],l=[1,3],s=[1,4],u=[2,4],d=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],A=[1,20],k=[1,21],h=[1,22],x=[1,23],D=[1,24],$=[1,26],L=[1,27],P=[1,28],I=[1,29],J=[1,30],st=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],j=[1,34],p=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],At=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,c,r,y,E,i,F){var o=i.length-1;switch(E){case 3:return y.setRootDoc(i[o]),i[o];case 4:this.$=[];break;case 5:i[o]!="nl"&&(i[o-1].push(i[o]),this.$=i[o-1]);break;case 6:case 7:this.$=i[o];break;case 8:this.$="nl";break;case 12:this.$=i[o];break;case 13:const q=i[o-1];q.description=y.trimColon(i[o]),this.$=q;break;case 14:this.$={stmt:"relation",state1:i[o-2],state2:i[o]};break;case 15:const gt=y.trimColon(i[o]);this.$={stmt:"relation",state1:i[o-3],state2:i[o-1],description:gt};break;case 19:this.$={stmt:"state",id:i[o-3],type:"default",description:"",doc:i[o-1]};break;case 20:var B=i[o],H=i[o-2].trim();if(i[o].match(":")){var ht=i[o].split(":");B=ht[0],H=[H,ht[1]]}this.$={stmt:"state",id:B,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[o-3],type:"default",description:i[o-5],doc:i[o-1]};break;case 22:this.$={stmt:"state",id:i[o],type:"fork"};break;case 23:this.$={stmt:"state",id:i[o],type:"join"};break;case 24:this.$={stmt:"state",id:i[o],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[o-1].trim(),note:{position:i[o-2].trim(),text:i[o].trim()}};break;case 29:this.$=i[o].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[o].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[o-3],url:i[o-2],tooltip:i[o-1]};break;case 33:this.$={stmt:"click",id:i[o-3],url:i[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[o-1].trim(),classes:i[o].trim()};break;case 36:this.$={stmt:"style",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 37:this.$={stmt:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[o].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:l,6:s},{1:[3]},{3:5,4:e,5:l,6:s},{3:6,4:e,5:l,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,7]),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(p,[2,11]),t(p,[2,12],{14:[1,40],15:[1,41]}),t(p,[2,16]),{18:[1,42]},t(p,[2,18],{20:[1,43]}),{23:[1,44]},t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(p,[2,28]),{34:[1,49]},{36:[1,50]},t(p,[2,31]),{13:51,24:N,57:j},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,41]),t(p,[2,6]),t(p,[2,13]),{13:58,24:N,57:j},t(p,[2,17]),t(At,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(p,[2,29]),t(p,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(p,[2,14],{14:[1,71]}),{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(p,[2,34]),t(p,[2,35]),t(p,[2,36]),t(p,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(p,[2,15]),t(p,[2,19]),t(At,u,{7:78}),t(p,[2,26]),t(p,[2,27]),{5:[1,79]},{5:[1,80]},{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,32]),t(p,[2,33]),t(p,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,c){if(c.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=c,r}},"parseError"),parse:f(function(a){var c=this,r=[0],y=[],E=[null],i=[],F=this.table,o="",B=0,H=0,ht=2,q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),M={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(M.yy[Tt]=this.yy[Tt]);b.setInput(a,M.yy),M.yy.lexer=b,M.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var qt=b.options&&b.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(O){r.length=r.length-2*O,E.length=E.length-O,i.length=i.length-O}f(Qt,"popStack");function xt(){var O;return O=y.pop()||b.lex()||q,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=c.symbols_[O]||O),O}f(xt,"lex");for(var C,U,R,_t,z={},ut,G,Lt,dt;;){if(U=r[r.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=xt()),R=F[U]&&F[U][C]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in F[U])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(B+1)+`:
      +import{g as Zt}from"./chunk-55IACEB6-BuzvVrQ6.js";import{s as te}from"./chunk-2J33WTMH-DtergGMb.js";import{_ as f,l as _,c as w,r as ee,u as se,a as ie,b as re,g as ae,s as ne,q as oe,t as le,ab as ce,k as W,A as he}from"./mermaid.core-Br9os_fu.js";var Dt=(function(){var t=f(function(Y,a,c,r){for(c=c||{},r=Y.length;r--;c[Y[r]]=a);return c},"o"),e=[1,2],l=[1,3],s=[1,4],u=[2,4],d=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],A=[1,20],k=[1,21],h=[1,22],x=[1,23],D=[1,24],$=[1,26],L=[1,27],P=[1,28],I=[1,29],J=[1,30],st=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],j=[1,34],p=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],At=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,c,r,y,E,i,F){var o=i.length-1;switch(E){case 3:return y.setRootDoc(i[o]),i[o];case 4:this.$=[];break;case 5:i[o]!="nl"&&(i[o-1].push(i[o]),this.$=i[o-1]);break;case 6:case 7:this.$=i[o];break;case 8:this.$="nl";break;case 12:this.$=i[o];break;case 13:const q=i[o-1];q.description=y.trimColon(i[o]),this.$=q;break;case 14:this.$={stmt:"relation",state1:i[o-2],state2:i[o]};break;case 15:const gt=y.trimColon(i[o]);this.$={stmt:"relation",state1:i[o-3],state2:i[o-1],description:gt};break;case 19:this.$={stmt:"state",id:i[o-3],type:"default",description:"",doc:i[o-1]};break;case 20:var B=i[o],H=i[o-2].trim();if(i[o].match(":")){var ht=i[o].split(":");B=ht[0],H=[H,ht[1]]}this.$={stmt:"state",id:B,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[o-3],type:"default",description:i[o-5],doc:i[o-1]};break;case 22:this.$={stmt:"state",id:i[o],type:"fork"};break;case 23:this.$={stmt:"state",id:i[o],type:"join"};break;case 24:this.$={stmt:"state",id:i[o],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[o-1].trim(),note:{position:i[o-2].trim(),text:i[o].trim()}};break;case 29:this.$=i[o].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[o].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[o-3],url:i[o-2],tooltip:i[o-1]};break;case 33:this.$={stmt:"click",id:i[o-3],url:i[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[o-1].trim(),classes:i[o].trim()};break;case 36:this.$={stmt:"style",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 37:this.$={stmt:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[o].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:l,6:s},{1:[3]},{3:5,4:e,5:l,6:s},{3:6,4:e,5:l,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,7]),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(p,[2,11]),t(p,[2,12],{14:[1,40],15:[1,41]}),t(p,[2,16]),{18:[1,42]},t(p,[2,18],{20:[1,43]}),{23:[1,44]},t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(p,[2,28]),{34:[1,49]},{36:[1,50]},t(p,[2,31]),{13:51,24:N,57:j},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,41]),t(p,[2,6]),t(p,[2,13]),{13:58,24:N,57:j},t(p,[2,17]),t(At,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(p,[2,29]),t(p,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(p,[2,14],{14:[1,71]}),{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(p,[2,34]),t(p,[2,35]),t(p,[2,36]),t(p,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(p,[2,15]),t(p,[2,19]),t(At,u,{7:78}),t(p,[2,26]),t(p,[2,27]),{5:[1,79]},{5:[1,80]},{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,32]),t(p,[2,33]),t(p,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,c){if(c.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=c,r}},"parseError"),parse:f(function(a){var c=this,r=[0],y=[],E=[null],i=[],F=this.table,o="",B=0,H=0,ht=2,q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),M={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(M.yy[Tt]=this.yy[Tt]);b.setInput(a,M.yy),M.yy.lexer=b,M.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var qt=b.options&&b.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(O){r.length=r.length-2*O,E.length=E.length-O,i.length=i.length-O}f(Qt,"popStack");function xt(){var O;return O=y.pop()||b.lex()||q,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=c.symbols_[O]||O),O}f(xt,"lex");for(var C,U,R,_t,z={},ut,G,Lt,dt;;){if(U=r[r.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=xt()),R=F[U]&&F[U][C]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in F[U])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(B+1)+`:
       `+b.showPosition()+`
       Expecting `+dt.join(", ")+", got '"+(this.terminals_[C]||C)+"'":mt="Parse error on line "+(B+1)+": Unexpected "+(C==q?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[C]||C,line:b.yylineno,loc:Et,expected:dt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(R[0]){case 1:r.push(C),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),C=null,H=b.yyleng,o=b.yytext,B=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],z.$=E[E.length-G],z._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},qt&&(z._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(z,[o,H,B,M.yy,R[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[R[1]][0]),E.push(z.$),i.push(z._$),Lt=F[r[r.length-2]][r[r.length-1]],r.push(Lt);break;case 3:return!0}}return!0},"parse")},Jt=(function(){var Y={EOF:1,parseError:f(function(c,r){if(this.yy.parser)this.yy.parser.parseError(c,r);else throw new Error(c)},"parseError"),setInput:f(function(a,c){return this.yy=c||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var c=a.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var c=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===y.length?this.yylloc.first_column:0)+y[y.length-r.length].length-r[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
       `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),c=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-ZEd_TODf.js b/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-B_DrLljO.js
      similarity index 83%
      rename from apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-ZEd_TODf.js
      rename to apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-B_DrLljO.js
      index 46e6e1547..375284e49 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-ZEd_TODf.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-B_DrLljO.js
      @@ -1,4 +1,4 @@
      -import{_ as e}from"./mermaid.core-Dza7SVX6.js";var l=e(()=>`
      +import{_ as e}from"./mermaid.core-Br9os_fu.js";var l=e(()=>`
         /* Font Awesome icon styling - consolidated */
         .label-icon {
           display: inline-block;
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-CeYe8rvb.js b/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-B0b4a7yH.js
      similarity index 96%
      rename from apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-CeYe8rvb.js
      rename to apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-B0b4a7yH.js
      index ae7812ec6..746ba5003 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-CeYe8rvb.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-B0b4a7yH.js
      @@ -1 +1 @@
      -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-Dza7SVX6.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h};
      +import{_ as i,d as l,n as d,j as o}from"./mermaid.core-Br9os_fu.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h};
      diff --git a/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-B6GDpV6h.js b/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-SK1ytu-J.js
      similarity index 67%
      rename from apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-B6GDpV6h.js
      rename to apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-SK1ytu-J.js
      index 484dc1947..d4b1d6e21 100644
      --- a/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-B6GDpV6h.js
      +++ b/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-SK1ytu-J.js
      @@ -1 +1 @@
      -import{_ as i}from"./mermaid.core-Dza7SVX6.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
      +import{_ as i}from"./mermaid.core-Br9os_fu.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I};
      diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-2GxwnCPM.js b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-2GxwnCPM.js
      deleted file mode 100644
      index 74227e5b8..000000000
      --- a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-2GxwnCPM.js
      +++ /dev/null
      @@ -1 +0,0 @@
      -import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-BrYyR5Bn.js";import{_ as i}from"./mermaid.core-Dza7SVX6.js";import"./chunk-FMBD7UC4-ZEd_TODf.js";import"./chunk-ND2GUHAM-CeYe8rvb.js";import"./chunk-55IACEB6-anBFgZU6.js";import"./chunk-2J33WTMH-VeUyViKL.js";import"./index-BMmTKsPq.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
      diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js
      new file mode 100644
      index 000000000..62f52b954
      --- /dev/null
      +++ b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js
      @@ -0,0 +1 @@
      +import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CnzKhSUz.js";import{_ as i}from"./mermaid.core-Br9os_fu.js";import"./chunk-FMBD7UC4-B_DrLljO.js";import"./chunk-ND2GUHAM-B0b4a7yH.js";import"./chunk-55IACEB6-BuzvVrQ6.js";import"./chunk-2J33WTMH-DtergGMb.js";import"./index-DIKFd2HX.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
      diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-2GxwnCPM.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-2GxwnCPM.js
      deleted file mode 100644
      index 74227e5b8..000000000
      --- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-2GxwnCPM.js
      +++ /dev/null
      @@ -1 +0,0 @@
      -import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-BrYyR5Bn.js";import{_ as i}from"./mermaid.core-Dza7SVX6.js";import"./chunk-FMBD7UC4-ZEd_TODf.js";import"./chunk-ND2GUHAM-CeYe8rvb.js";import"./chunk-55IACEB6-anBFgZU6.js";import"./chunk-2J33WTMH-VeUyViKL.js";import"./index-BMmTKsPq.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
      diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js
      new file mode 100644
      index 000000000..62f52b954
      --- /dev/null
      +++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js
      @@ -0,0 +1 @@
      +import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CnzKhSUz.js";import{_ as i}from"./mermaid.core-Br9os_fu.js";import"./chunk-FMBD7UC4-B_DrLljO.js";import"./chunk-ND2GUHAM-B0b4a7yH.js";import"./chunk-55IACEB6-BuzvVrQ6.js";import"./chunk-2J33WTMH-DtergGMb.js";import"./index-DIKFd2HX.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
      diff --git a/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-lwbIYhF_.js b/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-C4dXj3jJ.js
      similarity index 99%
      rename from apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-lwbIYhF_.js
      rename to apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-C4dXj3jJ.js
      index f5f415489..cc28c385f 100644
      --- a/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-lwbIYhF_.js
      +++ b/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-C4dXj3jJ.js
      @@ -1 +1 @@
      -import{b4 as lt,_ as V,l as $,d as gt}from"./mermaid.core-Dza7SVX6.js";import{c as tt}from"./cytoscape.esm-nFXppDBa.js";import"./index-BMmTKsPq.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render};
      +import{b4 as lt,_ as V,l as $,d as gt}from"./mermaid.core-Br9os_fu.js";import{c as tt}from"./cytoscape.esm-nFXppDBa.js";import"./index-DIKFd2HX.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render};
      diff --git a/apps/pythinker-code/dist-web/assets/dagre-BM42HDAG-CQ5sq_l2.js b/apps/pythinker-code/dist-web/assets/dagre-BM42HDAG-nD5EHTND.js
      similarity index 98%
      rename from apps/pythinker-code/dist-web/assets/dagre-BM42HDAG-CQ5sq_l2.js
      rename to apps/pythinker-code/dist-web/assets/dagre-BM42HDAG-nD5EHTND.js
      index 87af08356..19ce08071 100644
      --- a/apps/pythinker-code/dist-web/assets/dagre-BM42HDAG-CQ5sq_l2.js
      +++ b/apps/pythinker-code/dist-web/assets/dagre-BM42HDAG-nD5EHTND.js
      @@ -1,4 +1,4 @@
      -import{_ as w,aV as _,aW as Y,aX as j,aY as F,l as r,c as H,aZ as V,a_ as $,ai as Q,aQ as U,aj as P,ah as W,a$ as Z,b0 as q,b1 as z}from"./mermaid.core-Dza7SVX6.js";import{i as N,G as B}from"./graph--OzhPTMs.js";import{b as K,m as R,l as I}from"./layout-SsrduOYp.js";import"./index-BMmTKsPq.js";var ee=4;function ne(e){return K(e,ee)}function b(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:te(e),edges:se(e)};return N(e.graph())||(t.value=ne(e.graph())),t}function te(e){return R(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),i={v:t};return N(n)||(i.value=n),N(a)||(i.parent=a),i})}function se(e){return R(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return N(t.name)||(a.name=t.name),N(n)||(a.value=n),a})}var d=new Map,y=new Map,A=new Map,re=w(()=>{y.clear(),A.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=y.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=w((e,t)=>{const n=y.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{r.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const i=t.children(e)||[];e!==a&&i.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);r.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(r.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(r.debug("Setting parent",o,e),n.setParent(o,e)):(r.info("In copy ",e,"root",a,"data",t.node(e),a),r.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);r.debug("Copying Edges",u),u.forEach(c=>{r.info("Edge",c);const m=t.edge(c.v,c.w,c.name);r.info("Edge data",m,a);try{ie(c,a)?(r.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(h){r.error(h)}})}r.debug("Removing node",o),t.removeNode(o)})},"copy"),J=w((e,t)=>{const n=t.children(e);let a=[...n];for(const i of n)A.set(i,e),a=[...a,...J(i,t)];return a},"extractDescendants"),oe=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),i=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=i.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(r.trace("Searching children of id ",e,a),a.length<1)return e;let i;for(const o of a){const l=C(o,t,n),u=oe(t,n,l);if(l)if(u.length>0)i=l;else return l}return i},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),ae=w((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),y.set(n,J(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),i=e.edges();a.length>0?(r.debug("Cluster identified",n,y),i.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(r.warn("Edge: ",o," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",y.get(n)),d.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,y)});for(let n of d.keys()){const a=d.get(n).id,i=e.parent(a);i!==n&&d.has(i)&&!d.get(i).externalConnections&&(d.get(n).id=i)}e.edges().forEach(function(n){const a=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let i=n.v,o=n.w;if(r.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),i=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){const l=e.parent(i);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}r.warn("Fix Replacing with XXX",i,o,n.name),e.setEdge(i,o,a,n.name)}}),r.warn("Adjusted Graph",b(e)),T(e,0),r.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(r.warn("extractor - ",t,b(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),a=!1;for(const i of n){const o=e.children(i);a=a||o.length>0}if(!a){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const i of n)if(r.debug("Extracting node",i,d,d.has(i)&&!d.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!d.has(i))r.debug("Not a cluster",i,t);else if(!d.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.warn("Cluster without external connections, without a parent and with children",i,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(i)?.clusterData?.dir&&(l=d.get(i).clusterData.dir,r.warn("Fixing dir",d.get(i).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",b(e)),G(i,e,u,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:d.get(i).clusterData,label:d.get(i).label,graph:u}),r.warn("New graph after copy node: (",i,")",b(u)),r.debug("Old graph after copy",b(e))}else r.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!d.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),r.debug(d);n=e.nodes(),r.warn("New list of nodes",n);for(const i of n){const o=e.node(i);r.warn(" Now next level",i,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),L=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const i=e.children(a),o=L(e,i);n=[...n,...o]}),n},"sorter"),ce=w(e=>L(e,e.children()),"sortNodesByHierarchy"),M=w(async(e,t,n,a,i,o)=>{r.warn("Graph in recursive render:XAX",b(t),i);const l=t.graph().rankdir;r.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),h=u.insert("g").attr("class","edgeLabels"),v=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));r.trace(`Setting data for parent cluster XXX
      +import{_ as w,aV as _,aW as Y,aX as j,aY as F,l as r,c as H,aZ as V,a_ as $,ai as Q,aQ as U,aj as P,ah as W,a$ as Z,b0 as q,b1 as z}from"./mermaid.core-Br9os_fu.js";import{i as N,G as B}from"./graph--OzhPTMs.js";import{b as K,m as R,l as I}from"./layout-SsrduOYp.js";import"./index-DIKFd2HX.js";var ee=4;function ne(e){return K(e,ee)}function b(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:te(e),edges:se(e)};return N(e.graph())||(t.value=ne(e.graph())),t}function te(e){return R(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),i={v:t};return N(n)||(i.value=n),N(a)||(i.parent=a),i})}function se(e){return R(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return N(t.name)||(a.name=t.name),N(n)||(a.value=n),a})}var d=new Map,y=new Map,A=new Map,re=w(()=>{y.clear(),A.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=y.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=w((e,t)=>{const n=y.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{r.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const i=t.children(e)||[];e!==a&&i.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);r.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(r.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(r.debug("Setting parent",o,e),n.setParent(o,e)):(r.info("In copy ",e,"root",a,"data",t.node(e),a),r.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);r.debug("Copying Edges",u),u.forEach(c=>{r.info("Edge",c);const m=t.edge(c.v,c.w,c.name);r.info("Edge data",m,a);try{ie(c,a)?(r.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(h){r.error(h)}})}r.debug("Removing node",o),t.removeNode(o)})},"copy"),J=w((e,t)=>{const n=t.children(e);let a=[...n];for(const i of n)A.set(i,e),a=[...a,...J(i,t)];return a},"extractDescendants"),oe=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),i=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=i.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(r.trace("Searching children of id ",e,a),a.length<1)return e;let i;for(const o of a){const l=C(o,t,n),u=oe(t,n,l);if(l)if(u.length>0)i=l;else return l}return i},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),ae=w((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),y.set(n,J(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),i=e.edges();a.length>0?(r.debug("Cluster identified",n,y),i.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(r.warn("Edge: ",o," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",y.get(n)),d.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,y)});for(let n of d.keys()){const a=d.get(n).id,i=e.parent(a);i!==n&&d.has(i)&&!d.get(i).externalConnections&&(d.get(n).id=i)}e.edges().forEach(function(n){const a=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let i=n.v,o=n.w;if(r.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),i=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){const l=e.parent(i);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}r.warn("Fix Replacing with XXX",i,o,n.name),e.setEdge(i,o,a,n.name)}}),r.warn("Adjusted Graph",b(e)),T(e,0),r.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(r.warn("extractor - ",t,b(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),a=!1;for(const i of n){const o=e.children(i);a=a||o.length>0}if(!a){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const i of n)if(r.debug("Extracting node",i,d,d.has(i)&&!d.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!d.has(i))r.debug("Not a cluster",i,t);else if(!d.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.warn("Cluster without external connections, without a parent and with children",i,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(i)?.clusterData?.dir&&(l=d.get(i).clusterData.dir,r.warn("Fixing dir",d.get(i).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",b(e)),G(i,e,u,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:d.get(i).clusterData,label:d.get(i).label,graph:u}),r.warn("New graph after copy node: (",i,")",b(u)),r.debug("Old graph after copy",b(e))}else r.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!d.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),r.debug(d);n=e.nodes(),r.warn("New list of nodes",n);for(const i of n){const o=e.node(i);r.warn(" Now next level",i,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),L=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const i=e.children(a),o=L(e,i);n=[...n,...o]}),n},"sorter"),ce=w(e=>L(e,e.children()),"sortNodesByHierarchy"),M=w(async(e,t,n,a,i,o)=>{r.warn("Graph in recursive render:XAX",b(t),i);const l=t.graph().rankdir;r.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),h=u.insert("g").attr("class","edgeLabels"),v=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));r.trace(`Setting data for parent cluster XXX
        Node.id = `,f,`
        data=`,g.height,`
       Parent cluster`,i.height),t.setNode(i.id,g),t.parent(f)||(r.trace("Setting parent",f,i.id),t.setParent(f,i.id,g))}if(r.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),s?.clusterNode){r.info("Cluster identified XBX",f,s.width,t.node(f));const{ranksep:g,nodesep:E}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:g+25,nodesep:E});const p=await M(v,s.graph,n,a,t.node(f),o),x=p.elem;V(s,x),s.diff=p.diff||0,r.info("New compound node after recursive render XAX",f,"width",s.width,"height",s.height),$(x,s)}else t.children(f).length>0?(r.trace("Cluster - the non recursive path XBX",f,s.id,s,s.width,"Graph:",t),r.trace(C(s.id,t)),d.set(s.id,{id:C(s.id,t),node:s})):(r.trace("Node - the non recursive path XAX",f,v,t.node(f),l),await Q(v,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(s){const g=t.edge(s.v,s.w,s.name);r.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),r.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),r.info("Fix",d,"ids:",s.v,s.w,"Translating: ",d.get(s.v),d.get(s.w)),await z(h,g)});await Promise.all(f)},"processEdges")(),r.info("Graph before layout:",JSON.stringify(b(t))),r.info("############################################# XXX"),r.info("###                Layout                 ### XXX"),r.info("############################################# XXX"),I(t),r.info("Graph after layout:",JSON.stringify(b(t)));let O=0,{subGraphTitleTotalMargin:S}=U(o);return await Promise.all(ce(t).map(async function(f){const s=t.node(f);if(r.info("Position XBX => "+f+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s?.clusterNode)s.y+=S,r.info("A tainted cluster node XBX1",f,s.id,s.width,s.height,s.x,s.y,t.parent(f)),d.get(s.id).node=s,P(s);else if(t.children(f).length>0){r.info("A pure cluster node XBX1",f,s.id,s.x,s.y,s.width,s.height,t.parent(f)),s.height+=S,t.node(s.parentId);const g=s?.padding/2||0,E=s?.labelBBox?.height||0,p=E-g||0;r.debug("OffsetY",p,"labelHeight",E,"halfPadding",g),await W(c,s),d.get(s.id).node=s}else{const g=t.node(s.parentId);s.y+=S/2,r.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",g,g?.offsetY,s),P(s)}})),t.edges().forEach(function(f){const s=t.edge(f);r.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var E=t.node(f.w);const p=Z(m,s,d,n,g,E,a);q(s,p)}),t.nodes().forEach(function(f){const s=t.node(f);r.info(f,s.type,s.diff),s.isGroup&&(O=s.diff)}),r.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),ge=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");_(a,e.markers,e.type,e.diagramId),Y(),j(),F(),re(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),r.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const h=structuredClone(o),v=structuredClone(o),X=structuredClone(o);h.label="",h.arrowTypeEnd="none",h.endLabelLeft="",h.endLabelRight="",h.startLabelLeft="",h.id=l+"-cyclic-special-1",v.startLabelRight="",v.startLabelLeft="",v.endLabelLeft="",v.endLabelRight="",v.arrowTypeStart="none",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-mid",X.label="",X.startLabelRight="",X.startLabelLeft="",X.arrowTypeStart="none",m.isGroup&&(h.fromCluster=l,X.toCluster=l),X.id=l+"-cyclic-special-2",X.arrowTypeStart="none",n.setEdge(l,u,h,l+"-cyclic-special-0"),n.setEdge(u,c,v,l+"-cyclic-special-1"),n.setEdge(c,l,X,l+"-cycy({...j,...C().radar}),"getConfig"),b=l(()=>x.axes,"getAxes"),N=l(()=>x.curves,"getCurves"),U=l(()=>x.options,"getOptions"),X=l(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=l(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=l(()=>{z(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:_,setDiagramTitle:F,getDiagramTitle:R,getAccDescription:I,setAccDescription:k},Q=l(a=>{H(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await V("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),p=D(t),u=at(p,c),g=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(u,o,v,n.ticks,n.graticule),st(u,o,v,c),M(u,o,i,h,g,n.graticule,c),T(u,i,n.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const u=2*p*Math.PI/o-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=A(g,r,s,c),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(u,i.curveTension)).attr("class",`radarCurve-${p}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;ry({...j,...C().radar}),"getConfig"),b=l(()=>x.axes,"getAxes"),N=l(()=>x.curves,"getCurves"),U=l(()=>x.options,"getOptions"),X=l(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=l(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=l(()=>{z(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:_,setDiagramTitle:F,getDiagramTitle:R,getAccDescription:I,setAccDescription:k},Q=l(a=>{H(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await V("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),p=D(t),u=at(p,c),g=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(u,o,v,n.ticks,n.graticule),st(u,o,v,c),M(u,o,i,h,g,n.graticule,c),T(u,i,n.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const u=2*p*Math.PI/o-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=A(g,r,s,c),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(u,i.curveTension)).attr("class",`radarCurve-${p}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;r({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),H=s(()=>{d.reset(),S()},"clear"),L=s(()=>d.records.stack[0],"getRoot"),X=s(()=>d.records.cnt,"getCount"),z=A.treeView,R=s(()=>u(z,N().treeView),"getConfig"),W=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const a={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(a),d.records.stack.push(a)},"addNode"),E={clear:H,addNode:W,getRoot:L,getCount:X,getConfig:R,getAccTitle:y,getAccDescription:T,getDiagramTitle:B,setAccDescription:C,setAccTitle:f,setDiagramTitle:x},m=E,F=s(e=>{D(e,m),e.nodes.map(t=>m.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await $("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,n,o)=>{const c=n.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:g,width:r}=c.node().getBBox(),l=g+o.paddingY*2,i=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+l/2),a.BBox={x:e,y:t,width:i,height:l}},"positionLabel"),b=s((e,t,a,n,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",n).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,a)=>{let n=0,o=0;const c=s((r,l,i,h)=>{const v=h*(i.rowIndent+i.paddingX);Y(v,n,l,r,i);const{height:p,width:w}=l.BBox;b(r,v-i.rowIndent,n+p/2,v,n+p/2,i.lineThickness),o=Math.max(o,v+w),n+=p},"drawNode"),g=s((r,l=0)=>{c(e,r,a,l),r.children.forEach(p=>{g(p,l+1)});const{x:i,y:h,height:v}=r.BBox;if(r.children.length){const{y:p,height:w}=r.children[r.children.length-1].BBox;b(e,i+a.paddingX,h+v,i+a.paddingX,p+w/2+a.lineThickness/2,a.lineThickness)}},"processNode");return g(t),{totalHeight:n,totalWidth:o}},"drawTree"),j=s((e,t,a,n)=>{k.debug(`Rendering treeView diagram
      +import{q as x,b as f,s as C,t as B,g as T,a as y,_ as s,H as u,l as k,L as V,e as _,F as N,A as S,I as A}from"./mermaid.core-Br9os_fu.js";import{p as D}from"./chunk-4BX2VUAB-DHez2dpA.js";import{I}from"./chunk-QZHKN3VN-SK1ytu-J.js";import{p as $}from"./wardley-L42UT6IY-Bnsl155y.js";import"./index-DIKFd2HX.js";var d=new I(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),H=s(()=>{d.reset(),S()},"clear"),L=s(()=>d.records.stack[0],"getRoot"),X=s(()=>d.records.cnt,"getCount"),z=A.treeView,R=s(()=>u(z,N().treeView),"getConfig"),W=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const a={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(a),d.records.stack.push(a)},"addNode"),E={clear:H,addNode:W,getRoot:L,getCount:X,getConfig:R,getAccTitle:y,getAccDescription:T,getDiagramTitle:B,setAccDescription:C,setAccTitle:f,setDiagramTitle:x},m=E,F=s(e=>{D(e,m),e.nodes.map(t=>m.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await $("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,n,o)=>{const c=n.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:g,width:r}=c.node().getBBox(),l=g+o.paddingY*2,i=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+l/2),a.BBox={x:e,y:t,width:i,height:l}},"positionLabel"),b=s((e,t,a,n,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",n).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,a)=>{let n=0,o=0;const c=s((r,l,i,h)=>{const v=h*(i.rowIndent+i.paddingX);Y(v,n,l,r,i);const{height:p,width:w}=l.BBox;b(r,v-i.rowIndent,n+p/2,v,n+p/2,i.lineThickness),o=Math.max(o,v+w),n+=p},"drawNode"),g=s((r,l=0)=>{c(e,r,a,l),r.children.forEach(p=>{g(p,l+1)});const{x:i,y:h,height:v}=r.BBox;if(r.children.length){const{y:p,height:w}=r.children[r.children.length-1].BBox;b(e,i+a.paddingX,h+v,i+a.paddingX,p+w/2+a.lineThickness/2,a.lineThickness)}},"processNode");return g(t),{totalHeight:n,totalWidth:o}},"drawTree"),j=s((e,t,a,n)=>{k.debug(`Rendering treeView diagram
       `+e);const o=n.db,c=o.getRoot(),g=o.getConfig(),r=V(t),l=r.append("g");l.attr("class","tree-view");const{totalHeight:i,totalWidth:h}=q(l,c,g);r.attr("viewBox",`-${g.lineThickness/2} 0 ${h} ${i}`),_(r,i,h,g.useMaxWidth)},"draw"),G={draw:j},J=G,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:a,lineColor:n}=u(K,e);return`
           .treeView-node-label {
               font-size: ${t};
      diff --git a/apps/pythinker-code/dist-web/assets/diagram-KO2AKTUF-D8nRxl1j.js b/apps/pythinker-code/dist-web/assets/diagram-KO2AKTUF-y70M5fzs.js
      similarity index 98%
      rename from apps/pythinker-code/dist-web/assets/diagram-KO2AKTUF-D8nRxl1j.js
      rename to apps/pythinker-code/dist-web/assets/diagram-KO2AKTUF-y70M5fzs.js
      index c96a5004b..f8fad4e4d 100644
      --- a/apps/pythinker-code/dist-web/assets/diagram-KO2AKTUF-D8nRxl1j.js
      +++ b/apps/pythinker-code/dist-web/assets/diagram-KO2AKTUF-y70M5fzs.js
      @@ -1,3 +1,3 @@
      -import{p as re}from"./chunk-4BX2VUAB-Df7H4Pbw.js";import{t as oe,q as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as T,d as ue,G as xe,A as fe,H as ge,F as M,I as he,i as y,w as P,ak as pe}from"./mermaid.core-Dza7SVX6.js";import{p as be,i as ve}from"./wardley-L42UT6IY-Dr9wBWEv.js";import"./index-BMmTKsPq.js";var $="position frame",D="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=L(i,n.dataEntities,t);e=v(e,{$kind:$,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function G(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(G,"calculateEntityVisualProps");function L(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
      "};let c=`${P(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-4BX2VUAB-DHez2dpA.js";import{t as oe,q as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as T,d as ue,G as xe,A as fe,H as ge,F as M,I as he,i as y,w as P,ak as pe}from"./mermaid.core-Br9os_fu.js";import{p as be,i as ve}from"./wardley-L42UT6IY-Bnsl155y.js";import"./index-DIKFd2HX.js";var $="position frame",D="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=L(i,n.dataEntities,t);e=v(e,{$kind:$,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function G(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(G,"calculateEntityVisualProps");function L(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
      "};let c=`${P(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="
      ")}const m=r!==void 0;m&&(c+=`

      ${r}`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(L,"calculateTextProps");function V(e,n){const t=n,i=G(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:D,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[$]:V,[S]:J},Be={[D]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=T(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var Te=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=T(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),$e={draw:Te},De=o(e=>"","getStyles"),Ne=De,He={parser:Ee,db:F,renderer:$e,styles:Ne};export{He as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-LMA3HP47-D0dO95EA.js b/apps/pythinker-code/dist-web/assets/diagram-LMA3HP47-BRRoF6Yv.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/diagram-LMA3HP47-D0dO95EA.js rename to apps/pythinker-code/dist-web/assets/diagram-LMA3HP47-BRRoF6Yv.js index b96079e72..bb260279e 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-LMA3HP47-D0dO95EA.js +++ b/apps/pythinker-code/dist-web/assets/diagram-LMA3HP47-BRRoF6Yv.js @@ -1,4 +1,4 @@ -import{_ as b,H as u,L as $,e as B,l as m,b as C,a as S,q as D,t as T,g as F,s as P,F as z,I as A,A as E}from"./mermaid.core-Dza7SVX6.js";import{p as W}from"./chunk-4BX2VUAB-Df7H4Pbw.js";import{p as _}from"./wardley-L42UT6IY-Dr9wBWEv.js";import"./index-BMmTKsPq.js";var L=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=C,this.getAccTitle=S,this.setDiagramTitle=D,this.getDiagramTitle=T,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){E(),this.packet=[]}},N=1e4,I=b((t,e)=>{W(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),I(e,r)},"parse")},Y=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),B(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())H(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:Y},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` +import{_ as b,H as u,L as $,e as B,l as m,b as C,a as S,q as D,t as T,g as F,s as P,F as z,I as A,A as E}from"./mermaid.core-Br9os_fu.js";import{p as W}from"./chunk-4BX2VUAB-DHez2dpA.js";import{p as _}from"./wardley-L42UT6IY-Bnsl155y.js";import"./index-DIKFd2HX.js";var L=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=C,this.getAccTitle=S,this.setDiagramTitle=D,this.getDiagramTitle=T,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){E(),this.packet=[]}},N=1e4,I=b((t,e)=>{W(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),I(e,r)},"parse")},Y=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),B(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())H(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),O={draw:Y},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/pythinker-code/dist-web/assets/diagram-OG6HWLK6-DeIk_zMC.js b/apps/pythinker-code/dist-web/assets/diagram-OG6HWLK6-CGgx3Kmb.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/diagram-OG6HWLK6-DeIk_zMC.js rename to apps/pythinker-code/dist-web/assets/diagram-OG6HWLK6-CGgx3Kmb.js index 17f477119..db51ed434 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-OG6HWLK6-DeIk_zMC.js +++ b/apps/pythinker-code/dist-web/assets/diagram-OG6HWLK6-CGgx3Kmb.js @@ -1,4 +1,4 @@ -import{_ as w,a1 as de,F as Q,H as J,L as he,e as ue,l as K,bd as P,d as Y,b as pe,a as fe,q as me,t as ge,g as ye,s as Se,I as ve,be as xe,A as be}from"./mermaid.core-Dza7SVX6.js";import{s as we}from"./chunk-2J33WTMH-VeUyViKL.js";import{p as Ce}from"./chunk-4BX2VUAB-Df7H4Pbw.js";import{p as Te}from"./wardley-L42UT6IY-Dr9wBWEv.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as Z}from"./ordinal-Cboi1Yqb.js";import"./index-BMmTKsPq.js";import"./init-Gi6I4Gst.js";function Le(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function $e(){return this.eachAfter(Le)}function Ae(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function Fe(e,a){for(var n=this,l=[n],r,o,d=-1;n=l.pop();)if(e.call(a,n,++d,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ne(e,a){for(var n=this,l=[n],r=[],o,d,h,m=-1;n=l.pop();)if(r.push(n),o=n.children)for(d=0,h=o.length;d=0;)n+=l[r].value;a.value=n})}function _e(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function ke(e){for(var a=this,n=ze(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function ze(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function De(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function Pe(){return Array.from(this)}function Be(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Re(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ee(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--h)r.push(o=d[h]=new j(d[h])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(qe)}function We(){return ee(this).eachBefore(Oe)}function He(e){return e.children}function Ie(e){return Array.isArray(e)?e[1]:null}function Oe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function qe(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=ee.prototype={constructor:j,count:$e,each:Ae,eachAfter:Ne,eachBefore:Fe,find:Me,sum:Ve,sort:_e,path:ke,ancestors:De,descendants:Pe,leaves:Be,links:Re,copy:We,[Symbol.iterator]:Ee};function Ge(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Xe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ye(e,a,n,l,r){for(var o=e.children,d,h=-1,m=o.length,c=e.value&&(l-a)/e.value;++hM&&(M=c),V=p*p*R,N=Math.max(M/V,V/g),N>z){p-=c;break}z=N}d.push(m={value:p,dice:x1?l:1)},n})(Ue);function Ke(){var e=Je,a=!1,n=1,l=1,r=[0],o=O,d=O,h=O,m=O,c=O;function u(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Xe),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,p=s.x1-x,g=s.y1-x;p{xe(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function ne(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(ne,"buildHierarchy");var Qe=w((e,a)=>{Ce(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,m=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};n.push(b)}const l=ne(n),r=w((o,d)=>{for(const h of o)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(l,0)},"populate"),et=w(e=>e.name?String(e.name):"","getItemName"),le={parser:{yy:void 0},parse:w(async e=>{try{const n=await Te("treemap",e);K.debug("Treemap AST:",n);const l=le.parser?.yy;if(!(l instanceof ae))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(n,l)}catch(a){throw K.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,G=25,at=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),d=o.padding??tt,h=r.getDiagramTitle(),m=r.getRoot(),{themeVariables:c}=Q();if(!m)return;const u=h?30:0,b=he(a),s=o.nodeWidth?o.nodeWidth*B:960,x=o.nodeHeight?o.nodeHeight*B:500,S=s,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ue(b,v,S,o.useMaxWidth);let p;try{const t=o.valueFormat||",";if(t==="$0,0")p=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";p=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);p=w(f=>"$"+I(i||"")(f),"valueFormat")}else p=I(t)}catch(t){K.error("Error creating format function:",t),p=I(",")}const g=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ee(m).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),te=Ke().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+B:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?B:0).paddingRight(t=>t.children&&t.children.length>0?B:0).paddingBottom(t=>t.children&&t.children.length>0?B:0).round(!0)(R),re=te.descendants().filter(t=>t.children&&t.children.length>0),E=z.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);E.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),E.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),E.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>g(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>M(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=P({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),E.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+N(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let $;o.showValues!==!1&&t.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),o.showValues!==!1&&E.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?p(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const se=te.leaves(),X=z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);X.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("style",t=>P({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),X.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(t.data.name)+";",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,k=6,W=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let H=Math.max(k,Math.min(F,Math.round(y*T))),U=y+W+H;for(;U>A&&y>_&&(y--,H=Math.max(k,Math.min(F,Math.round(y*T))),!(HD||y<_||A(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?p(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const k=(i.y1-i.y0)/2+$/2+_;f.attr("y",k);const W=i.x1-i.x0,oe=i.y1-i.y0-4,ce=W-8;f.node().getComputedTextLength()>ce||k+F>oe||F{const a=de(),n=Q(),l=J(a,n.themeVariables),r=J(rt,e),o=r.titleColor??l.titleColor,d=r.labelColor??l.textColor,h=r.valueColor??l.textColor;return` +import{_ as w,a1 as de,F as Q,H as J,L as he,e as ue,l as K,bd as P,d as Y,b as pe,a as fe,q as me,t as ge,g as ye,s as Se,I as ve,be as xe,A as be}from"./mermaid.core-Br9os_fu.js";import{s as we}from"./chunk-2J33WTMH-DtergGMb.js";import{p as Ce}from"./chunk-4BX2VUAB-DHez2dpA.js";import{p as Te}from"./wardley-L42UT6IY-Bnsl155y.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as Z}from"./ordinal-Cboi1Yqb.js";import"./index-DIKFd2HX.js";import"./init-Gi6I4Gst.js";function Le(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function $e(){return this.eachAfter(Le)}function Ae(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function Fe(e,a){for(var n=this,l=[n],r,o,d=-1;n=l.pop();)if(e.call(a,n,++d,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ne(e,a){for(var n=this,l=[n],r=[],o,d,h,m=-1;n=l.pop();)if(r.push(n),o=n.children)for(d=0,h=o.length;d=0;)n+=l[r].value;a.value=n})}function _e(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function ke(e){for(var a=this,n=ze(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function ze(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function De(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function Pe(){return Array.from(this)}function Be(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Re(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ee(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--h)r.push(o=d[h]=new j(d[h])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(qe)}function We(){return ee(this).eachBefore(Oe)}function He(e){return e.children}function Ie(e){return Array.isArray(e)?e[1]:null}function Oe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function qe(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=ee.prototype={constructor:j,count:$e,each:Ae,eachAfter:Ne,eachBefore:Fe,find:Me,sum:Ve,sort:_e,path:ke,ancestors:De,descendants:Pe,leaves:Be,links:Re,copy:We,[Symbol.iterator]:Ee};function Ge(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Xe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ye(e,a,n,l,r){for(var o=e.children,d,h=-1,m=o.length,c=e.value&&(l-a)/e.value;++hM&&(M=c),V=p*p*R,N=Math.max(M/V,V/g),N>z){p-=c;break}z=N}d.push(m={value:p,dice:x1?l:1)},n})(Ue);function Ke(){var e=Je,a=!1,n=1,l=1,r=[0],o=O,d=O,h=O,m=O,c=O;function u(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Xe),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,p=s.x1-x,g=s.y1-x;p{xe(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function ne(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(ne,"buildHierarchy");var Qe=w((e,a)=>{Ce(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,m=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};n.push(b)}const l=ne(n),r=w((o,d)=>{for(const h of o)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(l,0)},"populate"),et=w(e=>e.name?String(e.name):"","getItemName"),le={parser:{yy:void 0},parse:w(async e=>{try{const n=await Te("treemap",e);K.debug("Treemap AST:",n);const l=le.parser?.yy;if(!(l instanceof ae))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(n,l)}catch(a){throw K.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,G=25,at=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),d=o.padding??tt,h=r.getDiagramTitle(),m=r.getRoot(),{themeVariables:c}=Q();if(!m)return;const u=h?30:0,b=he(a),s=o.nodeWidth?o.nodeWidth*B:960,x=o.nodeHeight?o.nodeHeight*B:500,S=s,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ue(b,v,S,o.useMaxWidth);let p;try{const t=o.valueFormat||",";if(t==="$0,0")p=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";p=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);p=w(f=>"$"+I(i||"")(f),"valueFormat")}else p=I(t)}catch(t){K.error("Error creating format function:",t),p=I(",")}const g=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ee(m).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),te=Ke().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+B:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?B:0).paddingRight(t=>t.children&&t.children.length>0?B:0).paddingBottom(t=>t.children&&t.children.length>0?B:0).round(!0)(R),re=te.descendants().filter(t=>t.children&&t.children.length>0),E=z.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);E.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),E.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),E.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>g(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>M(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=P({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),E.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+N(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=Y(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let $;o.showValues!==!1&&t.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),o.showValues!==!1&&E.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?p(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const se=te.leaves(),X=z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);X.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("style",t=>P({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),X.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(t.data.name)+";",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=Y(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,k=6,W=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let H=Math.max(k,Math.min(F,Math.round(y*T))),U=y+W+H;for(;U>A&&y>_&&(y--,H=Math.max(k,Math.min(F,Math.round(y*T))),!(HD||y<_||A(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?p(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const k=(i.y1-i.y0)/2+$/2+_;f.attr("y",k);const W=i.x1-i.x0,oe=i.y1-i.y0-4,ce=W-8;f.node().getComputedTextLength()>ce||k+F>oe||F{const a=de(),n=Q(),l=J(a,n.themeVariables),r=J(rt,e),o=r.titleColor??l.titleColor,d=r.labelColor??l.textColor,h=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/erDiagram-TEJ5UH35-DqreqXxL.js b/apps/pythinker-code/dist-web/assets/erDiagram-TEJ5UH35-BLZpvXyd.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/erDiagram-TEJ5UH35-DqreqXxL.js rename to apps/pythinker-code/dist-web/assets/erDiagram-TEJ5UH35-BLZpvXyd.js index 6bc1cb7cc..05f9fc8cd 100644 --- a/apps/pythinker-code/dist-web/assets/erDiagram-TEJ5UH35-DqreqXxL.js +++ b/apps/pythinker-code/dist-web/assets/erDiagram-TEJ5UH35-BLZpvXyd.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-55IACEB6-anBFgZU6.js";import{s as Bt}from"./chunk-2J33WTMH-VeUyViKL.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,q as Gt,t as Kt,c as it,l as V,A as Ut,y as Zt,C as jt,E as Wt,p as Qt,r as Xt,d as Ht,u as qt}from"./mermaid.core-Dza7SVX6.js";import{c as Jt}from"./channel-efrhVSpc.js";import"./index-BMmTKsPq.js";var _t=(function(){var e=l(function(C,n,c,o){for(c=c||{},o=C.length;o--;c[C[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],T=[1,19],Q=[1,28],M=[1,29],D=[1,20],I=[1,18],S=[1,21],R=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],A=[1,46],F=[1,55],Y=[40,48,50,51,52,70,71],P=[1,66],z=[1,64],N=[1,61],G=[1,65],K=[1,67],X=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],gt=[65,66,67,68,69],bt=[1,84],kt=[1,83],mt=[1,81],Et=[1,82],Tt=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,92],q=[1,91],J=[1,90],U=[19,58],St=[1,101],Ot=[1,100],ht=[19,58,60,62],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 67:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 79:case 80:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 66:case 69:this.$=t[s];break;case 68:t[s-2].push(t[s]),this.$=t[s-2];break;case 70:this.$=t[s].replace(/"/g,"");break;case 71:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:T,43:Q,44:M,48:D,50:I,51:S,52:R},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:T,43:Q,44:M,48:D,50:I,51:S,52:R},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:nt,66:at,67:ct,68:ot,69:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:A},{16:47,40:O,41:A},{16:48,40:O,41:A},e(i,[2,4]),{11:49,40:T,48:D,50:I,51:S,52:R},{16:50,40:O,41:A},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:T,48:D,50:I,51:S,52:R},{64:57,70:[1,58],71:[1,59]},e(Y,[2,72]),e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:N,45:62,46:63,48:G,49:K},e(X,[2,37]),e(X,[2,38]),{16:68,40:O,41:A,42:N},{13:P,38:69,41:z,42:N,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{63:35,12:72,17:[1,73],42:N,65:nt,66:at,67:ct,68:ot,69:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:nt,66:at,67:ct,68:ot,69:lt},e(gt,[2,77]),e(gt,[2,78]),{6:bt,10:kt,39:80,42:mt,47:Et},{40:[1,85],41:[1,86]},e(Tt,[2,43],{46:87,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:N}),{6:bt,10:kt,39:88,42:mt,47:Et},{14:89,40:H,50:q,72:J},{16:93,40:O,41:A},{11:94,40:T,48:D,50:I,51:S,52:R},{18:95,19:[1,96],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:97,57:98,59:99,61:St,62:Ot}),e([19,58,61,62],[2,66]),e(i,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(i,[2,36]),{13:P,41:z,45:104,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(X,[2,39]),e(X,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,79]),e(i,[2,80]),e(i,[2,81]),{13:[1,105],42:N},{13:[1,107],15:[1,106]},{19:[1,108]},e(i,[2,15]),e(U,[2,62],{57:109,60:[1,110],62:Ot}),e(U,[2,63]),e(ht,[2,67]),e(U,[2,70]),e(ht,[2,69]),{18:111,19:[1,112],53:53,54:54,58:F},{16:113,40:O,41:A},e(Tt,[2,44],{46:87,13:P,41:z,48:G,49:K}),{14:114,40:H,50:q,72:J},{16:115,40:O,41:A},{14:116,40:H,50:q,72:J},e(i,[2,13]),e(U,[2,64]),{59:117,61:St},{19:[1,118]},e(i,[2,20]),e(i,[2,23],{17:[1,119],42:N}),e(i,[2,11]),{13:[1,120],42:N},e(i,[2,10]),e(ht,[2,68]),e(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:F},{14:123,40:H,50:q,72:J},{19:[1,124]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,At=0,Dt=2,Nt=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function Ct(){var b;return b=r.pop()||_.lex()||Nt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(Ct,"lex");for(var g,v,k,ft,w={},et,E,It,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Ct()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: +import{g as Mt}from"./chunk-55IACEB6-BuzvVrQ6.js";import{s as Bt}from"./chunk-2J33WTMH-DtergGMb.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,q as Gt,t as Kt,c as it,l as V,A as Ut,y as Zt,C as jt,E as Wt,p as Qt,r as Xt,d as Ht,u as qt}from"./mermaid.core-Br9os_fu.js";import{c as Jt}from"./channel-DmsKuGC5.js";import"./index-DIKFd2HX.js";var _t=(function(){var e=l(function(C,n,c,o){for(c=c||{},o=C.length;o--;c[C[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],T=[1,19],Q=[1,28],M=[1,29],D=[1,20],I=[1,18],S=[1,21],R=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],A=[1,46],F=[1,55],Y=[40,48,50,51,52,70,71],P=[1,66],z=[1,64],N=[1,61],G=[1,65],K=[1,67],X=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],gt=[65,66,67,68,69],bt=[1,84],kt=[1,83],mt=[1,81],Et=[1,82],Tt=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,92],q=[1,91],J=[1,90],U=[19,58],St=[1,101],Ot=[1,100],ht=[19,58,60,62],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 67:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 79:case 80:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 66:case 69:this.$=t[s];break;case 68:t[s-2].push(t[s]),this.$=t[s-2];break;case 70:this.$=t[s].replace(/"/g,"");break;case 71:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:T,43:Q,44:M,48:D,50:I,51:S,52:R},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:T,43:Q,44:M,48:D,50:I,51:S,52:R},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:nt,66:at,67:ct,68:ot,69:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:A},{16:47,40:O,41:A},{16:48,40:O,41:A},e(i,[2,4]),{11:49,40:T,48:D,50:I,51:S,52:R},{16:50,40:O,41:A},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:T,48:D,50:I,51:S,52:R},{64:57,70:[1,58],71:[1,59]},e(Y,[2,72]),e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:N,45:62,46:63,48:G,49:K},e(X,[2,37]),e(X,[2,38]),{16:68,40:O,41:A,42:N},{13:P,38:69,41:z,42:N,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{63:35,12:72,17:[1,73],42:N,65:nt,66:at,67:ct,68:ot,69:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:nt,66:at,67:ct,68:ot,69:lt},e(gt,[2,77]),e(gt,[2,78]),{6:bt,10:kt,39:80,42:mt,47:Et},{40:[1,85],41:[1,86]},e(Tt,[2,43],{46:87,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:N}),{6:bt,10:kt,39:88,42:mt,47:Et},{14:89,40:H,50:q,72:J},{16:93,40:O,41:A},{11:94,40:T,48:D,50:I,51:S,52:R},{18:95,19:[1,96],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:97,57:98,59:99,61:St,62:Ot}),e([19,58,61,62],[2,66]),e(i,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(i,[2,36]),{13:P,41:z,45:104,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(X,[2,39]),e(X,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,79]),e(i,[2,80]),e(i,[2,81]),{13:[1,105],42:N},{13:[1,107],15:[1,106]},{19:[1,108]},e(i,[2,15]),e(U,[2,62],{57:109,60:[1,110],62:Ot}),e(U,[2,63]),e(ht,[2,67]),e(U,[2,70]),e(ht,[2,69]),{18:111,19:[1,112],53:53,54:54,58:F},{16:113,40:O,41:A},e(Tt,[2,44],{46:87,13:P,41:z,48:G,49:K}),{14:114,40:H,50:q,72:J},{16:115,40:O,41:A},{14:116,40:H,50:q,72:J},e(i,[2,13]),e(U,[2,64]),{59:117,61:St},{19:[1,118]},e(i,[2,20]),e(i,[2,23],{17:[1,119],42:N}),e(i,[2,11]),{13:[1,120],42:N},e(i,[2,10]),e(ht,[2,68]),e(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:F},{14:123,40:H,50:q,72:J},{19:[1,124]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,At=0,Dt=2,Nt=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function Ct(){var b;return b=r.pop()||_.lex()||Nt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(Ct,"lex");for(var g,v,k,ft,w={},et,E,It,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Ct()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: `+_.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[g]||g)+"'":yt="Parse error on line "+(tt+1)+": Unexpected "+(g==Nt?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:pt,expected:st})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(k[0]){case 1:o.push(g),p.push(_.yytext),t.push(_.yylloc),o.push(k[1]),g=null,At=_.yyleng,s=_.yytext,tt=_.yylineno,pt=_.yylloc;break;case 2:if(E=this.productions_[k[1]][1],w.$=p[p.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},wt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[s,At,tt,x.yy,k[1],p,t].concat(Lt)),typeof ft<"u")return ft;E&&(o=o.slice(0,-1*E*2),p=p.slice(0,-1*E),t=t.slice(0,-1*E)),o.push(this.productions_[k[1]][0]),p.push(w.$),t.push(w._$),It=Z[o[o.length-2]][o[o.length-1]],o.push(It);break;case 3:return!0}}return!0},"parse")},vt=(function(){var C={EOF:1,parseError:l(function(c,o){if(this.yy.parser)this.yy.parser.parseError(c,o);else throw new Error(c)},"parseError"),setInput:l(function(n,c){return this.yy=c||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var c=n.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var c=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),c=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-I6XJVG4X-J83xwYVI.js b/apps/pythinker-code/dist-web/assets/flowDiagram-I6XJVG4X-DFhQq6QC.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/flowDiagram-I6XJVG4X-J83xwYVI.js rename to apps/pythinker-code/dist-web/assets/flowDiagram-I6XJVG4X-DFhQq6QC.js index 8343dbb11..36d434167 100644 --- a/apps/pythinker-code/dist-web/assets/flowDiagram-I6XJVG4X-J83xwYVI.js +++ b/apps/pythinker-code/dist-web/assets/flowDiagram-I6XJVG4X-DFhQq6QC.js @@ -1,4 +1,4 @@ -import{g as qe}from"./chunk-FMBD7UC4-ZEd_TODf.js";import{_ as b,o as Oe,l as Q,c as g1,p as He,r as Xe,u as ie,b as Qe,s as Je,q as Ze,a as $e,g as et,t as tt,k as st,v as it,J as rt,x as at,y as te,d as se,z as nt,A as ut,B as ot,C as lt}from"./mermaid.core-Dza7SVX6.js";import{c as ct}from"./chunk-ND2GUHAM-CeYe8rvb.js";import{g as ht}from"./chunk-55IACEB6-anBFgZU6.js";import{s as dt}from"./chunk-2J33WTMH-VeUyViKL.js";import{c as pt}from"./channel-efrhVSpc.js";import"./index-BMmTKsPq.js";var ft="flowchart-",gt=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Qe,this.setAccDescription=Je,this.setDiagramTitle=Ze,this.getAccTitle=$e,this.getAccDescription=et,this.getDiagramTitle=tt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return st.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},f){if(!e||e.trim().length===0)return;let n;if(f!==void 0){let E;f.includes(` +import{g as qe}from"./chunk-FMBD7UC4-B_DrLljO.js";import{_ as b,o as Oe,l as Q,c as g1,p as He,r as Xe,u as ie,b as Qe,s as Je,q as Ze,a as $e,g as et,t as tt,k as st,v as it,J as rt,x as at,y as te,d as se,z as nt,A as ut,B as ot,C as lt}from"./mermaid.core-Br9os_fu.js";import{c as ct}from"./chunk-ND2GUHAM-B0b4a7yH.js";import{g as ht}from"./chunk-55IACEB6-BuzvVrQ6.js";import{s as dt}from"./chunk-2J33WTMH-DtergGMb.js";import{c as pt}from"./channel-DmsKuGC5.js";import"./index-DIKFd2HX.js";var ft="flowchart-",gt=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Qe,this.setAccDescription=Je,this.setDiagramTitle=Ze,this.getAccTitle=$e,this.getAccDescription=et,this.getDiagramTitle=tt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return st.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},f){if(!e||e.trim().length===0)return;let n;if(f!==void 0){let E;f.includes(` `)?E=f+` `:E=`{ `+f+` diff --git a/apps/pythinker-code/dist-web/assets/ganttDiagram-6RSMTGT7-LeaK0Z0S.js b/apps/pythinker-code/dist-web/assets/ganttDiagram-6RSMTGT7-CqxQlRCC.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ganttDiagram-6RSMTGT7-LeaK0Z0S.js rename to apps/pythinker-code/dist-web/assets/ganttDiagram-6RSMTGT7-CqxQlRCC.js index 437bce954..d8be49c79 100644 --- a/apps/pythinker-code/dist-web/assets/ganttDiagram-6RSMTGT7-LeaK0Z0S.js +++ b/apps/pythinker-code/dist-web/assets/ganttDiagram-6RSMTGT7-CqxQlRCC.js @@ -1,4 +1,4 @@ -import{bf as on,bg as $n,bh as cn,bi as un,bj as ln,bk as ue,bl as On,b4 as oe,g as Hn,s as Nn,t as Pn,q as Rn,a as Vn,b as zn,_ as d,c as Yt,d as Zt,e as qn,bm as rt,l as Tt,k as Bn,j as Zn,A as Xn,u as Gn}from"./mermaid.core-Dza7SVX6.js";import{b as jn,t as Ne,c as Qn,a as Jn,l as Kn}from"./linear-BB9wM_yi.js";import{i as tr}from"./init-Gi6I4Gst.js";import"./index-BMmTKsPq.js";import"./defaultLocale-DX6XiGOO.js";function er(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function ir(t){return"translate("+t+",0)"}function sr(t){return"translate(0,"+t+")"}function ar(t){return e=>+t(e)}function or(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function cr(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,a=6,c=6,m=3,Y=typeof window<"u"&&window.devicePixelRatio>1?0:.5,C=t===Gt||t===Xt?-1:1,p=t===Xt||t===le?"x":"y",L=t===Gt||t===xe?ir:sr;function _(S){var B=r??(e.ticks?e.ticks.apply(e,n):e.domain()),A=i??(e.tickFormat?e.tickFormat.apply(e,n):rr),U=Math.max(a,0)+m,I=e.range(),N=+I[0]+Y,W=+I[I.length-1]+Y,q=(e.bandwidth?or:ar)(e.copy(),Y),j=S.selection?S.selection():S,k=j.selectAll(".domain").data([null]),g=j.selectAll(".tick").data(B,e).order(),y=g.exit(),h=g.enter().append("g").attr("class","tick"),D=g.select("line"),w=g.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),g=g.merge(h),D=D.merge(h.append("line").attr("stroke","currentColor").attr(p+"2",C*a)),w=w.merge(h.append("text").attr("fill","currentColor").attr(p,C*U).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),S!==j&&(k=k.transition(S),g=g.transition(S),D=D.transition(S),w=w.transition(S),y=y.transition(S).attr("opacity",Pe).attr("transform",function(T){return isFinite(T=q(T))?L(T+Y):this.getAttribute("transform")}),h.attr("opacity",Pe).attr("transform",function(T){var v=this.parentNode.__axis;return L((v&&isFinite(v=v(T))?v:q(T))+Y)})),y.remove(),k.attr("d",t===Xt||t===le?c?"M"+C*c+","+N+"H"+Y+"V"+W+"H"+C*c:"M"+Y+","+N+"V"+W:c?"M"+N+","+C*c+"V"+Y+"H"+W+"V"+C*c:"M"+N+","+Y+"H"+W),g.attr("opacity",1).attr("transform",function(T){return L(q(T)+Y)}),D.attr(p+"2",C*a),w.attr(p,C*U).text(A),j.filter(cr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),j.each(function(){this.__axis=q})}return _.scale=function(S){return arguments.length?(e=S,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(S){return arguments.length?(n=S==null?[]:Array.from(S),_):n.slice()},_.tickValues=function(S){return arguments.length?(r=S==null?null:Array.from(S),_):r&&r.slice()},_.tickFormat=function(S){return arguments.length?(i=S,_):i},_.tickSize=function(S){return arguments.length?(a=c=+S,_):a},_.tickSizeInner=function(S){return arguments.length?(a=+S,_):a},_.tickSizeOuter=function(S){return arguments.length?(c=+S,_):c},_.tickPadding=function(S){return arguments.length?(m=+S,_):m},_.offset=function(S){return arguments.length?(Y=+S,_):Y},_}function ur(t){return fn(Gt,t)}function lr(t){return fn(xe,t)}const fr=Math.PI/180,dr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,hr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=$n(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),a,c;return e===n&&n===r?a=c=i:(a=fe((.4360747*e+.3850649*n+.1430804*r)/dn),c=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(a-i),200*(i-c),t.opacity)}function mr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,mr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>hr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function gr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const c=i(a),m=i.ceil(a);return a-c(e(a=new Date(+a),c==null?1:Math.floor(c)),a),i.range=(a,c,m)=>{const Y=[];if(a=i.ceil(a),m=m==null?1:Math.floor(m),!(a0))return Y;let C;do Y.push(C=new Date(+a)),e(a,m),t(a);while(Cet(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,m)=>{if(c>=c)if(m<0)for(;++m<=0;)for(;e(c,-1),!a(c););else for(;--m>=0;)for(;e(c,1),!a(c););}),n&&(i.count=(a,c)=>(ge.setTime(+a),ye.setTime(+c),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?c=>r(c)%a===0:c=>i.count(0,c)%a===0):i)),i}const Et=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Re=yt*30,ke=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Ot.range;const vr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());vr.range;const Ht=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ht.range;const Tr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());Tr.range;const xt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const xr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));xr.range;function Dt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const Rt=Dt(0),Nt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);Rt.range;Nt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),br=Mt(2),wr=Mt(3),It=Mt(4),Dr=Mt(5),Mr=Mt(6);wn.range;re.range;br.range;wr.range;It.range;Dr.range;Mr.range;const Pt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Pt.range;const Cr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Cr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function Sr(t,e,n,r,i,a){const c=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[a,1,ct],[a,5,5*ct],[a,15,15*ct],[a,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Re],[e,3,3*Re],[t,1,ke]];function m(C,p,L){const _=pU).right(c,_);if(S===c.length)return t.every(Ne(C/ke,p/ke,L));if(S===0)return Et.every(Math.max(Ne(C,p,L),1));const[B,A]=c[_/c[S-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?($=ve(At(l.y,0,1)),Q=$.getUTCDay(),$=Q>4||Q===0?re.ceil($):re($),$=_e.offset($,(l.V-1)*7),l.y=$.getUTCFullYear(),l.m=$.getUTCMonth(),l.d=$.getUTCDate()+(l.w+6)%7):($=pe(At(l.y,0,1)),Q=$.getDay(),$=Q>4||Q===0?Nt.ceil($):Nt($),$=xt.offset($,(l.V-1)*7),l.y=$.getFullYear(),l.m=$.getMonth(),l.d=$.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),Q="Z"in l?ve(At(l.y,0,1)).getUTCDay():pe(At(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,ve(l)):pe(l)}}function y(M,H,R,l){for(var J=0,$=H.length,Q=R.length,G,it;J<$;){if(l>=Q)return-1;if(G=H.charCodeAt(J++),G===37){if(G=H.charAt(J++),it=j[G in Ve?H.charAt(J++):G],!it||(l=it(M,R,l))<0)return-1}else if(G!=R.charCodeAt(l++))return-1}return l}function h(M,H,R){var l=C.exec(H.slice(R));return l?(M.p=p.get(l[0].toLowerCase()),R+l[0].length):-1}function D(M,H,R){var l=S.exec(H.slice(R));return l?(M.w=B.get(l[0].toLowerCase()),R+l[0].length):-1}function w(M,H,R){var l=L.exec(H.slice(R));return l?(M.w=_.get(l[0].toLowerCase()),R+l[0].length):-1}function T(M,H,R){var l=I.exec(H.slice(R));return l?(M.m=N.get(l[0].toLowerCase()),R+l[0].length):-1}function v(M,H,R){var l=A.exec(H.slice(R));return l?(M.m=U.get(l[0].toLowerCase()),R+l[0].length):-1}function u(M,H,R){return y(M,e,H,R)}function f(M,H,R){return y(M,n,H,R)}function x(M,H,R){return y(M,r,H,R)}function b(M){return c[M.getDay()]}function F(M){return a[M.getDay()]}function o(M){return Y[M.getMonth()]}function X(M){return m[M.getMonth()]}function s(M){return i[+(M.getHours()>=12)]}function E(M){return 1+~~(M.getMonth()/3)}function z(M){return c[M.getUTCDay()]}function V(M){return a[M.getUTCDay()]}function P(M){return Y[M.getUTCMonth()]}function K(M){return m[M.getUTCMonth()]}function O(M){return i[+(M.getUTCHours()>=12)]}function st(M){return 1+~~(M.getUTCMonth()/3)}return{format:function(M){var H=k(M+="",W);return H.toString=function(){return M},H},parse:function(M){var H=g(M+="",!1);return H.toString=function(){return M},H},utcFormat:function(M){var H=k(M+="",q);return H.toString=function(){return M},H},utcParse:function(M){var H=g(M+="",!0);return H.toString=function(){return M},H}}}var Ve={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Ur=/^%/,Er=/[\\^$*+?|[\]().{}]/g;function Z(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function Lr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Hr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Pr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Zr(t,e,n){var r=Ur.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Xr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Gr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return Z(t.getDate(),e,2)}function jr(t,e){return Z(t.getHours(),e,2)}function Qr(t,e){return Z(t.getHours()%12||12,e,2)}function Jr(t,e){return Z(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return Z(t.getMilliseconds(),e,3)}function Kr(t,e){return Dn(t,e)+"000"}function ti(t,e){return Z(t.getMonth()+1,e,2)}function ei(t,e){return Z(t.getMinutes(),e,2)}function ni(t,e){return Z(t.getSeconds(),e,2)}function ri(t){var e=t.getDay();return e===0?7:e}function ii(t,e){return Z(Rt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function si(t,e){return t=Mn(t),Z(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ai(t){return t.getDay()}function oi(t,e){return Z(Nt.count(kt(t)-1,t),e,2)}function ci(t,e){return Z(t.getFullYear()%100,e,2)}function ui(t,e){return t=Mn(t),Z(t.getFullYear()%100,e,2)}function li(t,e){return Z(t.getFullYear()%1e4,e,4)}function fi(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),Z(t.getFullYear()%1e4,e,4)}function di(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Z(e/60|0,"0",2)+Z(e%60,"0",2)}function Ge(t,e){return Z(t.getUTCDate(),e,2)}function hi(t,e){return Z(t.getUTCHours(),e,2)}function mi(t,e){return Z(t.getUTCHours()%12||12,e,2)}function gi(t,e){return Z(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return Z(t.getUTCMilliseconds(),e,3)}function yi(t,e){return Cn(t,e)+"000"}function ki(t,e){return Z(t.getUTCMonth()+1,e,2)}function pi(t,e){return Z(t.getUTCMinutes(),e,2)}function vi(t,e){return Z(t.getUTCSeconds(),e,2)}function Ti(t){var e=t.getUTCDay();return e===0?7:e}function xi(t,e){return Z(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function bi(t,e){return t=Sn(t),Z(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function wi(t){return t.getUTCDay()}function Di(t,e){return Z(re.count(wt(t)-1,t),e,2)}function Mi(t,e){return Z(t.getUTCFullYear()%100,e,2)}function Ci(t,e){return t=Sn(t),Z(t.getUTCFullYear()%100,e,2)}function Si(t,e){return Z(t.getUTCFullYear()%1e4,e,4)}function _i(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),Z(t.getUTCFullYear()%1e4,e,4)}function Yi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Fi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fi(t){return St=Fr(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ui(t){return new Date(t)}function Ei(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,a,c,m,Y,C){var p=Qn(),L=p.invert,_=p.domain,S=C(".%L"),B=C(":%S"),A=C("%I:%M"),U=C("%I %p"),I=C("%a %d"),N=C("%b %d"),W=C("%B"),q=C("%Y");function j(k){return(Y(k)4&&(S+=7),_.add(S,n));return B.diff(A,"week")+1},m.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var Y=m.startOf;m.startOf=function(C,p){var L=this.$utils(),_=!!L.u(p)||p;return L.p(C)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(C,p)}}}))})(jt)),jt.exports}var Wi=Ai();const $i=oe(Wi);var Qt={exports:{}},Oi=Qt.exports,tn;function Hi(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Oi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,c=/\d\d?/,m=/\d*[^-_:/,()\s\d]+/,Y={},C=function(U){return(U=+U)+(U>68?1900:2e3)},p=function(U){return function(I){this[U]=+I}},L=[/[+-]\d\d:?(\d\d)?|Z/,function(U){(this.zone||(this.zone={})).offset=(function(I){if(!I||I==="Z")return 0;var N=I.match(/([+-]|\d\d)/g),W=60*N[1]+(+N[2]||0);return W===0?0:N[0]==="+"?-W:W})(U)}],_=function(U){var I=Y[U];return I&&(I.indexOf?I:I.s.concat(I.f))},S=function(U,I){var N,W=Y.meridiem;if(W){for(var q=1;q<=24;q+=1)if(U.indexOf(W(q,0,I))>-1){N=q>12;break}}else N=U===(I?"pm":"PM");return N},B={A:[m,function(U){this.afternoon=S(U,!1)}],a:[m,function(U){this.afternoon=S(U,!0)}],Q:[i,function(U){this.month=3*(U-1)+1}],S:[i,function(U){this.milliseconds=100*+U}],SS:[a,function(U){this.milliseconds=10*+U}],SSS:[/\d{3}/,function(U){this.milliseconds=+U}],s:[c,p("seconds")],ss:[c,p("seconds")],m:[c,p("minutes")],mm:[c,p("minutes")],H:[c,p("hours")],h:[c,p("hours")],HH:[c,p("hours")],hh:[c,p("hours")],D:[c,p("day")],DD:[a,p("day")],Do:[m,function(U){var I=Y.ordinal,N=U.match(/\d+/);if(this.day=N[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===U&&(this.day=W)}],w:[c,p("week")],ww:[a,p("week")],M:[c,p("month")],MM:[a,p("month")],MMM:[m,function(U){var I=_("months"),N=(_("monthsShort")||I.map((function(W){return W.slice(0,3)}))).indexOf(U)+1;if(N<1)throw new Error;this.month=N%12||N}],MMMM:[m,function(U){var I=_("months").indexOf(U)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,p("year")],YY:[a,function(U){this.year=C(U)}],YYYY:[/\d{4}/,p("year")],Z:L,ZZ:L};function A(U){var I,N;I=U,N=Y&&Y.formats;for(var W=(U=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(D,w,T){var v=T&&T.toUpperCase();return w||N[T]||n[T]||N[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(u,f,x){return f||x.slice(1)}))}))).match(r),q=W.length,j=0;j-1)return new Date((F==="X"?1e3:1)*b);var s=A(F)(b),E=s.year,z=s.month,V=s.day,P=s.hours,K=s.minutes,O=s.seconds,st=s.milliseconds,M=s.zone,H=s.week,R=new Date,l=V||(E||z?1:R.getDate()),J=E||R.getFullYear(),$=0;E&&!z||($=z>0?z-1:R.getMonth());var Q,G=P||0,it=K||0,at=O||0,pt=st||0;return M?new Date(Date.UTC(J,$,l,G,it,at,pt+60*M.offset*1e3)):o?new Date(Date.UTC(J,$,l,G,it,at,pt)):(Q=new Date(J,$,l,G,it,at,pt),H&&(Q=X(Q).week(H).toDate()),Q)}catch{return new Date("")}})(k,h,g,N),this.init(),v&&v!==!0&&(this.$L=this.locale(v).$L),T&&k!=this.format(h)&&(this.$d=new Date("")),Y={}}else if(h instanceof Array)for(var u=h.length,f=1;f<=u;f+=1){y[1]=h[f-1];var x=N.apply(this,y);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}f===u&&(this.$d=new Date(""))}else q.call(this,j)}}}))})(Qt)),Qt.exports}var Ni=Hi();const Pi=oe(Ni);var Jt={exports:{}},Ri=Jt.exports,en;function Vi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(c){var m=this,Y=this.$locale();if(!this.isValid())return a.bind(this)(c);var C=this.$utils(),p=(c||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(L){switch(L){case"Q":return Math.ceil((m.$M+1)/3);case"Do":return Y.ordinal(m.$D);case"gggg":return m.weekYear();case"GGGG":return m.isoWeekYear();case"wo":return Y.ordinal(m.week(),"W");case"w":case"ww":return C.s(m.week(),L==="w"?1:2,"0");case"W":case"WW":return C.s(m.isoWeek(),L==="W"?1:2,"0");case"k":case"kk":return C.s(String(m.$H===0?24:m.$H),L==="k"?1:2,"0");case"X":return Math.floor(m.$d.getTime()/1e3);case"x":return m.$d.getTime();case"z":return"["+m.offsetName()+"]";case"zzz":return"["+m.offsetName("long")+"]";default:return L}}));return a.bind(this)(p)}}}))})(Jt)),Jt.exports}var zi=Vi();const qi=oe(zi);var Kt={exports:{}},Bi=Kt.exports,nn;function Zi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Bi,(function(){var n,r,i=1e3,a=6e4,c=36e5,m=864e5,Y=31536e6,C=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:Y,months:C,days:m,hours:c,minutes:a,seconds:i,milliseconds:1,weeks:6048e5},S=function(k){return k instanceof q},B=function(k,g,y){return new q(k,y,g.$l)},A=function(k){return r.p(k)+"s"},U=function(k){return k<0},I=function(k){return U(k)?Math.ceil(k):Math.floor(k)},N=function(k){return Math.abs(k)},W=function(k,g){return k?U(k)?{negative:!0,format:""+N(k)+g}:{negative:!1,format:""+k+g}:{negative:!1,format:""}},q=(function(){function k(y,h,D){var w=this;if(this.$d={},this.$l=D,y===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return B(y*_[A(h)],this);if(typeof y=="number")return this.$ms=y,this.parseFromMilliseconds(),this;if(typeof y=="object")return Object.keys(y).forEach((function(u){w.$d[A(u)]=y[u]})),this.calMilliseconds(),this;if(typeof y=="string"){var T=y.match(p);if(T){var v=T.slice(2).map((function(u){return u!=null?Number(u):0}));return this.$d.years=v[0],this.$d.months=v[1],this.$d.weeks=v[2],this.$d.days=v[3],this.$d.hours=v[4],this.$d.minutes=v[5],this.$d.seconds=v[6],this.calMilliseconds(),this}}return this}var g=k.prototype;return g.calMilliseconds=function(){var y=this;this.$ms=Object.keys(this.$d).reduce((function(h,D){return h+(y.$d[D]||0)*_[D]}),0)},g.parseFromMilliseconds=function(){var y=this.$ms;this.$d.years=I(y/Y),y%=Y,this.$d.months=I(y/C),y%=C,this.$d.days=I(y/m),y%=m,this.$d.hours=I(y/c),y%=c,this.$d.minutes=I(y/a),y%=a,this.$d.seconds=I(y/i),y%=i,this.$d.milliseconds=y},g.toISOString=function(){var y=W(this.$d.years,"Y"),h=W(this.$d.months,"M"),D=+this.$d.days||0;this.$d.weeks&&(D+=7*this.$d.weeks);var w=W(D,"D"),T=W(this.$d.hours,"H"),v=W(this.$d.minutes,"M"),u=this.$d.seconds||0;this.$d.milliseconds&&(u+=this.$d.milliseconds/1e3,u=Math.round(1e3*u)/1e3);var f=W(u,"S"),x=y.negative||h.negative||w.negative||T.negative||v.negative||f.negative,b=T.format||v.format||f.format?"T":"",F=(x?"-":"")+"P"+y.format+h.format+w.format+b+T.format+v.format+f.format;return F==="P"||F==="-P"?"P0D":F},g.toJSON=function(){return this.toISOString()},g.format=function(y){var h=y||"YYYY-MM-DDTHH:mm:ss",D={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return h.replace(L,(function(w,T){return T||String(D[w])}))},g.as=function(y){return this.$ms/_[A(y)]},g.get=function(y){var h=this.$ms,D=A(y);return D==="milliseconds"?h%=1e3:h=D==="weeks"?I(h/_[D]):this.$d[D],h||0},g.add=function(y,h,D){var w;return w=h?y*_[A(h)]:S(y)?y.$ms:B(y,this).$ms,B(this.$ms+w*(D?-1:1),this)},g.subtract=function(y,h){return this.add(y,h,!0)},g.locale=function(y){var h=this.clone();return h.$l=y,h},g.clone=function(){return B(this.$ms,this)},g.humanize=function(y){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!y)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},k})(),j=function(k,g,y){return k.add(g.years()*y,"y").add(g.months()*y,"M").add(g.days()*y,"d").add(g.hours()*y,"h").add(g.minutes()*y,"m").add(g.seconds()*y,"s").add(g.milliseconds()*y,"ms")};return function(k,g,y){n=y,r=y().$utils(),y.duration=function(w,T){var v=y.locale();return B(w,{$l:v},T)},y.isDuration=S;var h=g.prototype.add,D=g.prototype.subtract;g.prototype.add=function(w,T){return S(w)?j(this,w,1):h.bind(this)(w,T)},g.prototype.subtract=function(w,T){return S(w)?j(this,w,-1):D.bind(this)(w,T)}}}))})(Kt)),Kt.exports}var Xi=Zi();const Gi=oe(Xi);var we=(function(){var t=d(function(v,u,f,x){for(f=f||{},x=v.length;x--;f[v[x]]=u);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],c=[1,30],m=[1,31],Y=[1,32],C=[1,33],p=[1,34],L=[1,9],_=[1,10],S=[1,11],B=[1,12],A=[1,13],U=[1,14],I=[1,15],N=[1,16],W=[1,19],q=[1,20],j=[1,21],k=[1,22],g=[1,23],y=[1,25],h=[1,35],D={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(u,f,x,b,F,o,X){var s=o.length-1;switch(F){case 1:return o[s-1];case 2:this.$=[];break;case 3:o[s-1].push(o[s]),this.$=o[s-1];break;case 4:case 5:this.$=o[s];break;case 6:case 7:this.$=[];break;case 8:b.setWeekday("monday");break;case 9:b.setWeekday("tuesday");break;case 10:b.setWeekday("wednesday");break;case 11:b.setWeekday("thursday");break;case 12:b.setWeekday("friday");break;case 13:b.setWeekday("saturday");break;case 14:b.setWeekday("sunday");break;case 15:b.setWeekend("friday");break;case 16:b.setWeekend("saturday");break;case 17:b.setDateFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 18:b.enableInclusiveEndDates(),this.$=o[s].substr(18);break;case 19:b.TopAxis(),this.$=o[s].substr(8);break;case 20:b.setAxisFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 21:b.setTickInterval(o[s].substr(13)),this.$=o[s].substr(13);break;case 22:b.setExcludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 23:b.setIncludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 24:b.setTodayMarker(o[s].substr(12)),this.$=o[s].substr(12);break;case 27:b.setDiagramTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 28:this.$=o[s].trim(),b.setAccTitle(this.$);break;case 29:case 30:this.$=o[s].trim(),b.setAccDescription(this.$);break;case 31:b.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 33:b.addTask(o[s-1],o[s]),this.$="task";break;case 34:this.$=o[s-1],b.setClickEvent(o[s-1],o[s],null);break;case 35:this.$=o[s-2],b.setClickEvent(o[s-2],o[s-1],o[s]);break;case 36:this.$=o[s-2],b.setClickEvent(o[s-2],o[s-1],null),b.setLink(o[s-2],o[s]);break;case 37:this.$=o[s-3],b.setClickEvent(o[s-3],o[s-2],o[s-1]),b.setLink(o[s-3],o[s]);break;case 38:this.$=o[s-2],b.setClickEvent(o[s-2],o[s],null),b.setLink(o[s-2],o[s-1]);break;case 39:this.$=o[s-3],b.setClickEvent(o[s-3],o[s-1],o[s]),b.setLink(o[s-3],o[s-2]);break;case 40:this.$=o[s-1],b.setLink(o[s-1],o[s]);break;case 41:case 47:this.$=o[s-1]+" "+o[s];break;case 42:case 43:case 45:this.$=o[s-2]+" "+o[s-1]+" "+o[s];break;case 44:case 46:this.$=o[s-3]+" "+o[s-2]+" "+o[s-1]+" "+o[s];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:p,22:L,23:_,24:S,25:B,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:k,36:g,37:24,38:y,40:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:p,22:L,23:_,24:S,25:B,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:k,36:g,37:24,38:y,40:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(u,f){if(f.recoverable)this.trace(u);else{var x=new Error(u);throw x.hash=f,x}},"parseError"),parse:d(function(u){var f=this,x=[0],b=[],F=[null],o=[],X=this.table,s="",E=0,z=0,V=2,P=1,K=o.slice.call(arguments,1),O=Object.create(this.lexer),st={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(st.yy[M]=this.yy[M]);O.setInput(u,st.yy),st.yy.lexer=O,st.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var H=O.yylloc;o.push(H);var R=O.options&&O.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(ot){x.length=x.length-2*ot,F.length=F.length-ot,o.length=o.length-ot}d(l,"popStack");function J(){var ot;return ot=b.pop()||O.lex()||P,typeof ot!="number"&&(ot instanceof Array&&(b=ot,ot=b.pop()),ot=f.symbols_[ot]||ot),ot}d(J,"lex");for(var $,Q,G,it,at={},pt,ut,He,Bt;;){if(Q=x[x.length-1],this.defaultActions[Q]?G=this.defaultActions[Q]:(($===null||typeof $>"u")&&($=J()),G=X[Q]&&X[Q][$]),typeof G>"u"||!G.length||!G[0]){var ce="";Bt=[];for(pt in X[Q])this.terminals_[pt]&&pt>V&&Bt.push("'"+this.terminals_[pt]+"'");O.showPosition?ce="Parse error on line "+(E+1)+`: +import{bf as on,bg as $n,bh as cn,bi as un,bj as ln,bk as ue,bl as On,b4 as oe,g as Hn,s as Nn,t as Pn,q as Rn,a as Vn,b as zn,_ as d,c as Yt,d as Zt,e as qn,bm as rt,l as Tt,k as Bn,j as Zn,A as Xn,u as Gn}from"./mermaid.core-Br9os_fu.js";import{b as jn,t as Ne,c as Qn,a as Jn,l as Kn}from"./linear-CU8cUEmf.js";import{i as tr}from"./init-Gi6I4Gst.js";import"./index-DIKFd2HX.js";import"./defaultLocale-DX6XiGOO.js";function er(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function ir(t){return"translate("+t+",0)"}function sr(t){return"translate(0,"+t+")"}function ar(t){return e=>+t(e)}function or(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function cr(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,a=6,c=6,m=3,Y=typeof window<"u"&&window.devicePixelRatio>1?0:.5,C=t===Gt||t===Xt?-1:1,p=t===Xt||t===le?"x":"y",L=t===Gt||t===xe?ir:sr;function _(S){var B=r??(e.ticks?e.ticks.apply(e,n):e.domain()),A=i??(e.tickFormat?e.tickFormat.apply(e,n):rr),U=Math.max(a,0)+m,I=e.range(),N=+I[0]+Y,W=+I[I.length-1]+Y,q=(e.bandwidth?or:ar)(e.copy(),Y),j=S.selection?S.selection():S,k=j.selectAll(".domain").data([null]),g=j.selectAll(".tick").data(B,e).order(),y=g.exit(),h=g.enter().append("g").attr("class","tick"),D=g.select("line"),w=g.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),g=g.merge(h),D=D.merge(h.append("line").attr("stroke","currentColor").attr(p+"2",C*a)),w=w.merge(h.append("text").attr("fill","currentColor").attr(p,C*U).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),S!==j&&(k=k.transition(S),g=g.transition(S),D=D.transition(S),w=w.transition(S),y=y.transition(S).attr("opacity",Pe).attr("transform",function(T){return isFinite(T=q(T))?L(T+Y):this.getAttribute("transform")}),h.attr("opacity",Pe).attr("transform",function(T){var v=this.parentNode.__axis;return L((v&&isFinite(v=v(T))?v:q(T))+Y)})),y.remove(),k.attr("d",t===Xt||t===le?c?"M"+C*c+","+N+"H"+Y+"V"+W+"H"+C*c:"M"+Y+","+N+"V"+W:c?"M"+N+","+C*c+"V"+Y+"H"+W+"V"+C*c:"M"+N+","+Y+"H"+W),g.attr("opacity",1).attr("transform",function(T){return L(q(T)+Y)}),D.attr(p+"2",C*a),w.attr(p,C*U).text(A),j.filter(cr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),j.each(function(){this.__axis=q})}return _.scale=function(S){return arguments.length?(e=S,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(S){return arguments.length?(n=S==null?[]:Array.from(S),_):n.slice()},_.tickValues=function(S){return arguments.length?(r=S==null?null:Array.from(S),_):r&&r.slice()},_.tickFormat=function(S){return arguments.length?(i=S,_):i},_.tickSize=function(S){return arguments.length?(a=c=+S,_):a},_.tickSizeInner=function(S){return arguments.length?(a=+S,_):a},_.tickSizeOuter=function(S){return arguments.length?(c=+S,_):c},_.tickPadding=function(S){return arguments.length?(m=+S,_):m},_.offset=function(S){return arguments.length?(Y=+S,_):Y},_}function ur(t){return fn(Gt,t)}function lr(t){return fn(xe,t)}const fr=Math.PI/180,dr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,hr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=$n(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),a,c;return e===n&&n===r?a=c=i:(a=fe((.4360747*e+.3850649*n+.1430804*r)/dn),c=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(a-i),200*(i-c),t.opacity)}function mr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,mr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>hr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function gr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const c=i(a),m=i.ceil(a);return a-c(e(a=new Date(+a),c==null?1:Math.floor(c)),a),i.range=(a,c,m)=>{const Y=[];if(a=i.ceil(a),m=m==null?1:Math.floor(m),!(a0))return Y;let C;do Y.push(C=new Date(+a)),e(a,m),t(a);while(Cet(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,m)=>{if(c>=c)if(m<0)for(;++m<=0;)for(;e(c,-1),!a(c););else for(;--m>=0;)for(;e(c,1),!a(c););}),n&&(i.count=(a,c)=>(ge.setTime(+a),ye.setTime(+c),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?c=>r(c)%a===0:c=>i.count(0,c)%a===0):i)),i}const Et=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Re=yt*30,ke=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Ot.range;const vr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());vr.range;const Ht=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ht.range;const Tr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());Tr.range;const xt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const xr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));xr.range;function Dt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const Rt=Dt(0),Nt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);Rt.range;Nt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),br=Mt(2),wr=Mt(3),It=Mt(4),Dr=Mt(5),Mr=Mt(6);wn.range;re.range;br.range;wr.range;It.range;Dr.range;Mr.range;const Pt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Pt.range;const Cr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Cr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function Sr(t,e,n,r,i,a){const c=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[a,1,ct],[a,5,5*ct],[a,15,15*ct],[a,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Re],[e,3,3*Re],[t,1,ke]];function m(C,p,L){const _=pU).right(c,_);if(S===c.length)return t.every(Ne(C/ke,p/ke,L));if(S===0)return Et.every(Math.max(Ne(C,p,L),1));const[B,A]=c[_/c[S-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?($=ve(At(l.y,0,1)),Q=$.getUTCDay(),$=Q>4||Q===0?re.ceil($):re($),$=_e.offset($,(l.V-1)*7),l.y=$.getUTCFullYear(),l.m=$.getUTCMonth(),l.d=$.getUTCDate()+(l.w+6)%7):($=pe(At(l.y,0,1)),Q=$.getDay(),$=Q>4||Q===0?Nt.ceil($):Nt($),$=xt.offset($,(l.V-1)*7),l.y=$.getFullYear(),l.m=$.getMonth(),l.d=$.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),Q="Z"in l?ve(At(l.y,0,1)).getUTCDay():pe(At(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,ve(l)):pe(l)}}function y(M,H,R,l){for(var J=0,$=H.length,Q=R.length,G,it;J<$;){if(l>=Q)return-1;if(G=H.charCodeAt(J++),G===37){if(G=H.charAt(J++),it=j[G in Ve?H.charAt(J++):G],!it||(l=it(M,R,l))<0)return-1}else if(G!=R.charCodeAt(l++))return-1}return l}function h(M,H,R){var l=C.exec(H.slice(R));return l?(M.p=p.get(l[0].toLowerCase()),R+l[0].length):-1}function D(M,H,R){var l=S.exec(H.slice(R));return l?(M.w=B.get(l[0].toLowerCase()),R+l[0].length):-1}function w(M,H,R){var l=L.exec(H.slice(R));return l?(M.w=_.get(l[0].toLowerCase()),R+l[0].length):-1}function T(M,H,R){var l=I.exec(H.slice(R));return l?(M.m=N.get(l[0].toLowerCase()),R+l[0].length):-1}function v(M,H,R){var l=A.exec(H.slice(R));return l?(M.m=U.get(l[0].toLowerCase()),R+l[0].length):-1}function u(M,H,R){return y(M,e,H,R)}function f(M,H,R){return y(M,n,H,R)}function x(M,H,R){return y(M,r,H,R)}function b(M){return c[M.getDay()]}function F(M){return a[M.getDay()]}function o(M){return Y[M.getMonth()]}function X(M){return m[M.getMonth()]}function s(M){return i[+(M.getHours()>=12)]}function E(M){return 1+~~(M.getMonth()/3)}function z(M){return c[M.getUTCDay()]}function V(M){return a[M.getUTCDay()]}function P(M){return Y[M.getUTCMonth()]}function K(M){return m[M.getUTCMonth()]}function O(M){return i[+(M.getUTCHours()>=12)]}function st(M){return 1+~~(M.getUTCMonth()/3)}return{format:function(M){var H=k(M+="",W);return H.toString=function(){return M},H},parse:function(M){var H=g(M+="",!1);return H.toString=function(){return M},H},utcFormat:function(M){var H=k(M+="",q);return H.toString=function(){return M},H},utcParse:function(M){var H=g(M+="",!0);return H.toString=function(){return M},H}}}var Ve={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Ur=/^%/,Er=/[\\^$*+?|[\]().{}]/g;function Z(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function Lr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Hr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Pr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Zr(t,e,n){var r=Ur.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Xr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Gr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return Z(t.getDate(),e,2)}function jr(t,e){return Z(t.getHours(),e,2)}function Qr(t,e){return Z(t.getHours()%12||12,e,2)}function Jr(t,e){return Z(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return Z(t.getMilliseconds(),e,3)}function Kr(t,e){return Dn(t,e)+"000"}function ti(t,e){return Z(t.getMonth()+1,e,2)}function ei(t,e){return Z(t.getMinutes(),e,2)}function ni(t,e){return Z(t.getSeconds(),e,2)}function ri(t){var e=t.getDay();return e===0?7:e}function ii(t,e){return Z(Rt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function si(t,e){return t=Mn(t),Z(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ai(t){return t.getDay()}function oi(t,e){return Z(Nt.count(kt(t)-1,t),e,2)}function ci(t,e){return Z(t.getFullYear()%100,e,2)}function ui(t,e){return t=Mn(t),Z(t.getFullYear()%100,e,2)}function li(t,e){return Z(t.getFullYear()%1e4,e,4)}function fi(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),Z(t.getFullYear()%1e4,e,4)}function di(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Z(e/60|0,"0",2)+Z(e%60,"0",2)}function Ge(t,e){return Z(t.getUTCDate(),e,2)}function hi(t,e){return Z(t.getUTCHours(),e,2)}function mi(t,e){return Z(t.getUTCHours()%12||12,e,2)}function gi(t,e){return Z(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return Z(t.getUTCMilliseconds(),e,3)}function yi(t,e){return Cn(t,e)+"000"}function ki(t,e){return Z(t.getUTCMonth()+1,e,2)}function pi(t,e){return Z(t.getUTCMinutes(),e,2)}function vi(t,e){return Z(t.getUTCSeconds(),e,2)}function Ti(t){var e=t.getUTCDay();return e===0?7:e}function xi(t,e){return Z(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function bi(t,e){return t=Sn(t),Z(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function wi(t){return t.getUTCDay()}function Di(t,e){return Z(re.count(wt(t)-1,t),e,2)}function Mi(t,e){return Z(t.getUTCFullYear()%100,e,2)}function Ci(t,e){return t=Sn(t),Z(t.getUTCFullYear()%100,e,2)}function Si(t,e){return Z(t.getUTCFullYear()%1e4,e,4)}function _i(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),Z(t.getUTCFullYear()%1e4,e,4)}function Yi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Fi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fi(t){return St=Fr(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ui(t){return new Date(t)}function Ei(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,a,c,m,Y,C){var p=Qn(),L=p.invert,_=p.domain,S=C(".%L"),B=C(":%S"),A=C("%I:%M"),U=C("%I %p"),I=C("%a %d"),N=C("%b %d"),W=C("%B"),q=C("%Y");function j(k){return(Y(k)4&&(S+=7),_.add(S,n));return B.diff(A,"week")+1},m.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var Y=m.startOf;m.startOf=function(C,p){var L=this.$utils(),_=!!L.u(p)||p;return L.p(C)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(C,p)}}}))})(jt)),jt.exports}var Wi=Ai();const $i=oe(Wi);var Qt={exports:{}},Oi=Qt.exports,tn;function Hi(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Oi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,c=/\d\d?/,m=/\d*[^-_:/,()\s\d]+/,Y={},C=function(U){return(U=+U)+(U>68?1900:2e3)},p=function(U){return function(I){this[U]=+I}},L=[/[+-]\d\d:?(\d\d)?|Z/,function(U){(this.zone||(this.zone={})).offset=(function(I){if(!I||I==="Z")return 0;var N=I.match(/([+-]|\d\d)/g),W=60*N[1]+(+N[2]||0);return W===0?0:N[0]==="+"?-W:W})(U)}],_=function(U){var I=Y[U];return I&&(I.indexOf?I:I.s.concat(I.f))},S=function(U,I){var N,W=Y.meridiem;if(W){for(var q=1;q<=24;q+=1)if(U.indexOf(W(q,0,I))>-1){N=q>12;break}}else N=U===(I?"pm":"PM");return N},B={A:[m,function(U){this.afternoon=S(U,!1)}],a:[m,function(U){this.afternoon=S(U,!0)}],Q:[i,function(U){this.month=3*(U-1)+1}],S:[i,function(U){this.milliseconds=100*+U}],SS:[a,function(U){this.milliseconds=10*+U}],SSS:[/\d{3}/,function(U){this.milliseconds=+U}],s:[c,p("seconds")],ss:[c,p("seconds")],m:[c,p("minutes")],mm:[c,p("minutes")],H:[c,p("hours")],h:[c,p("hours")],HH:[c,p("hours")],hh:[c,p("hours")],D:[c,p("day")],DD:[a,p("day")],Do:[m,function(U){var I=Y.ordinal,N=U.match(/\d+/);if(this.day=N[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===U&&(this.day=W)}],w:[c,p("week")],ww:[a,p("week")],M:[c,p("month")],MM:[a,p("month")],MMM:[m,function(U){var I=_("months"),N=(_("monthsShort")||I.map((function(W){return W.slice(0,3)}))).indexOf(U)+1;if(N<1)throw new Error;this.month=N%12||N}],MMMM:[m,function(U){var I=_("months").indexOf(U)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,p("year")],YY:[a,function(U){this.year=C(U)}],YYYY:[/\d{4}/,p("year")],Z:L,ZZ:L};function A(U){var I,N;I=U,N=Y&&Y.formats;for(var W=(U=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(D,w,T){var v=T&&T.toUpperCase();return w||N[T]||n[T]||N[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(u,f,x){return f||x.slice(1)}))}))).match(r),q=W.length,j=0;j-1)return new Date((F==="X"?1e3:1)*b);var s=A(F)(b),E=s.year,z=s.month,V=s.day,P=s.hours,K=s.minutes,O=s.seconds,st=s.milliseconds,M=s.zone,H=s.week,R=new Date,l=V||(E||z?1:R.getDate()),J=E||R.getFullYear(),$=0;E&&!z||($=z>0?z-1:R.getMonth());var Q,G=P||0,it=K||0,at=O||0,pt=st||0;return M?new Date(Date.UTC(J,$,l,G,it,at,pt+60*M.offset*1e3)):o?new Date(Date.UTC(J,$,l,G,it,at,pt)):(Q=new Date(J,$,l,G,it,at,pt),H&&(Q=X(Q).week(H).toDate()),Q)}catch{return new Date("")}})(k,h,g,N),this.init(),v&&v!==!0&&(this.$L=this.locale(v).$L),T&&k!=this.format(h)&&(this.$d=new Date("")),Y={}}else if(h instanceof Array)for(var u=h.length,f=1;f<=u;f+=1){y[1]=h[f-1];var x=N.apply(this,y);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}f===u&&(this.$d=new Date(""))}else q.call(this,j)}}}))})(Qt)),Qt.exports}var Ni=Hi();const Pi=oe(Ni);var Jt={exports:{}},Ri=Jt.exports,en;function Vi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(c){var m=this,Y=this.$locale();if(!this.isValid())return a.bind(this)(c);var C=this.$utils(),p=(c||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(L){switch(L){case"Q":return Math.ceil((m.$M+1)/3);case"Do":return Y.ordinal(m.$D);case"gggg":return m.weekYear();case"GGGG":return m.isoWeekYear();case"wo":return Y.ordinal(m.week(),"W");case"w":case"ww":return C.s(m.week(),L==="w"?1:2,"0");case"W":case"WW":return C.s(m.isoWeek(),L==="W"?1:2,"0");case"k":case"kk":return C.s(String(m.$H===0?24:m.$H),L==="k"?1:2,"0");case"X":return Math.floor(m.$d.getTime()/1e3);case"x":return m.$d.getTime();case"z":return"["+m.offsetName()+"]";case"zzz":return"["+m.offsetName("long")+"]";default:return L}}));return a.bind(this)(p)}}}))})(Jt)),Jt.exports}var zi=Vi();const qi=oe(zi);var Kt={exports:{}},Bi=Kt.exports,nn;function Zi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Bi,(function(){var n,r,i=1e3,a=6e4,c=36e5,m=864e5,Y=31536e6,C=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:Y,months:C,days:m,hours:c,minutes:a,seconds:i,milliseconds:1,weeks:6048e5},S=function(k){return k instanceof q},B=function(k,g,y){return new q(k,y,g.$l)},A=function(k){return r.p(k)+"s"},U=function(k){return k<0},I=function(k){return U(k)?Math.ceil(k):Math.floor(k)},N=function(k){return Math.abs(k)},W=function(k,g){return k?U(k)?{negative:!0,format:""+N(k)+g}:{negative:!1,format:""+k+g}:{negative:!1,format:""}},q=(function(){function k(y,h,D){var w=this;if(this.$d={},this.$l=D,y===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return B(y*_[A(h)],this);if(typeof y=="number")return this.$ms=y,this.parseFromMilliseconds(),this;if(typeof y=="object")return Object.keys(y).forEach((function(u){w.$d[A(u)]=y[u]})),this.calMilliseconds(),this;if(typeof y=="string"){var T=y.match(p);if(T){var v=T.slice(2).map((function(u){return u!=null?Number(u):0}));return this.$d.years=v[0],this.$d.months=v[1],this.$d.weeks=v[2],this.$d.days=v[3],this.$d.hours=v[4],this.$d.minutes=v[5],this.$d.seconds=v[6],this.calMilliseconds(),this}}return this}var g=k.prototype;return g.calMilliseconds=function(){var y=this;this.$ms=Object.keys(this.$d).reduce((function(h,D){return h+(y.$d[D]||0)*_[D]}),0)},g.parseFromMilliseconds=function(){var y=this.$ms;this.$d.years=I(y/Y),y%=Y,this.$d.months=I(y/C),y%=C,this.$d.days=I(y/m),y%=m,this.$d.hours=I(y/c),y%=c,this.$d.minutes=I(y/a),y%=a,this.$d.seconds=I(y/i),y%=i,this.$d.milliseconds=y},g.toISOString=function(){var y=W(this.$d.years,"Y"),h=W(this.$d.months,"M"),D=+this.$d.days||0;this.$d.weeks&&(D+=7*this.$d.weeks);var w=W(D,"D"),T=W(this.$d.hours,"H"),v=W(this.$d.minutes,"M"),u=this.$d.seconds||0;this.$d.milliseconds&&(u+=this.$d.milliseconds/1e3,u=Math.round(1e3*u)/1e3);var f=W(u,"S"),x=y.negative||h.negative||w.negative||T.negative||v.negative||f.negative,b=T.format||v.format||f.format?"T":"",F=(x?"-":"")+"P"+y.format+h.format+w.format+b+T.format+v.format+f.format;return F==="P"||F==="-P"?"P0D":F},g.toJSON=function(){return this.toISOString()},g.format=function(y){var h=y||"YYYY-MM-DDTHH:mm:ss",D={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return h.replace(L,(function(w,T){return T||String(D[w])}))},g.as=function(y){return this.$ms/_[A(y)]},g.get=function(y){var h=this.$ms,D=A(y);return D==="milliseconds"?h%=1e3:h=D==="weeks"?I(h/_[D]):this.$d[D],h||0},g.add=function(y,h,D){var w;return w=h?y*_[A(h)]:S(y)?y.$ms:B(y,this).$ms,B(this.$ms+w*(D?-1:1),this)},g.subtract=function(y,h){return this.add(y,h,!0)},g.locale=function(y){var h=this.clone();return h.$l=y,h},g.clone=function(){return B(this.$ms,this)},g.humanize=function(y){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!y)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},k})(),j=function(k,g,y){return k.add(g.years()*y,"y").add(g.months()*y,"M").add(g.days()*y,"d").add(g.hours()*y,"h").add(g.minutes()*y,"m").add(g.seconds()*y,"s").add(g.milliseconds()*y,"ms")};return function(k,g,y){n=y,r=y().$utils(),y.duration=function(w,T){var v=y.locale();return B(w,{$l:v},T)},y.isDuration=S;var h=g.prototype.add,D=g.prototype.subtract;g.prototype.add=function(w,T){return S(w)?j(this,w,1):h.bind(this)(w,T)},g.prototype.subtract=function(w,T){return S(w)?j(this,w,-1):D.bind(this)(w,T)}}}))})(Kt)),Kt.exports}var Xi=Zi();const Gi=oe(Xi);var we=(function(){var t=d(function(v,u,f,x){for(f=f||{},x=v.length;x--;f[v[x]]=u);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],c=[1,30],m=[1,31],Y=[1,32],C=[1,33],p=[1,34],L=[1,9],_=[1,10],S=[1,11],B=[1,12],A=[1,13],U=[1,14],I=[1,15],N=[1,16],W=[1,19],q=[1,20],j=[1,21],k=[1,22],g=[1,23],y=[1,25],h=[1,35],D={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(u,f,x,b,F,o,X){var s=o.length-1;switch(F){case 1:return o[s-1];case 2:this.$=[];break;case 3:o[s-1].push(o[s]),this.$=o[s-1];break;case 4:case 5:this.$=o[s];break;case 6:case 7:this.$=[];break;case 8:b.setWeekday("monday");break;case 9:b.setWeekday("tuesday");break;case 10:b.setWeekday("wednesday");break;case 11:b.setWeekday("thursday");break;case 12:b.setWeekday("friday");break;case 13:b.setWeekday("saturday");break;case 14:b.setWeekday("sunday");break;case 15:b.setWeekend("friday");break;case 16:b.setWeekend("saturday");break;case 17:b.setDateFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 18:b.enableInclusiveEndDates(),this.$=o[s].substr(18);break;case 19:b.TopAxis(),this.$=o[s].substr(8);break;case 20:b.setAxisFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 21:b.setTickInterval(o[s].substr(13)),this.$=o[s].substr(13);break;case 22:b.setExcludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 23:b.setIncludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 24:b.setTodayMarker(o[s].substr(12)),this.$=o[s].substr(12);break;case 27:b.setDiagramTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 28:this.$=o[s].trim(),b.setAccTitle(this.$);break;case 29:case 30:this.$=o[s].trim(),b.setAccDescription(this.$);break;case 31:b.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 33:b.addTask(o[s-1],o[s]),this.$="task";break;case 34:this.$=o[s-1],b.setClickEvent(o[s-1],o[s],null);break;case 35:this.$=o[s-2],b.setClickEvent(o[s-2],o[s-1],o[s]);break;case 36:this.$=o[s-2],b.setClickEvent(o[s-2],o[s-1],null),b.setLink(o[s-2],o[s]);break;case 37:this.$=o[s-3],b.setClickEvent(o[s-3],o[s-2],o[s-1]),b.setLink(o[s-3],o[s]);break;case 38:this.$=o[s-2],b.setClickEvent(o[s-2],o[s],null),b.setLink(o[s-2],o[s-1]);break;case 39:this.$=o[s-3],b.setClickEvent(o[s-3],o[s-1],o[s]),b.setLink(o[s-3],o[s-2]);break;case 40:this.$=o[s-1],b.setLink(o[s-1],o[s]);break;case 41:case 47:this.$=o[s-1]+" "+o[s];break;case 42:case 43:case 45:this.$=o[s-2]+" "+o[s-1]+" "+o[s];break;case 44:case 46:this.$=o[s-3]+" "+o[s-2]+" "+o[s-1]+" "+o[s];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:p,22:L,23:_,24:S,25:B,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:k,36:g,37:24,38:y,40:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:p,22:L,23:_,24:S,25:B,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:k,36:g,37:24,38:y,40:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(u,f){if(f.recoverable)this.trace(u);else{var x=new Error(u);throw x.hash=f,x}},"parseError"),parse:d(function(u){var f=this,x=[0],b=[],F=[null],o=[],X=this.table,s="",E=0,z=0,V=2,P=1,K=o.slice.call(arguments,1),O=Object.create(this.lexer),st={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(st.yy[M]=this.yy[M]);O.setInput(u,st.yy),st.yy.lexer=O,st.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var H=O.yylloc;o.push(H);var R=O.options&&O.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(ot){x.length=x.length-2*ot,F.length=F.length-ot,o.length=o.length-ot}d(l,"popStack");function J(){var ot;return ot=b.pop()||O.lex()||P,typeof ot!="number"&&(ot instanceof Array&&(b=ot,ot=b.pop()),ot=f.symbols_[ot]||ot),ot}d(J,"lex");for(var $,Q,G,it,at={},pt,ut,He,Bt;;){if(Q=x[x.length-1],this.defaultActions[Q]?G=this.defaultActions[Q]:(($===null||typeof $>"u")&&($=J()),G=X[Q]&&X[Q][$]),typeof G>"u"||!G.length||!G[0]){var ce="";Bt=[];for(pt in X[Q])this.terminals_[pt]&&pt>V&&Bt.push("'"+this.terminals_[pt]+"'");O.showPosition?ce="Parse error on line "+(E+1)+`: `+O.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[$]||$)+"'":ce="Parse error on line "+(E+1)+": Unexpected "+($==P?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(ce,{text:O.match,token:this.terminals_[$]||$,line:O.yylineno,loc:H,expected:Bt})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+$);switch(G[0]){case 1:x.push($),F.push(O.yytext),o.push(O.yylloc),x.push(G[1]),$=null,z=O.yyleng,s=O.yytext,E=O.yylineno,H=O.yylloc;break;case 2:if(ut=this.productions_[G[1]][1],at.$=F[F.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},R&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),it=this.performAction.apply(at,[s,z,E,st.yy,G[1],F,o].concat(K)),typeof it<"u")return it;ut&&(x=x.slice(0,-1*ut*2),F=F.slice(0,-1*ut),o=o.slice(0,-1*ut)),x.push(this.productions_[G[1]][0]),F.push(at.$),o.push(at._$),He=X[x[x.length-2]][x[x.length-1]],x.push(He);break;case 3:return!0}}return!0},"parse")},w=(function(){var v={EOF:1,parseError:d(function(f,x){if(this.yy.parser)this.yy.parser.parseError(f,x);else throw new Error(f)},"parseError"),setInput:d(function(u,f){return this.yy=f||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var f=u.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:d(function(u){var f=u.length,x=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===b.length?this.yylloc.first_column:0)+b[b.length-x.length].length-x[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(u){this.unput(this.match.slice(u))},"less"),pastInput:d(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var u=this.pastInput(),f=new Array(u.length+1).join("-");return u+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-PVQCEYII-BuZXSVal.js b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-PVQCEYII-DY42jPcw.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/gitGraphDiagram-PVQCEYII-BuZXSVal.js rename to apps/pythinker-code/dist-web/assets/gitGraphDiagram-PVQCEYII-DY42jPcw.js index 010aef6d1..40c1d869e 100644 --- a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-PVQCEYII-BuZXSVal.js +++ b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-PVQCEYII-DY42jPcw.js @@ -1,4 +1,4 @@ -import{p as le}from"./chunk-4BX2VUAB-Df7H4Pbw.js";import{I as he}from"./chunk-QZHKN3VN-B6GDpV6h.js";import{t as $e,q as fe,s as ge,g as ue,a as ye,b as xe,_ as h,F as J,l as w,d as me,c as W,u as pe,G as be,A as we,k as B,H as ke,I as ve,K as Ce}from"./mermaid.core-Dza7SVX6.js";import{p as Ee}from"./wardley-L42UT6IY-Dr9wBWEv.js";import"./index-BMmTKsPq.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new he(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Ie=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Re=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Ie,branch:Re,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{le(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ke(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ue(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=h(e=>e.branch,"parseCheckout"),Ue=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,I=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],R=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),R=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-I).attr("y",t.y+13.5).attr("width",l.width+2*I).attr("height",l.height+2*I),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{p as le}from"./chunk-4BX2VUAB-DHez2dpA.js";import{I as he}from"./chunk-QZHKN3VN-SK1ytu-J.js";import{t as $e,q as fe,s as ge,g as ue,a as ye,b as xe,_ as h,F as J,l as w,d as me,c as W,u as pe,G as be,A as we,k as B,H as ke,I as ve,K as Ce}from"./mermaid.core-Br9os_fu.js";import{p as Ee}from"./wardley-L42UT6IY-Bnsl155y.js";import"./index-DIKFd2HX.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new he(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Ie=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Re=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Ie,branch:Re,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{le(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ke(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ue(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=h(e=>e.branch,"parseCheckout"),Ue=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,I=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],R=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),R=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-I).attr("y",t.y+13.5).attr("width",l.width+2*I).attr("height",l.height+2*I),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+I} ${s-i/2-L/2},${x-I} ${t.posWithOffset-i/2-L},${x-c-I} diff --git a/apps/pythinker-code/dist-web/assets/index-BMmTKsPq.js b/apps/pythinker-code/dist-web/assets/index-BMmTKsPq.js deleted file mode 100644 index e2aecd39b..000000000 --- a/apps/pythinker-code/dist-web/assets/index-BMmTKsPq.js +++ /dev/null @@ -1,432 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-NShcAOkq.js","assets/DesignSystemView-Bux62PsO.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/CodeBlockNode-CuG5i4rb.js","assets/safeRaf-DGuzXxDK.js","assets/index5-Def2Zrxa.js","assets/index11-Dc3KsH1m.js"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** -* @vue/shared v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function V1(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $n={},Qc=[],rr=()=>{},MM=()=>!1,eh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),q1=e=>e.startsWith("onUpdate:"),so=Object.assign,I2=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},GL=Object.prototype.hasOwnProperty,qn=(e,t)=>GL.call(e,t),Ut=Array.isArray,ed=e=>Nd(e)==="[object Map]",Ju=e=>Nd(e)==="[object Set]",LS=e=>Nd(e)==="[object Date]",ZL=e=>Nd(e)==="[object RegExp]",hn=e=>typeof e=="function",co=e=>typeof e=="string",ji=e=>typeof e=="symbol",Kn=e=>e!==null&&typeof e=="object",$2=e=>(Kn(e)||hn(e))&&hn(e.then)&&hn(e.catch),EM=Object.prototype.toString,Nd=e=>EM.call(e),YL=e=>Nd(e).slice(8,-1),K1=e=>Nd(e)==="[object Object]",G1=e=>co(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$u=V1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Z1=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},JL=/-\w/g,us=Z1(e=>e.replace(JL,t=>t.slice(1).toUpperCase())),XL=/\B([A-Z])/g,wi=Z1(e=>e.replace(XL,"-$1").toLowerCase()),Y1=Z1(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gm=Z1(e=>e?`on${Y1(e)}`:""),Cs=(e,t)=>!Object.is(e,t),td=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},J1=e=>{const t=parseFloat(e);return isNaN(t)?e:t},xg=e=>{const t=co(e)?Number(e):NaN;return isNaN(t)?e:t};let FS;const X1=()=>FS||(FS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),QL="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",eF=V1(QL);function jt(e){if(Ut(e)){const t={};for(let n=0;n{if(n){const o=n.split(nF);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ze(e){let t="";if(co(e))t=e;else if(Ut(e))for(let n=0;n$l(n,t))}const $M=e=>!!(e&&e.__v_isRef===!0),N=e=>co(e)?e:e==null?"":Ut(e)||Kn(e)&&(e.toString===EM||!hn(e.toString))?$M(e)?N(e.value):JSON.stringify(e,NM,2):String(e),NM=(e,t)=>$M(t)?NM(e,t.value):ed(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[Hv(o,i)+" =>"]=s,n),{})}:Ju(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hv(n))}:ji(t)?Hv(t):Kn(t)&&!Ut(t)&&!K1(t)?String(t):t,Hv=(e,t="")=>{var n;return ji(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function uF(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** -* @vue/reactivity v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let rs;class LM{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&rs&&(rs.active?(this.parent=rs,this.index=(rs.scopes||(rs.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(rs===this)rs=this.prevScope;else{let t=rs;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(Qf){let t=Qf;for(Qf=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Xf;){let t=Xf;for(Xf=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function RM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function PM(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),O2(o),dF(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function Rk(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(DM(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function DM(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wp)||(e.globalVersion=wp,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Rk(e))))return;e.flags|=2;const t=e.dep,n=mo,o=Sr;mo=e,Sr=!0;try{RM(e);const s=e.fn(e._value);(t.version===0||Cs(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{mo=n,Sr=o,PM(e),e.flags&=-3}}function O2(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)O2(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function dF(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function hDe(e,t){e.effect instanceof _g&&(e=e.effect.fn);const n=new _g(e);t&&so(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function mDe(e){e.effect.stop()}let Sr=!0;const BM=[];function Nl(){BM.push(Sr),Sr=!1}function Ll(){const e=BM.pop();Sr=e===void 0?!0:e}function OS(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=mo;mo=void 0;try{t()}finally{mo=n}}}let wp=0;class fF{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class e0{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!mo||!Sr||mo===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==mo)n=this.activeLink=new fF(mo,this),mo.deps?(n.prevDep=mo.depsTail,mo.depsTail.nextDep=n,mo.depsTail=n):mo.deps=mo.depsTail=n,zM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=mo.depsTail,n.nextDep=void 0,mo.depsTail.nextDep=n,mo.depsTail=n,mo.deps===n&&(mo.deps=o)}return n}trigger(t){this.version++,wp++,this.notify(t)}notify(t){L2();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{F2()}}}function zM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)zM(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Sg=new WeakMap,Nu=Symbol(""),Pk=Symbol(""),xp=Symbol("");function Bs(e,t,n){if(Sr&&mo){let o=Sg.get(e);o||Sg.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new e0),s.map=o,s.key=n),s.track()}}function xl(e,t,n,o,s,i){const r=Sg.get(e);if(!r){wp++;return}const l=a=>{a&&a.trigger()};if(L2(),t==="clear")r.forEach(l);else{const a=Ut(e),u=a&&G1(n);if(a&&n==="length"){const c=Number(o);r.forEach((d,f)=>{(f==="length"||f===xp||!ji(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(xp)),t){case"add":a?u&&l(r.get("length")):(l(r.get(Nu)),ed(e)&&l(r.get(Pk)));break;case"delete":a||(l(r.get(Nu)),ed(e)&&l(r.get(Pk)));break;case"set":ed(e)&&l(r.get(Nu));break}}F2()}function pF(e,t){const n=Sg.get(e);return n&&n.get(t)}function wc(e){const t=Rn(e);return t===e?t:(Bs(t,"iterate",xp),Pi(e)?t:t.map(Er))}function t0(e){return Bs(e=Rn(e),"iterate",xp),e}function Kr(e,t){return Fl(e)?yd(wa(e)?Er(t):t):Er(t)}const hF={__proto__:null,[Symbol.iterator](){return Uv(this,Symbol.iterator,e=>Kr(this,e))},concat(...e){return wc(this).concat(...e.map(t=>Ut(t)?wc(t):t))},entries(){return Uv(this,"entries",e=>(e[1]=Kr(this,e[1]),e))},every(e,t){return cl(this,"every",e,t,void 0,arguments)},filter(e,t){return cl(this,"filter",e,t,n=>n.map(o=>Kr(this,o)),arguments)},find(e,t){return cl(this,"find",e,t,n=>Kr(this,n),arguments)},findIndex(e,t){return cl(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return cl(this,"findLast",e,t,n=>Kr(this,n),arguments)},findLastIndex(e,t){return cl(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return cl(this,"forEach",e,t,void 0,arguments)},includes(...e){return Vv(this,"includes",e)},indexOf(...e){return Vv(this,"indexOf",e)},join(e){return wc(this).join(e)},lastIndexOf(...e){return Vv(this,"lastIndexOf",e)},map(e,t){return cl(this,"map",e,t,void 0,arguments)},pop(){return pf(this,"pop")},push(...e){return pf(this,"push",e)},reduce(e,...t){return RS(this,"reduce",e,t)},reduceRight(e,...t){return RS(this,"reduceRight",e,t)},shift(){return pf(this,"shift")},some(e,t){return cl(this,"some",e,t,void 0,arguments)},splice(...e){return pf(this,"splice",e)},toReversed(){return wc(this).toReversed()},toSorted(e){return wc(this).toSorted(e)},toSpliced(...e){return wc(this).toSpliced(...e)},unshift(...e){return pf(this,"unshift",e)},values(){return Uv(this,"values",e=>Kr(this,e))}};function Uv(e,t,n){const o=t0(e),s=o[t]();return o!==e&&!Pi(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const mF=Array.prototype;function cl(e,t,n,o,s,i){const r=t0(e),l=r!==e&&!Pi(e),a=r[t];if(a!==mF[t]){const d=a.apply(e,i);return l?Er(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,Kr(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(r,u,o);return l&&s?s(c):c}function RS(e,t,n,o){const s=t0(e),i=s!==e&&!Pi(e);let r=n,l=!1;s!==e&&(i?(l=o.length===0,r=function(u,c,d){return l&&(l=!1,u=Kr(e,u)),n.call(this,u,Kr(e,c),d,e)}):n.length>3&&(r=function(u,c,d){return n.call(this,u,c,d,e)}));const a=s[t](r,...o);return l?Kr(e,a):a}function Vv(e,t,n){const o=Rn(e);Bs(o,"iterate",xp);const s=o[t](...n);return(s===-1||s===!1)&&s0(n[0])?(n[0]=Rn(n[0]),o[t](...n)):s}function pf(e,t,n=[]){Nl(),L2();const o=Rn(e)[t].apply(e,n);return F2(),Ll(),o}const gF=V1("__proto__,__v_isRef,__isVue"),WM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ji));function vF(e){ji(e)||(e=String(e));const t=Rn(this);return Bs(t,"has",e),t.hasOwnProperty(e)}class HM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?GM:KM:i?qM:VM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=Ut(t);if(!s){let a;if(r&&(a=hF[n]))return a;if(n==="hasOwnProperty")return vF}const l=Reflect.get(t,n,Bo(t)?t:o);if((ji(n)?WM.has(n):gF(n))||(s||Bs(t,"get",n),i))return l;if(Bo(l)){const a=r&&G1(n)?l:l.value;return s&&Kn(a)?Bk(a):a}return Kn(l)?s?Bk(l):Ms(l):l}}class jM extends HM{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const r=Ut(t)&&G1(n);if(!this._isShallow){const u=Fl(i);if(!Pi(o)&&!Fl(o)&&(i=Rn(i),o=Rn(o)),!r&&Bo(i)&&!Bo(o))return u||(i.value=o),!0}const l=r?Number(n)e,Yh=e=>Reflect.getPrototypeOf(e);function xF(e,t,n){return function(...o){const s=this.__v_raw,i=Rn(s),r=ed(i),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...o),c=n?Dk:t?yd:Er;return!t&&Bs(i,"iterate",a?Pk:Nu),so(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function Jh(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function _F(e,t){const n={get(s){const i=this.__v_raw,r=Rn(i),l=Rn(s);e||(Cs(s,l)&&Bs(r,"get",s),Bs(r,"get",l));const{has:a}=Yh(r),u=t?Dk:e?yd:Er;if(a.call(r,s))return u(i.get(s));if(a.call(r,l))return u(i.get(l));i!==r&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Bs(Rn(s),"iterate",Nu),s.size},has(s){const i=this.__v_raw,r=Rn(i),l=Rn(s);return e||(Cs(s,l)&&Bs(r,"has",s),Bs(r,"has",l)),s===l?i.has(s):i.has(s)||i.has(l)},forEach(s,i){const r=this,l=r.__v_raw,a=Rn(l),u=t?Dk:e?yd:Er;return!e&&Bs(a,"iterate",Nu),l.forEach((c,d)=>s.call(i,u(c),u(d),r))}};return so(n,e?{add:Jh("add"),set:Jh("set"),delete:Jh("delete"),clear:Jh("clear")}:{add(s){const i=Rn(this),r=Yh(i),l=Rn(s),a=!t&&!Pi(s)&&!Fl(s)?l:s;return r.has.call(i,a)||Cs(s,a)&&r.has.call(i,s)||Cs(l,a)&&r.has.call(i,l)||(i.add(a),xl(i,"add",a,a)),this},set(s,i){!t&&!Pi(i)&&!Fl(i)&&(i=Rn(i));const r=Rn(this),{has:l,get:a}=Yh(r);let u=l.call(r,s);u||(s=Rn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,i),u?Cs(i,c)&&xl(r,"set",s,i):xl(r,"add",s,i),this},delete(s){const i=Rn(this),{has:r,get:l}=Yh(i);let a=r.call(i,s);a||(s=Rn(s),a=r.call(i,s)),l&&l.call(i,s);const u=i.delete(s);return a&&xl(i,"delete",s,void 0),u},clear(){const s=Rn(this),i=s.size!==0,r=s.clear();return i&&xl(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=xF(s,e,t)}),n}function n0(e,t){const n=_F(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(qn(n,s)&&s in o?n:o,s,i)}const SF={get:n0(!1,!1)},CF={get:n0(!1,!0)},AF={get:n0(!0,!1)},MF={get:n0(!0,!0)},VM=new WeakMap,qM=new WeakMap,KM=new WeakMap,GM=new WeakMap;function EF(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ms(e){return Fl(e)?e:o0(e,!1,yF,SF,VM)}function TF(e){return o0(e,!1,bF,CF,qM)}function Bk(e){return o0(e,!0,kF,AF,KM)}function gDe(e){return o0(e,!0,wF,MF,GM)}function o0(e,t,n,o,s){if(!Kn(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const r=EF(YL(e));if(r===0)return e;const l=new Proxy(e,r===2?o:n);return s.set(e,l),l}function wa(e){return Fl(e)?wa(e.__v_raw):!!(e&&e.__v_isReactive)}function Fl(e){return!!(e&&e.__v_isReadonly)}function Pi(e){return!!(e&&e.__v_isShallow)}function s0(e){return e?!!e.__v_raw:!1}function Rn(e){const t=e&&e.__v_raw;return t?Rn(t):e}function Et(e){return!qn(e,"__v_skip")&&Object.isExtensible(e)&&TM(e,"__v_skip",!0),e}const Er=e=>Kn(e)?Ms(e):e,yd=e=>Kn(e)?Bk(e):e;function Bo(e){return e?e.__v_isRef===!0:!1}function V(e){return ZM(e,!1)}function Co(e){return ZM(e,!0)}function ZM(e,t){return Bo(e)?e:new IF(e,t)}class IF{constructor(t,n){this.dep=new e0,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Rn(t),this._value=n?t:Er(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Pi(t)||Fl(t);t=o?t:Rn(t),Cs(t,n)&&(this._rawValue=t,this._value=o?t:Er(t),this.dep.trigger())}}function $F(e){e.dep&&e.dep.trigger()}function x(e){return Bo(e)?e.value:e}function YM(e){return hn(e)?e():x(e)}const NF={get:(e,t,n)=>t==="__v_raw"?e:x(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return Bo(s)&&!Bo(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function JM(e){return wa(e)?e:new Proxy(e,NF)}class LF{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new e0,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function FF(e){return new LF(e)}function vDe(e){const t=Ut(e)?new Array(e.length):{};for(const n in e)t[n]=XM(e,n);return t}class OF{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=ji(n)?n:String(n),this._raw=Rn(t);let s=!0,i=t;if(!Ut(t)||ji(this._key)||!G1(this._key))do s=!s0(i)||Pi(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=x(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Bo(this._raw[this._key])){const n=this._object[this._key];if(Bo(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return pF(this._raw,this._key)}}class RF{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function yDe(e,t,n){return Bo(e)?e:hn(e)?new RF(e):Kn(e)&&arguments.length>1?XM(e,t,n):V(e)}function XM(e,t,n){return new OF(e,t,n)}class PF{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new e0(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wp-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&mo!==this)return OM(this,!0),!0}get value(){const t=this.dep.track();return DM(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function DF(e,t,n=!1){let o,s;return hn(e)?o=e:(o=e.get,s=e.set),new PF(o,s,n)}const kDe={GET:"get",HAS:"has",ITERATE:"iterate"},bDe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Xh={},Cg=new WeakMap;let ca;function wDe(){return ca}function BF(e,t=!1,n=ca){if(n){let o=Cg.get(n);o||Cg.set(n,o=[]),o.push(e)}}function zF(e,t,n=$n){const{immediate:o,deep:s,once:i,scheduler:r,augmentJob:l,call:a}=n,u=b=>s?b:Pi(b)||s===!1||s===0?_l(b,1):_l(b);let c,d,f,p,h=!1,m=!1;if(Bo(e)?(d=()=>e.value,h=Pi(e)):wa(e)?(d=()=>u(e),h=!0):Ut(e)?(m=!0,h=e.some(b=>wa(b)||Pi(b)),d=()=>e.map(b=>{if(Bo(b))return b.value;if(wa(b))return u(b);if(hn(b))return a?a(b,2):b()})):hn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Nl();try{f()}finally{Ll()}}const b=ca;ca=c;try{return a?a(e,3,[p]):e(p)}finally{ca=b}}:d=rr,t&&s){const b=d,S=s===!0?1/0:s;d=()=>_l(b(),S)}const k=N2(),w=()=>{c.stop(),k&&k.active&&I2(k.effects,c)};if(i&&t){const b=t;t=(...S)=>{b(...S),w()}}let v=m?new Array(e.length).fill(Xh):Xh;const y=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const S=c.run();if(s||h||(m?S.some((I,T)=>Cs(I,v[T])):Cs(S,v))){f&&f();const I=ca;ca=c;try{const T=[S,v===Xh?void 0:m&&v[0]===Xh?[]:v,p];v=S,a?a(t,3,T):t(...T)}finally{ca=I}}}else c.run()};return l&&l(y),c=new _g(d),c.scheduler=r?()=>r(y,!1):y,p=b=>BF(b,!1,c),f=c.onStop=()=>{const b=Cg.get(c);if(b){if(a)a(b,4);else for(const S of b)S();Cg.delete(c)}},t?o?y(!0):v=c.run():r?r(y.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function _l(e,t=1/0,n){if(t<=0||!Kn(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Bo(e))_l(e.value,t,n);else if(Ut(e))for(let o=0;o{_l(o,t,n)});else if(K1(e)){for(const o in e)_l(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&_l(e[o],t,n)}return e}/** -* @vue/runtime-core v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const QM=[];function WF(e){QM.push(e)}function HF(){QM.pop()}function xDe(e,t){}const _De={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},jF={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function th(e,t,n,o){try{return o?e(...o):e()}catch(s){Fd(s,t,n)}}function ar(e,t,n,o){if(hn(e)){const s=th(e,t,n,o);return s&&$2(s)&&s.catch(i=>{Fd(i,t,n)}),s}if(Ut(e)){const s=[];for(let i=0;i>>1,s=Qs[o],i=_p(s);i=_p(n)?Qs.push(e):Qs.splice(VF(t),0,e),e.flags|=1,t5()}}function t5(){Ag||(Ag=e5.then(n5))}function Mg(e){Ut(e)?nd.push(...e):da&&e.id===-1?da.splice(Fc+1,0,e):e.flags&1||(nd.push(e),e.flags|=1),t5()}function PS(e,t,n=Ur+1){for(;n_p(n)-_p(o));if(nd.length=0,da){da.push(...t);return}for(da=t,Fc=0;Fce.id==null?e.flags&2?-1:1/0:e.id;function n5(e){try{for(Ur=0;UrOc.emit(s,...i)),Qh=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{o5(i,t)}),setTimeout(()=>{Oc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Qh=[])},3e3)):Qh=[]}let Es=null,i0=null;function Sp(e){const t=Es;return Es=e,i0=e&&e.type.__scopeId||null,t}function SDe(e){i0=e}function CDe(){i0=null}const ADe=e=>ve;function ve(e,t=Es,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Lg(-1);const i=Sp(t);let r;try{r=e(...s)}finally{Sp(i),o._d&&Lg(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Bn(e,t){if(Es===null)return e;const n=ih(Es),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&hn(t)?t.call(o&&o.proxy):t}}function MDe(){return!!(es()||Lu)}const qF=Symbol.for("v-scx"),KF=()=>wn(qF);function s5(e,t){return nh(e,null,t)}function EDe(e,t){return nh(e,null,{flush:"post"})}function GF(e,t){return nh(e,null,{flush:"sync"})}function Ye(e,t,n){return nh(e,t,n)}function nh(e,t,n=$n){const{immediate:o,deep:s,flush:i,once:r}=n,l=so({},n),a=t&&o||!t&&i!=="post";let u;if(Wu){if(i==="sync"){const p=KF();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=rr,p.resume=rr,p.pause=rr,p}}const c=As;l.call=(p,h,m)=>ar(p,c,h,m);let d=!1;i==="post"?l.scheduler=p=>{Vo(p,c&&c.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(p,h)=>{h?p():R2(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=zF(e,t,l);return Wu&&(u?u.push(f):a&&f()),f}function ZF(e,t,n){const o=this.proxy,s=co(e)?e.includes(".")?i5(o,e):()=>o[e]:e.bind(o,o);let i;hn(t)?i=t:(i=t.handler,n=t);const r=Od(this),l=nh(s,i.bind(o),n);return r(),l}function i5(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,yu=e=>e&&(e.disabled||e.disabled===""),YF=e=>e&&(e.defer||e.defer===""),DS=e=>typeof SVGElement<"u"&&e instanceof SVGElement,BS=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,zk=(e,t)=>{const n=e&&e.to;return co(n)?t?t(n):null:n},JF={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:k,parentNode:w}}=u,v=yu(t.props);let{dynamicChildren:y}=t;const b=(T,$,F)=>{T.shapeFlag&16&&c(T.children,$,F,s,i,r,l,a)},S=(T=t)=>{const $=yu(T.props),F=T.target=zk(T.props,h),R=Wk(F,T,m,p);F&&(r!=="svg"&&DS(F)?r="svg":r!=="mathml"&&BS(F)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(F),$||(b(T,F,R),Ff(T,!1)))},I=T=>{const $=()=>{if(ra.get(T)===$){if(ra.delete(T),yu(T.props)){const F=w(T.el)||n;b(T,F,T.anchor),Ff(T,!0)}S(T)}};ra.set(T,$),Vo($,i)};if(e==null){const T=t.el=m(""),$=t.anchor=m("");if(p(T,n,o),p($,n,o),YF(t.props)||i&&i.pendingBranch){I(t);return}v&&(b(t,n,$),Ff(t,!0)),S()}else{t.el=e.el;const T=t.anchor=e.anchor,$=ra.get(e);if($){$.flags|=8,ra.delete(e),I(t);return}t.targetStart=e.targetStart;const F=t.target=e.target,R=t.targetAnchor=e.targetAnchor,P=yu(e.props),M=P?n:F,D=P?T:R;if(r==="svg"||DS(F)?r="svg":(r==="mathml"||BS(F))&&(r="mathml"),y?(f(e.dynamicChildren,y,M,s,i,r,l),q2(e,t,!0)):a||d(e,t,M,D,s,i,r,l,!1),v)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):em(t,n,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const B=t.target=zk(t.props,h);B&&em(t,B,null,u,0)}else P&&em(t,F,R,u,1);Ff(t,v)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:f}=e,p=i||!yu(f),h=ra.get(e);if(h&&(h.flags|=8,ra.delete(e)),d&&(s(u),s(c)),i&&s(a),!h&&r&16)for(let m=0;m{e.isMounted=!0}),po(()=>{e.isUnmounting=!0}),e}const Zi=[Function,Array],u5={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zi,onEnter:Zi,onAfterEnter:Zi,onEnterCancelled:Zi,onBeforeLeave:Zi,onLeave:Zi,onAfterLeave:Zi,onLeaveCancelled:Zi,onBeforeAppear:Zi,onAppear:Zi,onAfterAppear:Zi,onAppearCancelled:Zi},c5=e=>{const t=e.subTree;return t.component?c5(t.component):t},QF={name:"BaseTransition",props:u5,setup(e,{slots:t}){const n=es(),o=a5();return()=>{const s=t.default&&P2(t.default(),!0),i=s&&s.length?d5(s):n.subTree?oe():void 0;if(!i)return;const r=Rn(e),{mode:l}=r;if(o.isLeaving)return qv(i);const a=zS(i);if(!a)return qv(i);let u=Cp(a,r,o,n,d=>u=d);a.type!==Zo&&Ea(a,u);let c=n.subTree&&zS(n.subTree);if(c&&c.type!==Zo&&!br(c,a)&&c5(n).type!==Zo){let d=Cp(c,r,o,n);if(Ea(c,d),l==="out-in"&&a.type!==Zo)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},qv(i);l==="in-out"&&a.type!==Zo?d.delayLeave=(f,p,h)=>{const m=f5(o,c);m[String(c.key)]=c,f[er]=()=>{p(),f[er]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{h(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function d5(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Zo){t=n;break}}return t}const eO=QF;function f5(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Cp(e,t,n,o,s){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:k,onAppear:w,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),S=f5(n,e),I=(F,R)=>{F&&ar(F,o,9,R)},T=(F,R)=>{const P=R[1];I(F,R),Ut(F)?F.every(M=>M.length<=1)&&P():F.length<=1&&P()},$={mode:r,persisted:l,beforeEnter(F){let R=a;if(!n.isMounted)if(i)R=k||a;else return;F[er]&&F[er](!0);const P=S[b];P&&br(e,P)&&P.el[er]&&P.el[er](),I(R,[F])},enter(F){if(S[b]===e)return;let R=u,P=c,M=d;if(!n.isMounted)if(i)R=w||u,P=v||c,M=y||d;else return;let D=!1;F[hf]=z=>{D||(D=!0,z?I(M,[F]):I(P,[F]),$.delayedLeave&&$.delayedLeave(),F[hf]=void 0)};const B=F[hf].bind(null,!1);R?T(R,[F,B]):B()},leave(F,R){const P=String(e.key);if(F[hf]&&F[hf](!0),n.isUnmounting)return R();I(f,[F]);let M=!1;F[er]=B=>{M||(M=!0,R(),B?I(m,[F]):I(h,[F]),F[er]=void 0,S[P]===e&&delete S[P])};const D=F[er].bind(null,!1);S[P]=e,p?T(p,[F,D]):D()},clone(F){const R=Cp(F,t,n,o,s);return s&&s(R),R}};return $}function qv(e){if(oh(e))return e=Ol(e),e.children=null,e}function zS(e){if(!oh(e))return l5(e.type)&&e.children?d5(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&hn(n.default))return n.default()}}function Ea(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ea(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function P2(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function WS(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Tg=new WeakMap;function od(e,t,n,o,s=!1){if(Ut(e)){e.forEach((m,k)=>od(m,t&&(Ut(t)?t[k]:t),n,o,s));return}if(Il(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&od(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?ih(o.component):o.el,r=s?null:i,{i:l,r:a}=e,u=t&&t.r,c=l.refs===$n?l.refs={}:l.refs,d=l.setupState,f=Rn(d),p=d===$n?MM:m=>WS(c,m)?!1:qn(f,m),h=(m,k)=>!(k&&WS(c,k));if(u!=null&&u!==a){if(HS(t),co(u))c[u]=null,p(u)&&(d[u]=null);else if(Bo(u)){const m=t;h(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(hn(a))th(a,l,12,[r,c]);else{const m=co(a),k=Bo(a);if(m||k){const w=()=>{if(e.f){const v=m?p(a)?d[a]:c[a]:h()||!e.k?a.value:c[e.k];if(s)Ut(v)&&I2(v,i);else if(Ut(v))v.includes(i)||v.push(i);else if(m)c[a]=[i],p(a)&&(d[a]=c[a]);else{const y=[i];h(a,e.k)&&(a.value=y),e.k&&(c[e.k]=y)}}else m?(c[a]=r,p(a)&&(d[a]=r)):k&&(h(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const v=()=>{w(),Tg.delete(e)};v.id=-1,Tg.set(e,v),Vo(v,n)}else HS(e),w()}}}function HS(e){const t=Tg.get(e);t&&(t.flags|=8,Tg.delete(e))}let jS=!1;const xc=()=>{jS||(console.error("Hydration completed but contains mismatches."),jS=!0)},tO=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",nO=e=>e.namespaceURI.includes("MathML"),tm=e=>{if(e.nodeType===1){if(tO(e))return"svg";if(nO(e))return"mathml"}},jc=e=>e.nodeType===8;function oO(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(y,b)=>{if(!b.hasChildNodes()){n(null,y,b),Eg(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Eg(),b._vnode=y},d=(y,b,S,I,T,$=!1)=>{$=$||!!b.dynamicChildren;const F=jc(y)&&y.data==="[",R=()=>m(y,b,S,I,T,F),{type:P,ref:M,shapeFlag:D,patchFlag:B}=b;let z=y.nodeType;b.el=y,B===-2&&($=!1,b.dynamicChildren=null);let A=null;switch(P){case xa:z!==3?b.children===""?(a(b.el=s(""),r(y),y),A=y):A=R():(y.data!==b.children&&(xc(),y.data=b.children),A=i(y));break;case Zo:v(y)?(A=i(y),w(b.el=y.content.firstChild,y,S)):z!==8||F?A=R():A=i(y);break;case id:if(F&&(y=i(y),z=y.nodeType),z===1||z===3){A=y;const L=!b.children.length;for(let W=0;W{$=$||!!b.dynamicChildren;const{type:F,props:R,patchFlag:P,shapeFlag:M,dirs:D,transition:B}=b,z=F==="input"||F==="option";if(z||P!==-1){D&&Vr(b,null,S,"created");let A=!1;if(v(y)){A=$5(null,B)&&S&&S.vnode.props&&S.vnode.props.appear;const W=y.content.firstChild;if(A){const j=W.getAttribute("class");j&&(W.$cls=j),B.beforeEnter(W)}w(W,y,S),b.el=y=W}if(M&16&&!(R&&(R.innerHTML||R.textContent))){let W=p(y.firstChild,b,y,S,I,T,$);for(W&&!nm(y,1)&&xc();W;){const j=W;W=W.nextSibling,l(j)}}else if(M&8){let W=b.children;W[0]===` -`&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(W=W.slice(1));const{textContent:j}=y;j!==W&&j!==W.replace(/\r\n|\r/g,` -`)&&(nm(y,0)||xc(),y.textContent=b.children)}if(R){if(z||!$||P&48){const W=y.tagName.includes("-");for(const j in R)(z&&(j.endsWith("value")||j==="indeterminate")||eh(j)&&!$u(j)||j[0]==="."||W&&!$u(j))&&o(y,j,null,R[j],void 0,S)}else if(R.onClick)o(y,"onClick",null,R.onClick,void 0,S);else if(P&4&&wa(R.style))for(const W in R.style)R.style[W]}let L;(L=R&&R.onVnodeBeforeMount)&&hi(L,S,b),D&&Vr(b,null,S,"beforeMount"),((L=R&&R.onVnodeMounted)||D||A)&&O5(()=>{L&&hi(L,S,b),A&&B.enter(y),D&&Vr(b,null,S,"mounted")},I)}return y.nextSibling},p=(y,b,S,I,T,$,F)=>{F=F||!!b.dynamicChildren;const R=b.children,P=R.length;let M=!1;for(let D=0;D{const{slotScopeIds:F}=b;F&&(T=T?T.concat(F):F);const R=r(y),P=p(i(y),b,R,S,I,T,$);return P&&jc(P)&&P.data==="]"?i(b.anchor=P):(xc(),a(b.anchor=u("]"),R,P),P)},m=(y,b,S,I,T,$)=>{if(nm(y.parentElement,1)||xc(),b.el=null,$){const P=k(y);for(;;){const M=i(y);if(M&&M!==P)l(M);else break}}const F=i(y),R=r(y);return l(y),n(null,b,R,F,S,I,tm(R),T),S&&(S.vnode.el=b.el,a0(S,b.el)),F},k=(y,b="[",S="]")=>{let I=0;for(;y;)if(y=i(y),y&&jc(y)&&(y.data===b&&I++,y.data===S)){if(I===0)return i(y);I--}return y},w=(y,b,S)=>{const I=b.parentNode;I&&I.replaceChild(y,b);let T=S;for(;T;)T.vnode.el===b&&(T.vnode.el=T.subTree.el=y),T=T.parent},v=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[c,d]}const US="data-allow-mismatch",sO={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function nm(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(US);)e=e.parentElement;const n=e&&e.getAttribute(US);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(sO[t])}}const iO=X1().requestIdleCallback||(e=>setTimeout(e,1)),rO=X1().cancelIdleCallback||(e=>clearTimeout(e)),IDe=(e=1e4)=>t=>{const n=iO(t,{timeout:e});return()=>rO(n)};function lO(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:r}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(lO(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},NDe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},LDe=(e=[])=>(t,n)=>{co(e)&&(e=[e]);let o=!1;const s=r=>{o||(o=!0,i(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},i=()=>{n(r=>{for(const l of e)r.removeEventListener(l,s)})};return n(r=>{for(const l of e)r.addEventListener(l,s,{once:!0})}),i};function aO(e,t){if(jc(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(jc(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Il=e=>!!e.type.__asyncLoader;function or(e){hn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:r,suspensible:l=!0,onError:a}=e;let u=null,c,d=0;const f=()=>(d++,u=null,p()),p=()=>{let h;return u||(h=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((k,w)=>{a(m,()=>k(f()),()=>w(m),d+1)});throw m}).then(m=>h!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return Ze({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,k){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const v=()=>{w||k()},y=i?()=>{const b=i(v,S=>aO(h,S));b&&(m.bum||(m.bum=[])).push(b)}:v;c?y():p().then(()=>!m.isUnmounted&&y())},get __asyncResolved(){return c},setup(){const h=As;if(D2(h),c)return()=>om(c,h);const m=y=>{u=null,Fd(y,h,13,!o)};if(l&&h.suspense||Wu)return p().then(y=>()=>om(y,h)).catch(y=>(m(y),()=>o?K(o,{error:y}):null));const k=V(!1),w=V(),v=V(!!s);return s&&setTimeout(()=>{v.value=!1},s),r!=null&&setTimeout(()=>{if(!k.value&&!w.value){const y=new Error(`Async component timed out after ${r}ms.`);m(y),w.value=y}},r),p().then(()=>{k.value=!0,h.parent&&oh(h.parent.vnode)&&h.parent.update()}).catch(y=>{m(y),w.value=y}),()=>{if(k.value&&c)return om(c,h);if(w.value&&o)return K(o,{error:w.value});if(n&&!v.value)return om(n,h)}}})}function om(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,r=K(e,o,s);return r.ref=n,r.ce=i,delete t.vnode.ce,r}const oh=e=>e.type.__isKeepAlive,uO={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=es(),o=n.ctx;if(!o.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const s=new Map,i=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=o,f=d("div");o.activate=(v,y,b,S,I)=>{const T=v.component;u(v,y,b,0,l),a(T.vnode,v,y,b,T,l,S,v.slotScopeIds,I),Vo(()=>{T.isDeactivated=!1,T.a&&td(T.a);const $=v.props&&v.props.onVnodeMounted;$&&hi($,T.parent,v)},l)},o.deactivate=v=>{const y=v.component;$g(y.m),$g(y.a),u(v,f,null,1,l),Vo(()=>{y.da&&td(y.da);const b=v.props&&v.props.onVnodeUnmounted;b&&hi(b,y.parent,v),y.isDeactivated=!0},l)};function p(v){Kv(v),c(v,n,l,!0)}function h(v){s.forEach((y,b)=>{const S=Yk(Il(y)?y.type.__asyncResolved||{}:y.type);S&&!v(S)&&m(b)})}function m(v){const y=s.get(v);y&&(!r||!br(y,r))?p(y):r&&Kv(r),s.delete(v),i.delete(v)}Ye(()=>[e.include,e.exclude],([v,y])=>{v&&h(b=>Of(v,b)),y&&h(b=>!Of(y,b))},{flush:"post",deep:!0});let k=null;const w=()=>{k!=null&&(Ng(n.subTree.type)?Vo(()=>{s.set(k,sm(n.subTree))},n.subTree.suspense):s.set(k,sm(n.subTree)))};return Sn(w),B2(w),po(()=>{s.forEach(v=>{const{subTree:y,suspense:b}=n,S=sm(y);if(v.type===S.type&&v.key===S.key){Kv(S);const I=S.component.da;I&&Vo(I,b);return}p(v)})}),()=>{if(k=null,!t.default)return r=null;const v=t.default(),y=v[0];if(v.length>1)return r=null,v;if(!Ta(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return r=null,y;let b=sm(y);if(b.type===Zo)return r=null,b;const S=b.type,I=Yk(Il(b)?b.type.__asyncResolved||{}:S),{include:T,exclude:$,max:F}=e;if(T&&(!I||!Of(T,I))||$&&I&&Of($,I))return b.shapeFlag&=-257,r=b,y;const R=b.key==null?S:b.key,P=s.get(R);return b.el&&(b=Ol(b),y.shapeFlag&128&&(y.ssContent=b)),k=R,P?(b.el=P.el,b.component=P.component,b.transition&&Ea(b,b.transition),b.shapeFlag|=512,i.delete(R),i.add(R)):(i.add(R),F&&i.size>parseInt(F,10)&&m(i.values().next().value)),b.shapeFlag|=256,r=b,Ng(y.type)?y:b}}},FDe=uO;function Of(e,t){return Ut(e)?e.some(n=>Of(n,t)):co(e)?e.split(",").includes(t):ZL(e)?(e.lastIndex=0,e.test(t)):!1}function cO(e,t){p5(e,"a",t)}function dO(e,t){p5(e,"da",t)}function p5(e,t,n=As){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(r0(t,o,n),n){let s=n.parent;for(;s&&s.parent;)oh(s.parent.vnode)&&fO(o,t,n,s),s=s.parent}}function fO(e,t,n,o){const s=r0(t,e,o,!0);En(()=>{I2(o[t],s)},n)}function Kv(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function sm(e){return e.shapeFlag&128?e.ssContent:e}function r0(e,t,n=As,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Nl();const l=Od(n),a=ar(t,n,e,r);return l(),Ll(),a});return o?s.unshift(i):s.push(i),i}}const jl=e=>(t,n=As)=>{(!Wu||e==="sp")&&r0(e,(...o)=>t(...o),n)},pO=jl("bm"),Sn=jl("m"),h5=jl("bu"),B2=jl("u"),po=jl("bum"),En=jl("um"),hO=jl("sp"),mO=jl("rtg"),gO=jl("rtc");function vO(e,t=As){r0("ec",e,t)}const z2="components",yO="directives";function kO(e,t){return W2(z2,e,!0,t)||e}const m5=Symbol.for("v-ndc");function Ko(e){return co(e)?W2(z2,e,!1)||e:e||m5}function ODe(e){return W2(yO,e)}function W2(e,t,n=!0,o=!1){const s=Es||As;if(s){const i=s.type;if(e===z2){const l=Yk(i,!1);if(l&&(l===t||l===us(t)||l===Y1(us(t))))return i}const r=VS(s[e]||i[e],t)||VS(s.appContext[e],t);return!r&&o?i:r}}function VS(e,t){return e&&(e[t]||e[us(t)]||e[Y1(us(t))])}function st(e,t,n,o){let s;const i=n&&n[o],r=Ut(e);if(r||co(e)){const l=r&&wa(e);let a=!1,u=!1;l&&(a=!Pi(e),u=Fl(e),e=t0(e)),s=new Array(e.length);for(let c=0,d=e.length;ct(l,a,void 0,i&&i[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,u=l.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function An(e,t,n={},o,s){if(Es.ce||Es.parent&&Il(Es.parent)&&Es.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),pe(Te,null,[K("slot",n,o&&o())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const r=i&&H2(i(n)),l=n.key||r&&r.key,a=pe(Te,{key:(l&&!ji(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||(o?o():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function H2(e){return e.some(t=>Ta(t)?!(t.type===Zo||t.type===Te&&!H2(t.children)):!0)?e:null}function RDe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:Gm(o)]=e[o];return n}const Hk=e=>e?W5(e)?ih(e):Hk(e.parent):null,ep=so(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Hk(e.parent),$root:e=>Hk(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>j2(e),$forceUpdate:e=>e.f||(e.f=()=>{R2(e.update)}),$nextTick:e=>e.n||(e.n=xt.bind(e.proxy)),$watch:e=>ZF.bind(e)}),Gv=(e,t)=>e!==$n&&!e.__isScriptSetup&&qn(e,t),jk={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Gv(o,t))return r[t]=1,o[t];if(s!==$n&&qn(s,t))return r[t]=2,s[t];if(qn(i,t))return r[t]=3,i[t];if(n!==$n&&qn(n,t))return r[t]=4,n[t];Uk&&(r[t]=0)}}const u=ep[t];let c,d;if(u)return t==="$attrs"&&Bs(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==$n&&qn(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,qn(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return Gv(s,t)?(s[t]=n,!0):o!==$n&&qn(o,t)?(o[t]=n,!0):qn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:r}},l){let a;return!!(n[l]||e!==$n&&l[0]!=="$"&&qn(e,l)||Gv(t,l)||qn(i,l)||qn(o,l)||qn(ep,l)||qn(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:qn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},bO=so({},jk,{get(e,t){if(t!==Symbol.unscopables)return jk.get(e,t,e)},has(e,t){return t[0]!=="_"&&!eF(t)}});function PDe(){return null}function DDe(){return null}function BDe(e){}function zDe(e){}function WDe(){return null}function HDe(){}function jDe(e,t){return null}function UDe(){return g5().slots}function sh(){return g5().attrs}function g5(e){const t=es();return t.setupContext||(t.setupContext=U5(t))}function Mp(e){return Ut(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function VDe(e,t){const n=Mp(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?Ut(s)||hn(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function qDe(e,t){return!e||!t?e||t:Ut(e)&&Ut(t)?e.concat(t):so({},Mp(e),Mp(t))}function KDe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function GDe(e){const t=es(),n=Wu;let o=e();Tp(),n&&rd(!1);const s=()=>{Od(t),n&&rd(!0)},i=()=>{es()!==t&&t.scope.off(),Tp(),n&&rd(!1)};return $2(o)&&(o=o.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),r})),[o,()=>{s(),Promise.resolve().then(i)}]}let Uk=!0;function wO(e){const t=j2(e),n=e.proxy,o=e.ctx;Uk=!1,t.beforeCreate&&qS(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:k,beforeDestroy:w,beforeUnmount:v,destroyed:y,unmounted:b,render:S,renderTracked:I,renderTriggered:T,errorCaptured:$,serverPrefetch:F,expose:R,inheritAttrs:P,components:M,directives:D,filters:B}=t;if(u&&xO(u,o,null),r)for(const L in r){const W=r[L];hn(W)&&(o[L]=W.bind(n))}if(s){const L=s.call(n,n);Kn(L)&&(e.data=Ms(L))}if(Uk=!0,i)for(const L in i){const W=i[L],j=hn(W)?W.bind(n,n):hn(W.get)?W.get.bind(n,n):rr,re=!hn(W)&&hn(W.set)?W.set.bind(n):rr,Q=O({get:j,set:re});Object.defineProperty(o,L,{enumerable:!0,configurable:!0,get:()=>Q.value,set:Y=>Q.value=Y})}if(l)for(const L in l)v5(l[L],o,n,L);if(a){const L=hn(a)?a.call(n):a;Reflect.ownKeys(L).forEach(W=>{Vn(W,L[W])})}c&&qS(c,e,"c");function A(L,W){Ut(W)?W.forEach(j=>L(j.bind(n))):W&&L(W.bind(n))}if(A(pO,d),A(Sn,f),A(h5,p),A(B2,h),A(cO,m),A(dO,k),A(vO,$),A(gO,I),A(mO,T),A(po,v),A(En,b),A(hO,F),Ut(R))if(R.length){const L=e.exposed||(e.exposed={});R.forEach(W=>{Object.defineProperty(L,W,{get:()=>n[W],set:j=>n[W]=j,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===rr&&(e.render=S),P!=null&&(e.inheritAttrs=P),M&&(e.components=M),D&&(e.directives=D),F&&D2(e)}function xO(e,t,n=rr){Ut(e)&&(e=Vk(e));for(const o in e){const s=e[o];let i;Kn(s)?"default"in s?i=wn(s.from||o,s.default,!0):i=wn(s.from||o):i=wn(s),Bo(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function qS(e,t,n){ar(Ut(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function v5(e,t,n,o){let s=o.includes(".")?i5(n,o):()=>n[o];if(co(e)){const i=t[e];hn(i)&&Ye(s,i)}else if(hn(e))Ye(s,e.bind(n));else if(Kn(e))if(Ut(e))e.forEach(i=>v5(i,t,n,o));else{const i=hn(e.handler)?e.handler.bind(n):t[e.handler];hn(i)&&Ye(s,i,e)}}function j2(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let a;return l?a=l:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(u=>Ig(a,u,r,!0)),Ig(a,t,r)),Kn(t)&&i.set(t,a),a}function Ig(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&Ig(e,i,n,!0),s&&s.forEach(r=>Ig(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=_O[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const _O={data:KS,props:GS,emits:GS,methods:Rf,computed:Rf,beforeCreate:Gs,created:Gs,beforeMount:Gs,mounted:Gs,beforeUpdate:Gs,updated:Gs,beforeDestroy:Gs,beforeUnmount:Gs,destroyed:Gs,unmounted:Gs,activated:Gs,deactivated:Gs,errorCaptured:Gs,serverPrefetch:Gs,components:Rf,directives:Rf,watch:CO,provide:KS,inject:SO};function KS(e,t){return t?e?function(){return so(hn(e)?e.call(this,this):e,hn(t)?t.call(this,this):t)}:t:e}function SO(e,t){return Rf(Vk(e),Vk(t))}function Vk(e){if(Ut(e)){const t={};for(let n=0;n{let c,d=$n,f;return GF(()=>{const p=e[s];Cs(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const h=n.set?n.set(p):p;if(!Cs(h,c)&&!(d!==$n&&Cs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${i}`in m)||(c=p,u()),o.emit(`update:${t}`,h),Cs(p,h)&&Cs(p,d)&&!Cs(h,f)&&u(),d=p,f=h}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||$n:l,done:!1}:{done:!0}}}},l}const k5=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${us(t)}Modifiers`]||e[`${wi(t)}Modifiers`];function EO(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||$n;let s=n;const i=t.startsWith("update:"),r=i&&k5(o,t.slice(7));r&&(r.trim&&(s=n.map(c=>co(c)?c.trim():c)),r.number&&(s=n.map(J1)));let l,a=o[l=Gm(t)]||o[l=Gm(us(t))];!a&&i&&(a=o[l=Gm(wi(t))]),a&&ar(a,e,6,s);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ar(u,e,6,s)}}const TO=new WeakMap;function b5(e,t,n=!1){const o=n?TO:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let r={},l=!1;if(!hn(e)){const a=u=>{const c=b5(u,t,!0);c&&(l=!0,so(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(Kn(e)&&o.set(e,null),null):(Ut(i)?i.forEach(a=>r[a]=null):so(r,i),Kn(e)&&o.set(e,r),r)}function l0(e,t){return!e||!eh(t)?!1:(t=t.slice(2).replace(/Once$/,""),qn(e,t[0].toLowerCase()+t.slice(1))||qn(e,wi(t))||qn(e,t))}function Ym(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,k=Sp(e);let w,v;try{if(n.shapeFlag&4){const b=s||o,S=b;w=bi(u.call(S,b,c,d,p,f,h)),v=l}else{const b=t;w=bi(b.length>1?b(d,{attrs:l,slots:r,emit:a}):b(d,null)),v=t.props?l:$O(l)}}catch(b){tp.length=0,Fd(b,e,1),w=K(Zo)}let y=w;if(v&&m!==!1){const b=Object.keys(v),{shapeFlag:S}=y;b.length&&S&7&&(i&&b.some(q1)&&(v=NO(v,i)),y=Ol(y,v,!1,!0))}return n.dirs&&(y=Ol(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&Ea(y,n.transition),w=y,Sp(k),w}function IO(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||eh(n))&&((t||(t={}))[n]=e[n]);return t},NO=(e,t)=>{const n={};for(const o in e)(!q1(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function LO(e,t,n){const{props:o,children:s,component:i}=e,{props:r,children:l,patchFlag:a}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?ZS(o,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;dObject.create(x5),S5=e=>Object.getPrototypeOf(e)===x5;function FO(e,t,n,o=!1){const s={},i=_5();e.propsDefaults=Object.create(null),C5(e,t,s,i);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=o?s:TF(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function OO(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:r}}=e,l=Rn(s),[a]=e.propsOptions;let u=!1;if((o||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=A5(d,t,!0);so(r,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!a)return Kn(e)&&o.set(e,Qc),Qc;if(Ut(i))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",V2=e=>Ut(e)?e.map(bi):[bi(e)],PO=(e,t,n)=>{if(t._n)return t;const o=ve((...s)=>V2(t(...s)),n);return o._c=!1,o},M5=(e,t,n)=>{const o=e._ctx;for(const s in e){if(U2(s))continue;const i=e[s];if(hn(i))t[s]=PO(s,i,o);else if(i!=null){const r=V2(i);t[s]=()=>r}}},E5=(e,t)=>{const n=V2(t);e.slots.default=()=>n},T5=(e,t,n)=>{for(const o in t)(n||!U2(o))&&(e[o]=t[o])},DO=(e,t,n)=>{const o=e.slots=_5();if(e.vnode.shapeFlag&32){const s=t._;s?(T5(o,t,n),n&&TM(o,"_",s,!0)):M5(t,o)}else t&&E5(e,t)},BO=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,r=$n;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:T5(s,t,n):(i=!t.$stable,M5(t,s)),r=t}else t&&(E5(e,t),r={default:1});if(i)for(const l in s)!U2(l)&&r[l]==null&&delete s[l]},Vo=O5;function zO(e){return I5(e)}function WO(e){return I5(e,oO)}function I5(e,t){const n=X1();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=rr,insertStaticContent:h}=e,m=(H,Z,ye,fe=null,de=null,J=null,ae=void 0,be=null,_e=!!Z.dynamicChildren)=>{if(H===Z)return;H&&!br(H,Z)&&(fe=me(H),Y(H,de,J,!0),H=null),Z.patchFlag===-2&&(_e=!1,Z.dynamicChildren=null);const{type:ce,ref:Se,shapeFlag:ie}=Z;switch(ce){case xa:k(H,Z,ye,fe);break;case Zo:w(H,Z,ye,fe);break;case id:H==null&&v(Z,ye,fe,ae);break;case Te:M(H,Z,ye,fe,de,J,ae,be,_e);break;default:ie&1?S(H,Z,ye,fe,de,J,ae,be,_e):ie&6?D(H,Z,ye,fe,de,J,ae,be,_e):(ie&64||ie&128)&&ce.process(H,Z,ye,fe,de,J,ae,be,_e,he)}Se!=null&&de?od(Se,H&&H.ref,J,Z||H,!Z):Se==null&&H&&H.ref!=null&&od(H.ref,null,J,H,!0)},k=(H,Z,ye,fe)=>{if(H==null)o(Z.el=l(Z.children),ye,fe);else{const de=Z.el=H.el;Z.children!==H.children&&u(de,Z.children)}},w=(H,Z,ye,fe)=>{H==null?o(Z.el=a(Z.children||""),ye,fe):Z.el=H.el},v=(H,Z,ye,fe)=>{[H.el,H.anchor]=h(H.children,Z,ye,fe,H.el,H.anchor)},y=({el:H,anchor:Z},ye,fe)=>{let de;for(;H&&H!==Z;)de=f(H),o(H,ye,fe),H=de;o(Z,ye,fe)},b=({el:H,anchor:Z})=>{let ye;for(;H&&H!==Z;)ye=f(H),s(H),H=ye;s(Z)},S=(H,Z,ye,fe,de,J,ae,be,_e)=>{if(Z.type==="svg"?ae="svg":Z.type==="math"&&(ae="mathml"),H==null)I(Z,ye,fe,de,J,ae,be,_e);else{const ce=H.el&&H.el._isVueCE?H.el:null;try{ce&&ce._beginPatch(),F(H,Z,de,J,ae,be,_e)}finally{ce&&ce._endPatch()}}},I=(H,Z,ye,fe,de,J,ae,be)=>{let _e,ce;const{props:Se,shapeFlag:ie,transition:we,dirs:Re}=H;if(_e=H.el=r(H.type,J,Se&&Se.is,Se),ie&8?c(_e,H.children):ie&16&&$(H.children,_e,null,fe,de,Zv(H,J),ae,be),Re&&Vr(H,null,fe,"created"),T(_e,H,H.scopeId,ae,fe),Se){for(const ft in Se)ft!=="value"&&!$u(ft)&&i(_e,ft,null,Se[ft],J,fe);"value"in Se&&i(_e,"value",null,Se.value,J),(ce=Se.onVnodeBeforeMount)&&hi(ce,fe,H)}Re&&Vr(H,null,fe,"beforeMount");const at=$5(de,we);at&&we.beforeEnter(_e),o(_e,Z,ye),((ce=Se&&Se.onVnodeMounted)||at||Re)&&Vo(()=>{try{ce&&hi(ce,fe,H),at&&we.enter(_e),Re&&Vr(H,null,fe,"mounted")}finally{}},de)},T=(H,Z,ye,fe,de)=>{if(ye&&p(H,ye),fe)for(let J=0;J{for(let ce=_e;ce{const be=Z.el=H.el;let{patchFlag:_e,dynamicChildren:ce,dirs:Se}=Z;_e|=H.patchFlag&16;const ie=H.props||$n,we=Z.props||$n;let Re;if(ye&&iu(ye,!1),(Re=we.onVnodeBeforeUpdate)&&hi(Re,ye,Z,H),Se&&Vr(Z,H,ye,"beforeUpdate"),ye&&iu(ye,!0),(ie.innerHTML&&we.innerHTML==null||ie.textContent&&we.textContent==null)&&c(be,""),ce?R(H.dynamicChildren,ce,be,ye,fe,Zv(Z,de),J):ae||W(H,Z,be,null,ye,fe,Zv(Z,de),J,!1),_e>0){if(_e&16)P(be,ie,we,ye,de);else if(_e&2&&ie.class!==we.class&&i(be,"class",null,we.class,de),_e&4&&i(be,"style",ie.style,we.style,de),_e&8){const at=Z.dynamicProps;for(let ft=0;ft{Re&&hi(Re,ye,Z,H),Se&&Vr(Z,H,ye,"updated")},fe)},R=(H,Z,ye,fe,de,J,ae)=>{for(let be=0;be{if(Z!==ye){if(Z!==$n)for(const J in Z)!$u(J)&&!(J in ye)&&i(H,J,Z[J],null,de,fe);for(const J in ye){if($u(J))continue;const ae=ye[J],be=Z[J];ae!==be&&J!=="value"&&i(H,J,be,ae,de,fe)}"value"in ye&&i(H,"value",Z.value,ye.value,de)}},M=(H,Z,ye,fe,de,J,ae,be,_e)=>{const ce=Z.el=H?H.el:l(""),Se=Z.anchor=H?H.anchor:l("");let{patchFlag:ie,dynamicChildren:we,slotScopeIds:Re}=Z;Re&&(be=be?be.concat(Re):Re),H==null?(o(ce,ye,fe),o(Se,ye,fe),$(Z.children||[],ye,Se,de,J,ae,be,_e)):ie>0&&ie&64&&we&&H.dynamicChildren&&H.dynamicChildren.length===we.length?(R(H.dynamicChildren,we,ye,de,J,ae,be),(Z.key!=null||de&&Z===de.subTree)&&q2(H,Z,!0)):W(H,Z,ye,Se,de,J,ae,be,_e)},D=(H,Z,ye,fe,de,J,ae,be,_e)=>{Z.slotScopeIds=be,H==null?Z.shapeFlag&512?de.ctx.activate(Z,ye,fe,ae,_e):B(Z,ye,fe,de,J,ae,_e):z(H,Z,_e)},B=(H,Z,ye,fe,de,J,ae)=>{const be=H.component=z5(H,fe,de);if(oh(H)&&(be.ctx.renderer=he),H5(be,!1,ae),be.asyncDep){if(de&&de.registerDep(be,A,ae),!H.el){const _e=be.subTree=K(Zo);w(null,_e,Z,ye),H.placeholder=_e.el}}else A(be,H,Z,ye,de,J,ae)},z=(H,Z,ye)=>{const fe=Z.component=H.component;if(LO(H,Z,ye))if(fe.asyncDep&&!fe.asyncResolved){L(fe,Z,ye);return}else fe.next=Z,fe.update();else Z.el=H.el,fe.vnode=Z},A=(H,Z,ye,fe,de,J,ae)=>{const be=()=>{if(H.isMounted){let{next:ie,bu:we,u:Re,parent:at,vnode:ft}=H;{const Qe=N5(H);if(Qe){ie&&(ie.el=ft.el,L(H,ie,ae)),Qe.asyncDep.then(()=>{Vo(()=>{H.isUnmounted||ce()},de)});return}}let Mt=ie,Tt;iu(H,!1),ie?(ie.el=ft.el,L(H,ie,ae)):ie=ft,we&&td(we),(Tt=ie.props&&ie.props.onVnodeBeforeUpdate)&&hi(Tt,at,ie,ft),iu(H,!0);const tn=Ym(H),Kt=H.subTree;H.subTree=tn,m(Kt,tn,d(Kt.el),me(Kt),H,de,J),ie.el=tn.el,Mt===null&&a0(H,tn.el),Re&&Vo(Re,de),(Tt=ie.props&&ie.props.onVnodeUpdated)&&Vo(()=>hi(Tt,at,ie,ft),de)}else{let ie;const{el:we,props:Re}=Z,{bm:at,m:ft,parent:Mt,root:Tt,type:tn}=H,Kt=Il(Z);if(iu(H,!1),at&&td(at),!Kt&&(ie=Re&&Re.onVnodeBeforeMount)&&hi(ie,Mt,Z),iu(H,!0),we&&ne){const Qe=()=>{H.subTree=Ym(H),ne(we,H.subTree,H,de,null)};Kt&&tn.__asyncHydrate?tn.__asyncHydrate(we,H,Qe):Qe()}else{Tt.ce&&Tt.ce._hasShadowRoot()&&Tt.ce._injectChildStyle(tn,H.parent?H.parent.type:void 0);const Qe=H.subTree=Ym(H);m(null,Qe,ye,fe,H,de,J),Z.el=Qe.el}if(ft&&Vo(ft,de),!Kt&&(ie=Re&&Re.onVnodeMounted)){const Qe=Z;Vo(()=>hi(ie,Mt,Qe),de)}(Z.shapeFlag&256||Mt&&Il(Mt.vnode)&&Mt.vnode.shapeFlag&256)&&H.a&&Vo(H.a,de),H.isMounted=!0,Z=ye=fe=null}};H.scope.on();const _e=H.effect=new _g(be);H.scope.off();const ce=H.update=_e.run.bind(_e),Se=H.job=_e.runIfDirty.bind(_e);Se.i=H,Se.id=H.uid,_e.scheduler=()=>R2(Se),iu(H,!0),ce()},L=(H,Z,ye)=>{Z.component=H;const fe=H.vnode.props;H.vnode=Z,H.next=null,OO(H,Z.props,fe,ye),BO(H,Z.children,ye),Nl(),PS(H),Ll()},W=(H,Z,ye,fe,de,J,ae,be,_e=!1)=>{const ce=H&&H.children,Se=H?H.shapeFlag:0,ie=Z.children,{patchFlag:we,shapeFlag:Re}=Z;if(we>0){if(we&128){re(ce,ie,ye,fe,de,J,ae,be,_e);return}else if(we&256){j(ce,ie,ye,fe,de,J,ae,be,_e);return}}Re&8?(Se&16&&q(ce,de,J),ie!==ce&&c(ye,ie)):Se&16?Re&16?re(ce,ie,ye,fe,de,J,ae,be,_e):q(ce,de,J,!0):(Se&8&&c(ye,""),Re&16&&$(ie,ye,fe,de,J,ae,be,_e))},j=(H,Z,ye,fe,de,J,ae,be,_e)=>{H=H||Qc,Z=Z||Qc;const ce=H.length,Se=Z.length,ie=Math.min(ce,Se);let we;for(we=0;weSe?q(H,de,J,!0,!1,ie):$(Z,ye,fe,de,J,ae,be,_e,ie)},re=(H,Z,ye,fe,de,J,ae,be,_e)=>{let ce=0;const Se=Z.length;let ie=H.length-1,we=Se-1;for(;ce<=ie&&ce<=we;){const Re=H[ce],at=Z[ce]=_e?bl(Z[ce]):bi(Z[ce]);if(br(Re,at))m(Re,at,ye,null,de,J,ae,be,_e);else break;ce++}for(;ce<=ie&&ce<=we;){const Re=H[ie],at=Z[we]=_e?bl(Z[we]):bi(Z[we]);if(br(Re,at))m(Re,at,ye,null,de,J,ae,be,_e);else break;ie--,we--}if(ce>ie){if(ce<=we){const Re=we+1,at=Rewe)for(;ce<=ie;)Y(H[ce],de,J,!0),ce++;else{const Re=ce,at=ce,ft=new Map;for(ce=at;ce<=we;ce++){const Pt=Z[ce]=_e?bl(Z[ce]):bi(Z[ce]);Pt.key!=null&&ft.set(Pt.key,ce)}let Mt,Tt=0;const tn=we-at+1;let Kt=!1,Qe=0;const nt=new Array(tn);for(ce=0;ce=tn){Y(Pt,de,J,!0);continue}let Oe;if(Pt.key!=null)Oe=ft.get(Pt.key);else for(Mt=at;Mt<=we;Mt++)if(nt[Mt-at]===0&&br(Pt,Z[Mt])){Oe=Mt;break}Oe===void 0?Y(Pt,de,J,!0):(nt[Oe-at]=ce+1,Oe>=Qe?Qe=Oe:Kt=!0,m(Pt,Z[Oe],ye,null,de,J,ae,be,_e),Tt++)}const ut=Kt?HO(nt):Qc;for(Mt=ut.length-1,ce=tn-1;ce>=0;ce--){const Pt=at+ce,Oe=Z[Pt],Je=Z[Pt+1],it=Pt+1{const{el:J,type:ae,transition:be,children:_e,shapeFlag:ce}=H;if(ce&6){Q(H.component.subTree,Z,ye,fe);return}if(ce&128){H.suspense.move(Z,ye,fe);return}if(ce&64){ae.move(H,Z,ye,he);return}if(ae===Te){o(J,Z,ye);for(let ie=0;ie<_e.length;ie++)Q(_e[ie],Z,ye,fe);o(H.anchor,Z,ye);return}if(ae===id){y(H,Z,ye);return}if(fe!==2&&ce&1&&be)if(fe===0)be.persisted&&!J[er]?o(J,Z,ye):(be.beforeEnter(J),o(J,Z,ye),Vo(()=>be.enter(J),de));else{const{leave:ie,delayLeave:we,afterLeave:Re}=be,at=()=>{H.ctx.isUnmounted?s(J):o(J,Z,ye)},ft=()=>{const Mt=J._isLeaving||!!J[er];J._isLeaving&&J[er](!0),be.persisted&&!Mt?at():ie(J,()=>{at(),Re&&Re()})};we?we(J,at,ft):ft()}else o(J,Z,ye)},Y=(H,Z,ye,fe=!1,de=!1)=>{const{type:J,props:ae,ref:be,children:_e,dynamicChildren:ce,shapeFlag:Se,patchFlag:ie,dirs:we,cacheIndex:Re,memo:at}=H;if(ie===-2&&(de=!1),be!=null&&(Nl(),od(be,null,ye,H,!0),Ll()),Re!=null&&(Z.renderCache[Re]=void 0),Se&256){Z.ctx.deactivate(H);return}const ft=Se&1&&we,Mt=!Il(H);let Tt;if(Mt&&(Tt=ae&&ae.onVnodeBeforeUnmount)&&hi(Tt,Z,H),Se&6)te(H.component,ye,fe);else{if(Se&128){H.suspense.unmount(ye,fe);return}ft&&Vr(H,null,Z,"beforeUnmount"),Se&64?H.type.remove(H,Z,ye,he,fe):ce&&!ce.hasOnce&&(J!==Te||ie>0&&ie&64)?q(ce,Z,ye,!1,!0):(J===Te&&ie&384||!de&&Se&16)&&q(_e,Z,ye),fe&&G(H)}const tn=at!=null&&Re==null;(Mt&&(Tt=ae&&ae.onVnodeUnmounted)||ft||tn)&&Vo(()=>{Tt&&hi(Tt,Z,H),ft&&Vr(H,null,Z,"unmounted"),tn&&(H.el=null)},ye)},G=H=>{const{type:Z,el:ye,anchor:fe,transition:de}=H;if(Z===Te){X(ye,fe);return}if(Z===id){b(H);return}const J=()=>{s(ye),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(H.shapeFlag&1&&de&&!de.persisted){const{leave:ae,delayLeave:be}=de,_e=()=>ae(ye,J);be?be(H.el,J,_e):_e()}else J()},X=(H,Z)=>{let ye;for(;H!==Z;)ye=f(H),s(H),H=ye;s(Z)},te=(H,Z,ye)=>{const{bum:fe,scope:de,job:J,subTree:ae,um:be,m:_e,a:ce}=H;$g(_e),$g(ce),fe&&td(fe),de.stop(),J&&(J.flags|=8,Y(ae,H,Z,ye)),be&&Vo(be,Z),Vo(()=>{H.isUnmounted=!0},Z)},q=(H,Z,ye,fe=!1,de=!1,J=0)=>{for(let ae=J;ae{if(H.shapeFlag&6)return me(H.component.subTree);if(H.shapeFlag&128)return H.suspense.next();const Z=f(H.anchor||H.el),ye=Z&&Z[r5];return ye?f(ye):Z};let xe=!1;const We=(H,Z,ye)=>{let fe;H==null?Z._vnode&&(Y(Z._vnode,null,null,!0),fe=Z._vnode.component):m(Z._vnode||null,H,Z,null,null,null,ye),Z._vnode=H,xe||(xe=!0,PS(fe),Eg(),xe=!1)},he={p:m,um:Y,m:Q,r:G,mt:B,mc:$,pc:W,pbc:R,n:me,o:e};let ee,ne;return t&&([ee,ne]=t(he)),{render:We,hydrate:ee,createApp:MO(We,ee)}}function Zv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function iu({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function $5(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function q2(e,t,n=!1){const o=e.children,s=t.children;if(Ut(o)&&Ut(s))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function N5(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:N5(t)}function $g(e){if(e)for(let t=0;te.__isSuspense;let Kk=0;const jO={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,r,l,a,u){if(e==null)UO(t,n,o,s,i,r,l,a,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}VO(e,t,n,o,s,r,l,a,u)}},hydrate:qO,normalize:KO},YDe=jO;function Ep(e,t){const n=e.props&&e.props[t];hn(n)&&n()}function UO(e,t,n,o,s,i,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=F5(e,s,o,t,d,n,i,r,l,a);u(null,f.pendingBranch=e.ssContent,d,null,o,f,i,r),f.deps>0?(Ep(e,"onPending"),Ep(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,i,r),sd(f,e.ssFallback)):f.resolve(!1,!0)}function VO(e,t,n,o,s,i,r,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:k,isHydrating:w}=d;if(m)d.pendingBranch=f,br(m,f)?(a(m,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():k&&(w||(a(h,p,n,o,s,null,i,r,l),sd(d,p)))):(d.pendingId=Kk++,w?(d.isHydrating=!1,d.activeBranch=m):u(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),k?(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,i,r,l),sd(d,p))):h&&br(h,f)?(a(h,f,n,o,s,d,i,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0&&d.resolve()));else if(h&&br(h,f))a(h,f,n,o,s,d,i,r,l),sd(d,f);else if(Ep(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=Kk++,a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0)d.resolve();else{const{timeout:v,pendingId:y}=d;v>0?setTimeout(()=>{d.pendingId===y&&d.fallback(p)},v):v===0&&d.fallback(p)}}function F5(e,t,n,o,s,i,r,l,a,u,c=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:k}}=u;let w;const v=GO(e);v&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const y=e.props?xg(e.props.timeout):void 0,b=i,S={vnode:e,parent:t,parentComponent:n,namespace:r,container:o,hiddenContainer:s,deps:0,pendingId:Kk++,timeout:typeof y=="number"?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(I=!1,T=!1){const{vnode:$,activeBranch:F,pendingBranch:R,pendingId:P,effects:M,parentComponent:D,container:B,isInFallback:z}=S;let A=!1;if(S.isHydrating)S.isHydrating=!1;else if(!I){A=F&&R.transition&&R.transition.mode==="out-in";let j=!1;A&&(F.transition.afterLeave=()=>{P===S.pendingId&&(f(R,B,i===b&&!j?h(F):i,0),Mg(M),z&&$.ssFallback&&($.ssFallback.el=null))}),F&&!S.isFallbackMountPending&&(m(F.el)===B&&(i=h(F),j=!0),p(F,D,S,!0),!A&&z&&$.ssFallback&&Vo(()=>$.ssFallback.el=null,S)),A||f(R,B,i,0)}S.isFallbackMountPending=!1,sd(S,R),S.pendingBranch=null,S.isInFallback=!1;let L=S.parent,W=!1;for(;L;){if(L.pendingBranch){L.effects.push(...M),W=!0;break}L=L.parent}!W&&!A&&Mg(M),S.effects=[],v&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!T&&t.resolve()),Ep($,"onResolve")},fallback(I){if(!S.pendingBranch)return;const{vnode:T,activeBranch:$,parentComponent:F,container:R,namespace:P}=S;Ep(T,"onFallback");const M=h($),D=()=>{S.isFallbackMountPending=!1,S.isInFallback&&(d(null,I,R,M,F,null,P,l,a),sd(S,I))},B=I.transition&&I.transition.mode==="out-in";B&&(S.isFallbackMountPending=!0,$.transition.afterLeave=D),S.isInFallback=!0,p($,F,null,!0),B||D()},move(I,T,$){S.activeBranch&&f(S.activeBranch,I,T,$),S.container=I},next(){return S.activeBranch&&h(S.activeBranch)},registerDep(I,T,$){const F=!!S.pendingBranch;F&&S.deps++;const R=I.vnode.el;I.asyncDep.catch(P=>{Fd(P,I,0)}).then(P=>{if(I.isUnmounted||S.isUnmounted||S.pendingId!==I.suspenseId)return;Tp(),I.asyncResolved=!0;const{vnode:M}=I;Gk(I,P,!1),R&&(M.el=R);const D=!R&&I.subTree.el;T(I,M,m(R||I.subTree.el),R?null:h(I.subTree),S,r,$),D&&(M.placeholder=null,k(D)),a0(I,M.el),F&&--S.deps===0&&S.resolve()})},unmount(I,T){S.isUnmounted=!0,S.activeBranch&&p(S.activeBranch,n,I,T),S.pendingBranch&&p(S.pendingBranch,n,I,T)}};return S}function qO(e,t,n,o,s,i,r,l,a){const u=t.suspense=F5(t,o,n,e.parentNode,document.createElement("div"),null,s,i,r,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,i,r);return u.deps===0&&u.resolve(!1,!0),c}function KO(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=JS(o?n.default:n),e.ssFallback=o?JS(n.fallback):K(Zo)}function JS(e){let t;if(hn(e)){const n=zu&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=Ws,R5())}return Ut(e)&&(e=IO(e)),e=bi(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function O5(e,t){t&&t.pendingBranch?Ut(e)?t.effects.push(...e):t.effects.push(e):Mg(e)}function sd(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,a0(o,s))}function GO(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Te=Symbol.for("v-fgt"),xa=Symbol.for("v-txt"),Zo=Symbol.for("v-cmt"),id=Symbol.for("v-stc"),tp=[];let Ws=null;function g(e=!1){tp.push(Ws=e?null:[])}function R5(){tp.pop(),Ws=tp[tp.length-1]||null}let zu=1;function Lg(e,t=!1){zu+=e,e<0&&Ws&&t&&(Ws.hasOnce=!0)}function P5(e){return e.dynamicChildren=zu>0?Ws||Qc:null,R5(),zu>0&&Ws&&Ws.push(e),e}function C(e,t,n,o,s,i){return P5(_(e,t,n,o,s,i,!0))}function pe(e,t,n,o,s){return P5(K(e,t,n,o,s,!0))}function Ta(e){return e?e.__v_isVNode===!0:!1}function br(e,t){return e.type===t.type&&e.key===t.key}function JDe(e){}const D5=({key:e})=>e??null,Jm=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?co(e)||Bo(e)||hn(e)?{i:Es,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,o=0,s=null,i=e===Te?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&D5(t),ref:t&&Jm(t),scopeId:i0,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Es};return l?(G2(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=co(n)?8:16),zu>0&&!r&&Ws&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Ws.push(a),a}const K=ZO;function ZO(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===m5)&&(e=Zo),Ta(e)){const l=Ol(e,t,!0);return n&&G2(l,n),zu>0&&!i&&Ws&&(l.shapeFlag&6?Ws[Ws.indexOf(e)]=l:Ws.push(l)),l.patchFlag=-2,l}if(eR(e)&&(e=e.__vccOpts),t){t=B5(t);let{class:l,style:a}=t;l&&!co(l)&&(t.class=ze(l)),Kn(a)&&(s0(a)&&!Ut(a)&&(a=so({},a)),t.style=jt(a))}const r=co(e)?1:Ng(e)?128:l5(e)?64:Kn(e)?4:hn(e)?2:0;return _(e,t,n,o,s,r,i,!0)}function B5(e){return e?s0(e)||S5(e)?so({},e):e:null}function Ol(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:r,children:l,transition:a}=e,u=t?Dn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&D5(u),ref:t&&t.ref?n&&i?Ut(i)?i.concat(Jm(t)):[i,Jm(t)]:Jm(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Te?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ol(e.ssContent),ssFallback:e.ssFallback&&Ol(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ea(c,a.clone(c)),c}function qe(e=" ",t=0){return K(xa,null,e,t)}function K2(e,t){const n=K(id,null,e);return n.staticCount=t,n}function oe(e="",t=!1){return t?(g(),pe(Zo,null,e)):K(Zo,null,e)}function bi(e){return e==null||typeof e=="boolean"?K(Zo):Ut(e)?K(Te,null,e.slice()):Ta(e)?bl(e):K(xa,null,String(e))}function bl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ol(e)}function G2(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Ut(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),G2(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!S5(t)?t._ctx=Es:s===3&&Es&&(Es.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else hn(t)?(t={default:t,_ctx:Es},n=32):(t=String(t),o&64?(n=16,t=[qe(t)]):n=8);e.children=t,e.shapeFlag|=n}function Dn(...e){const t={};for(let n=0;nAs||Es;let Fg,rd;{const e=X1(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(r=>r(i)):s[0](i)}};Fg=t("__VUE_INSTANCE_SETTERS__",n=>As=n),rd=t("__VUE_SSR_SETTERS__",n=>Wu=n)}const Od=e=>{const t=As;return Fg(e),e.scope.on(),()=>{e.scope.off(),Fg(t)}},Tp=()=>{As&&As.scope.off(),Fg(null)};function W5(e){return e.vnode.shapeFlag&4}let Wu=!1;function H5(e,t=!1,n=!1){t&&rd(t);const{props:o,children:s}=e.vnode,i=W5(e);FO(e,o,i,t),DO(e,s,n||t);const r=i?XO(e,t):void 0;return t&&rd(!1),r}function XO(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,jk);const{setup:o}=n;if(o){Nl();const s=e.setupContext=o.length>1?U5(e):null,i=Od(e),r=th(o,e,0,[e.props,s]),l=$2(r);if(Ll(),i(),(l||e.sp)&&!Il(e)&&D2(e),l){if(r.then(Tp,Tp),t)return r.then(a=>{Gk(e,a,t)}).catch(a=>{Fd(a,e,0)});e.asyncDep=r}else Gk(e,r,t)}else j5(e,t)}function Gk(e,t,n){hn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Kn(t)&&(e.setupState=JM(t)),j5(e,n)}let Og,Zk;function XDe(e){Og=e,Zk=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,bO))}}const QDe=()=>!Og;function j5(e,t,n){const o=e.type;if(!e.render){if(!t&&Og&&!o.render){const s=o.template||j2(e).template;if(s){const{isCustomElement:i,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,u=so(so({isCustomElement:i,delimiters:l},r),a);o.render=Og(s,u)}}e.render=o.render||rr,Zk&&Zk(e)}{const s=Od(e);Nl();try{wO(e)}finally{Ll(),s()}}}const QO={get(e,t){return Bs(e,"get",""),e[t]}};function U5(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,QO),slots:e.slots,emit:e.emit,expose:t}}function ih(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(JM(Et(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ep)return ep[n](e)},has(t,n){return n in t||n in ep}})):e.proxy}function Yk(e,t=!0){return hn(e)?e.displayName||e.name:e.name||t&&e.__name}function eR(e){return hn(e)&&"__vccOpts"in e}const O=(e,t)=>DF(e,t,Wu);function cn(e,t,n){try{Lg(-1);const o=arguments.length;return o===2?Kn(t)&&!Ut(t)?Ta(t)?K(e,null,[t]):K(e,t):K(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Ta(n)&&(n=[n]),K(e,t,n))}finally{Lg(1)}}function eBe(){}function tBe(e,t,n,o){const s=n[o];if(s&&tR(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function tR(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&Ws&&Ws.push(e),!0}const nR="3.5.35",nBe=rr,oBe=jF,sBe=Oc,iBe=o5,oR={createComponentInstance:z5,setupComponent:H5,renderComponentRoot:Ym,setCurrentRenderingInstance:Sp,isVNode:Ta,normalizeVNode:bi,getComponentPublicInstance:ih,ensureValidVNode:H2,pushWarningContext:WF,popWarningContext:HF},rBe=oR,lBe=null,aBe=null,uBe=null;/** -* @vue/runtime-dom v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Jk;const XS=typeof window<"u"&&window.trustedTypes;if(XS)try{Jk=XS.createPolicy("vue",{createHTML:e=>e})}catch{}const V5=Jk?e=>Jk.createHTML(e):e=>e,sR="http://www.w3.org/2000/svg",iR="http://www.w3.org/1998/Math/MathML",ml=typeof document<"u"?document:null,QS=ml&&ml.createElement("template"),rR={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?ml.createElementNS(sR,e):t==="mathml"?ml.createElementNS(iR,e):n?ml.createElement(e,{is:n}):ml.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>ml.createTextNode(e),createComment:e=>ml.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ml.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const r=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{QS.innerHTML=V5(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=QS.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Jl="transition",mf="animation",kd=Symbol("_vtc"),q5={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},K5=so({},u5,q5),lR=e=>(e.displayName="Transition",e.props=K5,e),Cr=lR((e,{slots:t})=>cn(eO,G5(e),t)),ru=(e,t=[])=>{Ut(e)?e.forEach(n=>n(...t)):e&&e(...t)},eC=e=>e?Ut(e)?e.some(t=>t.length>1):e.length>1:!1;function G5(e){const t={};for(const M in e)M in q5||(t[M]=e[M]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:u=r,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=aR(s),m=h&&h[0],k=h&&h[1],{onBeforeEnter:w,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:S,onBeforeAppear:I=w,onAppear:T=v,onAppearCancelled:$=y}=t,F=(M,D,B,z)=>{M._enterCancelled=z,la(M,D?c:l),la(M,D?u:r),B&&B()},R=(M,D)=>{M._isLeaving=!1,la(M,d),la(M,p),la(M,f),D&&D()},P=M=>(D,B)=>{const z=M?T:v,A=()=>F(D,M,B);ru(z,[D,A]),tC(()=>{la(D,M?a:i),jr(D,M?c:l),eC(z)||nC(D,o,m,A)})};return so(t,{onBeforeEnter(M){ru(w,[M]),jr(M,i),jr(M,r)},onBeforeAppear(M){ru(I,[M]),jr(M,a),jr(M,u)},onEnter:P(!1),onAppear:P(!0),onLeave(M,D){M._isLeaving=!0;const B=()=>R(M,D);jr(M,d),M._enterCancelled?(jr(M,f),Xk(M)):(Xk(M),jr(M,f)),tC(()=>{M._isLeaving&&(la(M,d),jr(M,p),eC(b)||nC(M,o,k,B))}),ru(b,[M,B])},onEnterCancelled(M){F(M,!1,void 0,!0),ru(y,[M])},onAppearCancelled(M){F(M,!0,void 0,!0),ru($,[M])},onLeaveCancelled(M){R(M),ru(S,[M])}})}function aR(e){if(e==null)return null;if(Kn(e))return[Yv(e.enter),Yv(e.leave)];{const t=Yv(e);return[t,t]}}function Yv(e){return xg(e)}function jr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[kd]||(e[kd]=new Set)).add(t)}function la(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[kd];n&&(n.delete(t),n.size||(e[kd]=void 0))}function tC(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uR=0;function nC(e,t,n,o){const s=e._endId=++uR,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:a}=Z5(e,t);if(!r)return o();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c(n[h]||"").split(", "),s=o(`${Jl}Delay`),i=o(`${Jl}Duration`),r=oC(s,i),l=o(`${mf}Delay`),a=o(`${mf}Duration`),u=oC(l,a);let c=null,d=0,f=0;t===Jl?r>0&&(c=Jl,d=r,f=i.length):t===mf?u>0&&(c=mf,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?Jl:mf:null,f=c?c===Jl?i.length:a.length:0);const p=c===Jl&&/\b(?:transform|all)(?:,|$)/.test(o(`${Jl}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function oC(e,t){for(;e.lengthsC(n)+sC(e[o])))}function sC(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Xk(e){return(e?e.ownerDocument:document).body.offsetHeight}function cR(e,t,n){const o=e[kd];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Rg=Symbol("_vod"),Y5=Symbol("_vsh"),yi={name:"show",beforeMount(e,{value:t},{transition:n}){e[Rg]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):gf(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),gf(e,!0),o.enter(e)):o.leave(e,()=>{gf(e,!1)}):gf(e,t))},beforeUnmount(e,{value:t}){gf(e,t)}};function gf(e,t){e.style.display=t?e[Rg]:"none",e[Y5]=!t}function dR(){yi.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const J5=Symbol("");function cBe(e){const t=es();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Pg(i,s))},o=()=>{const s=e(t.proxy);t.ce?Pg(t.ce,s):Qk(t.subTree,s),n(s)};h5(()=>{Mg(o)}),Sn(()=>{Ye(o,rr,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),En(()=>s.disconnect())})}function Qk(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Qk(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Pg(e.el,t);else if(e.type===Te)e.children.forEach(n=>Qk(n,t));else if(e.type===id){let{el:n,anchor:o}=e;for(;n&&(Pg(n,t),n!==o);)n=n.nextSibling}}function Pg(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=uF(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[J5]=o}}const fR=/(?:^|;)\s*display\s*:/;function pR(e,t,n){const o=e.style,s=co(n);let i=!1;if(n&&!s){if(t)if(co(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Pf(o,l,"")}else for(const r in t)n[r]==null&&Pf(o,r,"");for(const r in n){r==="display"&&(i=!0);const l=n[r];l!=null?mR(e,r,!co(t)&&t?t[r]:void 0,l)||Pf(o,r,l):Pf(o,r,"")}}else if(s){if(t!==n){const r=o[J5];r&&(n+=";"+r),o.cssText=n,i=fR.test(n)}}else t&&e.removeAttribute("style");Rg in e&&(e[Rg]=i?o.display:"",e[Y5]&&(o.display="none"))}const iC=/\s*!important$/;function Pf(e,t,n){if(Ut(n))n.forEach(o=>Pf(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=hR(e,t);iC.test(n)?e.setProperty(wi(o),n.replace(iC,""),"important"):e[o]=n}}const rC=["Webkit","Moz","ms"],Jv={};function hR(e,t){const n=Jv[t];if(n)return n;let o=us(t);if(o!=="filter"&&o in e)return Jv[t]=o;o=Y1(o);for(let s=0;sXv||(kR.then(()=>Xv=0),Xv=Date.now());function wR(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(Ut(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const r=s.slice(),l=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xR=(e,t,n,o,s,i)=>{const r=s==="svg";t==="class"?cR(e,o,r):t==="style"?pR(e,n,o):eh(t)?q1(t)||vR(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_R(e,t,o,r))?(uC(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&aC(e,t,o,r,i,t!=="value")):e._isVueCE&&(SR(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!co(o)))?uC(e,us(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),aC(e,t,o,r))};function _R(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&fC(t)&&hn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return fC(t)&&co(n)?!1:t in e}function SR(e,t){const n=e._def.props;if(!n)return!1;const o=us(t);return Array.isArray(n)?n.some(s=>us(s)===o):Object.keys(n).some(s=>us(s)===o)}const pC={};function CR(e,t,n){let o=Ze(e,t);K1(o)&&(o=so({},o,t));class s extends Z2{constructor(r){super(o,r,n)}}return s.def=o,s}const dBe=((e,t)=>CR(e,t,HR)),AR=typeof HTMLElement<"u"?HTMLElement:class{};class Z2 extends AR{constructor(t,n={},o=zg){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==zg?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(so({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Z2){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,xt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:r}=o;let l;if(i&&!Ut(i))for(const a in i){const u=i[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=xg(this._props[a])),(l||(l=Object.create(null)))[us(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(r),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)qn(this,o)||Object.defineProperty(this,o,{get:()=>x(n[o])})}_resolveProps(t){const{props:n}=t,o=Ut(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(us))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):pC;const s=us(t);n&&this._numberProps&&this._numberProps[s]&&(o=xg(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===pC?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(wi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(wi(t),n+""):n||this.removeAttribute(wi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),WR(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=K(this._def,so(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,r)=>{this.dispatchEvent(new CustomEvent(i,K1(r[0])?so({detail:r},r[0]):{detail:r}))};o.emit=(i,...r)=>{s(i,r),wi(i)!==i&&s(wi(i),r)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,r=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let l=null;for(let a=t.length-1;a>=0;a--){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=t[a],i.insertBefore(u,l||r),l=u,a===0&&(o||this._styleAnchors.set(this._def,u),n&&this._styleAnchors.set(n,u))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),TR=ER({name:"TransitionGroup",props:so({},K5,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=es(),o=a5();let s,i;return B2(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!FR(s[0].el,n.vnode.el,r)){s=[];return}s.forEach($R),s.forEach(NR);const l=s.filter(LR);Xk(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;jr(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Dg]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Dg]=null,la(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Rn(e),l=G5(r);let a=r.tag||Te;if(s=[],i)for(let u=0;u{l.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:r}=Z5(o);return i.removeChild(o),r}const Ia=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ut(t)?n=>td(t,n):t};function OR(e){e.target.composing=!0}function mC(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const lr=Symbol("_assign");function gC(e,t,n){return t&&(e=e.trim()),n&&(e=J1(e)),e}const vs={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[lr]=Ia(s);const i=o||s.props&&s.props.type==="number";Sl(e,t?"change":"input",r=>{r.target.composing||e[lr](gC(e.value,n,i))}),(n||i)&&Sl(e,"change",()=>{e.value=gC(e.value,n,i)}),t||(Sl(e,"compositionstart",OR),Sl(e,"compositionend",mC),Sl(e,"change",mC))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},r){if(e[lr]=Ia(r),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?J1(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},Bg={deep:!0,created(e,t,n){e[lr]=Ia(n),Sl(e,"change",()=>{const o=e._modelValue,s=bd(e),i=e.checked,r=e[lr];if(Ut(o)){const l=Q1(o,s),a=l!==-1;if(i&&!a)r(o.concat(s));else if(!i&&a){const u=[...o];u.splice(l,1),r(u)}}else if(Ju(o)){const l=new Set(o);i?l.add(s):l.delete(s),r(l)}else r(nE(e,i))})},mounted:vC,beforeUpdate(e,t,n){e[lr]=Ia(n),vC(e,t,n)}};function vC(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(Ut(t))s=Q1(t,o.props.value)>-1;else if(Ju(t))s=t.has(o.props.value);else{if(t===n)return;s=$l(t,nE(e,!0))}e.checked!==s&&(e.checked=s)}const tE={created(e,{value:t},n){e.checked=$l(t,n.props.value),e[lr]=Ia(n),Sl(e,"change",()=>{e[lr](bd(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[lr]=Ia(o),t!==n&&(e.checked=$l(t,o.props.value))}},eb={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=Ju(t);Sl(e,"change",()=>{const i=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?J1(bd(r)):bd(r));e[lr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,xt(()=>{e._assigning=!1})}),e[lr]=Ia(o)},mounted(e,{value:t}){yC(e,t)},beforeUpdate(e,t,n){e[lr]=Ia(n)},updated(e,{value:t}){e._assigning||yC(e,t)}};function yC(e,t){const n=e.multiple,o=Ut(t);if(!(n&&!o&&!Ju(t))){for(let s=0,i=e.options.length;sString(u)===String(l)):r.selected=Q1(t,l)>-1}else r.selected=t.has(l);else if($l(bd(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bd(e){return"_value"in e?e._value:e.value}function nE(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const RR={created(e,t,n){im(e,t,n,null,"created")},mounted(e,t,n){im(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){im(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){im(e,t,n,o,"updated")}};function oE(e,t){switch(e){case"SELECT":return eb;case"TEXTAREA":return vs;default:switch(t){case"checkbox":return Bg;case"radio":return tE;default:return vs}}}function im(e,t,n,o,s){const r=oE(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,o)}function PR(){vs.getSSRProps=({value:e})=>({value:e}),tE.getSSRProps=({value:e},t)=>{if(t.props&&$l(t.props.value,e))return{checked:!0}},Bg.getSSRProps=({value:e},t)=>{if(Ut(e)){if(t.props&&Q1(e,t.props.value)>-1)return{checked:!0}}else if(Ju(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},RR.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=oE(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const DR=["ctrl","shift","alt","meta"],BR={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>DR.some(n=>e[`${n}Key`]&&!t.includes(n))},Ct=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=wi(s.key);if(t.some(r=>r===i||zR[r]===i))return e(s)}))},sE=so({patchProp:xR},rR);let np,kC=!1;function iE(){return np||(np=zO(sE))}function rE(){return np=kC?np:WO(sE),kC=!0,np}const WR=((...e)=>{iE().render(...e)}),hBe=((...e)=>{rE().hydrate(...e)}),zg=((...e)=>{const t=iE().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=aE(o);if(!s)return;const i=t._component;!hn(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,lE(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),HR=((...e)=>{const t=rE().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=aE(o);if(s)return n(s,!0,lE(s))},t});function lE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function aE(e){return co(e)?document.querySelector(e):e}let bC=!1;const mBe=()=>{bC||(bC=!0,PR(),dR())};/*! - * shared v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const Wg=typeof window<"u",Da=(e,t=!1)=>t?Symbol.for(e):Symbol(e),jR=(e,t,n)=>UR({l:e,k:t,s:n}),UR=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Yo=e=>typeof e=="number"&&isFinite(e),uE=e=>J2(e)==="[object Date]",wd=e=>J2(e)==="[object RegExp]",Y2=e=>no(e)&&Object.keys(e).length===0,Xo=Object.assign,VR=Object.create,uo=(e=null)=>VR(e);let wC;const Cu=()=>wC||(wC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:uo()),qR=Object.prototype.hasOwnProperty;function sr(e,t){return qR.call(e,t)}const Fo=Array.isArray,ko=e=>typeof e=="function",zt=e=>typeof e=="string",Wn=e=>typeof e=="boolean",Hn=e=>e!==null&&typeof e=="object",KR=e=>Hn(e)&&ko(e.then)&&ko(e.catch),cE=Object.prototype.toString,J2=e=>cE.call(e),no=e=>J2(e)==="[object Object]",GR=e=>e==null?"":Fo(e)||no(e)&&e.toString===cE?JSON.stringify(e,null,2):String(e);function X2(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function ZR(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function xC(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function YR(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const JR=/^javascript:/i,XR=/^(?:href|src|action|formaction)$/i,QR=/&#(?:x([0-9a-f]+)|(\d+));?/gi,eP=/&(?:Tab|NewLine);/g,tP=/:?/gi,nP=/[\u0000-\u0020\u007f-\u009f]/g,oP=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,sP=/(^|[\s"'<>/])on(\w+\s*=)/gi,iP=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function rP(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function Q2(e){const t=e.replace(QR,rP).replace(eP,"").replace(tP,":").replace(nP,"");return JR.test(t)}function lP(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,r=t.lastIndex-1;let l=r+1,a=1,u=null;for(;l`${n}="${_C(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${_C(n,o)}'`),oP.test(e)&&(e=e.replace(sP,"$1on$2")),e=e.replace(iP,(t,n,o,s)=>Q2(s)?`${n}${o}about:blank`:t),e}const rm=e=>!Hn(e)||Fo(e);function Xm(e,t){if(rm(e)||rm(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(Hn(o[i])&&!Hn(s[i])&&(s[i]=Array.isArray(o[i])?[]:uo()),rm(s[i])||rm(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! - * message-compiler v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function uP(e,t,n){return{line:e,column:t,offset:n}}function tb(e,t,n){return{start:e,end:t}}const Jn={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},cP=17;function u0(e,t,n={}){const{domain:o,messages:s,args:i}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=o,l}function dP(e){throw e}const Dr=" ",fP="\r",Ps=` -`,pP="\u2028",hP="\u2029";function mP(e){const t=e;let n=0,o=1,s=1,i=0;const r=T=>t[T]===fP&&t[T+1]===Ps,l=T=>t[T]===Ps,a=T=>t[T]===hP,u=T=>t[T]===pP,c=T=>r(T)||l(T)||a(T)||u(T),d=()=>n,f=()=>o,p=()=>s,h=()=>i,m=T=>r(T)||a(T)||u(T)?Ps:t[T],k=()=>m(n),w=()=>m(n+i);function v(){return i=0,c(n)&&(o++,s=0),r(n)&&n++,n++,s++,t[n]}function y(){return r(n+i)&&i++,i++,t[n+i]}function b(){n=0,o=1,s=1,i=0}function S(T=0){i=T}function I(){const T=n+i;for(;T!==n;)v();i=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:k,currentPeek:w,next:v,peek:y,reset:b,resetPeek:S,skipToPeek:I}}const dl=void 0,gP=".",SC="'",vP="tokenizer";function yP(e,t={}){const n=t.location!==!1,o=mP(e),s=()=>o.index(),i=()=>uP(o.line(),o.column(),o.index()),r=i(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=t;function d(J,ae,be,..._e){const ce=u();if(ae.column+=be,ae.offset+=be,c){const Se=n?tb(ce.startLoc,ae):null,ie=u0(J,Se,{domain:vP,args:_e});c(ie)}}function f(J,ae,be){J.endLoc=i(),J.currentType=ae;const _e={type:ae};return n&&(_e.loc=tb(J.startLoc,J.endLoc)),be!=null&&(_e.value=be),_e}const p=J=>f(J,13);function h(J,ae){return J.currentChar()===ae?(J.next(),ae):(d(Jn.EXPECTED_TOKEN,i(),0,ae),"")}function m(J){let ae="";for(;J.currentPeek()===Dr||J.currentPeek()===Ps;)ae+=J.currentPeek(),J.peek();return ae}function k(J){const ae=m(J);return J.skipToPeek(),ae}function w(J){if(J===dl)return!1;const ae=J.charCodeAt(0);return ae>=97&&ae<=122||ae>=65&&ae<=90||ae===95}function v(J){if(J===dl)return!1;const ae=J.charCodeAt(0);return ae>=48&&ae<=57}function y(J,ae){const{currentType:be}=ae;if(be!==2)return!1;m(J);const _e=w(J.currentPeek());return J.resetPeek(),_e}function b(J,ae){const{currentType:be}=ae;if(be!==2)return!1;m(J);const _e=J.currentPeek()==="-"?J.peek():J.currentPeek(),ce=v(_e);return J.resetPeek(),ce}function S(J,ae){const{currentType:be}=ae;if(be!==2)return!1;m(J);const _e=J.currentPeek()===SC;return J.resetPeek(),_e}function I(J,ae){const{currentType:be}=ae;if(be!==7)return!1;m(J);const _e=J.currentPeek()===".";return J.resetPeek(),_e}function T(J,ae){const{currentType:be}=ae;if(be!==8)return!1;m(J);const _e=w(J.currentPeek());return J.resetPeek(),_e}function $(J,ae){const{currentType:be}=ae;if(!(be===7||be===11))return!1;m(J);const _e=J.currentPeek()===":";return J.resetPeek(),_e}function F(J,ae){const{currentType:be}=ae;if(be!==9)return!1;const _e=()=>{const Se=J.currentPeek();return Se==="{"?w(J.peek()):Se==="@"||Se==="|"||Se===":"||Se==="."||Se===Dr||!Se?!1:Se===Ps?(J.peek(),_e()):P(J,!1)},ce=_e();return J.resetPeek(),ce}function R(J){m(J);const ae=J.currentPeek()==="|";return J.resetPeek(),ae}function P(J,ae=!0){const be=(ce=!1,Se="")=>{const ie=J.currentPeek();return ie==="{"||ie==="@"||!ie?ce:ie==="|"?!(Se===Dr||Se===Ps):ie===Dr?(J.peek(),be(!0,Dr)):ie===Ps?(J.peek(),be(!0,Ps)):!0},_e=be();return ae&&J.resetPeek(),_e}function M(J,ae){const be=J.currentChar();return be===dl?dl:ae(be)?(J.next(),be):null}function D(J){const ae=J.charCodeAt(0);return ae>=97&&ae<=122||ae>=65&&ae<=90||ae>=48&&ae<=57||ae===95||ae===36}function B(J){return M(J,D)}function z(J){const ae=J.charCodeAt(0);return ae>=97&&ae<=122||ae>=65&&ae<=90||ae>=48&&ae<=57||ae===95||ae===36||ae===45}function A(J){return M(J,z)}function L(J){const ae=J.charCodeAt(0);return ae>=48&&ae<=57}function W(J){return M(J,L)}function j(J){const ae=J.charCodeAt(0);return ae>=48&&ae<=57||ae>=65&&ae<=70||ae>=97&&ae<=102}function re(J){return M(J,j)}function Q(J){let ae="",be="";for(;ae=W(J);)be+=ae;return be}function Y(J){let ae="";for(;;){const be=J.currentChar();if(be==="\\"){const _e=J.peek();_e==="{"||_e==="}"||_e==="@"||_e==="|"||_e==="\\"?(ae+=be+_e,J.next(),J.next()):(J.resetPeek(),ae+=be,J.next())}else{if(be==="{"||be==="}"||be==="@"||be==="|"||!be)break;if(be===Dr||be===Ps)if(P(J))ae+=be,J.next();else{if(R(J))break;ae+=be,J.next()}else ae+=be,J.next()}}return ae}function G(J){k(J);let ae="",be="";for(;ae=A(J);)be+=ae;const _e=J.currentChar();if(_e&&_e!=="}"&&_e!==dl&&_e!==Dr&&_e!==Ps&&_e!==" "){const ce=he(J);return d(Jn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be+ce),be+ce}return J.currentChar()===dl&&d(Jn.UNTERMINATED_CLOSING_BRACE,i(),0),be}function X(J){k(J);let ae="";return J.currentChar()==="-"?(J.next(),ae+=`-${Q(J)}`):ae+=Q(J),J.currentChar()===dl&&d(Jn.UNTERMINATED_CLOSING_BRACE,i(),0),ae}function te(J){return J!==SC&&J!==Ps}function q(J){k(J),h(J,"'");let ae="",be="";for(;ae=M(J,te);)ae==="\\"?be+=me(J):be+=ae;const _e=J.currentChar();return _e===Ps||_e===dl?(d(Jn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),_e===Ps&&(J.next(),h(J,"'")),be):(h(J,"'"),be)}function me(J){const ae=J.currentChar();switch(ae){case"\\":case"'":return J.next(),`\\${ae}`;case"u":return xe(J,ae,4);case"U":return xe(J,ae,6);default:return d(Jn.UNKNOWN_ESCAPE_SEQUENCE,i(),0,ae),""}}function xe(J,ae,be){h(J,ae);let _e="";for(let ce=0;ce{const _e=J.currentChar();return _e==="{"||_e==="@"||_e==="|"||_e==="("||_e===")"||!_e||_e===Dr?be:(be+=_e,J.next(),ae(be))};return ae("")}function H(J){k(J);const ae=h(J,"|");return k(J),ae}function Z(J,ae){let be=null;switch(J.currentChar()){case"{":return ae.braceNest>=1&&d(Jn.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),J.next(),be=f(ae,2,"{"),k(J),ae.braceNest++,be;case"}":return ae.braceNest>0&&ae.currentType===2&&d(Jn.EMPTY_PLACEHOLDER,i(),0),J.next(),be=f(ae,3,"}"),ae.braceNest--,ae.braceNest>0&&k(J),ae.inLinked&&ae.braceNest===0&&(ae.inLinked=!1),be;case"@":return ae.braceNest>0&&d(Jn.UNTERMINATED_CLOSING_BRACE,i(),0),be=ye(J,ae)||p(ae),ae.braceNest=0,be;default:{let ce=!0,Se=!0,ie=!0;if(R(J))return ae.braceNest>0&&d(Jn.UNTERMINATED_CLOSING_BRACE,i(),0),be=f(ae,1,H(J)),ae.braceNest=0,ae.inLinked=!1,be;if(ae.braceNest>0&&(ae.currentType===4||ae.currentType===5||ae.currentType===6))return d(Jn.UNTERMINATED_CLOSING_BRACE,i(),0),ae.braceNest=0,fe(J,ae);if(ce=y(J,ae))return be=f(ae,4,G(J)),k(J),be;if(Se=b(J,ae))return be=f(ae,5,X(J)),k(J),be;if(ie=S(J,ae))return be=f(ae,6,q(J)),k(J),be;if(!ce&&!Se&&!ie)return be=f(ae,12,he(J)),d(Jn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,be.value),k(J),be;break}}return be}function ye(J,ae){const{currentType:be}=ae;let _e=null;const ce=J.currentChar();switch((be===7||be===8||be===11||be===9)&&(ce===Ps||ce===Dr)&&d(Jn.INVALID_LINKED_FORMAT,i(),0),ce){case"@":return J.next(),_e=f(ae,7,"@"),ae.inLinked=!0,_e;case".":return k(J),J.next(),f(ae,8,".");case":":return k(J),J.next(),f(ae,9,":");default:return R(J)?(_e=f(ae,1,H(J)),ae.braceNest=0,ae.inLinked=!1,_e):I(J,ae)||$(J,ae)?(k(J),ye(J,ae)):T(J,ae)?(k(J),f(ae,11,ee(J))):F(J,ae)?(k(J),ce==="{"?Z(J,ae)||_e:f(ae,10,ne(J))):(be===7&&d(Jn.INVALID_LINKED_FORMAT,i(),0),ae.braceNest=0,ae.inLinked=!1,fe(J,ae))}}function fe(J,ae){let be={type:13};if(ae.braceNest>0)return Z(J,ae)||p(ae);if(ae.inLinked)return ye(J,ae)||p(ae);switch(J.currentChar()){case"{":return Z(J,ae)||p(ae);case"}":return d(Jn.UNBALANCED_CLOSING_BRACE,i(),0),J.next(),f(ae,3,"}");case"@":return ye(J,ae)||p(ae);default:{if(R(J))return be=f(ae,1,H(J)),ae.braceNest=0,ae.inLinked=!1,be;if(P(J))return f(ae,0,Y(J));break}}return be}function de(){const{currentType:J,offset:ae,startLoc:be,endLoc:_e}=a;return a.lastType=J,a.lastOffset=ae,a.lastStartLoc=be,a.lastEndLoc=_e,a.offset=s(),a.startLoc=i(),o.currentChar()===dl?f(a,13):fe(o,a)}return{nextToken:de,currentOffset:s,currentPosition:i,context:u}}const kP="parser",bP=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,wP=/\\([\\@{}|])/g;function xP(e,t){return t}function _P(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function SP(e={}){const t=e.location!==!1,{onError:n}=e;function o(w,v,y,b,...S){const I=w.currentPosition();if(I.offset+=b,I.column+=b,n){const T=t?tb(y,I):null,$=u0(v,T,{domain:kP,args:S});n($)}}function s(w,v,y){const b={type:w};return t&&(b.start=v,b.end=v,b.loc={start:y,end:y}),b}function i(w,v,y,b){t&&(w.end=v,w.loc&&(w.loc.end=y))}function r(w,v){const y=w.context(),b=s(3,y.offset,y.startLoc);return b.value=v.replace(wP,xP),i(b,w.currentOffset(),w.currentPosition()),b}function l(w,v){const y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(5,b,S);return I.index=parseInt(v,10),w.nextToken(),i(I,w.currentOffset(),w.currentPosition()),I}function a(w,v){const y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(4,b,S);return I.key=v,w.nextToken(),i(I,w.currentOffset(),w.currentPosition()),I}function u(w,v){const y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(9,b,S);return I.value=v.replace(bP,_P),w.nextToken(),i(I,w.currentOffset(),w.currentPosition()),I}function c(w){const v=w.nextToken(),y=w.context(),{lastOffset:b,lastStartLoc:S}=y,I=s(8,b,S);return v.type!==11?(o(w,Jn.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.lastStartLoc,0),I.value="",i(I,b,S),{nextConsumeToken:v,node:I}):(v.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Br(v)),I.value=v.value||"",i(I,w.currentOffset(),w.currentPosition()),{node:I})}function d(w,v){const y=w.context(),b=s(7,y.offset,y.startLoc);return b.value=v,i(b,w.currentOffset(),w.currentPosition()),b}function f(w){const v=w.context(),y=s(6,v.offset,v.startLoc);let b=w.nextToken();if(b.type===8){const S=c(w);y.modifier=S.node,b=S.nextConsumeToken||w.nextToken()}switch(b.type!==9&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),b=w.nextToken(),b.type===2&&(b=w.nextToken()),b.type){case 10:b.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=d(w,b.value||"");break;case 4:b.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=a(w,b.value||"");break;case 5:b.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=l(w,b.value||"");break;case 6:b.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(b)),y.key=u(w,b.value||"");break;default:{o(w,Jn.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const S=w.context(),I=s(7,S.offset,S.startLoc);return I.value="",i(I,S.offset,S.startLoc),y.key=I,i(y,S.offset,S.startLoc),{nextConsumeToken:b,node:y}}}return i(y,w.currentOffset(),w.currentPosition()),{node:y}}function p(w){const v=w.context(),y=v.currentType===1?w.currentOffset():v.offset,b=v.currentType===1?v.endLoc:v.startLoc,S=s(2,y,b);S.items=[];let I=null;do{const F=I||w.nextToken();switch(I=null,F.type){case 0:F.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(F)),S.items.push(r(w,F.value||""));break;case 5:F.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(F)),S.items.push(l(w,F.value||""));break;case 4:F.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(F)),S.items.push(a(w,F.value||""));break;case 6:F.value==null&&o(w,Jn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Br(F)),S.items.push(u(w,F.value||""));break;case 7:{const R=f(w);S.items.push(R.node),I=R.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const T=v.currentType===1?v.lastOffset:w.currentOffset(),$=v.currentType===1?v.lastEndLoc:w.currentPosition();return i(S,T,$),S}function h(w,v,y,b){const S=w.context();let I=b.items.length===0;const T=s(1,v,y);T.cases=[],T.cases.push(b);do{const $=p(w);I||(I=$.items.length===0),T.cases.push($)}while(S.currentType!==13);return I&&o(w,Jn.MUST_HAVE_MESSAGES_IN_PLURAL,y,0),i(T,w.currentOffset(),w.currentPosition()),T}function m(w){const v=w.context(),{offset:y,startLoc:b}=v,S=p(w);return v.currentType===13?S:h(w,y,b,S)}function k(w){const v=yP(w,Xo({},e)),y=v.context(),b=s(0,y.offset,y.startLoc);return t&&b.loc&&(b.loc.source=w),b.body=m(v),e.onCacheKey&&(b.cacheKey=e.onCacheKey(w)),y.currentType!==13&&o(v,Jn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,w[y.offset]||""),i(b,v.currentOffset(),v.currentPosition()),b}return{parse:k}}function Br(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function CP(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function CC(e,t){for(let n=0;nAC(n)),e}function AC(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nr;function a(m,k){r.code+=m}function u(m,k=!0){const w=k?o:"";a(s?w+" ".repeat(m):w)}function c(m=!0){const k=++r.indentLevel;m&&u(k)}function d(m=!0){const k=--r.indentLevel;m&&u(k)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>r.needIndent}}function TP(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),xd(e,t.key),t.modifier?(e.push(", "),xd(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function IP(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=zt(t.mode)?t.mode:"normal",o=zt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,i=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=EP(e,{filename:o,breakLineCode:s,needIndent:i});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(i),r.length>0&&(l.push(`const { ${X2(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),xd(l,e),l.deindent(i),l.push("}"),delete e.helpers;const{code:a,map:u}=l.context();return{ast:e,code:a,map:u?u.toJSON():void 0}};function FP(e,t={}){const n=Xo({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,l=SP(n).parse(e);return o?(i&&MP(l),s&&Rc(l),{ast:l,code:""}):(AP(l,n),LP(l,n))}/*! - * core-base v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function OP(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Cu().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Cu().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Xr(e){return Hn(e)&&tw(e)===0&&(sr(e,"b")||sr(e,"body"))}const dE=["b","body"];function RP(e){return Ba(e,dE)}const fE=["c","cases"];function PP(e){return Ba(e,fE,[])}const pE=["s","static"];function DP(e){return Ba(e,pE)}const hE=["i","items"];function BP(e){return Ba(e,hE,[])}const mE=["t","type"];function tw(e){return Ba(e,mE)}const gE=["v","value"];function lm(e,t){const n=Ba(e,gE);if(n!=null)return n;throw Ip(t)}const vE=["m","modifier"];function zP(e){return Ba(e,vE)}const yE=["k","key"];function WP(e){const t=Ba(e,yE);if(t)return t;throw Ip(6)}function Ba(e,t,n){for(let o=0;oHP(n,e)}function HP(e,t){const n=RP(t);if(n==null)throw Ip(0);if(tw(n)===1){const i=PP(n);return e.plural(i.reduce((r,l)=>[...r,MC(e,l)],[]))}else return MC(e,n)}function MC(e,t){const n=DP(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=BP(t).reduce((s,i)=>[...s,nb(e,i)],[]);return e.normalize(o)}}function nb(e,t){const n=tw(t);switch(n){case 3:return lm(t,n);case 9:return lm(t,n);case 4:{const o=t;if(sr(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(sr(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw Ip(n)}case 5:{const o=t;if(sr(o,"i")&&Yo(o.i))return e.interpolate(e.list(o.i));if(sr(o,"index")&&Yo(o.index))return e.interpolate(e.list(o.index));throw Ip(n)}case 6:{const o=t,s=zP(o),i=WP(o);return e.linked(nb(e,i),s?nb(e,s):void 0,e.type)}case 7:return lm(t,n);case 8:return lm(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const jP=e=>e;let am=uo();function UP(e,t={}){let n=!1;const o=t.onError||dP;return t.onError=s=>{n=!0,o(s)},{...FP(e,t),detectError:n}}function VP(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&zt(e)){Wn(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||jP)(e),s=am[o];if(s)return s;const{ast:i,detectError:r}=UP(e,{...t,location:!1,jit:!0}),l=Qv(i);return r?l:am[o]=l}else{const n=e.cacheKey;if(n){const o=am[n];return o||(am[n]=Qv(e))}else return Qv(e)}}let $p=null;function qP(e){$p=e}function KP(e,t,n){$p&&$p.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const GP=ZP("function:translate");function ZP(e){return t=>$p&&$p.emit(e,t)}const Ml={INVALID_ARGUMENT:cP,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},YP=24;function El(e){return u0(e,null,void 0)}function nw(e,t){return t.locale!=null?EC(t.locale):EC(e.locale)}let ey;function EC(e){if(zt(e))return e;if(ko(e)){if(e.resolvedOnce&&ey!=null)return ey;if(e.constructor.name==="Function"){const t=e();if(KR(t))throw El(Ml.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return ey=t}else throw El(Ml.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw El(Ml.NOT_SUPPORT_LOCALE_TYPE)}function JP(e,t,n){return[...new Set([n,...Fo(t)?t:Hn(t)?Object.keys(t):zt(t)?[t]:[n]])]}function ob(e,t,n){const o=zt(n)?n:Np,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let r=[n];for(;Fo(r);)r=TC(i,r,t);const l=Fo(t)||!no(t)?t:t.default?t.default:null;r=zt(l)?[l]:l,Fo(r)&&TC(i,r,!1),s.__localeChainCache.set(o,i)}return i}function TC(e,t,n){let o=!0;for(let s=0;s{r===void 0?r=l:r+=l},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,r===void 0||(r=sD(r),r===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,l="\\"+h,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(a=oD(i),d=za[o],u=d[a]||d.l||8,u===8||(o=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=i,c()===!1))))return;if(o===7)return t}}const IC=new Map;function rD(e,t){return Hn(e)?e[t]:null}function lD(e,t){if(!Hn(e))return null;let n=IC.get(t);if(n||(n=iD(t),n&&IC.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function uD(){return{upper:(e,t)=>t==="text"&&zt(e)?e.toUpperCase():t==="vnode"&&Hn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&zt(e)?e.toLowerCase():t==="vnode"&&Hn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&zt(e)?$C(e):t==="vnode"&&Hn(e)&&"__v_isVNode"in e?$C(e.children):e}}let bE;function cD(e){bE=e}let wE;function dD(e){wE=e}let xE;function fD(e){xE=e}let _E=null;const pD=e=>{_E=e},hD=()=>_E;let SE=null;const NC=e=>{SE=e},mD=()=>SE;let LC=0;function gD(e={}){const t=ko(e.onWarn)?e.onWarn:ZR,n=zt(e.version)?e.version:aD,o=zt(e.locale)||ko(e.locale)?e.locale:Np,s=ko(o)?Np:o,i=Fo(e.fallbackLocale)||no(e.fallbackLocale)||zt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=no(e.messages)?e.messages:ty(s),l=no(e.datetimeFormats)?e.datetimeFormats:ty(s),a=no(e.numberFormats)?e.numberFormats:ty(s),u=Xo(uo(),e.modifiers,uD()),c=e.pluralRules||uo(),d=ko(e.missing)?e.missing:null,f=Wn(e.missingWarn)||wd(e.missingWarn)?e.missingWarn:!0,p=Wn(e.fallbackWarn)||wd(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,k=ko(e.postTranslation)?e.postTranslation:null,w=no(e.processor)?e.processor:null,v=Wn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=ko(e.messageCompiler)?e.messageCompiler:bE,S=ko(e.messageResolver)?e.messageResolver:wE||rD,I=ko(e.localeFallbacker)?e.localeFallbacker:xE||JP,T=Hn(e.fallbackContext)?e.fallbackContext:void 0,$=e,F=Hn($.__datetimeFormatters)?$.__datetimeFormatters:new Map,R=Hn($.__numberFormatters)?$.__numberFormatters:new Map,P=Hn($.__meta)?$.__meta:{};LC++;const M={version:n,cid:LC,locale:o,fallbackLocale:i,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:k,processor:w,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:S,localeFallbacker:I,fallbackContext:T,onWarn:t,__meta:P};return M.datetimeFormats=l,M.numberFormats=a,M.__datetimeFormatters=F,M.__numberFormatters=R,__INTLIFY_PROD_DEVTOOLS__&&KP(M,n,P),M}const ty=e=>({[e]:uo()});function CE(e,t,n,o,s){const{missing:i,onWarn:r}=e;if(i!==null){const l=i(e,n,t,s);return zt(l)?l:t}else return t}function vf(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function vD(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function yD(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?l[a]=s[a]:t[a]=s[a]}),zt(i)?t.locale=i:no(i)&&(l=i),no(r)&&(l=r),l}function FC(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:i}=e;if(!zt(t[0])&&!uE(t[0])&&!Yo(t[0]))return Hg;const[r,l,a,u]=sb(...t),c=Wn(a.missingWarn)?a.missingWarn:e.missingWarn,d=Wn(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=nw(e,a);if(!zt(r)||r===""){const v=new Intl.DateTimeFormat(p.replace(/!/g,""),u);return f?v.formatToParts(l):v.format(l)}const h=AE(e,r,p,n,c,d,"datetime format");if(!zt(h))return o?c0:r;const m=n[h][r],k=ME(h,r,u);let w=i.get(k);return w||(w=new Intl.DateTimeFormat(h,Xo({},m,u)),i.set(k,w)),f?w.formatToParts(l):w.format(l)}const IE=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function sb(...e){const[t]=e,n=uo(),o=uo();let s;if(zt(t)){const r=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!r)throw El(Ml.INVALID_ISO_DATE_ARGUMENT);const l=r[3]?r[3].trim().startsWith("T")?`${r[1].trim()}${r[3].trim()}`:`${r[1].trim()}T${r[3].trim()}`:r[1].trim();s=new Date(l);try{s.toISOString()}catch{throw El(Ml.INVALID_ISO_DATE_ARGUMENT)}}else if(uE(t)){if(isNaN(t.getTime()))throw El(Ml.INVALID_DATE_ARGUMENT);s=t}else if(Yo(t))s=t;else throw El(Ml.INVALID_ARGUMENT);const i=TE(e,n,o,IE);return[n.key||"",s,n,i]}function OC(e,t,n){EE(e.__datetimeFormatters,t,n)}function RC(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:i}=e;if(!Yo(t[0]))return Hg;const[r,l,a,u]=ib(...t),c=Wn(a.missingWarn)?a.missingWarn:e.missingWarn,d=Wn(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=nw(e,a);if(!zt(r)||r===""){const v=new Intl.NumberFormat(p.replace(/!/g,""),u);return f?v.formatToParts(l):v.format(l)}const h=AE(e,r,p,n,c,d,"number format");if(!zt(h))return o?c0:r;const m=n[h][r],k=ME(h,r,u);let w=i.get(k);return w||(w=new Intl.NumberFormat(h,Xo({},m,u)),i.set(k,w)),f?w.formatToParts(l):w.format(l)}const $E=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ib(...e){const[t]=e,n=uo(),o=uo();if(!Yo(t))throw El(Ml.INVALID_ARGUMENT);const s=t,i=TE(e,n,o,$E);return[n.key||"",s,n,i]}function PC(e,t,n){EE(e.__numberFormatters,t,n)}const kD=e=>e,bD=e=>"",wD="text",xD=e=>e.length===0?"":X2(e),_D=GR;function ny(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function SD(e){const t=Yo(e.pluralIndex)?e.pluralIndex:-1;return Yo(e.named?.count)?e.named.count:Yo(e.named?.n)?e.named.n:t}function CD(e={}){const t=e.locale,n=SD(e),o=zt(t)&&ko(e.pluralRules?.[t])?e.pluralRules[t]:ny,s=o===ny?void 0:ny,i=w=>w[o(n,w.length,s)],r=e.list||[],l=w=>r[w],a=e.named||uo();Yo(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=w=>a[w];function c(w,v){const y=ko(e.messages)?e.messages(w,!!v):Hn(e.messages)?e.messages[w]:!1;return y||(e.parent?e.parent.message(w):bD)}const d=w=>e.modifiers?e.modifiers[w]:kD,f=ko(e.processor?.normalize)?e.processor.normalize:xD,p=ko(e.processor?.interpolate)?e.processor.interpolate:_D,h=zt(e.processor?.type)?e.processor.type:wD,k={list:l,named:u,plural:i,linked:(w,...v)=>{const[y,b]=v;let S="text",I="";v.length===1?Hn(y)?(I=y.modifier||I,S=y.type||S):zt(y)&&(I=y||I):v.length===2&&(zt(y)&&(I=y||I),zt(b)&&(S=b||S));const T=c(w,!0)(k),$=T===""||T===void 0?w:T,F=S==="vnode"&&Fo($)&&I?$[0]:$;return I?d(I)(F,S):F},message:c,type:h,interpolate:p,normalize:f,values:Xo(uo(),r,a)};return k}const DC=()=>"",tr=e=>ko(e);function BC(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:r,messages:l}=e,[a,u]=rb(...t),c=Wn(u.missingWarn)?u.missingWarn:e.missingWarn,d=Wn(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=Wn(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,h=zt(u.default)||Wn(u.default)?Wn(u.default)?i?a:()=>a:u.default:n?i?a:()=>a:null,m=n||h!=null&&(zt(h)||ko(h)),k=nw(e,u);f&&AD(u);let[w,v,y]=p?[a,k,l[k]||uo()]:NE(e,a,k,r,d,c),b=w,S=a;if(!p&&!(zt(b)||Xr(b)||tr(b))&&m&&(b=h,S=b),!p&&(!(zt(b)||Xr(b)||tr(b))||!zt(v)))return s?c0:a;let I=!1;const T=()=>{I=!0},$=tr(b)?b:LE(e,a,v,b,S,T);if(I)return b;const F=TD(e,v,y,u),R=CD(F),P=MD(e,$,R);let M=o?o(P,a):P;if(f&&zt(M)&&(M=aP(M)),__INTLIFY_PROD_DEVTOOLS__){const D={timestamp:Date.now(),key:zt(a)?a:tr(b)?b.key:"",locale:v||(tr(b)?b.locale:""),format:zt(b)?b:tr(b)?b.source:"",message:M};D.meta=Xo({},e.__meta,hD()||{}),GP(D)}return M}function AD(e){Fo(e.list)?e.list=e.list.map(t=>zt(t)?xC(t):t):Hn(e.named)&&Object.keys(e.named).forEach(t=>{zt(e.named[t])&&(e.named[t]=xC(e.named[t]))})}function NE(e,t,n,o,s,i){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:u}=e,c=u(e,o,n);let d=uo(),f,p=null;const h="translate";for(let m=0;mo);return u.locale=n,u.key=t,u}const a=r(o,ED(e,n,s,o,l,i));return a.locale=n,a.key=t,a.source=o,a}function MD(e,t,n){return t(n)}function rb(...e){const[t,n,o]=e,s=uo();if(!zt(t)&&!Yo(t)&&!tr(t)&&!Xr(t))throw El(Ml.INVALID_ARGUMENT);const i=Yo(t)?String(t):(tr(t),t);return Yo(n)?s.plural=n:zt(n)?s.default=n:no(n)&&!Y2(n)?s.named=n:Fo(n)&&(s.list=n),Yo(o)?s.plural=o:zt(o)?s.default=o:no(o)&&Xo(s,o),[i,s]}function ED(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw i&&i(r),r},onCacheKey:r=>jR(t,n,r)}}function TD(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(p,h)=>{let m=r(n,p);if(m==null&&(c||h)){const[k,,w]=NE(c||e,p,t,l,a,u);m=k??r(w,p)}if(zt(m)||Xr(m)){let k=!1;const v=LE(e,p,t,m,p,()=>{k=!0});return k?DC:v}else return tr(m)?m:DC}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Yo(o.plural)&&(f.pluralIndex=o.plural),f}OP();/*! - * vue-i18n v11.4.8 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const ID="11.4.8";function $D(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Cu().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Cu().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Cu().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Cu().__INTLIFY_PROD_DEVTOOLS__=!1)}const ti={UNEXPECTED_RETURN_TYPE:YP,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function xi(e,...t){return u0(e,null,void 0)}const lb=Da("__translateVNode"),ab=Da("__datetimeParts"),ub=Da("__numberParts"),FE=Da("__setPluralRules"),OE=Da("__injectWithOption"),Uc=Da("__dispose");function Lp(e){if(!Hn(e)||Xr(e))return e;for(const t in e)if(sr(e,t))if(!t.includes("."))Hn(e[t])&&Lp(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,i=!1;for(let r=0;r{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(r[a]=r[a]||uo(),Xm(u,r[a])):Xm(u,r)}else zt(l)&&Xm(JSON.parse(l),r)}),s==null&&i)for(const l in r)sr(r,l)&&Lp(r[l]);return r}function RE(e){return e.type}function PE(e,t,n){let o=Hn(t.messages)?t.messages:uo();"__i18nGlobal"in n&&(o=ow(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(Hn(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(Hn(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function zC(e){return K(xa,null,e,0)}function Fp(){return es()}const WC="__INTLIFY_META__",HC=()=>[],ND=()=>!1;let jC=0;function UC(e){return((t,n,o,s)=>e(n,o,Fp()||void 0,s))}const LD=()=>{const e=Fp();let t=null;return e&&(t=RE(e)[WC])?{[WC]:t}:null};function jg(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=Wg?V:Co;let r=Wn(e.inheritLocale)?e.inheritLocale:!0;const l=i(t&&r?t.locale.value:zt(e.locale)?e.locale:Np),a=i(t&&r?t.fallbackLocale.value:zt(e.fallbackLocale)||Fo(e.fallbackLocale)||no(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=i(ow(l.value,e)),c=i(no(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=i(no(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:Wn(e.missingWarn)||wd(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:Wn(e.fallbackWarn)||wd(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:Wn(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,k=ko(e.missing)?e.missing:null,w=ko(e.missing)?UC(e.missing):null,v=ko(e.postTranslation)?e.postTranslation:null,y=t?t.warnHtmlMessage:Wn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter;const S=t?t.modifiers:no(e.modifiers)?e.modifiers:{};let I=e.pluralRules||t&&t.pluralRules,T;T=(()=>{o&&NC(null);const ie={version:ID,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:S,pluralRules:I,missing:w===null?void 0:w,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:y,escapeParameter:b,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ie.datetimeFormats=c.value,ie.numberFormats=d.value,ie.__datetimeFormatters=no(T)?T.__datetimeFormatters:void 0,ie.__numberFormatters=no(T)?T.__numberFormatters:void 0;const we=gD(ie);return o&&NC(we),we})(),vf(T,l.value,a.value);function F(){return[l.value,a.value,u.value,c.value,d.value]}const R=O({get:()=>l.value,set:ie=>{T.locale=ie,l.value=ie}}),P=O({get:()=>a.value,set:ie=>{T.fallbackLocale=ie,a.value=ie,vf(T,l.value,ie)}}),M=O(()=>u.value),D=O(()=>c.value),B=O(()=>d.value);function z(){return ko(v)?v:null}function A(ie){v=ie,T.postTranslation=ie}function L(){return k}function W(ie){ie!==null&&(w=UC(ie)),k=ie,T.missing=w}const j=(ie,we,Re,at,ft,Mt)=>{F();let Tt;try{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=t?mD():void 0),Tt=ie(T)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=void 0)}if(Re!=="translate exists"&&Yo(Tt)&&Tt===c0||Re==="translate exists"&&!Tt){const[tn,Kt]=we();return t&&h?at(t):ft(tn)}else{if(Mt(Tt))return Tt;throw xi(ti.UNEXPECTED_RETURN_TYPE)}};function re(...ie){return j(we=>Reflect.apply(BC,null,[we,...ie]),()=>rb(...ie),"translate",we=>Reflect.apply(we.t,we,[...ie]),we=>we,we=>zt(we))}function Q(...ie){const[we,Re,at]=ie;if(at&&!Hn(at))throw xi(ti.INVALID_ARGUMENT);return re(we,Re,Xo({resolvedMessage:!0},at||{}))}function Y(...ie){return j(we=>Reflect.apply(FC,null,[we,...ie]),()=>sb(...ie),"datetime format",we=>Reflect.apply(we.d,we,[...ie]),()=>Hg,we=>zt(we)||Fo(we))}function G(...ie){return j(we=>Reflect.apply(RC,null,[we,...ie]),()=>ib(...ie),"number format",we=>Reflect.apply(we.n,we,[...ie]),()=>Hg,we=>zt(we)||Fo(we))}function X(ie){return ie.map(we=>zt(we)||Yo(we)||Wn(we)?zC(String(we)):we)}const q={normalize:X,interpolate:ie=>ie,type:"vnode"};function me(...ie){return j(we=>{let Re;const at=we;try{at.processor=q,Re=Reflect.apply(BC,null,[at,...ie])}finally{at.processor=null}return Re},()=>rb(...ie),"translate",we=>we[lb](...ie),we=>[zC(we)],we=>Fo(we))}function xe(...ie){return j(we=>Reflect.apply(RC,null,[we,...ie]),()=>ib(...ie),"number format",we=>we[ub](...ie),HC,we=>zt(we)||Fo(we))}function We(...ie){return j(we=>Reflect.apply(FC,null,[we,...ie]),()=>sb(...ie),"datetime format",we=>we[ab](...ie),HC,we=>zt(we)||Fo(we))}function he(ie){I=ie,T.pluralRules=I}function ee(ie,we){return j(()=>{if(!ie)return!1;const Re=zt(we)?we:l.value,at=zt(we)?[Re]:ob(T,a.value,Re);for(let ft=0;ft[ie],"translate exists",Re=>Reflect.apply(Re.te,Re,[ie,we]),ND,Re=>Wn(Re))}function ne(ie){let we=null;const Re=ob(T,a.value,l.value);for(let at=0;at{r&&(l.value=ie,T.locale=ie,vf(T,l.value,a.value))}),Ye(t.fallbackLocale,ie=>{r&&(a.value=ie,T.fallbackLocale=ie,vf(T,l.value,a.value))}));const Se={id:jC,locale:R,fallbackLocale:P,get inheritLocale(){return r},set inheritLocale(ie){r=ie,ie&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,vf(T,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:M,get modifiers(){return S},get pluralRules(){return I||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(ie){f=ie,T.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(ie){p=ie,T.fallbackWarn=p},get fallbackRoot(){return h},set fallbackRoot(ie){h=ie},get fallbackFormat(){return m},set fallbackFormat(ie){m=ie,T.fallbackFormat=m},get warnHtmlMessage(){return y},set warnHtmlMessage(ie){y=ie,T.warnHtmlMessage=ie},get escapeParameter(){return b},set escapeParameter(ie){b=ie,T.escapeParameter=ie},t:re,getLocaleMessage:Z,setLocaleMessage:ye,mergeLocaleMessage:fe,getPostTranslationHandler:z,setPostTranslationHandler:A,getMissingHandler:L,setMissingHandler:W,[FE]:he};return Se.datetimeFormats=D,Se.numberFormats=B,Se.rt=Q,Se.te=ee,Se.tm=H,Se.d=Y,Se.n=G,Se.getDateTimeFormat=de,Se.setDateTimeFormat=J,Se.mergeDateTimeFormat=ae,Se.getNumberFormat=be,Se.setNumberFormat=_e,Se.mergeNumberFormat=ce,Se[OE]=n,Se[lb]=me,Se[ab]=We,Se[ub]=xe,Se}function FD(e){const t=zt(e.locale)?e.locale:Np,n=zt(e.fallbackLocale)||Fo(e.fallbackLocale)||no(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=ko(e.missing)?e.missing:void 0,s=Wn(e.silentTranslationWarn)||wd(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=Wn(e.silentFallbackWarn)||wd(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Wn(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=no(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=ko(e.postTranslation)?e.postTranslation:void 0,d=zt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=Wn(e.sync)?e.sync:!0;let h=e.messages;if(no(e.sharedMessages)){const S=e.sharedMessages;h=Object.keys(S).reduce((T,$)=>{const F=T[$]||(T[$]={});return Xo(F,S[$]),T},h||{})}const{__i18n:m,__root:k,__injectWithOption:w}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:h,flatJson:b,datetimeFormats:v,numberFormats:y,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:k,__injectWithOption:w}}function cb(e={}){const t=jg(FD(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Wn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Wn(s)?!s:s},get silentFallbackWarn(){return Wn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Wn(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,i){return t.te(s,i)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,i){t.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){t.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,i){t.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){t.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,i){t.setNumberFormat(s,i)},mergeNumberFormat(s,i){t.mergeNumberFormat(s,i)}};return o.__extender=n,o}function OD(e,t,n){return{beforeCreate(){const o=Fp();if(!o)throw xi(ti.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const i=s.i18n;if(s.__i18n&&(i.__i18n=s.__i18n),i.__root=t,this===this.$root)this.$i18n=VC(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=cb(i);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=VC(e,s);else{this.$i18n=cb({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&PE(t,s,s),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,r)=>this.$i18n.te(i,r),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=Fp();if(!o)throw xi(ti.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function VC(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[FE](t.pluralizationRules||e.pluralizationRules);const n=ow(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const sw={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function RD({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Te?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},uo())}function DE(){return Te}const PD=Ze({name:"i18n-t",props:Xo({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Yo(e)||!isNaN(e)}},sw),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||$t({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),u=uo();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=zt(e.plural)?+e.plural:e.plural);const c=RD(t,a);return s[lb](e.keypath,c,u)},r=Xo(uo(),o),l=zt(e.tag)||Hn(e.tag)?e.tag:DE();return Hn(l)?cn(l,r,{default:i}):cn(l,r,i())}}}),qC=PD;function DD(e){return Fo(e)&&!zt(e[0])}function BE(e,t,n,o){const{slots:s,attrs:i}=t;return()=>{const r=()=>{const u={part:!0};let c=uo();e.locale&&(u.locale=e.locale),zt(e.format)?u.key=e.format:Hn(e.format)&&(zt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((p,h)=>n.includes(h)?Xo(uo(),p,{[h]:e.format[h]}):p,uo()));const d=o(e.value,u,c);let f=[u.key];return Fo(d)?f=d.map((p,h)=>{const m=s[p.type],k=m?m({[p.type]:p.value,index:h,parts:d}):[p.value];return DD(k)&&(k[0].key=`${p.type}-${h}`),k}):zt(d)&&(f=[d]),f},l=Xo(uo(),i),a=zt(e.tag)||Hn(e.tag)?e.tag:DE();return Hn(a)?cn(a,l,{default:r}):cn(a,l,r())}}const BD=Ze({name:"i18n-n",props:Xo({value:{type:Number,required:!0},format:{type:[String,Object]}},sw),setup(e,t){const n=e.i18n||$t({useScope:e.scope,__useComponent:!0});return BE(e,t,$E,(...o)=>n[ub](...o))}}),KC=BD;function zD(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function WD(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw xi(ti.UNEXPECTED_ERROR);const u=zD(e,l.$),c=GC(a);return[Reflect.apply(u.t,u,[...ZC(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);Wg&&(r.__i18nWatcher=Ye(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{Wg&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const a=r.__composer,u=GC(l);r.textContent=Reflect.apply(a.t,a,[...ZC(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function GC(e){if(zt(e))return{path:e};if(no(e)){if(!("path"in e))throw xi(ti.REQUIRED_VALUE,"path");return e}else throw xi(ti.INVALID_VALUE)}function ZC(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,r={},l=o||{};return zt(n)&&(r.locale=n),Yo(s)&&(r.plural=s),Yo(i)&&(r.plural=i),[t,l,r]}function HD(e,t,...n){const o=no(n[0])?n[0]:{};(Wn(o.globalInstall)?o.globalInstall:!0)&&([qC.name,"I18nT"].forEach(i=>e.component(i,qC)),[KC.name,"I18nN"].forEach(i=>e.component(i,KC)),[XC.name,"I18nD"].forEach(i=>e.component(i,XC))),e.directive("t",WD(t))}const jD=Da("global-vue-i18n");function UD(e={}){const t=__VUE_I18N_LEGACY_API__&&Wn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Wn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=VD(e,t),r=Da("");function l(d){return o.get(d)||null}function a(d,f){o.set(d,f)}function u(d){o.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,c),no(f[0])){const m=f[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=XD(d,c.global)),__VUE_I18N_FULL_INSTALL__&&HD(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(OD(i,i.__composer,c));const h=d.unmount;d.unmount=()=>{p&&p(),c.dispose(),h()}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function $t(e={}){const t=Fp();if(t==null)throw xi(ti.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw xi(ti.NOT_INSTALLED);const n=qD(t),o=GD(n),s=RE(t),i=KD(e,s);if(i==="global")return PE(o,e,s),o;if(i==="parent"){let a=YC(n,t,e.__useComponent);return a==null&&(a=o),a}if(i==="isolated"){if(n.mode!=="composition")throw xi(ti.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=Xo({},e),c=YC(n,t);u.__root=c||o;const d=jg(u);return a.__composerExtend&&(d[Uc]=a.__composerExtend(d)),N2()&&Ld(()=>{const p=d[Uc];p&&(p(),delete d[Uc])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=Xo({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),l=jg(a),r.__composerExtend&&(l[Uc]=r.__composerExtend(l)),YD(r,t,l),r.__setInstance(t,l)}return l}function VD(e,t){const n=cF(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>cb(e)):n.run(()=>jg(e));if(o==null)throw xi(ti.UNEXPECTED_ERROR);return[n,o]}function qD(e){const t=wn(e.isCE?jD:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw xi(e.isCE?ti.NOT_INSTALLED_WITH_PROVIDE:ti.UNEXPECTED_ERROR);return t}function KD(e,t){return Y2(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function GD(e){return e.mode==="composition"?e.global:e.global.__composer}function YC(e,t,n=!1){let o=null;const s=t.root;let i=ZD(t,n);for(;i!=null;){const r=e;if(e.mode==="composition")o=r.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(i);l!=null&&(o=l.__composer,n&&o&&!o[OE]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function ZD(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function YD(e,t,n){Sn(()=>{},t),En(()=>{const o=n;e.__deleteInstance(t);const s=o[Uc];s&&(s(),delete o[Uc])},t)}const JD=["locale","fallbackLocale","availableLocales"],JC=["t","rt","d","n","tm","te"];function XD(e,t){const n=Object.create(null);return JD.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw xi(ti.UNEXPECTED_ERROR);const r=Bo(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,JC.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw xi(ti.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,JC.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const QD=Ze({name:"i18n-d",props:Xo({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},sw),setup(e,t){const n=e.i18n||$t({useScope:e.scope,__useComponent:!0});return BE(e,t,IE,(...o)=>n[ab](...o))}}),XC=QD;$D();cD(VP);dD(lD);fD(ob);if(__INTLIFY_PROD_DEVTOOLS__){const e=Cu();e.__INTLIFY__=!0,qP(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const eB="modulepreload",tB=function(e){return"/"+e},QC={},Ts=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let r=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");s=r(n.map(u=>{if(u=tB(u),u in QC)return;QC[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":eB,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return s.then(r=>{for(const l of r||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};async function Jo(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return oB(e)}function nB(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||Jo(e)}function oB(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const rn={permission:"pythinker-web.permission",activeWorkspace:"pythinker-active-workspace",planMode:"pythinker-web.plan-mode",planArmed:"pythinker-web.plan-armed",dynamicWorkflowMode:"pythinker-web.dynamic-workflow-mode",goalMode:"pythinker-web.goal-mode",uiFontSize:"pythinker-web.ui-font-size",starredModels:"pythinker-web.starred-models",unread:"pythinker-web.unread",onboarded:"pythinker-web.onboarded",accent:"pythinker-web.accent",colorScheme:"pythinker-web.color-scheme",hiddenWorkspaces:"pythinker-web.hidden-workspaces",collapsedWorkspaces:"pythinker-web.collapsed-workspaces",workspaceOrder:"pythinker-web.workspace-order",workspaceNameOverrides:"pythinker-web.workspace-name-overrides",workspaceSort:"pythinker-web.workspace-sort",pinnedSessions:"pythinker-web.pinned-sessions",pinnedCollapsed:"pythinker-web.pinned-collapsed",recentEmojis:"pythinker-web.recent-emojis",conversationToc:"pythinker-web.beta-toc",notifyOnComplete:"pythinker-web.notify-on-complete",notifyOnQuestion:"pythinker-web.notify-on-question",notifyOnApproval:"pythinker-web.notify-on-approval",soundOnComplete:"pythinker-web.sound-on-complete",inputHistory:"pythinker-web.input-history",clientId:"pythinker-web.client-id",debug:"pythinker-web.debug",openInLastTarget:"pythinker-web.open-in.last-target",sidebarCollapsed:"pythinker-web.sidebar-collapsed",sidebarWidth:"pythinker-web.sidebar-width",codeFont:"pythinker-web.code-font",contentAlign:"pythinker-web.content-align",theme:"pythinker-web.theme",thinking:"pythinker-web.thinking"};function e4(e){return`pythinker-web.draft.${e&&e.length>0?e:"__new__"}`}function zo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function ts(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Hu(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Rd(e){const t=zo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Wa(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function iw(){const e=zo(rn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[o,s]of Object.entries(t))s===!0&&(n[o]=!0);return n}catch{return{}}}function rw(e){const n={...iw()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];ts(rn.unread,JSON.stringify(n))}function sB(){const e=Rd(rn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function oy(e){Wa(rn.collapsedWorkspaces,Array.from(e))}function iB(){const e=Rd(rn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function zE(e){Wa(rn.workspaceOrder,Array.from(e))}function um(){const e=Rd(rn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}function t4(e){Wa(rn.workspaceNameOverrides,e)}function rB(){return zo(rn.workspaceSort)}function WE(e){ts(rn.workspaceSort,e)}function lB(e,t){if(e.length===0)return null;const n=new Set(e),o=t.filter(i=>n.has(i)),s=e.filter(i=>!t.includes(i));return s.length===0&&o.length===t.length?null:[...s,...o]}function aB(e,t){const n=new Map(t.map((o,s)=>[o,s]));return e.toSorted((o,s)=>(n.get(o.id)??-1)-(n.get(s.id)??-1))}function uB(e,t,n,o="before"){const s=e.indexOf(t),i=e.indexOf(n);if(s===-1||i===-1||s===i)return e;const r=[...e];r.splice(s,1);const l=s(t.get(o.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function dB(e,t=2e4){const n=V(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return En(()=>clearInterval(s)),n}const fB=["src","alt","role"],pB=Ze({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=dB("/brand/mascot-waving.png"),o=e,s=t;function i(){o.interactive&&s("click")}return(r,l)=>(g(),C("img",{src:e.animated?x(n):"/brand/icon.svg",class:ze(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:i},null,10,fB))}}),ht=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},lw=ht(pB,[["__scopeId","data-v-4349c96d"]]),hB={"&":"&","<":"<",">":">",'"':""","'":"'"};function n4(e){return e.replace(/[&<>"']/g,t=>hB[t]??t)}function mB(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gB(e,t,n=40){const o=e.replace(/\s+/g," ").trim();if(o.length===0)return"";const s=t.trim();if(s.length===0)return o4(o,n*2);const i=o.toLowerCase().indexOf(s.toLowerCase());if(i<0)return o4(o,n*2);const r=Math.max(0,i-n),l=Math.min(o.length,i+s.length+n),a=r>0,u=l`${i}`)}const ku=V(0),vB=["type","disabled","aria-label"],yB=Ze({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},type:{default:"button"}},setup(e,{expose:t}){const n=V();return t({el:n}),(o,s)=>(g(),C("button",{ref_key:"el",ref:n,class:ze(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[An(o.$slots,"default",{},void 0,!0)],10,vB))}}),Jt=ht(yB,[["__scopeId","data-v-4b23513f"]]),kB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bB(e,t){return g(),C("svg",kB,[...t[0]||(t[0]=[_("path",{d:"M11.1 12.9001V15.0909C11.1 15.593 11.5029 16 12 16C12.4971 16 12.9 15.593 12.9 15.0909V12.9001H15.0909C15.593 12.9001 16 12.4972 16 12.0001C16 11.5031 15.593 11.1001 15.0909 11.1001H12.9V8.90909C12.9 8.40701 12.4971 8 12 8C11.5029 8 11.1 8.40701 11.1 8.90909V11.1001H8.90909C8.40701 11.1001 8 11.5031 8 12.0001C8 12.4972 8.40701 12.9001 8.90909 12.9001H11.1Z",fill:"currentColor"},null,-1),_("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9996 2.1001C6.53199 2.1001 2.09961 6.53248 2.09961 12.0001C2.09961 13.9226 2.64847 15.7192 3.59804 17.2391L2.517 19.8207C2.10313 20.8091 2.82908 21.9001 3.90059 21.9001H11.9996C17.4672 21.9001 21.8996 17.4677 21.8996 12.0001C21.8996 6.53248 17.4672 2.1001 11.9996 2.1001ZM3.89961 12.0001C3.89961 7.52659 7.5261 3.9001 11.9996 3.9001C16.4731 3.9001 20.0996 7.52659 20.0996 12.0001C20.0996 16.4736 16.4724 20.1001 11.9989 20.1001H4.35146L5.63494 17.0351L5.35165 16.6291C4.43632 15.3172 3.89961 13.7227 3.89961 12.0001Z",fill:"currentColor"},null,-1)])])}const wB=Et({name:"pythinker-add-conversation",render:bB}),xB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _B(e,t){return g(),C("svg",xB,[...t[0]||(t[0]=[_("path",{d:"M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z",fill:"currentColor"},null,-1)])])}const SB=Et({name:"pythinker-folder",render:_B}),CB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},AB=["clip-path"],MB=["id"];function EB(e,t){return g(),C("svg",CB,[_("g",{"clip-path":"url(#"+e.idMap.clip0_4626_2033+")"},[...t[0]||(t[0]=[_("path",{d:"M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z",fill:"currentColor"},null,-1)])],8,AB),_("defs",null,[_("clipPath",{id:e.idMap.clip0_4626_2033},[...t[1]||(t[1]=[_("rect",{width:"24",height:"24",fill:"white"},null,-1)])],8,MB)])])}const TB=Et({name:"pythinker-folder-open",render:EB,setup(){return{idMap:{clip0_4626_2033:"uicons-"+Math.random().toString(36).substr(2,10)}}}}),IB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $B(e,t){return g(),C("svg",IB,[...t[0]||(t[0]=[_("path",{d:"M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z",fill:"currentColor"},null,-1),_("path",{d:"M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z",fill:"currentColor"},null,-1),_("path",{d:"M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z",fill:"currentColor"},null,-1)])])}const NB=Et({name:"pythinker-more",render:$B}),LB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FB(e,t){return g(),C("svg",LB,[...t[0]||(t[0]=[_("path",{d:"M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z",fill:"currentColor"},null,-1)])])}const OB=Et({name:"pythinker-search",render:FB}),RB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function PB(e,t){return g(),C("svg",RB,[...t[0]||(t[0]=[_("path",{d:"M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z",fill:"currentColor"},null,-1),_("path",{d:"M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z",fill:"currentColor"},null,-1)])])}const DB=Et({name:"pythinker-setting",render:PB}),BB={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zB(e,t){return g(),C("svg",BB,[...t[0]||(t[0]=[_("path",{d:"M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z",fill:"currentColor"},null,-1)])])}const WB=Et({name:"pythinker-thinking",render:zB}),HB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function jB(e,t){return g(),C("svg",HB,[...t[0]||(t[0]=[_("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[_("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"}),_("path",{d:"m9 12l2 2l4-4"})],-1)])])}const UB=Et({name:"tabler-circle-check",render:jB}),VB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qB(e,t){return g(),C("svg",VB,[...t[0]||(t[0]=[_("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.56 3.69a9 9 0 0 0-2.92 1.95M3.69 8.56A9 9 0 0 0 3 12m.69 3.44a9 9 0 0 0 1.95 2.92m2.92 1.95A9 9 0 0 0 12 21m3.44-.69a9 9 0 0 0 2.92-1.95m1.95-2.92A9 9 0 0 0 21 12m-.69-3.44a9 9 0 0 0-1.95-2.92m-2.92-1.95A9 9 0 0 0 12 3"},null,-1)])])}const KB=Et({name:"tabler-circle-dashed",render:qB}),GB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ZB(e,t){return g(),C("svg",GB,[...t[0]||(t[0]=[_("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[_("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm5-2v16"}),_("path",{d:"m15 10l-2 2l2 2"})],-1)])])}const YB=Et({name:"tabler-layout-sidebar-left-collapse",render:ZB}),JB={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function XB(e,t){return g(),C("svg",JB,[...t[0]||(t[0]=[_("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[_("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm5-2v16"}),_("path",{d:"m14 10l2 2l-2 2"})],-1)])])}const QB=Et({name:"tabler-layout-sidebar-left-expand",render:XB}),ez={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tz(e,t){return g(),C("svg",ez,[...t[0]||(t[0]=[_("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"},null,-1)])])}const nz=Et({name:"tabler-paperclip",render:tz}),oz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sz(e,t){return g(),C("svg",oz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])}const iz=Et({name:"ri-add-line",render:sz}),rz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lz(e,t){return g(),C("svg",rz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m19.713 9.128l-.246.566a.506.506 0 0 1-.934 0l-.246-.566a4.36 4.36 0 0 0-2.22-2.25l-.759-.339a.53.53 0 0 1 0-.963l.717-.319a4.37 4.37 0 0 0 2.251-2.326l.253-.611a.506.506 0 0 1 .942 0l.253.61a4.37 4.37 0 0 0 2.25 2.327l.718.32a.53.53 0 0 1 0 .962l-.76.338a4.36 4.36 0 0 0-2.219 2.251M6 5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5h2v5a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V7a4 4 0 0 1 4-4h7v2z"},null,-1)])])}const az=Et({name:"ri-ai-generate",render:lz}),uz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cz(e,t){return g(),C("svg",uz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z"},null,-1)])])}const dz=Et({name:"ri-alert-line",render:cz}),fz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pz(e,t){return g(),C("svg",fz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 10H2V4.003C2 3.449 2.455 3 2.992 3h18.016A.99.99 0 0 1 22 4.003V10h-1v10.002a.996.996 0 0 1-.993.998H3.993A.996.996 0 0 1 3 20.002zm16 0H5v9h14zM4 5v3h16V5zm5 7h6v2H9z"},null,-1)])])}const hz=Et({name:"ri-archive-line",render:pz}),mz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gz(e,t){return g(),C("svg",mz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13 16.172l5.364-5.364l1.414 1.414L12 20l-7.778-7.778l1.414-1.414L11 16.172V4h2z"},null,-1)])])}const vz=Et({name:"ri-arrow-down-line",render:gz}),yz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kz(e,t){return g(),C("svg",yz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z"},null,-1)])])}const bz=Et({name:"ri-arrow-down-s-line",render:kz}),wz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xz(e,t){return g(),C("svg",wz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m5.828 7l2.536 2.535L6.95 10.95L2 6l4.95-4.95l1.414 1.415L5.828 5H13a8 8 0 1 1 0 16H4v-2h9a6 6 0 0 0 0-12z"},null,-1)])])}const _z=Et({name:"ri-arrow-go-back-line",render:xz}),Sz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Cz(e,t){return g(),C("svg",Sz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m16.172 11l-5.364-5.364l1.414-1.414L20 12l-7.778 7.778l-1.414-1.414L16.172 13H4v-2z"},null,-1)])])}const Az=Et({name:"ri-arrow-right-line",render:Cz}),Mz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ez(e,t){return g(),C("svg",Mz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z"},null,-1)])])}const Tz=Et({name:"ri-arrow-right-s-line",render:Ez}),Iz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function $z(e,t){return g(),C("svg",Iz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M13 7.828V20h-2V7.828l-5.364 5.364l-1.414-1.414L12 4l7.778 7.778l-1.414 1.414z"},null,-1)])])}const s4=Et({name:"ri-arrow-up-line",render:$z}),Nz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Lz(e,t){return g(),C("svg",Nz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 10.828l-4.95 4.95l-1.414-1.414L12 8l6.364 6.364l-1.414 1.414z"},null,-1)])])}const Fz=Et({name:"ri-arrow-up-s-line",render:Lz}),Oz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Rz(e,t){return g(),C("svg",Oz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"},null,-1)])])}const Pz=Et({name:"ri-braces-line",render:Rz}),Dz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Bz(e,t){return g(),C("svg",Dz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"},null,-1)])])}const zz=Et({name:"ri-calendar-close-line",render:Bz}),Wz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hz(e,t){return g(),C("svg",Wz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"},null,-1)])])}const jz=Et({name:"ri-calendar-schedule-line",render:Hz}),Uz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Vz(e,t){return g(),C("svg",Uz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"},null,-1)])])}const qz=Et({name:"ri-calendar-todo-line",render:Vz}),Kz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Gz(e,t){return g(),C("svg",Kz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z"},null,-1)])])}const Zz=Et({name:"ri-check-line",render:Gz}),Yz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Jz(e,t){return g(),C("svg",Yz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"},null,-1)])])}const Xz=Et({name:"ri-close-line",render:Jz}),Qz={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eW(e,t){return g(),C("svg",Qz,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1)])])}const tW=Et({name:"ri-code-line",render:eW}),nW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function oW(e,t){return g(),C("svg",nW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M15 4h-2v7h7V9h-3.586l4.293-4.293l-1.414-1.414L15 7.586zM4 15h3.586l-4.293 4.293l1.414 1.414L9 16.414V20h2v-7H4z"},null,-1)])])}const sW=Et({name:"ri-collapse-diagonal-line",render:oW}),iW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rW(e,t){return g(),C("svg",iW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1zm1 2H6v12h12zm-9 3h2v6H9zm4 0h2v6h-2zM9 4v2h6V4z"},null,-1)])])}const lW=Et({name:"ri-delete-bin-line",render:rW}),aW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uW(e,t){return g(),C("svg",aW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 19h18v2H3zm10-5.828L19.071 7.1l1.414 1.414L12 17L3.515 8.515L4.929 7.1L11 13.173V2h2z"},null,-1)])])}const cW=Et({name:"ri-download-line",render:uW}),dW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fW(e,t){return g(),C("svg",dW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M8.5 7a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m0 6.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M15.5 7a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1.5 8a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3"},null,-1)])])}const pW=Et({name:"ri-draggable",render:fW}),hW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function mW(e,t){return g(),C("svg",hW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6.17 18a3.001 3.001 0 0 1 5.66 0H22v2H11.83a3.001 3.001 0 0 1-5.66 0H2v-2zm6-7a3.001 3.001 0 0 1 5.66 0H22v2h-4.17a3.001 3.001 0 0 1-5.66 0H2v-2zm-6-7a3.001 3.001 0 0 1 5.66 0H22v2H11.83a3.001 3.001 0 0 1-5.66 0H2V4zM9 6a1 1 0 1 0 0-2a1 1 0 0 0 0 2m6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const gW=Et({name:"ri-equalizer-line",render:mW}),vW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yW(e,t){return g(),C("svg",vW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17.586 5H14V3h7v7h-2V6.414l-4.293 4.293l-1.414-1.414zM3 14h2v3.586l4.293-4.293l1.414 1.414L6.414 19H10v2H3z"},null,-1)])])}const kW=Et({name:"ri-expand-diagonal-line",render:yW}),bW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function wW(e,t){return g(),C("svg",bW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"},null,-1)])])}const xW=Et({name:"ri-external-link-line",render:wW}),_W={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function SW(e,t){return g(),C("svg",_W,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"},null,-1)])])}const CW=Et({name:"ri-eye-line",render:SW}),AW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function MW(e,t){return g(),C("svg",AW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"},null,-1)])])}const EW=Et({name:"ri-eye-off-line",render:MW}),TW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function IW(e,t){return g(),C("svg",TW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const $W=Et({name:"ri-file-add-line",render:IW}),NW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function LW(e,t){return g(),C("svg",NW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z"},null,-1)])])}const FW=Et({name:"ri-file-copy-line",render:LW}),OW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function RW(e,t){return g(),C("svg",OW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m21 6.757l-2 2V4h-9v5H5v11h14v-2.757l2-2v5.765a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8l6.003-6h10.995C20.55 2 21 2.455 21 2.992zm.778 2.05l1.414 1.415L15.414 18l-1.416-.002l.002-1.412z"},null,-1)])])}const PW=Et({name:"ri-file-edit-line",render:RW}),DW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function BW(e,t){return g(),C("svg",DW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z"},null,-1)])])}const i4=Et({name:"ri-file-line",render:BW}),zW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function WW(e,t){return g(),C("svg",zW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M21 8v12.993A1 1 0 0 1 20.007 22H3.993A.993.993 0 0 1 3 21.008V2.992C3 2.455 3.449 2 4.002 2h10.995zm-2 1h-5V4H5v16h14zM8 7h3v2H8zm0 4h8v2H8zm0 4h8v2H8z"},null,-1)])])}const HW=Et({name:"ri-file-text-line",render:WW}),jW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function UW(e,t){return g(),C("svg",jW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M16 2v2h-1v3.243a8 8 0 0 0 .736 3.352l4.281 9.276A1.5 1.5 0 0 1 18.655 22H5.344a1.5 1.5 0 0 1-1.362-2.129l4.281-9.276A8 8 0 0 0 9 7.243V4H8V2zm-2.613 8.001h-2.776q-.156.545-.374 1.071l-.158.362L6.124 20h11.75l-3.954-8.566A10 10 0 0 1 13.387 10M11 7.243q0 .38-.028.758h2.057a10 10 0 0 1-.02-.364L13 7.243V4h-2z"},null,-1)])])}const VW=Et({name:"ri-flask-line",render:UW}),qW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function KW(e,t){return g(),C("svg",qW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const GW=Et({name:"ri-flashlight-line",render:KW}),ZW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function YW(e,t){return g(),C("svg",ZW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414zM4 5v14h16V7h-8.414l-2-2zm7 7V9h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const JW=Et({name:"ri-folder-add-line",render:YW}),XW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function QW(e,t){return g(),C("svg",XW,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])}const eH=Et({name:"ri-folder-fill",render:QW}),tH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nH(e,t){return g(),C("svg",tH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"},null,-1)])])}const oH=Et({name:"ri-git-fork-line",render:nH}),sH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function iH(e,t){return g(),C("svg",sH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const rH=Et({name:"ri-git-pull-request-line",render:iH}),lH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function aH(e,t){return g(),C("svg",lH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M17 13v1c0 2.77-.664 5.445-1.915 7.846l-.227.42l-1.746-.974a14.9 14.9 0 0 0 1.881-6.836L15 14v-1zm-6-3h2v4l-.005.379a12.94 12.94 0 0 1-2.691 7.549l-.231.29l-1.549-1.264a10.94 10.94 0 0 0 2.47-6.588L11 14zm1-4a5 5 0 0 1 5 5h-2a3 3 0 0 0-6 0v3c0 2.235-.82 4.344-2.27 5.977l-.212.23l-1.448-1.38a6.97 6.97 0 0 0 1.924-4.524L7 14v-3a5 5 0 0 1 5-5m0-4a9 9 0 0 1 9 9v3c0 1.698-.201 3.37-.596 4.99l-.14.539l-1.93-.526c.392-1.437.614-2.922.658-4.435L19 14v-3A7 7 0 0 0 7.808 5.394L6.383 3.968A8.96 8.96 0 0 1 12 2M4.968 5.383l1.426 1.425a6.97 6.97 0 0 0-1.39 3.951L5 11l.004 2c0 1.12-.264 2.203-.761 3.177l-.157.29l-1.736-.992c.379-.665.6-1.407.645-2.183L3.004 13v-2a8.94 8.94 0 0 1 1.964-5.617"},null,-1)])])}const uH=Et({name:"ri-fingerprint-line",render:aH}),cH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function dH(e,t){return g(),C("svg",cH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.01 8.01 0 0 0 5.648 6.667M10.03 13c.151 2.439.848 4.73 1.97 6.752A15.9 15.9 0 0 0 13.97 13zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.01 8.01 0 0 0 19.938 13M4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333A8.01 8.01 0 0 0 4.062 11m5.969 0h3.938A15.9 15.9 0 0 0 12 4.248A15.9 15.9 0 0 0 10.03 11m4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.01 8.01 0 0 0-5.648-6.667"},null,-1)])])}const fH=Et({name:"ri-global-line",render:dH}),pH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function hH(e,t){return g(),C("svg",pH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993zM20 15V5H4v14L14 9zm0 2.828l-6-6L6.828 19H20zM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4"},null,-1)])])}const r4=Et({name:"ri-image-line",render:hH}),mH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gH(e,t){return g(),C("svg",mH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16M11 7h2v2h-2zm0 4h2v6h-2z"},null,-1)])])}const vH=Et({name:"ri-information-line",render:gH}),yH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kH(e,t){return g(),C("svg",yH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.06 8.111l1.415 1.414a7 7 0 0 1 0 9.9l-.354.353a7 7 0 1 1-9.9-9.9l1.415 1.415a5 5 0 1 0 7.071 7.071l.354-.354a5 5 0 0 0 0-7.07l-1.415-1.415zm6.718 6.01l-1.414-1.414a5 5 0 0 0-7.071-7.07l-.354.353a5 5 0 0 0 0 7.07l1.415 1.415l-1.415 1.414l-1.414-1.414a7 7 0 0 1 0-9.9l.354-.353a7 7 0 1 1 9.9 9.9"},null,-1)])])}const bH=Et({name:"ri-links-line",render:kH}),wH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xH(e,t){return g(),C("svg",wH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"},null,-1)])])}const _H=Et({name:"ri-list-check",render:xH}),SH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function CH(e,t){return g(),C("svg",SH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"},null,-1)])])}const AH=Et({name:"ri-list-unordered",render:CH}),MH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function EH(e,t){return g(),C("svg",MH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M4 15h2v5h12V4H6v5H4V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm6-4V8l5 4l-5 4v-3H2v-2z"},null,-1)])])}const TH=Et({name:"ri-login-box-line",render:EH}),IH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function $H(e,t){return g(),C("svg",IH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m17 4.238l-7.928 7.1L4 7.216V19h16zM4.511 5l7.55 6.662L19.502 5z"},null,-1)])])}const NH=Et({name:"ri-mail-line",render:$H}),LH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function FH(e,t){return g(),C("svg",LH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1zm-.692-2H20V5H4v13.385zM8 10h8v2H8z"},null,-1)])])}const OH=Et({name:"ri-message-line",render:FH}),RH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function PH(e,t){return g(),C("svg",RH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.196 2.268l3.25 5.63a1 1 0 0 1-.366 1.365l-1.3.75l1.001 1.732l-1.732 1l-1-1.733l-1.299.751a1 1 0 0 1-1.366-.366L8.546 8.215a5 5 0 0 0-3.222 6.56A4.97 4.97 0 0 1 8 14c1.684 0 3.174.833 4.08 2.109l7.688-4.439l1 1.733l-7.878 4.548a5 5 0 0 1 .01 2.05L21 20v2l-17 .001A4.98 4.98 0 0 1 3 19c0-1.007.298-1.945.81-2.73a7.003 7.003 0 0 1 3.717-9.82l-.393-.682a2 2 0 0 1 .732-2.732l2.598-1.5a2 2 0 0 1 2.732.732M8 16a3 3 0 0 0-2.83 4h5.66A3 3 0 0 0 8 16m3.464-12.732l-2.598 1.5l2.75 4.763l2.598-1.5z"},null,-1)])])}const DH=Et({name:"ri-microscope-line",render:PH}),BH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function zH(e,t){return g(),C("svg",BH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6 5h2v14H6zm10 0h2v14h-2z"},null,-1)])])}const WH=Et({name:"ri-pause-fill",render:zH}),HH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function jH(e,t){return g(),C("svg",HH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m15.728 9.576l-1.414-1.414L5 17.476v1.414h1.414zm1.414-1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zm-9.9 12.728H3v-4.243L16.435 3.212a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414z"},null,-1)])])}const UH=Et({name:"ri-pencil-line",render:jH}),VH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qH(e,t){return g(),C("svg",VH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M19.376 12.416L8.777 19.482A.5.5 0 0 1 8 19.066V4.934a.5.5 0 0 1 .777-.416l10.599 7.066a.5.5 0 0 1 0 .832"},null,-1)])])}const KH=Et({name:"ri-play-fill",render:qH}),GH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ZH(e,t){return g(),C("svg",GH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m22.313 10.175l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707l1.414-1.414z"},null,-1)])])}const YH=Et({name:"ri-pushpin-fill",render:ZH}),JH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function XH(e,t){return g(),C("svg",JH,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"},null,-1)])])}const QH=Et({name:"ri-pushpin-line",render:XH}),ej={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tj(e,t){return g(),C("svg",ej,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-1-5h2v2h-2zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1a1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.501 3.501 0 1 1 13 13.355"},null,-1)])])}const nj=Et({name:"ri-question-line",render:tj}),oj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sj(e,t){return g(),C("svg",oj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M13 4.055A9 9 0 0 1 21 13v9H3v-9a9 9 0 0 1 8-8.945V1h2zM19 20v-7a7 7 0 1 0-14 0v7zm-7-2a5 5 0 1 1 0-10a5 5 0 0 1 0 10m0-2a3 3 0 1 0 0-6a3 3 0 0 0 0 6m0-2a1 1 0 1 1 0-2a1 1 0 0 1 0 2"},null,-1)])])}const ij=Et({name:"ri-robot-line",render:sj}),rj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lj(e,t){return g(),C("svg",rj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05zM13 10h3l-5 7v-5H8l5-7z"},null,-1)])])}const aj=Et({name:"ri-shield-flash-line",render:lj}),uj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cj(e,t){return g(),C("svg",uj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05z"},null,-1)])])}const dj=Et({name:"ri-shield-line",render:cj}),fj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pj(e,t){return g(),C("svg",fj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m6.265 3.807l1.147 1.639a8 8 0 1 0 9.176 0l1.147-1.639A9.99 9.99 0 0 1 22 12c0 5.523-4.477 10-10 10S2 17.523 2 12a9.99 9.99 0 0 1 4.265-8.193M11 12V2h2v10z"},null,-1)])])}const hj=Et({name:"ri-shut-down-line",render:pj}),mj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gj(e,t){return g(),C("svg",mj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const vj=Et({name:"ri-sort-desc",render:gj}),yj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kj(e,t){return g(),C("svg",yj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M14 4.438A2.437 2.437 0 0 0 16.438 2h1.125A2.437 2.437 0 0 0 20 4.438v1.125A2.437 2.437 0 0 0 17.563 8h-1.125A2.437 2.437 0 0 0 14 5.563zM1 11a6 6 0 0 0 6-6h2a6 6 0 0 0 6 6v2a6 6 0 0 0-6 6H7a6 6 0 0 0-6-6zm3.876 1A8.04 8.04 0 0 1 8 15.124A8.04 8.04 0 0 1 11.124 12A8.04 8.04 0 0 1 8 8.876A8.04 8.04 0 0 1 4.876 12m12.374 2A3.25 3.25 0 0 1 14 17.25v1.5A3.25 3.25 0 0 1 17.25 22h1.5A3.25 3.25 0 0 1 22 18.75v-1.5A3.25 3.25 0 0 1 18.75 14z"},null,-1)])])}const bj=Et({name:"ri-sparkling-line",render:kj}),wj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xj(e,t){return g(),C("svg",wj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"},null,-1)])])}const _j=Et({name:"ri-star-fill",render:xj}),Sj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Cj(e,t){return g(),C("svg",Sj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"},null,-1)])])}const Aj=Et({name:"ri-star-line",render:Cj}),Mj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ej(e,t){return g(),C("svg",Mj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M6 5h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1"},null,-1)])])}const Tj=Et({name:"ri-stop-fill",render:Ej}),Ij={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function $j(e,t){return g(),C("svg",Ij,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M5 11v2h14v-2z"},null,-1)])])}const Nj=Et({name:"ri-subtract-line",render:$j}),Lj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fj(e,t){return g(),C("svg",Lj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 2a1 1 0 1 1 0 2a8 8 0 1 0 8 8a1 1 0 1 1 2 0c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2m0 4a1 1 0 1 1 0 2a4 4 0 1 0 4 4a1 1 0 1 1 2 0a6 6 0 1 1-6-6m5.656-3.9a1.001 1.001 0 0 1 1.415 1.415l-.708.706h.001a1 1 0 1 0 1.414 1.415l.707-.707A1 1 0 0 1 21.9 6.343l-2.12 2.122a1 1 0 0 1-.708.292h-2.414l-3.95 3.95a1 1 0 0 1-1.414-1.414l3.95-3.95V4.93a1 1 0 0 1 .292-.707z"},null,-1)])])}const Oj=Et({name:"ri-target-line",render:Fj}),Rj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Pj(e,t){return g(),C("svg",Rj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m1 2v14h16V5zm8 10h6v2h-6zm-3.333-3L5.838 9.172l1.415-1.415L11.495 12l-4.242 4.243l-1.415-1.415z"},null,-1)])])}const Dj=Et({name:"ri-terminal-box-line",render:Pj}),Bj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function zj(e,t){return g(),C("svg",Bj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"},null,-1)])])}const Wj=Et({name:"ri-time-line",render:zj}),Hj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function jj(e,t){return g(),C("svg",Hj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"},null,-1)])])}const Uj=Et({name:"ri-tools-line",render:jj}),Vj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qj(e,t){return g(),C("svg",Vj,[...t[0]||(t[0]=[_("path",{fill:"currentColor",d:"M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4"},null,-1)])])}const Kj=Et({name:"ri-user-line",render:qj}),Gj=` - - - -`,Zj=` - - -`,Yj=` - - - - - - - - - -`,Jj=` - - - - -`,Xj=` - - -`,Qj=` - - - -`,eU=` - - -`,tU='',nU='',oU='',sU='',iU='',rU='',lU='',aU='',uU='',cU='',dU='',fU='',pU='',hU='',l4='',mU='',gU='',vU='',yU='',kU='',bU='',wU='',xU='',_U='',SU='',CU='',AU='',MU='',EU='',TU='',IU='',$U='',NU='',LU='',FU='',a4='',OU='',RU='',PU='',DU='',BU='',zU='',WU='',HU='',jU='',u4='',UU='',VU='',qU='',KU='',GU='',ZU='',YU='',JU='',XU='',QU='',eV='',tV='',nV='',oV='',sV='',iV='',rV='',lV='',aV='',uV='',cV='',dV='',fV='',pV='',hV='',mV='',gV='',vV='',yV='',HE={sm:14,md:16,lg:20};function It(e,t){return{component:e,svg:t}}const jE={plus:It(iz,rU),"chat-new":It(wB,Gj),"calendar-close":It(zz,vU),"calendar-schedule":It(jz,yU),"calendar-todo":It(qz,kU),close:It(Xz,wU),check:It(Zz,bU),archive:It(hz,uU),search:It(OB,Xj),copy:It(FW,LU),link:It(bH,VU),"external-link":It(xW,TU),download:It(cW,CU),undo:It(_z,fU),send:It(s4,l4),image:It(r4,u4),settings:It(DB,Qj),sliders:It(gW,MU),robot:It(ij,sV),microscope:It(DH,JU),flask:It(VW,RU),eye:It(CW,IU),"eye-off":It(EW,$U),"log-in":It(TH,GU),"chevron-down":It(bz,dU),"chevron-right":It(Tz,hU),"chevron-up":It(Fz,mU),"arrow-up":It(s4,l4),"arrow-down":It(vz,cU),"arrow-right":It(Az,pU),minus:It(Nj,pV),"panel-collapse":It(YB,oU),"panel-expand":It(QB,sU),expand:It(kW,EU),collapse:It(sW,_U),list:It(AH,KU),sort:It(vj,aV),grip:It(pW,AU),folder:It(TB,Yj),"folder-closed":It(SB,Zj),"folder-plus":It(JW,DU),"folder-solid":It(eH,BU),file:It(i4,a4),"file-text":It(HW,OU),"file-edit":It(PW,FU),"file-plus":It($W,NU),"file-off":It(i4,a4),attachment:It(nz,iU),"image-off":It(r4,u4),code:It(tW,xU),terminal:It(Dj,mV),pencil:It(UH,QU),tool:It(Uj,vV),glob:It(Pz,gU),globe:It(fH,jU),"check-list":It(_H,qU),bolt:It(GW,PU),"git-fork":It(oH,zU),"git-pull-request":It(rH,WU),message:It(OH,YU),mail:It(NH,ZU),user:It(Kj,yV),info:It(vH,UU),"help-circle":It(nj,oV),"alert-triangle":It(dz,aU),fingerprint:It(uH,HU),"shield-question":It(dj,rV),"full-access":It(aj,iV),trash:It(lW,SU),clock:It(Wj,gV),sparkles:It(bj,uV),thinking:It(WB,eU),target:It(Oj,hV),pause:It(WH,XU),play:It(KH,eV),power:It(hj,lV),stop:It(Tj,fV),star:It(_j,cV),"star-outline":It(Aj,dV),"dots-horizontal":It(NB,Jj),"circle-check":It(UB,tU),"circle-dashed":It(KB,nU),"pushpin-line":It(QH,nV),"pushpin-fill":It(YH,tV),"gen-title":It(az,lU)};function kV(e){return jE[e]}function bV(e,t){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,"").replace(/^
      -`;const i=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${o}`;return i<0?r.push(["class",l]):(r[i]=r[i].slice(),r[i][1]+=` ${l}`),`
      ${t}
      -`}return`
      ${t}
      -`}function Bp(e){return!e.attrs||e.attrs.length===0?`${to(e.content)}`:`${to(e.content)}`}function xb(e){const t=to(e.content);return e.attrs?`${t}
      -`:`
      ${t}
      -`}function Roe(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

      `;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function u3(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Poe(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function c3(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function o1(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const Doe={langPrefix:"language-",xhtmlOut:!1,breaks:!1},mm=Object.prototype.hasOwnProperty,On={code_inline(e,t){return Bp(e[t])},code_block(e,t){return xb(e[t])},fence(e,t,n,o,s){const i=e[t],r=i.info?r9(i.info).trim():"",{langName:l,langAttrs:a}=m9(r),u=n.highlight,c=to(i.content);if(!u)return rp(i,c,r,l,n);const d=u(i.content,l,a);return v0(d)?d.then(f=>rp(i,f||c,r,l,n)):rp(i,d||c,r,l,n)},image(e,t,n,o,s){const i=e[t],r=s.renderInlineAsText(i.children||[],n,o),l=i.attrIndex("alt");return l>=0&&i.attrs?i.attrs[l][1]=r:i.attrs?i.attrs.push(["alt",r]):i.attrs=[["alt",r]],o1(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
      -`:`
      -`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
      -`:`
      -`:` -`},text(e,t){return to(e[t].content)},text_special(e,t){return to(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function d3(e,t,n){const o=e.info?r9(e.info).trim():"",{langName:s,langAttrs:i}=m9(o),r=t.highlight,l=to(e.content);if(!r)return rp(e,l,o,s,t);const a=r(e.content,s,i);if(v0(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return rp(e,a||l,o,s,t)}function ky(e,t,n,o){switch(e.type){case"text":return t.text===On.text?e.content.length===0?"":to(e.content):null;case"text_special":return t.text_special===On.text_special?e.content.length===0?"":to(e.content):null;case"softbreak":return t.softbreak===On.softbreak?o:null;case"hardbreak":return t.hardbreak===On.hardbreak?n:null;case"html_inline":return t.html_inline===On.html_inline?e.content:null;case"code_inline":return t.code_inline===On.code_inline?Bp(e):null;default:return null}}function Boe(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===On.text)return i.content.length===0?"":to(i.content);break;case"text_special":if(s.text_special===On.text_special)return i.content.length===0?"":to(i.content);break;case"softbreak":if(s.softbreak===On.softbreak)return t.breaks?t.xhtmlOut?`
      -`:`
      -`:` -`;break;case"hardbreak":if(s.hardbreak===On.hardbreak)return t.xhtmlOut?`
      -`:`
      -`;break;case"html_inline":if(s.html_inline===On.html_inline)return i.content;break;case"code_inline":if(s.code_inline===On.code_inline)return Bp(i);break}const r=s[i.type];if(!r)return o1(i,t.xhtmlOut===!0);const l=r(e,0,t,n,o);return typeof l=="string"?l:og(l,i.type)}var zoe=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...On}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,r=o.xhtmlOut===!0;let l,a,u,c,d,f,p="",h="",m=!1,k="";for(let w=0;w0&&e[w-1].hidden?` -`:"";if(y==="list_item_open"&&(!v.attrs||v.attrs.length===0)&&w+3${this.renderInlineTokens($.children||[],o,s)}`,w+=3;continue}}if(w+2 -`,w+=2;continue}}}if(y==="inline"){const T=v.children||[];if(T.length===1){m||(l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,p=o.xhtmlOut?`
      -`:`
      -`,h=o.breaks?p:` -`,m=!0);const $=T[0];switch($.type){case"text":if(l===On.text){k+=to($.content);continue}break;case"text_special":if(a===On.text_special){k+=to($.content);continue}break;case"softbreak":if(u===On.softbreak){k+=h;continue}break;case"hardbreak":if(c===On.hardbreak){k+=p;continue}break;case"html_inline":if(d===On.html_inline){k+=$.content;continue}break;case"code_inline":if(f===On.code_inline){k+=Bp($);continue}break}}k+=this.renderInlineTokens(T,o,s);continue}const S=i[y];if(!S){const T=v.attrs;if(!v.hidden){if(!T||T.length===0)switch(y){case"hr":k+=r?`


      -`:`
      -`;continue;case"heading_open":k+=`<${v.tag}>`;continue;case"heading_close":k+=` -`;continue;case"paragraph_open":k+=`${b}

      `;continue;case"paragraph_close":k+=`

      -`;continue;case"list_item_open":{const $=e[w+1];k+=b+($&&($.type==="inline"||$.hidden||$.nesting===-1&&$.tag==="li")?"
    1. ":`
    2. -`);continue}case"list_item_close":k+=`
    3. -`;continue;case"bullet_list_open":k+=`${b}
        -`;continue;case"bullet_list_close":k+=`
      -`;continue;case"blockquote_open":k+=b+(e[w+1]&&e[w+1].nesting===-1&&e[w+1].tag==="blockquote"?"
      ":`
      -`);continue;case"blockquote_close":k+=`
      -`;continue;case"ordered_list_open":k+=`${b}
        -`;continue;case"ordered_list_close":k+=`
      -`;continue;case"table_open":k+=`${b} -`;continue;case"table_close":k+=`
      -`;continue;case"thead_open":k+=`${b} -`;continue;case"thead_close":k+=` -`;continue;case"tbody_open":k+=`${b} -`;continue;case"tbody_close":k+=` -`;continue;case"tr_open":k+=`${b} -`;continue;case"tr_close":k+=` -`;continue;case"td_open":k+=`${b}`;continue;case"td_close":k+=` -`;continue;case"th_open":k+=`${b}`;continue;case"th_close":k+=` -`;continue}else if(T.length===1){const $=T[0];if(y==="ordered_list_open"&&$[0]==="start"){k+=`${b}
        -`;continue}if(y==="td_open"&&$[0]==="style"){k+=`${b}`;continue}if(y==="th_open"&&$[0]==="style"){k+=`${b}`;continue}}}k+=this.renderToken(e,w,o);continue}if(y==="code_block"&&S===On.code_block){k+=xb(v);continue}if(y==="fence"&&S===On.fence){k+=d3(v,o);continue}if(y==="html_block"&&S===On.html_block){k+=v.content;continue}const I=S(e,w,o,s,this);typeof I=="string"?k+=I:k+=og(I,v.type)}return k}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let r="";for(let l=0;l0&&e[t-1].hidden?` -`:"",c=a?`> -`:">";if(!l||l.length===0)return i===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:i===-1?`${u}(n||(n={...t}),n);if(mm.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),mm.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(mm.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(mm.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Doe,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===On.code_block)return xb(t);if(i==="html_block"&&s.html_block===On.html_block)return t.content;const r=this.mergeOptions(n),l=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[i];if(!a)return t.block?this.renderToken(e,0,r):o1(t,r.xhtmlOut===!0);if(i==="fence"&&a===On.fence)return d3(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:og(u,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Boe(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
        -`:`
        -`,r=t.breaks?i:` -`,l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,p=o.link_open,h=o.link_close,m=o.em_open,k=o.em_close,w=o.strong_open,v=o.strong_close;let y="";for(let b=0;b`;if(u===On.softbreak&&b+3`,b+=1;continue}if(S.type==="em_open"&&!m&&!k&&b+2${F}`,b+=2;continue}}}if(S.type==="strong_open"&&!w&&!v&&b+2${F}`,b+=2;continue}}}switch(S.type){case"text":if(l===On.text){const $=S.content.length===0?"":to(S.content);if(d===On.html_inline&&b+1=4)return!0;continue}if(l===9){if(r+=4-r%4,i++,r>=4)return!0;continue}break}if(i0&&u<=6){if(a=3)return!0;break}default:if(l>=48&&l<=57){let a=i+1;for(;a57)break;a++}if(a=xe,!ee&&We!==void 0&&(he=Lo(e),ee=he>=We)),ee){const H=this.parseFullDocument(e,D,n,he,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",qo(D,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!gl(D)?.unbounded}),H.tokens}else if(W){const H=(be,_e,ce)=>be<_e?_e:be>ce?ce:be;he===void 0&&(he=Lo(e));const Z=te&&!X?l3(e.length,he,n.options):null,ye=Z?.maxChunkChars??(j?H(Math.ceil(e.length/re),8e3,64e3):Q??1e4),fe=Z?.maxChunkLines??(j?H(Math.ceil(he/re),150,700):Y??200),de=Z?.maxChunks??(j?H(Math.ceil(e.length/64e3),re,32):G),J=e.length>0&&e.charCodeAt(e.length-1)===10,ae=L&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Z?.strategy!=="plain";if((A||ae)&&(e.length>=ye*2||he>=fe*2)&&J){const be=n1(n,e,D,{maxChunkChars:ye,maxChunkLines:fe,fenceAware:Z?.fenceAware??q,maxChunks:de});return this.cache={src:e,tokens:be,env:D,lineCount:he,lastSegment:void 0,globalStateReason:mi(e)},this.updateCacheLineCount(this.cache,he),this.recordChunkedParseResult(D,A?"explicit-initial-large-doc":"default-initial-large-doc"),be}}const ne=this.parseFullDocument(e,D,n,he);return he=ne.lineCount,this.cache={src:e,tokens:ne.tokens,env:D,lineCount:he,lastSegment:void 0,globalStateReason:mi(e)},this.updateCacheLineCount(this.cache,he),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",qo(D,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!gl(D)?.unbounded}),ne.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",qo(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=mi(s.src),s.globalStateReason=r);const l=r?null:i!==null?this.detectGlobalStateForAppend(s,i):mi(e),a=r||l;if(a){const D=o??s.env;Dl(D);const B=mi(e),z=this.parseFullDocument(e,D,n),A=z.tokens,L=z.lineCount;return this.cache={src:e,tokens:A,env:D,lineCount:L,lastSegment:void 0,globalStateReason:B},this.updateCacheLineCount(this.cache,L),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",qo(D,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!gl(D)?.unbounded}),A}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?B=8:c.length>1e3?B=6:c.length>200&&(B=4),B=Math.min(B,D);let z=null;const A=n.options?.streamContextParseStrategy??"chars",L=n.options?.streamContextParseMinChars??200,W=n.options?.streamContextParseMinLines??2;let j;const re=()=>(j===void 0&&(j=Lo(c)),j),Q=this.canDirectlyParseAppend(s),Y=Q&&this.shouldUseUnboundedAppend(e,s,c);let G=!1;if(!Q)switch(A){case"lines":G=re()>=W;break;case"constructs":if(c.length>=L){G=!0;break}if(joe(c)){G=!0;break}G=re()>=W;break;case"chars":default:G=c.length>=L}if(B>0&&G){const q=this.getTailLines(s.src,B)+c;try{const me=this.core.parse(q,s.env,n).tokens,xe=me.findIndex(We=>We.map&&typeof We.map[1]=="number"&&We.map[1]>B);if(xe!==-1){const We=me.slice(xe),he=D-B;he!==0&&this.shiftTokenLines(We,he),z={tokens:We}}}catch{z=null}}else z=null;if(!z){const q=D;if(Y)z={tokens:sp(n,c,s.env,{mode:"stream"})},q>0&&this.shiftTokenLines(z.tokens,q);else{const me=this.core.parse(c,s.env,n);q>0&&this.shiftTokenLines(me.tokens,q),z=me}}let X=0;if(s.tokens.length>0&&z.tokens.length>0){const q=s.tokens[s.tokens.length-1],me=z.tokens[0];try{q.type==="inline"&&me.type==="inline"&&(me.children&&me.children.length>0&&(q.children||(q.children=[]),this.appendTokens(q.children,me.children)),q.content=(q.content||"")+(me.content||""),X=1)}catch{X=0}}const te=s.tokens.length;if(z.tokens.length>X){const q=s.tokens,me=z.tokens,xe=Math.min(q.length,me.length-X);let We=0;for(let he=xe;he>0;he--){let ee=!0;for(let ne=0;ne0&&(X+=We),me.length>X&&this.appendTokens(s.tokens,me,X)}if(s.src=e,s.globalStateReason=null,s.lineCount=D+(j??re()),s.tokens.length>te){const q=this.getLastSegment(s.tokens,e,te,s.tokens.length,e.length-c.length,D);q?s.lastSegment=q:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,Y&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",qo(s.env,{area:"stream",path:Y?"stream-unbounded-append":"stream-append",reason:Y?"large-delta":"safe-append",unbounded:Y}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",qo(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,h=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,k=!p&&!c&&h,w=m||k,v=n.options?.streamChunkAdaptive!==!1,y=n.options?.streamChunkTargetChunks??8,b=n.options?.streamChunkSizeChars,S=n.options?.streamChunkSizeLines,I=n.options?.streamChunkMaxChunks,T=!!n.__explicitStreamChunkConfig,$=n.options?.autoTuneChunks!==!1,F=n.options?.streamChunkFenceAware??!0;let R=c&&s.lineCount!==void 0?s.lineCount+Lo(c):void 0;if(w){R===void 0&&(R=Lo(e));const D=(re,Q,Y)=>reY?Y:re,B=$&&!T?l3(e.length,R,n.options):null,z=B?.maxChunkChars??(v?D(Math.ceil(e.length/y),8e3,64e3):b??1e4),A=B?.maxChunkLines??(v?D(Math.ceil(R/y),150,700):S??200),L=B?.maxChunks??(v?D(Math.ceil(e.length/64e3),y,32):I),W=e.length>0&&e.charCodeAt(e.length-1)===10,j=k&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&B?.strategy!=="plain";if((m||j)&&(e.length>=z*2||R>=A*2)&&W){const re=n1(n,e,d,{maxChunkChars:z,maxChunkLines:A,fenceAware:B?.fenceAware??F,maxChunks:L});return this.cache={src:e,tokens:re,env:d,lineCount:R,lastSegment:void 0,globalStateReason:mi(e)},this.updateCacheLineCount(this.cache,R),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),re}}const P=this.parseFullDocument(e,d,n,R),M=P.tokens;return R=P.lineCount,this.cache={src:e,tokens:M,env:d,lineCount:R,lastSegment:void 0,globalStateReason:mi(e)},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",qo(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!gl(d)?.unbounded}),M}recordChunkedParseResult(e,t){const n=gl(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",qo(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!gl(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",qo(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=mi(e);rh(t)&&Dl(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?f9(n,e.length,o):"no";if(r==="yes"){const a=sp(n,e,t);return qo(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?Lo(e):0)}}let l=o;if(r==="need-lines"&&(l=Lo(e),d9(n,e.length,l))){const a=sp(n,e,t);return qo(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Lo(e):0),{tokens:ad(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:Lo(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` -`))return null;const o=n??t.slice(e.length);if(!o)return null;const s=o.length;if(o.charCodeAt(s-1)!==10)return null;let i=0,r=-1;for(let a=0;a=2));a++);if(i<2)return null;const l=(r===-1?o:o.slice(0,r)).trim();if(l.length===0)return null;if(/^[-=]+$/.test(l)){const a=e.slice(0,-1),u=a.lastIndexOf(` -`);if(a.slice(u+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(o)?null:o}tryTailSegmentReparse(e,t,n,o){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const i=t.src.slice(0,s.srcOffset);if(!e.startsWith(i))return null;const r=t.src.slice(s.srcOffset),l=e.slice(s.srcOffset);if(l===r)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const u=this.tryContainerTailAppendMerge(e,t,n,o,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,o),c=this.getLastSegment(u.tokens,l);return s.lineStart>0&&this.shiftTokenLines(u.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,u.tokens),t.lineCount=s.lineStart+Lo(l),c?t.lastSegment={tokenStart:s.tokenStart+c.tokenStart,tokenEnd:s.tokenStart+c.tokenEnd,lineStart:s.lineStart+c.lineStart,lineEnd:s.lineStart+c.lineEnd,srcOffset:s.srcOffset+c.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let o=e.length-1;o>=0;o--)if(e.charCodeAt(o)===10&&(n--,n===0))return e.slice(o+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,o=e.slice(n),s=o.length;let i=null,r=0;for(;r<=s;){let l=o.indexOf(` -`,r);l===-1&&(l=s);let a=r;for(;a=3&&(i?i.marker===u&&d>=i.length&&(i=null):i={marker:u,length:d})}}if(l===s)break;r=l+1}return i!==null}peek(){return this.cache?.tokens??Hoe}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sby?n.slice(n.length-by):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=o-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]l&&(l=c.map[1])),c.nesting<0){a+=-c.nesting;continue}if(c.nesting>0){if(a-=c.nesting,c.level===0&&a<=0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(c.level===0&&a===0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` -`,i+1),i===-1)return e.length;s--}return i+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let o=n,s=t-1;for(;o>0;){if(s=e.indexOf(` -`,s+1),s===-1)return e.length;o--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,o,s,i){if(!i||this.mayContainReferenceDefinition(i))return null;const r=t.tokens[s.tokenStart];switch(r?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,o,s,i,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,o,s,i,r);default:return null}}tryListTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),h=this.getListParagraphMode(c,0,c.length,0);(p==="loose"||h==="loose"||this.endsWithBlankLine(t.src)||(c[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,r.level,!1),this.setListParagraphVisibility(d,0,d.length,r.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+Lo(i);t.lineCount=m;const k=this.getDocLineCount(e,m);return r.map&&(r.map[1]=k),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:k,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(i))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(h.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(h,m);const k=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,w=t.lineCount??Lo(t.src);t.tokens.splice(k,0,...h),t.src=e,t.env=n,t.globalStateReason=null;const v=w+Lo(i);t.lineCount=v;const y=this.getDocLineCount(e,v);if(r.map&&(r.map[1]=y),p.tbodyOpenIndex>=0){const b=t.tokens[p.tbodyOpenIndex];b?.map&&(b.map[1]=y)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` -`);if(t<0)return null;const n=e.indexOf(` -`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let l=n-1;l>t;l--){const a=e[l];if(a.type==="table_close"&&a.level===o){s=l;break}}if(s<0)return null;let i=-1,r=-1;for(let l=t+1;l=0){for(let l=s-1;l>i;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===o+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let r=0;for(let l=0;l0&&l0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const r=o+2;for(let l=t;l=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=Lo(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let r=i.children.length-1;r>=0;r--)n.push(i.children[r])}}}}};const p3={default:Foe,zero:Ooe,commonmark:Loe};function Koe(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Goe(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function h3(e){return e.experimental?{...e,...e.experimental}:e}function Qi(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function m3(e,t,n){for(let o=0;o=4?n.quotes=[$[0],$[1],$[2],$[3]]:n.quotes=["“","”","‘","’"]}let r=m3(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=m3(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=g3(i?.options,s,"fullChunkedFallback"),u=g3(i?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const p=new Dne;let h=null;const m=()=>(h||(h=new Woe(n)),h);let k=null;const w=()=>(k||(k=new qoe(p)),k);let v=null;const y=()=>(v||(v=new xT),v),b=$=>!c&&!!d&&!Goe($,d),S=($,F)=>o==="default"&&!c&&h===null&&f!==null&&$.parse===f&&b($)&&!$.stream.enabled&&F<($.options.autoUnboundedThresholdChars??4e6)&&$.options.html===!1&&$.options.xhtmlOut===!1&&$.options.breaks===!1&&$.options.langPrefix==="language-"&&$.options.linkify===!1&&$.options.typographer===!1&&$.options.highlight===null,I=($,F)=>o==="default"&&!c&&b($)&&!$.stream.enabled&&!$.options.fullChunkedFallback&&F<($.options.autoUnboundedThresholdChars??4e6)&&$.options.html===!1&&$.options.linkify===!1&&$.options.typographer===!1,T={core:p,block:p.block,inline:p.inline,get linkify(){const $=y();return Object.defineProperty(this,"linkify",{value:$,writable:!0,configurable:!0}),$},get renderer(){const $=m();return Object.defineProperty(this,"renderer",{value:$,writable:!0,configurable:!0}),$},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return b(this)},set($){const F=h3($);return this.options={...this.options,...F},(Qi($,"fullChunkSizeChars")||Qi($,"fullChunkSizeLines")||Qi($,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(Qi($,"streamChunkSizeChars")||Qi($,"streamChunkSizeLines")||Qi($,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),Qi($,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),Qi($,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),h&&h.set(F),typeof F.stream=="boolean"&&(this.stream.enabled=F.stream,k&&(k.reset(),k.resetStats())),this},configure($){const F=typeof $=="string"?p3[$]:$;if(!F)throw new Error("Wrong `markdown-it` preset, can't be empty");if(F.options&&this.set(F.options),F.components){const R=F.components;R.core?.rules&&this.core.ruler.enableOnly(R.core.rules),R.block?.rules&&this.block.ruler.enableOnly(R.block.rules),R.inline?.rules&&this.inline.ruler.enableOnly(R.inline.rules),R.inline2?.rules&&this.inline.ruler2.enableOnly(R.inline2.rules)}return this},enable($,F){const R=Array.isArray($)?$:[$],P=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],M=new Set;for(const D of P){if(!D)continue;const B=D.enable(R,!0);for(let z=0;z!M.has(B));if(D.length)throw new Error(`Rules manager: invalid rule name ${D.join(", ")}`)}return this},disable($,F){const R=Array.isArray($)?$:[$],P=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],M=new Set;for(const D of P){if(!D)continue;const B=D.disable(R,!0);for(let z=0;z!M.has(B));if(D.length)throw new Error(`Rules manager: invalid rule name ${D.join(", ")}`)}return this},use($,...F){const R=typeof $=="function"?$:$&&typeof $.default=="function"?$.default:void 0;if(!R)throw new TypeError("MarkdownIt.use: plugin must be a function");const P=[this,...F],M=$;return c=!0,R.apply(M,P),this},render($,F){let R;if(S(this,$.length)){F!==void 0&&(Ys(F),R=uy("render"));const D=R?Sc():0,B=R?s3($,R):o3($);if(R&&(R.attemptMs=Sc()-D,B===null&&(R.fallbackReason="unsupported-stock-subset"),kf(F,R)),B!==null)return F!==void 0&&qo(F,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const P=F??{},M=this.parse($,P);return R&&kf(P,R),m().render(M,this.options,P)},async renderAsync($,F){let R;if(S(this,$.length)){F!==void 0&&(Ys(F),R=uy("render"));const D=R?Sc():0,B=R?s3($,R):o3($);if(R&&(R.attemptMs=Sc()-D,B===null&&(R.fallbackReason="unsupported-stock-subset"),kf(F,R)),B!==null)return F!==void 0&&qo(F,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const P=F??{},M=this.parse($,P);return R&&kf(P,R),m().renderAsync(M,this.options,P)},renderIterable($,F={}){const R=this.parseIterable($,F);return m().render(R,this.options,F)},async renderAsyncIterable($,F={}){const R=await this.parseAsyncIterable($,F);return m().renderAsync(R,this.options,F)},renderInline($,F={}){const R=this.parseInline($,F);return m().render(R,this.options,F)},validateLink:XT,normalizeLink:QT,normalizeLinkText:e9,utils:hee,helpers:{...nte},parse($,F){if(typeof $!="string")throw new TypeError("Input data should be a String");if(F!==void 0&&Ys(F),I(this,$.length)){const D=F===void 0?void 0:uy("parse"),B=D?Sc():0,z=Yne($,D);if(D&&(D.attemptMs=Sc()-B,z===null&&(D.fallbackReason="unsupported-stock-subset"),kf(F,D)),z!==null)return F!==void 0&&qo(F,{area:"parse",path:"stock-fast",reason:"stock-subset"}),z}const R=F??{};let P;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&b(this)){const D=f9(this,$.length);if(D==="yes"){const B=sp(this,$,R);return qo(F,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),B}D==="need-lines"&&(P=Lo($))}if(!this.stream.enabled){const D=$.length,B=this.options.autoTuneChunks!==!1,z=r,A=!a&&b(this),L=!!this.options.fullChunkedFallback,W=A&&D>=2e5;let j;(L||W||P!==void 0)&&(j=P??Lo($));const re=(L||W)&&B&&!z?Noe(D,j,this.options):null;if(L||W){const Q=j??0;if(L?D>=(this.options.fullChunkThresholdChars??2e4)||Q>=(this.options.fullChunkThresholdLines??400):W){if(re&&re.strategy!=="plain"){const Y=n1(this,$,R,{maxChunkChars:re.maxChunkChars,maxChunkLines:re.maxChunkLines,fenceAware:re.fenceAware,maxChunks:re.maxChunks});return F&&v3(F,L?"explicit-full-chunk":"default-large-string"),Y}if(L){const Y=(ee,ne,H)=>eeH?H:ee,G=this.options.fullChunkAdaptive!==!1,X=this.options.fullChunkTargetChunks??8,te=Y(Math.ceil(D/X),8e3,64e3),q=Y(Math.ceil(Q/X),150,700),me=G?te:this.options.fullChunkSizeChars??1e4,xe=G?q:this.options.fullChunkSizeLines??200,We=G?Y(Math.ceil(D/64e3),X,32):this.options.fullChunkMaxChunks,he=n1(this,$,R,{maxChunkChars:me,maxChunkLines:xe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:We});return F&&v3(F,"explicit-full-chunk"),he}}}if(P!==void 0&&b(this)&&d9(this,D,j??P)){const Q=sp(this,$,R);return qo(F,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),Q}}const M=mi($);return qo(F,{area:"parse",path:"plain",reason:"default-plain"}),ad(R,M,()=>p.parse($,R,this).tokens)},parseIterable($,F={}){return Ys(F),Eoe(this,$,F)},parseAsyncIterable($,F={}){return Ys(F),Toe(this,$,F)},parseIterableToSink($,F,R={}){return Ys(R),Ioe(this,$,F,R)},parseAsyncIterableToSink($,F,R={}){return Ys(R),$oe(this,$,F,R)},parseInline($,F={}){if(typeof $!="string")throw new TypeError("Input data should be a String");Ys(F),rh(F)&&Dl(F);const R=p.createState($,F,this);return R.inlineMode=!0,p.process(R),R.tokens}};if(T.stream={enabled:!!n.stream,parse($,F){return T.stream.enabled?w().parse($,F,T):T.parse($,F??{})},reset(){w().reset()},peek(){return k?k.peek():[]},stats(){return k?k.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){k&&k.resetStats()}},i?.components){const $=i.components;$.core?.rules&&T.core.ruler.enableOnly($.core.rules),$.block?.rules&&T.block.ruler.enableOnly($.block.rules),$.inline?.rules&&T.inline.ruler.enableOnly($.inline.rules),$.inline2?.rules&&T.inline.ruler2.enableOnly($.inline2.rules)}return d=Koe(T),f=T.parse,T}var Yoe=Zoe;const v9=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Joe=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],y9=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],Xoe=["svg","g","path"],Qoe=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],ese=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],tse=["action","data","href","src","srcset","poster","xlink:href","formaction"],nse=["script"],ose=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],Na=new Set(v9),k9=new Set(y9),zp=new Set([...v9,...Joe,...y9,...Xoe]),b9=new Set([...zp,...Qoe]),sse=new Set(ese),ise=new Set(tse),uh=new Set(nse),w9=new Set(ose);function x9(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const rse={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function _9(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const r=Number.parseInt(i,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return rse[String(s??"").toLowerCase()]??t})}const gm=new Set(["http","https","mailto","tel"]),lse=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),lu=new Set(["http","https"]);function S9(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const ase=/^https?:\/\//i;function use(e){if(!ase.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function cse(e,t,n){if(!lp(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function lp(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function dse(e,t){return t==="href"||t==="xlink:href"?lp(e,t)?gm:lu:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?lu:(lp(e,t),gm)}function Ou(e,t={}){if(use(e))return!1;const n=x9(_9(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const r=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!r:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=S9(n);return i?i==="file"?!cse(n,o,s):lp(o,s)?lse.has(i):!dse(o,s).has(i):!1}function fse(e){const t=_9(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=S9(x9(t).toLowerCase());return n==="http"||n==="https"}function pse(e,t={}){const n=String(e??"").trim();return n?Ou(n,t)?"":n:""}function y3(e){return pse(e,{tagName:"img",attrName:"src"})}function hse(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,p,h,m,k){return f[p].nesting===1&&f[p].attrJoin("class",t),k.renderToken(f,p,h,m,k)}n=n||{};const i=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||o,c=n.render||s;function d(f,p,h,m){let k,w=!1,v=f.bMarks[p]+f.tShift[p],y=f.eMarks[p];if(l!==f.src.charCodeAt(v))return!1;for(k=v+1;k<=y&&r[(k-v)%a]===f.src[k];k++);const b=Math.floor((k-v)/a);if(b=h||(v=f.bMarks[T]+f.tShift[T],y=f.eMarks[T],v=4)){for(k=v+1;k<=y&&r[(k-v)%a]===f.src[k];k++);if(!(Math.floor((k-v)/a)=2){const r=Number(i[0]),l=Number(i[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&C9(s.children,t,n)}}function gse(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(hse,t,{render(n,o){return n[o].nesting===1?`
        `:`
        -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,r=i.bMarks[n]+i.tShift[n],l=i.eMarks[n],a=i.src.slice(r,l),u=a.match(/^:::\s*([^\s{]+)/);if(!u)return!1;const c=u[1];if(!c.trim())return!1;const d=a.slice(u[0].length).trim();let f,p;const h=d.indexOf("{"),m=h>=0?d.slice(h).trimStart():void 0;if(h===-1)f=d||void 0;else{if(f=d.slice(0,h).trim()||void 0,m?.startsWith("{")){let I=0,T=-1;for(let $=0;$0&&(p=m.slice(0,T))}p||(f=d||void 0)}if(s)return!0;const k=!!i.env.__markstreamFinal;let w=n+1,v=!1;for(;w<=o;){const I=i.bMarks[w]+i.tShift[w],T=i.eMarks[w];if(i.src.slice(I,T).trim()===":::"){v=!0;break}w++}v||(w=o);const y=i.push("vmr_container_open","div",1);if(y.attrSet("class",`vmr-container vmr-container-${c}`),y.map=[n,v?w:o],y.meta={...y.meta??{},unclosed:!v&&!k},f&&y.attrSet("data-args",f),p)try{const I=JSON.parse(p);for(const[T,$]of Object.entries(I)){const F=$!=null&&typeof $=="object";y.attrSet(`data-${T}`,F?JSON.stringify($):String($))}}catch{const I=mse(p);if(I)for(const[T,$]of Object.entries(I)){const F=$!=null&&typeof $=="object";y.attrSet(`data-${T}`,F?JSON.stringify($):String($))}else y.attrSet("data-attrs",p)}const b=[];for(let I=n+1;II.trim().length>0)){let I=b.join(` -`);I.endsWith(` -`)||(I+=` -`),I.endsWith(` - -`)||(I+=` -`);const T=i.tokens[i.tokens.length-1];T&&(T.raw=I);const $=[];i.md.block.parse(I,i.md,i.env,$),C9($,n+1,n+1+b.length),i.tokens.push(...$)}const S=i.push("vmr_container_close","div",-1);return v||(S.hidden=!0,S.map=[o,o]),i.line=v?w+1:w,!0},{alt:["paragraph","reference","blockquote","list"]})}function Tr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oo(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function y0(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const vse=/^[a-z][a-z0-9_-]*$/;function k3(e){return vse.test(String(e??"").trim().toLowerCase())}function ur(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return k3(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":k3(s)?s:""}function Xu(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=ur(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function yse(...e){const t=new Set,n=[];for(const o of e)for(const s of Xu(o))t.has(s)||(t.add(s),n.push(s));return n}function kse(e){const t=Xu(e);return{key:t.join(","),tags:t}}function A9(e){return ur(e)}function bse(e,t){const n=String(e??""),o=ur(t);if(!o)return!1;const s=Tr(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function M9(e,t){const n=ur(t);return!!n&&!zp.has(n)&&!bse(e,n)}function wse(e,t){const n=String(e??""),o=ur(t);if(!o)return n;const s=Tr(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),r=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(r,"")}const E9=Na,xse=zp,T9=new Set(k9);T9.delete("details");const _se=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Sse=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,_b=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Cse=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function s1(e){return(e.match(_b)?.[1]??"").toLowerCase()}function $w(e){return/^\s*<\s*\//.test(e)}function Nw(e,t){return E9.has(t)||/\/\s*>\s*$/.test(e)}function Ase(e,t){let n=0;for(let o=0;o0&&n--;continue}Nw(s,i)||n++}}return n}function b3(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${Tr(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const r=i[0]??"",l=!!i[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:i.index,end:i.index+r.length};s--;continue}a||s++}return null}function Ese(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${Tr(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(i);if(r){o>0&&o--;continue}l||o++}return o}function i1(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Tse(e){const t=e;return t.meta||(t.meta={}),t.meta}function wy(e,t,n){const o=Tse(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function Ise(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${Tr(p)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=p=>p?n.some(h=>h.test(p)):!1,r=p=>{if(!(!p||!o.length))for(const h of o)h.raw+=p,h.inner+=p},l=()=>{!o.length||!s||(r(` -`),s=!1)},a=p=>{r(p)},u=p=>{for(let m=0;m{const h=o[o.length-1]?.tag;if(!h)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${Tr(h)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!c(p),f=(p,h,m)=>{const k=m??(p.type==="html_inline"?s1(h):"");if(!(k&&t.has(k))){r(h);return}const w=$w(h),v=!w&&Nw(h,k);if(w){if(!o.length||o[o.length-1].tag!==k){r(h);return}u(h);return}if(r(h),v){wy(p,h,"");return}o.push({tag:k,token:p,raw:h,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const h=String(p.content??"");if(d(h)?s=!1:l(),!o.length&&!i(h)){s=!1;continue}let m=0,k=!0;for(const w of p.children){const v=i1(w),y=w.type==="html_inline"?s1(v):"",b=y&&t.has(y);let S=v;if(k&&h&&v&&(o.length||b)){const I=h.indexOf(v,m);if(I!==-1)a(h.slice(m,I)),S=h.slice(I,I+v.length),m=I+v.length;else{if(o.length&&!b)continue;k=!1}}f(w,S,y)}k&&h&&m0;continue}if(o.length&&typeof p.content=="string"){const h=i1(p),m=p.type==="html_block"?c(h):null;if(m){u(`${s?` -`:""}${m}`),s=o.length>0;continue}if(!p.content)continue;l(),r(p.content),s=!0}}for(const p of o)wy(p.token,p.raw,p.inner)}function $se(e){return/^\s*<\s*[!?]/.test(e)}function Nse(e){const t=new Set(xse);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function w3(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Lse(e,t){let n=null;for(const i of e.matchAll(_se)){const r=i.index??-1;if(r<0)continue;const l=(i[1]??"").toLowerCase();w3(l,t)&&Oo(e.slice(r))===-1&&(!n||r")&&(!n||i")&&(!n||i{const p=f,h=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const y of m){const b=ur(String(y??""));b&&h.add(b)}const k=Nse(Array.from(h)),w=new Set(Rse);for(const y of h)w.add(y);return{autoCloseInlineTagSet:w,commonHtmlTags:k,customTagSet:h,shouldMergeHtmlBlockTag:y=>h.has(y)||!k.has(y)||T9.has(y)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},i=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,p)=>{const h=r(f);if(!/\S/.test(h))return[];if(l(h))return[{type:"code_block",content:a(h),raw:h}];const m=h.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const k={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},k,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[k]},c=(f,p,h)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":h,d=(f,p)=>{const h=r(p);return!/\S/.test(h)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${h}`,f.children.push({type:"text",content:h,raw:h}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:h,customTagSet:m}=o(f);for(const k of p){const w=k;if(w.type!=="inline"||!Array.isArray(w.children))continue;const v=String(w.content??""),y=w.children.length?w.children:v.includes("<")?[{type:"text",content:v,raw:v}]:null;if(y)try{const b=Ose(y,h);if(w.children=b.children,b.pendingBuffer){const S=v.lastIndexOf(b.pendingBuffer);if(S!==-1){const I=v.slice(0,S);w.content=I,typeof w.raw=="string"&&(w.raw=I)}}}catch(b){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",b)}}Ise(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:h,customTagSet:m,shouldMergeHtmlBlockTag:k}=o(f),w=[];for(let v=0;v0){const[S,I]=w[w.length-1];if(v!==I){if(y.type==="paragraph_open"||y.type==="paragraph_close"){p.splice(v,1),v--;continue}const T=String(y.content??y.raw??"");if(T){const $=p[I],F=`${String($.content||"")} -${T}`,R=Oo(F),P=R===-1?null:b3(F,S,R+1);if(P){const M=F.slice(0,P.end),D=F.slice(P.end);$.content=M,$.loading=!1,p.splice(v,1),w.pop();const B=d($,D)?[]:u(D,c(p,v,"paragraph"));B.length&&p.splice(v,0,...B),v--;continue}$.content=F,$.loading!==!1&&($.loading=!0)}p.splice(v,1),v--;continue}}const b=s(y);if(b){if($se(b))continue;const S=(b.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),I=/^\s*<\s*\//.test(b);if(!S||!k(S))continue;if(i(y,b),!I)S&&!new RegExp(`^\\s*<\\s*${S}\\b[^>]*\\/\\s*>`,"i").test(b)&&Ese(b,S)>0&&w.push([S,v]);else if(w.length>0&&S&&w[w.length-1][0]===S){const[,T]=w[w.length-1],$=p[T];$.content=`${String($.content||"")} -${b}`,$.loading=!1,w.pop(),p.splice(v,1),v--}continue}else if(w.length>0){if(y.type==="paragraph_open"||y.type==="paragraph_close"){p.splice(v,1),v--;continue}const S=y.content||"",I=new RegExp(`<\\s*\\/\\s*${w[w.length-1][0]}\\s*>`,"i").test(S);if(S){const[,T]=w[w.length-1],$=p[T];$.content=`${$.content||""} -${S}`,$.loading!==!1&&($.loading=!I)}I&&w.pop(),p.splice(v,1),v--}else continue}if(m.size>0){const v=new Map,y=new Map,b=T=>{let $=v.get(T);return $||($=new RegExp(`<\\s*${T}\\b`,"i"),v.set(T,$)),$},S=T=>{let $=y.get(T);return $||($=new RegExp(`<\\s*\\/\\s*${T}\\s*>`,"i"),y.set(T,$)),$},I=[];for(let T=0;T0){const P=I[I.length-1],M=p[P.index],D=$.type==="html_block"?S(P.tag).exec(F):null;if(D){const A=D.index+D[0].length,L=F.slice(0,A),W=F.slice(A);M.content=`${String(M.content??"")} -${L}`,Array.isArray(M.children)&&M.children.push({type:"html_inline",content:``,raw:``}),I.pop();const j=d(M,W)?[]:u(W,c(p,T,"paragraph"));j.length?p.splice(T,1,...j):(p.splice(T,1),T--);continue}if($.type!=="inline")continue;const B=Array.isArray($.children)?$.children:[],z=Ase(B,P.tag);if(z!==-1){const A=B.slice(0,z+1),L=B.slice(z+1),W=A.map(j=>String(j?.content??j?.raw??"")).join("");if(M.content=`${String(M.content??"")} -${W}`,Array.isArray(M.children)&&M.children.push(...A),L.length){const j=L.map(re=>String(re.content??re.raw??"")).join("");if(j.trim()){const re=j.replace(/^\s+/,"");if(d(M,j))p.splice(T,1),T--;else if(re.startsWith("<"))p.splice(T,1,{type:"html_block",content:re});else{const Q=u(j,c(p,T,"paragraph"));p.splice(T,1,...Q)}}else p.splice(T,1),T--}else p.splice(T,1),T--;I.pop();continue}M.content=`${String(M.content??"")} -${F}`,Array.isArray(M.children)&&M.children.push(...B),p.splice(T,1),T--;continue}if($.type!=="inline")continue;const R=Array.isArray($.children)?$.children:[];for(const P of m)if((R.length?Mse(R,P):b(P).test(F)&&!S(P).test(F)?1:0)>0){I.push({tag:P,index:T});break}}}{let v=0;for(let y=0;y0?v--:(p.splice(y,1),y--))}}for(let v=0;v/]+)/)?.[1]??"").toLowerCase();if($.startsWith("!")||$.startsWith("?")){y.loading=!1;continue}if(m.has($)){const z=String(y.content??""),A=Oo(z),L=A===-1?null:b3(z,$,A+1);y.loading=L?!1:y.loading!==void 0?y.loading:!0;const W=L?.start??-1,j=L?L.end-L.start:0;if(W!==-1){const re=z.slice(0,W+j);let Q="";A!==-1&&A]+)))?/g;let R;for(;(R=F.exec(y.content||""))!==null;)R[1],R[2]||R[3]||R[4];const P=String(y.content??""),M=new RegExp(`<\\/\\s*${$}\\s*>`,"i").exec(P),D=M?M.index:-1,B=M?M[0].length:0;if(D!==-1){const z=P.slice(0,D+B),A=(P.slice(D+B)||"").replace(/^\s+/,"");y.children=[{type:"html_block",content:z,tag:$,loading:!1}],y.content=z,y.raw=z,A&&p.splice(v+1,0,A.startsWith("<")?{type:"html_block",content:A}:{type:"text",content:A,raw:A})}else y.children=[{type:"html_block",content:y.content,tag:$,loading:!0}];continue}if(!y||y.type!=="inline")continue;if(y.children.length===2&&y.children[0].type==="html_inline"){const $=(y.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),F=y.children[1],R=String(F?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(F?.type==="html_inline"&&R===$)continue;h.has($)?(y.children[0].loading=!0,y.children[0].tag=$,y.children.push({type:"html_inline",tag:$,loading:!0,content:``})):y.children=[{type:"html_block",loading:!0,tag:$,content:String(y.children[0]?.content??"")+String(y.children[1]?.content??"")}];continue}else if(y.children.length===3&&y.children[0].type==="html_inline"&&y.children[2].type==="html_inline"){const $=(y.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(h.has($))continue;y.children=[{type:"html_block",loading:!1,tag:$,content:y.children.map(F=>F.content).join("")}];continue}if(!y.content?.startsWith("<")||y.children?.length!==1)continue;const b=String(y.content),S=y,I=S.children[0];if(I?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(b)&&(S.children.length=0);continue}const T=String(I.content??b).match(Cse)?.[1]?.toLowerCase()??"";if(T){if(/\/\s*>\s*$/.test(b)||E9.has(T)){S.children=[{type:"html_inline",content:b}];continue}S.children.length=0}}})}function Dse(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Bse(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(l.length===1&&!Dse(l[0]??"")){const a=l[0]??"",u=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:u},{type:"inline",tag:"",nesting:0,level:u,content:a,children:[{type:"text",content:a,level:u+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:u}),s+=2}}})}const I9=/\.([a-z0-9]{1,15})$/i,zse=/[_()[\]{}<>]/u,Wse=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Hse=/[?#@]/u,jse=/[\\/]/u,Use=/^[\p{L}\p{N}./\\-]+$/u,Vse=/^[A-Za-z0-9-]{1,63}$/u,qse=/^xn--[a-z0-9-]{2,59}$/i,Kse=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Gse=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Zse=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,Yse=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Jse=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,Xse=2e3,Qse=512,eie={},tie=new Set(["ai","md","py","rs","sh","zip"]),$9=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),nie=new Set([...$9,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),oie=new Set(["com","dev","io","page","site"]),sie=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),iie=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),Au=new Map;function x3(e,t){if(!e||e.length>Qse)return t;for(Au.set(e,t);Au.size>Xse;){const n=Au.keys().next().value;if(!n)break;Au.delete(n)}return t}function Wp(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function xy(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Wp(n)?n:void 0}function _3(e,t){if(!Wp(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function S3(e){const t=ch(e);return Wp(t)?t:void 0}function rie(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function C3(e,t){if(!Wp(t))return;const n=String(e??"").trim().split(/\s+/u).map(rie).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>r1(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>r1(s,{marketTicker:!0}))&&(o.marketTicker=!0),Wp(o)?o:void 0}function Ha(e,t=!1){let n;return{options(o){return t||o==null?_3(e,n):_3(e,xy(S3(o),C3(o,n)))},remember(o){const s=S3(o);n=t?xy(n,s):xy(s,C3(o,n))},reset(){n=void 0}}}function A3(e){return Vse.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function lie(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return A3(n)||qse.test(n)?t.every(A3):!1}function N9(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function aie(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function uie(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function L9(e,t,n){const o=aie(t);return N9(e)&&uie(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function cie(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function ch(e){const t=String(e??""),n=Au.get(t);return n?(Au.delete(t),Au.set(t,n),n):cie(t)?x3(t,{explicitFilename:Zse.test(t),filename:Yse.test(t),marketTicker:Jse.test(t)}):x3(t,eie)}function die(e){return lie(e.split(/[\\/]/)[0]??"")}function fie(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function pie(e){if(zse.test(e)||!Use.test(e))return!0;if(jse.test(e))return!die(e);const t=e.replace(I9,"");return N9(t)?!0:t.split(".").filter(Boolean).some(fie)}function hie(e,t,n){if(!(n?nie:$9).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Gse:Kse).test(o)}function r1(e,t={}){if(!e||Wse.test(e)||Hse.test(e))return!1;const n=e.match(I9);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return hie(e,o,t.marketTicker===!0)?!0:iie.has(o)?!tie.has(o)||t.filename?!0:pie(e):!!(t.explicitFilename&&oie.has(o)||t.filename&&sie.has(o))}const M3=["!"];function pi(e){return{type:"text",content:e,raw:e}}function au(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function uu(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function ta(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function mie(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(pi(t))}}function E3(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function vie(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function T3(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;or.type==="code_inline"),o=new Map;let s=0;for(let r=0;r0&&u?I3(u):-1;if(c!==-1&&u)for(const d of u.slice(c))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(r=a);continue}if(!(l.type!=="text"||typeof l.content!="string"))for(const a of l.content)a==="("?s++:a===")"&&s>0&&s--}const i=ch(t);for(let r=0;r<=e.length-1;r++){r<0&&(r=0);const l=e[r];if(!l)break;if(l.type==="link_open"&&(l.markup==="linkify"||l.markup==="autolink")){let a=-1;for(let u=r+1;u0){const h=I3(u);h!==-1&&(d===-1||h=m.content.length){p-=m.content.length;continue}if(p<0)break;const k=m.content[p],w=m.content.slice(0,p);let v=m.content.slice(p);for(let S=h+1;S0&&(e.splice(h+1,y),a=h+1);let b=c;if(k==="!"&&f!==-1)b=c.slice(0,f);else if(v){const S=encodeURI(v);if(S&&c.endsWith(S))b=c.slice(0,c.length-S.length);else{const I=k?encodeURI(k):"",T=I?c.indexOf(I):-1;T!==-1&&(b=c.slice(0,T))}}b!==c&&vie(l,b),v&&e.splice(a+1,0,pi(v));break}}}if(!n){if(l?.type==="em_open"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("*")){const a=e[r-1].content?.replace(/(\*+)$/,"")||"";e[r-1].content=a,l.type="strong_open",l.tag="strong",l.markup="**";for(let u=r+1;ud[0]==="href")?.[1]||"";if(e[r+3]?.type==="text"){const d=(e[r+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(c+=e[r+3]?.content?.slice(0,d)||"",e[r+3].content=""),a.push(ta(u,c,f));const p=e[r+3].content?.replace(/^\)\**/,"");p&&a.push(pi(p)),e.splice(r-4,8,...a)}else a.push({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`}),e.splice(r-4,7,...a);continue}else if(e[r-1].content==="]("&&e[r-3]?.type==="text"&&e[r-3].content?.endsWith(")"))if(e[r-2]?.type==="strong_open"){const[a,u]=e[r-3].content?.split("[**")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else if(e[r-2]?.type==="em_open"){const[a,u]=e[r-3].content?.split("[*")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else{const[a,u]=e[r-3].content?.split("[")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}}if(l.type==="link_close"&&l.nesting===-1&&e[r-2]?.type==="link_open"&&e[r+1]?.type==="text"&&e[r-1]?.type==="text"){const a=e[r-1].content||"",u=e[r-2].attrs||[],c=u.find(w=>w[0]==="href")?.[1]||"",d=u.find(w=>w[0]==="title")?.[1]||"";let f=3,p=2;const h=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(h){p+=1;const w=h[1].length;au(m,w)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let w=r+1;wk[0]==="href")?.[1];e[r+5]?.type==="text"&&e[r+5].content==="."?(f=(m||f)+e[r+5].content,e[r+5].content=""):f=m||f,p+=3}let h=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const m=(e[r+2]?.content??"").indexOf(")");h=m===-1,m===-1&&(f+=e[r+2]?.content?.slice(0,m)||"",e[r+2].content="")}a.push(ta(d,f,h)),uu(a,2),e.splice(r-2,p,...a)}if(l.type==="text"&&/\*+\[[^\]]*$/.test(l.content||"")&&e[r+1]?.type==="strong_open"&&e[r+2]?.type==="text"&&e[r+2].content==="]("&&e[r+3]?.type==="link_open"&&e[r+5]?.type==="link_close"&&e[r+6]?.type==="text"&&e[r+6].content===")"&&e[r+7]?.type==="strong_close"){const a=(l.content||"").match(/^(\*+)\[(.*)$/);if(a){const u=(a[2]||"")+a[1];let c=e[r+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!c&&e[r+4]?.type==="text"&&(c=e[r+4].content||"");const d=[];au(d,2),d.push(ta(u,c,!1)),uu(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=c+1;for(;k=0&&e[h].type==="text"&&e[h].content==="";)h--;const m=e[h];let k=c+1;for(;k{const n=t;try{const o=Nie(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function $3(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function N3(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function L3(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function F9(e,t){if(!e.startsWith("|")||e.includes(` -`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function _y(e){return F9(e)!==null}function O9(e){return/^:?-+:?$/.test(e.trim())}function Mie(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(O9)}function Eie(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Tie(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(O9)&&Eie(n)}function Iie(e){return e==="|"||e==="|:"}function $ie(e){const t=F9(e);return t!==null&&t.every(n=>!n.includes(":"))}function Nie(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const r=String(i.content??""),l=r.split(` -`)[0]??"",[a="",u="",...c]=r.split(` -`),d=!t&&!r.includes(` -`)&&/\r?\n$/.test(n)&&_y(r);if(!t&&(r.includes(` -`)&&c.length===0&&_y(a)&&Tie(u)||d)){const f=l.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>L3(h)),p=[...$3(),...f,...N3()];o.splice(s-1,3,...p)}else if(r.includes(` -`)&&c.length===0&&_y(a)&&Mie(u)){const f=l.slice(1,-1).split("|").map(h=>h.trim()).flatMap(h=>L3(h)),p=[...$3(),...f,...N3()];o.splice(s-1,3,...p)}else r.includes(` -`)&&c.length===0&&$ie(a)&&Iie(u)&&(i.content=r.slice(0,-2),i.children.splice(2,1))}return o}function Lie(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let u=t;for(;u=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const i=n[n.length-1],r=o;let l=0,a=t;for(;a=0&&e[c]==="\\";)d++,c--;if(d%2===0){if(l===0)return a;l--,a+=r.length;continue}}const u=e[a];if(u==="\\"){a+=2;continue}u===i?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var Fie=Lie;const Oie=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],l1=Oie.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),Rie=/\\[a-z]+/i,R9="(?:\\\\|\\u0008)",Pie=new RegExp(String.raw`${R9}(?:${l1})\s*\{[^}]+\}`,"i"),Die=new RegExp(String.raw`(?:${R9})?(?:${l1})\s*\{`,"i"),Bie=/\\(?:text|frac|left|right|times)/,zie=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Wie=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Hie=/[A-Z]+\s*\([^)]+\)/i,jie=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,Uie=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,Vie=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,qie={"\b":"\\b","\v":"\\v","\f":"\\f"};function Kie(e){let t="";for(const n of e)t+=qie[n]??n;return t}function ma(e){if(!e)return!1;const t=Kie(e),n=t.trim();if(Vie.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=Rie.test(t),s=Pie.test(t),i=Die.test(t),r=Bie.test(t),l=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=zie.test(t)&&!Wie.test(t),u=Hie.test(t),c=jie.test(n),d=Uie.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||r||l||a||u||c||d||f||p}const P9="__markstreamMathPluginApplied",Sb=80,D9=2e4,F3=D9+4096;function Lw(e){return!!e[P9]}function Gie(e){e[P9]=!0}const B9=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],Zie=["cdot","mathbf{","partial","mu_{"],z9=B9.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),W9="[ \r\b\f\v]",Yie=new RegExp(`([^\\\\])(${Zie.map(e=>e).join("|")})+`,"g"),Jie=/span\{([^}]+)\}/,Xie=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,Qie=/(^|[^\\])\\\r?\n/g,ere=/(^|[^\\])\\$/g,tre=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,nre=new RegExp(`(${W9})|(${z9})\\b`,"g"),O3=new Map,R3=new Map;function ore(e){if(!e)return nre;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),o=O3.get(n);if(o)return o;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${W9})|(${s})\\b`,"g");return O3.set(n,i),i}function sre(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const o=e?"__default__":n.join(""),s=R3.get(o);if(s)return s;const i=e?[l1,z9].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),l1].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return R3.set(o,r),r}const P3={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function D3(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function ire(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&tre.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function B3(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function na(e,t){const n=t?.commands??B9,o=t?.escapeExclamation??!0,s=t?.commands==null,i=ore(s?void 0:n);let r=e.replace(i,(u,c,d,f,p)=>{if(c!==void 0&&P3[c]!==void 0)return`\\${P3[c]}`;if(d&&n.includes(d)){const h=p&&typeof f=="number"?p[f-1]:void 0;return h==="\\"||h&&/\w/.test(h)?u:`\\${d}`}return u});o&&(r=ire(r));let l=r;const a=sre(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(Jie,"span\\{$1\\}").replace(Xie,"\\operatorname{span}\\{$1\\}"),l=l.replace(Qie,`$1\\\\ -`),l=l.replace(ere,"$1\\\\"),l=l.replace(Yie,"$1\\$2"),l}function z3(e){const t=e.trim();return!(!ma(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function H9(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[l]==="\\"&&l+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function Cb(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=l)break;const u=a1(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}dh(e,a)||i++,r=a+Math.max(1,t.length)}return i}function Fw(e,t,n){const o=jp(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!jp(o.slice(0,s)).trim()||dh(o,s))return-1;const i=H9(o);if(a1(i,s))return-1;const r=W3(o,t,0,s,i);if(t==="$$"){if(r%2===1)return-1}else if(r>W3(o,n,0,s,i))return-1;return s}function Hp(e){return e===" "||e===" "}function jp(e){let t=e.length;for(;t>0&&Hp(e[t-1]);)t--;return e.slice(0,t)}function H3(e){let t=0;for(let n=0;n=48&&t<=57}function lre(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function are(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function ure(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(are)}function cre(e){let t=0;if(!j3(e[t]))return!1;for(;j3(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:Hp(e[t+1])}function j9(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&Hp(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&Hp(t[1])||cre(t)||lre(t)||ure(t))}function U3(e,t){return e?t?`${e} -${t}`:e:t}function Ab(e){const t=String(e??"").trim();return t?ma(t):!1}function V3(e){let t=0;for(let n=0;nSb){p=!0;break}const m=s[h],k=Dc(m,c);if(k!==-1){const w=U3(f,m.slice(0,k));if(!Ab(w)){p=!0;break}const v=m.slice(k+c.length),y=v.trim()?`suffix:${V3(v)}`:"nosuffix";return["closed",u,o+l,d,o+h,k,V3(w),y].join(":")}if(j9(m)){p=!0;break}if(f=U3(f,m),f.length>D9){p=!0;break}}if(!p&&Ab(f))return["pending",u,o+l,d].join(":")}}return null}function Cy(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function fre(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function Ay(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function pre(e,t){Gie(e);const n=(r,l,a)=>{const u=String(l??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!u)return;const c=r.push("paragraph_open","p",1);c.map=[a,a+1];const d=r.push("inline","",0);d.content=u,d.map=[a,a+1],d.children=[],r.push("paragraph_close","p",-1)},o=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(v,y)=>{let b=y;for(;b=3&&(!b||/\s/.test(b))){const S=a.push("text","",0);return S.content=a.src.slice(a.pos,v),a.pos=v,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),h=Math.max(0,a.pos-p.length);let m=h,k=h;const w=h;for(const[v,y]of f){const b=a.src,S=H9(b),I=rre(b,c);let T=!1;v==="$$"&&m!==w&&(m=w);let $=-1,F=-1,R=0;const P=M=>{if((M==="undefined"||M==null)&&(M=""),M==="\\"){a.pos=a.pos+M.length,m=a.pos;return}if(M==="\\)"||M==="\\("){const z=a.push("text_special","",0);z.content=M==="\\)"?")":"(",z.markup=M,a.pos=a.pos+M.length,m=a.pos;return}if(!M)return;if(v==="$$"&&M.includes("$")){let z=0;for(;z0&&M[A-1]==="$"||A+10){const L=M.slice(0,D),W=a.push("text","",0);W.content=L,a.pos=a.pos+L.length,m=a.pos}const z=M.slice(D).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(z){const[,L,W]=z,j=W.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),re=j?j[1]:W,Q=j&&j[2]?j[2]:null,Y=a.push("image","img",0);Y.attrs=[["src",re],["alt",L]],Q&&Y.attrs.push(["title",Q]),Y.content=L,Y.children=[{type:"text",content:L,tag:""}],a.pos=a.pos+z[0].length,m=a.pos;const G=M.slice(D+z[0].length);G&&P(G);return}const A=a.push("text","",0);A.content=M,a.pos=a.pos+M.length,m=a.pos;return}const B=a.push("text","",0);B.content=M,a.pos=a.pos+M.length,m=a.pos};for(;!(m>=b.length);){const M=b.indexOf(v,m);if(M===-1)break;if(dh(b,M)){m=M+Math.max(1,v.length);continue}const D=a1(S,M);if(D){m=D[1];continue}const B=a1(I,M);if(B){m=B[1];continue}if(M===$&&m===F){if(R++,R>2){m=M+Math.max(1,v.length);continue}}else R=0,$=M,F=m;if(v==="("&&M>0){let G=M-1;for(;G>=0&&b[G]===" ";)G--;if(G>=0&&b[G]==="]"){m=M+v.length;continue}}if(v==="$"&&M>0&&b[M-1]==="$"){m=M+1;continue}if(v==="$"&&M=b.length);){const D=Cb(b,M);if(D===-1)break;if(D+10&&b[D-1]==="$"){M=D+1;continue}const B=Sy(b,D+1);if(B===-1)break;const z=b.slice(D+1,B),A=z.includes("`"),L=!z||!z.trim(),W=b[B+1],j=Cy(z,W),re=Ay(z);if(!A&&!L&&!j&&!re){const Q=b.slice(m,D);Q&&P(Q);const Y=a.push("math_inline","math",0);Y.content=na(z,t),Y.markup="$",Y.raw=`$${z}$`,Y.loading=!1,m=B+1,M=B+1}else P("$"),M=D+1}M{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],h=c.bMarks[l]+c.tShift[l];let m=c.src.slice(h,c.eMarks[l]).trim(),k=!1,w="",v="",y=!1,b="",S=!1;for(const[Q,Y]of p)if(m.startsWith(Q))if(Q.includes("[")){const G=Q==="\\["?m.slice(Q.length):"";if(Q==="\\["&&Dc(G,Y)===-1&&!/^\s*!\[/.test(G)&&!G.includes("`")&&ma(G)){k=!0,w=Q,v=Y;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1=0?"\\]":v,R=$>=0?$:Dc(m,v,T);if(!y&&R>w.length){const Q=m.slice(I+w.length,R),Y=c.push("math_block","math",0);Y.content=na(Q),Y.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",Y.map=[l,l+1],Y.raw=`${w}${Q}${F}`,Y.block=!0,Y.loading=!1,c.line=l+1;const G=m.slice(R+F.length);return G.trim()&&n(c,G,l),!0}let P=l,M="",D=!1,B="",z=l;const A=y?m:m===w?"":m.slice(w.length),L=!f&&w==="\\["?"]":"",W=Dc(A,v);if(W!==-1){const Q=W;M=A.slice(0,Q),B=A.slice(Q+v.length),z=y?l+1:l,D=!0,P=z}else for(A&&!y&&(M=A),P=l+1;P{const c=r,d=c.bMarks[l]+c.tShift[l],f=c.src.slice(d,c.eMarks[l]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(r,l,a,u)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function hre(e){const t=e.renderer.rules.image||function(n,o,s,i,r){const l=n,a=r;return a.renderToken?a.renderToken(l,o,s):""};e.renderer.rules.image=(n,o,s,i,r)=>{const l=n;return l[o].attrSet?.("loading","lazy"),t(l,o,s,i,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const mre=/^\s]/i,gre=/^<\/a\s*>/i;function vre(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const r=String(i.content??"");mre.test(r)&&o>0&&o--,gre.test(r)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function yre(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const r=s.filter(l=>vre(l,i));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:r}))})}function kre(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,r=e;r.__markstreamOriginalValidateLink=i,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return o(...l);const c=a.validateLink;a.validateLink=u;try{return o(...l)}finally{a.validateLink=c}}),t.at("image",(...l)=>{const a=l[0].md;if(!a)return s(...l);const u=a.validateLink;a.validateLink=i;try{return s(...l)}finally{a.validateLink=u}})}function bre(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new Yoe({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:r=>!Ou(r,{tagName:"a",attrName:"href"})}),kre(i),yre(i),(e.enableMath??!0)&&pre(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&gse(i),e.enableFixIndentedCodeBlock!==!1&&Bse(i),yie(i),xie(i),bie(i),Aie(i),hre(i),Pse(i,{customHtmlTags:e.customHtmlTags}),i}function Ru(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>Ru(n))),t}function wre(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function xre(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function _re(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function vm(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function K3(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function G3(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Are(e,t){const n=[],o=[],s=[],i=[],r=e.split(Sre),l=/\r?\n$/.test(e),a=r.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),u=p=>{const h=p;if(!q9.some(m=>h.startsWith(m)))if(h.startsWith("-")){const m=h.slice(1);s.push(G3(m,a))}else if(h.startsWith("+")){const m=h.slice(1);i.push(G3(m,a))}else{K3(n,o,s,i);const m=a&&h.startsWith(" ")?h.slice(1):h;n.push(m),o.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let p=0;p0||i.length>0)&&K3(n,o,s,i);const d=n.join(` -`),f=o.join(` -`);return{original:t&&l&&d?`${d} -`:d,updated:t&&l&&f?`${f} -`:f}}function Ow(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},o=typeof n.closed=="boolean"?n.closed:void 0,s=o===!0||o!==!1&&t,i=String(e.info??""),r=i.startsWith("diff"),l=r?(()=>{const u=i,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():i;let a=String(e.content??"");if(q3.test(a)&&(a=a.replace(q3,"")),r){const{original:u,updated:c}=Are(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t}}function Mre(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Ere(){return{type:"hardbreak",raw:`\\ -`}}function Tre(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i\s*$/.test(t)||Na.has(e)}function Ire(e){if(!e||e.length===0)return Z3();const t=Ey.get(e);if(t)return t;const n=e.map(ur).filter(Boolean);if(!n.length){const s=Z3();return Ey.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:x0({customHtmlTags:e})};return Ey.set(e,o),o}function Y9(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function $re(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function u1(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Nre(e,t,n){const o=e.slice();return u1(o,"href")||o.push(["href",t]),n!=null&&!u1(o,"title")&&o.push(["title",n]),o}function Mb(e){return e.map(Y9).join("")}function sg(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:sg(o.children)});continue}t.push(o)}return t}function Lre(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(S.toLowerCase())||(m+=S),w=!0,k=!0}const v=[],y=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let b;for(;(b=y.exec(l))!==null;){const S=b[1],I=b[2]||b[3]||b[4]||"";v.push([S,I])}if(u?.has(a)){const S=$re(e);return[{type:a,tag:a,attrs:v,content:S?S.inner:p.innerTokens.length?Mb(p.innerTokens):"",children:p.innerTokens.length?o(p.innerTokens,s,i,r):[],raw:S?.raw??m,loading:e.loading||k,autoClosed:w},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:v,content:m,children:h,raw:m,loading:k,autoClosed:w},p.nextIndex]}function J9(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>J9(t)).join(""):String(e.content??"")}function Ore(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>J9(t)).join("")}function Y3(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],r=Ore(o??e);let l="";r?l=r:i!=null&&String(i).length>0?l=String(i):o?.content!=null&&String(o.content).length>0?l=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?l=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?l=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(l=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,u=a===null?null:String(a),c=String(e.content??"");return{type:"image",src:s,alt:l,title:u,raw:c,loading:t}}function Rre(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Pre(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Bre(e,t,n){const o=e.slice();return c1(o,"href")||o.push(["href",t]),n!=null&&!c1(o,"title")&&o.push(["title",n]),o}function ym(e,t,n){const o=e[t],s=Dre(o.attrs),i=String(c1(s,"href")??""),r=c1(s,"title"),l=r==null?null:String(r),a=Bre(s,i,l);let u=t+1;const c=[];let d=!0;for(;uk.type==="strong_open")){const k=String(p.content??""),w=String(p.raw??k),v=Ru(p);v.content=k.slice(0,-2),v.raw=w.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=v}const h=Ao(f,void 0,void 0,n),m=h.map(k=>{const w=k;return"content"in k?String(w.content??""):String(w.raw??"")}).join("");return{node:{type:"link",href:i,title:l,text:m,children:h,raw:`[${m}](${i}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,Xre=/\p{P}/u,Qre=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,ele=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,tle=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,nle=/:\/\//,Eb=1,X9=2,ole=4,sle=8,Q9=16,ua=32,ig=64,zf=128,eI=256,ile=512,Wf=1024,rle=1982;function km(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function La(e){return!!e&&Yre.test(e)}function Fa(e){return!!e&&(Jre.test(e)||Xre.test(e))}function nI(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&Qre.test(e)}function oI(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&ele.test(e)}function ale(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||La(o)?!1:!(Fa(o)&&!nI(o,n)&&n&&!La(n)&&!Fa(n))}function ule(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||La(n)?!1:!(Fa(n)&&!oI(n,o)&&o&&!La(o)&&!Fa(o))}function cle(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||La(o)?!1:!(Fa(o)&&!nI(o,n)&&n&&!La(n)&&!Fa(n))}function fle(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||La(n)?!1:!(Fa(n)&&!oI(n,o)&&o&&!La(o)&&!Fa(o))}function ple(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const vle=/[\p{L}\p{N}]/u,yle=/^[\p{L}\p{N}]+$/u;function Tb(e){return e?vle.test(e):!1}function sI(e){return e?yle.test(e):!1}function ap(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function xle(e){return e?tle.test(e)||nle.test(e):!1}function _le(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ao(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=ch(t),r={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(o={...o,__linkifyDemotionContext:r});const l=o,a=[];let u=null,c=0;const d=o?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function h(){u=null}function m(ee,ne){const H=e.length===1?t:String(ne.content??""),Z=[],ye=kle(ee);if(ye!==-1){S(ee.slice(0,ye),ee.slice(0,ye));const de=ee.slice(ye);return de&&(P({type:"text",content:de,raw:de}),c--),c++,!0}if(qre.test(ee)){const de=ee.indexOf("~~");de!==-1&&Z.push({type:"strikethrough",index:de})}if(Kre.test(ee)){const de=ee.indexOf("**");de!==-1&&Z.push({type:"strong",index:de})}if(/[^*]*\*[^*]+/.test(ee)){const de=H?tI(H,0):ee.indexOf("*");if(H&&de===-1)return!1;de!==-1&&Z.push({type:"emphasis",index:de})}Z.sort((de,J)=>de.index!==J.index?de.index-J.index:de.type===J.type?0:de.type==="strong"?-1:J.type==="strong"?1:0);const fe=Z[0];if(!fe)return!1;if(fe.type==="strikethrough"){const de=fe.index,J=de>-1?ee.slice(0,de):"";if(J&&S(J,J),de===-1)return c++,!0;const ae=ee.indexOf("~~",de+2),be=ae===-1?ee.slice(de+2):ee.slice(de+2,ae),_e=ae===-1?"":ee.slice(ae+2),{node:ce}=X3([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:be,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return h(),b(ce),_e&&(P({type:"text",content:_e,raw:_e}),c--),c++,!0}if(fe.type==="strong"){const de=fe.index,J=de>-1?ee.slice(0,de):"";if(J&&S(J,J),de===-1)return c++,!0;if(t&&de===0){let ie=!1,we=0;for(;we=2)return S(ee,ee),c++,!0}}if(t&&(ee.match(/\*/g)||[]).length>lle(t))return S(ee.slice(J.length),ee.slice(J.length)),c++,!0;const ae=ap(ee,de);if(ae.len>=3){const ie=wle(ee,de+ae.len);if(ie!==-1){const we=ee.slice(de+ae.len,ie);if(ble(we)){const{node:Re}=bf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:we,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);h(),b(Re);const at=ee.slice(ie+3);return at&&(P({type:"text",content:at,raw:at}),c--),c++,!0}}}if(!dle(ee,de)){const ie=ee.slice(de,de+ae.len);S(ie,ie);const we=ee.slice(de+ae.len);return we&&(P({type:"text",content:we,raw:we}),c--),c++,!0}const be=ple(ee,de+2);let _e="",ce="";if(be.index!==-1){_e=ee.slice(de+2,be.index),ce=ee.slice(be.index+2);const ie=be.index,we=ap(ee,ie);if(ae.intraword&&we.intraword&&!sI(_e)||!_e&&ae.len>=4&&ae.intraword)return S(ee.slice(J.length),ee.slice(J.length)),c++,!0}else{if(d||be.sawInvalidClose||ae.intraword)return S(ee.slice(J.length),ee.slice(J.length)),c++,!0;_e=ee.slice(de+2),ce=""}if(!_e&&/^\*+$/.test(ce))return S(ee,ee),c++,!0;const{node:Se}=bf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:_e,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return h(),b(Se),ce&&(P({type:"text",content:ce,raw:ce}),c--),c++,!0}if(fe.type==="emphasis"){let de=fe.index;de===-1&&(de=0);const J=ee.slice(0,de);if(J&&S(J,J),!ale(ee,de)){S(ee[de],ee[de]);const ie=ee.slice(de+1);return ie&&(P({type:"text",content:ie,raw:ie}),c--),c++,!0}const ae=ap(ee,de),be=cle(H,ee,de+1),_e=be.index,ce=e[c+1];if(o?.final&&ce?.type==="em_open"&&_e!==-1&&ee.slice(de+1,_e).trim()!==ee.slice(de+1,_e)||_e===-1&&(be.sawInvalidClose||o?.final||ae.intraword||!Tb(ee[de+1])))return S(ee.slice(de),ee.slice(de)),c++,!0;const{node:Se}=vm([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:_e>-1?ee.slice(de+1,_e):ee.slice(de+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(h(),b(Se),_e!==-1&&_e{for(let Se=0;Se=0&&ce[we]==="\\";we--)ie++;if(ie%2===0)return Se}return-1})(ee);if(Z===-1)return!1;let ye=1;for(let ce=Z+1;cefe?.type==="math_inline")||!Gre.test(ee))return null;const H=ne.parseInline(ee,{__markstreamFinal:!!o?.final});if(!Array.isArray(H)||H.length===0)return null;const Z=(H.find(fe=>fe?.type==="inline")?.children??[]).filter(fe=>!(fe?.type==="text"&&String(fe.content??"")===""));if(!Z.length||!Z.some(fe=>fe?.type!=="text")||Z.length===1&&Z[0]?.type==="text"&&String(Z[0].content??"")===ee)return null;const ye=Ao(Z,ee,n,o);return ye.length?ye:null}function v(ee){h(),a.push(ee)}function y(ee){h();const ne=Ru(ee);a.push(ne)}function b(ee){v(ee)}function S(ee,ne){u?(u.content+=ee,u.raw+=ne??ee):(u={type:"text",content:String(ee??""),raw:String(ne??ee??"")},a.push(u))}function I(ee,ne){if(!ee)return;const H=Ao([{...ne,type:"text",content:ee,raw:ee}],ee,n,o);if(H.length===1&&H[0]?.type==="text"){const Z=H[0];S(String(Z.content??""),String(Z.raw??Z.content??""));return}for(const Z of H)b(Z)}function T(ee,ne){return String(ee.markup??"").startsWith(ne)}function $(ee){if(!u||ee.loading!==!0||ee.markup!=="\\(\\)")return;const ne=e[c-1];!ne||ne.type!=="text"||!T(ne,"\\(")||u.content.endsWith("(")&&(u.content=u.content.slice(0,-1),u.raw.endsWith("(")&&(u.raw=u.raw.slice(0,-1)),!u.content&&a[a.length-1]===u&&(a.pop(),u=null))}function F(ee){return ee.endsWith("](")?e[c+1]?.type==="link_open"&&e[c+1]?.markup==="linkify"&&e[c+2]?.type==="text"&&e[c+3]?.type==="link_close"&&e[c+4]?.type==="text"&&String(e[c+4]?.content??"").startsWith(")"):!1}function R(ee,ne,H=km(ee)){let Z=ee;const ye=String(ne.content??"");return(H&Eb)!==0&&Z.endsWith("\\")&&!T(ne,"\\\\")&&!ye.endsWith("\\\\")&&(Z=Z.slice(0,-1)),(H&Wf)!==0&&Z.endsWith("(")&&!T(ne,"\\(")&&!ye.endsWith("\\(")&&(Z=Z.slice(0,-1)),(H&X9)!==0&&/\*+$/.test(Z)&&!T(ne,"\\*")&&!ye.endsWith("\\*")&&(Z=Z.replace(/\*+$/,"")),Z}for(;c=0;ie--){const we=a[ie];if(we.type!=="text")break;ae=ie,be=String(we.content??"")+be}aeJ==="href")?.[1],de=String(fe??"");if(t&&de){const J=t.indexOf("](");if(J!==-1){const ae=t.indexOf(")",J+2);ae===-1?ne.loading=!0:ne.loading&&t.slice(J+2,ae).includes(de)&&(ne.loading=!1)}}L(ne)||v(ne)}function z(ee){if(ee.markup!=="linkify")return!1;const{node:ne,nextIndex:H}=ym(e,c,o);return j(ne,H)?(c=H,!0):!1}function A(ee){h(),b(zre(ee)),c++}function L(ee){if(ee.type!=="link")return!1;const ne=a[a.length-1];if(!ne||ne.type!=="text")return!1;const H=String(ne.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!H)return!1;const Z=ee,ye=String(Z.href??""),fe=String(Z.text??""),de=String(H[2]??""),J=ye.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!ye||!(fe===ye||fe===J||xle(fe)))return!1;const ae=String(H[1]??"");return ae?(ne.content=ae,ne.raw=ae):a.pop(),v({...ee,text:de,children:[{type:"text",content:de,raw:de}],raw:`[${de}](${ye}${Z.title?` "${Z.title}"`:""})`}),!0}function W(ee){if(ee.type!=="link")return!1;const ne=ee,H=String(ne.href??"");return H?j({href:H,title:ne.title==null||ne.title===""?null:String(ne.title),loading:!!ne.loading},c+1):!1}function j(ee,ne){const H=a[a.length-1];if(H?.type!=="image"||H.src||!H.loading||!String(H.raw??"").endsWith("]("))return!1;const Z=e[ne],ye=String(Z?.content??"");if(Z?.type!=="text"||!ye.startsWith(")"))return!1;a.pop(),u=null;const fe=String(H.alt??"");v({type:"image",src:ee.href,alt:fe,title:ee.title,raw:`![${fe}](${ee.href}${ee.title?` "${ee.title}"`:""})`,loading:!!ee.loading});const de=ye.slice(1),J=Ru(Z);return J.content=de,J.raw=de,p()[ne]=J,!0}function re(ee){if(ee.type!=="link")return!1;const ne=a[a.length-1],H=e[c-1];if(!ne||ne.type!=="text"||H?.type!=="text")return!1;const Z=String(ne.content??""),ye=String(H.content??"");if(!Z.endsWith("!")||!ye.endsWith("!")||T(H,"\\!"))return!1;const fe=Z.slice(0,-1);fe?(ne.content=fe,ne.raw=fe,u=ne):(a.pop(),u=null);const de=ee,J=String(de.text??de.children?.map(_e=>String(_e?.content??_e?.raw??"")).join("")??""),ae=String(de.href??""),be=de.title==null||de.title===""?null:String(de.title);return v({type:"image",src:ae,alt:J,title:be,raw:`![${J}](${ae}${be?` "${be}"`:""})`,loading:!!de.loading}),!0}function Q(ee,ne="",H=null){const Z=String(ee.alt??ee.raw??"");return{type:"link",href:ne,title:H,text:Z,children:[ee],raw:`[${Z}](${ne}${H?` "${H}"`:""})`,loading:!0}}function Y(ee){const ne=ee.startsWith("![")?ee:`![${ee}`,H=ne.slice(2),Z=H.indexOf("](");return{type:"image",src:"",alt:Z===-1?H.replace(/\]$/,""):H.slice(0,Z),title:null,raw:ne,loading:!0}}function G(ee){const ne=ee.indexOf("[![");if(ne===-1||typeof t=="string"&&e.length===1&&gle(t,ne,"["))return!1;const H=ee.slice(0,ne);return H&&S(H,H),v(Q(Y(ee.slice(ne+1)))),c++,!0}function X(ee){if(o?.final)return!1;const ne=e[c-1];if(ne?.type!=="text"||!String(ne.content??"").endsWith("[")||T(ne,"\\["))return!1;const H=a[a.length-1];if(H?.type==="text"&&H.content.endsWith("[")){const Z=H.content.slice(0,-1);Z?(H.content=Z,H.raw=Z,u=H):(a.pop(),u=null)}return v(Q(Y3(ee))),c++,!0}function te(ee){if(ee.type!=="link")return!1;const ne=ee,H=String(ne.raw??""),Z=String(ne.text??"");if(!H.startsWith("[![")&&!Z.startsWith("!["))return!1;const ye=ne.title==null||ne.title===""?null:String(ne.title);return v(Q({type:"image",src:String(ne.href??""),alt:Z.replace(/^!\[/,"").replace(/\]$/,""),title:ye,raw:H.startsWith("[![")?H.slice(1):H,loading:!0})),!0}function q(ee){if(!ee.startsWith("]("))return!1;const ne=e[c-2];if(ne?.type==="text"&&String(ne.content??"").endsWith("[")&&T(ne,"\\["))return!1;const H=a[a.length-1];if(H?.type!=="image"&&H?.type!=="link")return!1;const Z=H,ye=H?.type==="link"&&Array.isArray(Z.children)&&Z.children.length===1&&Z.children[0]?.type==="image"?a.pop():null,fe=ye?ye.children[0]:a.pop();if(!fe||fe.type!=="image")return!1;const de=e[c+1];let J=String(ye?.href??""),ae=ye?.title==null?null:String(ye.title),be=!0;if(de?.type==="link_open"){const{node:ce,nextIndex:Se}=ym(e,c+1,o);J=ce.href,ae=ce.title,be=!0,c=Se}else{if(J=ee.slice(2),J.includes('"')){const ce=J.split('"');J=String(ce[0]??"").trim(),ae=ce[1]==null?null:String(ce[1]).trim()}c++}const _e=Q(fe,J,ae);return _e.loading=be,v(_e),!0}function me(){const ee=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&ee?.type==="text"&&String(ee.content??"").endsWith("[")&&T(ee,"\\[")}function xe(ee,ne){const H=ee.indexOf("[");if(H===-1)return!1;let Z=ee.slice(0,H);const ye=ee.indexOf("](",H);if(ye!==-1){const fe=e[c+2];let de=ee.slice(H+1,ye);if(de.includes("[")){const ie=de.indexOf("[");Z+=ee.slice(0,H+ie+1);const we=H+ie+1;de=ee.slice(we+1,ye)}const J=e[c+1];if(ee.endsWith("](")&&J?.type==="link_open"&&fe){const ie=e[c+4];let we=4,Re=!0;if(ie?.type==="text"){const ft=String(ie.content??"");if(ft.startsWith(")")){Re=!1;const Mt=ft.slice(1);if(Mt){const Tt=Ru(ie);Tt.content=Mt,Tt.raw=Mt,p()[c+4]=Tt}else we++}else ft==="."&&we++}I(Z,ne);const at=String(fe.content??"");return o?.validateLink&&!o.validateLink(at)?S(de,de):v({type:"link",href:at,title:null,text:de,children:[{type:"text",content:de,raw:de}],loading:Re}),c+=we,!0}const ae=ee.indexOf(")",ye),be=ae!==-1?ee.slice(ye+2,ae):"",_e=ae===-1;let ce=Z.match(/\*+$/);if(ce&&(Z=Z.replace(/\*+$/,"")),I(Z,ne),ce||(ce=de.match(/^\*+/)),!d&&ce){const ie=ce[0].length;de=de.replace(/^\*+/,"").replace(/\*+$/,"");const we=[];if(ie===1?we.push({type:"em_open",tag:"em",nesting:1}):ie===2?we.push({type:"strong_open",tag:"strong",nesting:1}):ie===3&&(we.push({type:"strong_open",tag:"strong",nesting:1}),we.push({type:"em_open",tag:"em",nesting:1})),we.push({type:"link",href:be,title:null,text:de,children:[{type:"text",content:de,raw:de}],loading:_e}),ie===1){we.push({type:"em_close",tag:"em",nesting:-1});const{node:Re}=vm(we,0,o);b(Re)}else if(ie===2){we.push({type:"strong_close",tag:"strong",nesting:-1});const{node:Re}=bf(we,0,void 0,o);b(Re)}else if(ie===3){we.push({type:"em_close",tag:"em",nesting:-1}),we.push({type:"strong_close",tag:"strong",nesting:-1});const{node:Re}=bf(we,0,void 0,o);b(Re)}else{const{node:Re}=vm(we,0,o);b(Re)}}else o?.validateLink&&!o.validateLink(be)?S(de,de):v({type:"link",href:be,title:null,text:de,children:[{type:"text",content:de,raw:de}],loading:_e});const Se=ae!==-1?ee.slice(ae+1):"";return Se&&(P({type:"text",content:Se,raw:Se}),c--),c++,!0}return!1}function We(ee){const ne=ee.indexOf("![");if(ne===-1)return!1;const H=ee.slice(0,ne);return H&&!u?u={type:"text",content:H,raw:H}:H&&u&&(u.content+=H),u&&(a.push(u),u=null),v(Y(ee.slice(ne))),c++,!0}function he(ee){if(!(ee?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ne=ee.slice(1).match(/[^\s\]]/);if(ne===null)return c++,!0;if(ne&&/x/i.test(ne[0])){const H=ne[0]==="x"||ne[0]==="X";return v({type:"checkbox_input",checked:H,raw:H?"[x]":"[ ]"}),c++,!0}return!1}return a}function Pw(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function Q3(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` -`&&r++,{startLine:i,endLine:r}}function Up(e,t,n,o){const s=Sle(e,t,n);return Pw(s.startLine,s.endLine,o)}function Cle(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:Pw(o,s,t)}function Pn(e,t,n){if(!n?.includeSourceMap)return e;const o=Cle(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function Ale(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(i)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=Pw(i,Math.max(r,l),o)),e}function Mle(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),r=i.replace(/[ \t\r\n]+$/g,"");if(r===i)break;if(r){s.content=r;break}o.pop();continue}break}}function Ele(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const r=i.replace(/[ \t\r\n\d.)]+$/g,"");r!==i&&(r?s.content=r:o.pop())}break}}function Tle(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Dd(e,t,n){const o=e[t],s=[],i=Ha(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&Pn(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(u=>u[0]==="start");if(a){const u=Number(a[1]);return Number.isFinite(u)&&u!==0?u:1}}})(),items:s,raw:s.map(a=>a.raw).join(` -`)};return n?.includeSourceMap&&Pn(l,o,n),[l,r+1]}function Ile(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=Ha(o,!0);let a=t+1;for(;au.raw).join(` -`)} -:::`},a+1]}const $le=new Set(["warning","info","note","tip","danger","caution"]);function Nle(e){let t=0;for(;t=0;m--){const k=f[m];if(k.type==="text"&&/:+/.test(k.content)){p=m;break}}const h={type:"paragraph",children:Ao((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Pn(h,e[u],n),l.push(h),a.remember(h.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Dd(e,u,a.options());n?.includeSourceMap&&Pn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Bd(e,u,a.options());n?.includeSourceMap&&Pn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=k0(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:i,children:l,raw:`:::${s} ${i} -${l.map(d=>d.raw).join(` -`)} -:::`},u+1]}const Fle=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Ole(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Fle.exec(String(o.info??""));return s?Ile(e,t,s,n):null}const Dw={parseContainer:(e,t,n)=>Lle(e,t,n),matchAdmonition:Ole};function Bd(e,t,n){const o=[],s=Ha(n,!0);let i=t+1;for(;il.raw).join(` -`)};return n?.includeSourceMap&&Pn(r,e[t],n),[r,i+1]}function Rle(e){if(e.info?.startsWith("diff"))return Ow(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function Ple(e,t,n){const o=[];let s=t+1,i=[],r=[];const l=Ha(n,!0);for(;su.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a0&&(o.push({type:"definition_item",term:i,definition:r,raw:`${i.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` -`)}`}),i=[]),s=a+1}else s++;return[{type:"definition_list",items:o,raw:o.map(a=>a.raw).join(` -`)},s+1]}function Dle(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],r=Ha(n,!0);let l=t+1;for(;la.raw).join(` -`)}`},l+1]}function Ble(e,t,n){const o=e[t],s=o.attrs,i=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(c=>Array.isArray(c)&&c.length>=1&&c[0]).map(([c,d])=>[String(c),d==null||d===""?!0:String(d)])):void 0,r=String(o.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...i?{attrs:i}:{},children:Ao(a.children||[],u,void 0,n),raw:u}}function zle(e,t,n){const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function iI(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!k.includes(">");else if(u)u=!k.includes("?>");else if(k.startsWith("");else if(k.startsWith("");else if(k.startsWith("");else{const w=s(k);if(w)if(w.closing){for(let v=r.length-1;v>=0;v--)if(r[v]===w.tag){r.length=v;break}}else w.selfClosing||i(w.after,w.tag)||r.push(w.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function _ae(e,t,n){if(!n?.length)return!1;const o=new Set(Xu(n));if(!o.size)return!1;const s=c=>{const d=c.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||c==="_"||c==="-"||c===":"},i=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const k=c.indexOf(">",d);if(k===-1)return null;let w=k-1;for(;w>=0&&i(c[w]);)w--;return{closing:f,tag:h,selfClosing:!f&&c[w]==="/",after:c.slice(k+1)}},l=(c,d)=>{const f=c.toLowerCase();let p=0;for(;p")return!0}}return!1},a=[];let u=0;for(;u=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,h=zd(p);if(h){const m=r(p.slice(h.index));if(m)if(m.closing){for(let k=a.length-1;k>=0;k--)if(a[k]===m.tag){a.length=k;break}}else m.selfClosing||l(m.after,m.tag)||a.push(m.tag)}if(c===-1||c>=t)break;u=c+1}return a.length>0}function Sae(e,t){const n=nae.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` -`,s),r=e.slice(s,i===-1?e.length:i);return!zd(r.endsWith("\r")?r.slice(0,-1):r)||wae(e,s)||xae(e,s)||_ae(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function gI(e,t,n){let o=t;for(;oo&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!wf(e,l)){o!=null&&s&&n+i+2>o&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!wf(e,l)){const a=gI(e,i,"`"),u=Cae(e,i+a,a);if(u===-1)break;i=u+a;continue}if(e.startsWith("\\[",i)&&!wf(e,l)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!wf(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return r}function Aae(e,t){if(!Lw(t))return e;const n=t,o=sA.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?vI(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:w0(e).state;sA.set(n,{source:e,state:s});const{context:i}=s,r=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(r==null)return e;const l=e.slice(r+2),a=e.lastIndexOf(` -`,r-1)+1;if(e.slice(a,r).trim()!==""&&!/^\r?\n/.test(l)||/^\s*!\[/.test(l))return e;const u=l.trim(),c=/^(?:[a-z]|pi)$/i.test(u);return ma(l)&&!c?e:e.slice(0,r)}function Mae(e,t,n,o,s){const i=Ww(e),r=Hw(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&jw(e)==null&&Fy(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(l.rest)&&Fy(t):(t.inFence=!0,t.fenceChar=l.markerChar,t.fenceLen=l.markerLen,t.fenceInBlockquote=l.inBlockquote,t.fenceInList=l.inList||t.listContentIndent!=null&&!l.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return aA(e,t,n,o,s)}else return aA(e,t,n,o,s);return!1}function w0(e,t=gae(),n=null,o=!1,s=0){const i=up(t);let r=up(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,p=e.slice(u,f);Mae(p,i,s+u,n,o)&&(a=!0),d?(r=up(i),l=""):l=p,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:i,lineBuffer:l}}}function vI(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:up(e.committedContext),context:up(e.context),lineBuffer:e.lineBuffer+t}}:w0(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Eae(e,t){if(!Lw(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=b0.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,r=i&&s?t.slice(s.source.length):"",l=i&&s?vI(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):w0(t),a=l.state,u=i&&s?l.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!u&&!bae(s.source,r)&&!yae(t)){s.source=t,s.explicitBracketMath=a;return}const c=dre(t);(s&&(s&&!i||s.key!==c||u)||!s&&c)&&n.reset(),vae(e,t,c,a)}function Tae(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function Iae(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function Oy(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&Iae(e,t)}function uA(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function $ae(e){for(let t=0;t+5":""}function dA(e){return{type:"paragraph",children:e,raw:e.map(Fae).join("")}}function fA(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function pA(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=dae(t);if(!s?.size)return null;let i=-1;for(let c=0;cp?.type==="hardbreak")){i=c;break}}if(i===-1)return null;const r=o.slice(0,i),l=o[i];if(!l)return null;const a=[];r.length&&a.push(dA(r)),a.push(l);const u=o.slice(i+1);return u.length&&a.push(dA(u)),a}function Oae(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function cp(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Rae(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${Tr(t)}\s*>\s*$`,"i").test(n)}const Ry=new Set(["iframe","script","style","textarea","title"]);function fh(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:y===-1?e.length:y+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:y===-1?e.length:y+3,selfClosing:!1,tag:""}}const p=Oo(e.slice(f));if(p===-1)return null;const h=f+p+1,m=e.slice(f,h);if(/^<\s*[!?]/.test(m))return{closing:!1,end:h,selfClosing:!1,tag:""};let k=m.slice(1).trimStart();const w=k.startsWith("/");w&&(k=k.slice(1).trimStart());const v=k.match(/^([A-Z][\w:-]*)/i);return v?.[1]?{closing:w,end:h,selfClosing:/\/\s*>$/.test(m),tag:v[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,p)=>{const h=new RegExp(String.raw`<\s*\/\s*${Tr(f)}(?=\s|>)`,"gi");h.lastIndex=p;const m=h.exec(e);if(!m||m.index==null)return null;const k=s(m.index);return k?{start:m.index,end:k.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(Ry.has(o)){const f=i(o,l+1);return f?{raw:e.slice(r,f.end),start:r,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(r),start:r,end:e.length,closed:!1}}let c=1,d=l+1;for(;d]*$/,"")} -`}function hA(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Bae(e,t,n){return n?e.includes(n,t)?!0:hA(e.slice(Math.max(0,t))).includes(hA(n)):!1}function zae(e,t){let n=Math.max(0,t);for(;n)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function kI(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Hae=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),jae=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function Uae(e){return/\n\s*\n/.test(e)||jae.test(e)}function Vae(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Hae.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!Uae(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function qae(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=fh(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Kae(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,r=oA.get(i),l=r&&r.final===o&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:dd(u,t,n));return oA.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Gae(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,r=String(i.tag??"").toLowerCase();if(!r||r==="details"||w9.has(r)||Array.isArray(i.children))return s;const l=String(s.raw??i.content??"");if(!l)return s;const a=Oo(l);if(a===-1)return s;const u=fh(l,r,0),c=u?.closeStart??-1,d=u?.closed===!0&&c>=a+1,f=d?l.slice(a+1,c):l.slice(a+1);if(!f.trim())return s;const p=kI(n,o),h=d?null:qae(f),m=h?Kae(h,t,p,o):dd(f,t,p);return Vae(f,m)?{...s,children:m}:s})}function Zae(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function dd(e,t,n){return e.trim()?wI(e,t,{...n,__disableStreamParse:!0}):[]}function Yae(e,t,n){const o=dd(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Jae(e,t,n){const o=iI({content:e}),s=Oo(e),i=yI(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const r=Yae(e.slice(s+1,i),t,n);r.length>0&&(o.children=r)}return o.raw=e,o}function Xae(e,t,n){const o=Oo(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=fh(s,"summary",0);if(!i)return dd(s,t,n);const r=s.slice(0,i.start),l=s.slice(i.end);return[...dd(r,t,n),Jae(i.raw,t,n),...dd(l,t,n)]}function bI(e,t,n,o,s,i=0){const r=[];let l=i;for(let a=0;a{const re=yI(f,"details");return re!==-1?f.slice(0,re):f})():f,[y]=bI(w?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,p+f.length),b=Xae(v,n,kI(o,s)),S=m===-1?"":String(e[m].raw??cp(e[m])??""),I=w||m!==-1&&k?.closed===!0,T=S.replace(/[\t\r\n ]+$/,""),$=I?(()=>{const re=(k?.raw??"").lastIndexOf(T);return re===-1?t.length:p+re})():t.length,F=Oo(f),R=w&&F!==-1?p+F+1:p+f.length,P=t.slice(R,$===-1?t.length:$),M=n.parse(P,{__markstreamFinal:s}),D=n.renderer.render(M,n.options,{__markstreamFinal:s}),B=$+T.length,z=I?Math.max($+S.length,zae(t,B)):t.length,A=I?t.slice($,z):S,L=I?t.slice(p,z):t.slice(p),W=w&&F!==-1?f.slice(0,F+1):f,j={...u,tag:"details",attrs:y0(f.slice(0,F+1)),raw:L,content:`${W}${D}${A}`,children:[...b,...y],loading:!s&&!I};if(o.includeSourceMap&&(j.sourceMap=Up(t,p,I?z:t.length,o)),r.push(j),l=I?z:t.length,m===-1&&!w)break;m!==-1&&(a=m)}return[r,l]}function Qae(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let r=0;r=d.start&&F.end<=d.end){s.splice(I,1);continue}break}S=$+T.length,s.splice(I,1)}}return s}function eue(e){const t=l=>l===" "||l===" "||l===` -`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a{const k=m.charCodeAt(0);return k>=65&&k<=90||k>=97&&k<=122},c=m=>{const k=m.charCodeAt(0);return k>=48&&k<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",p=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",h=p;if(a>=l.length||!d(l[a]))return!1;for(a++;a=l.length)return!0;if(l[a]==="/"){for(a++;a=l.length}if(!p(l[a]))return!1;for(a++;a=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a=l.length)return!0;a++}else{for(;a"||k==='"'||k==="'"||k==="`")break;a++}if(a>=l.length)return!0}}}return!0},o=(l,a)=>{let u=!1,c="",d=0;const f=v=>v===" "||v===" ",p=v=>{let y=0;for(;y{let y=0;for(;y";)for(b=!0,y++;y{const y=p(v);if(y)return y;const b=h(v);return b==null?null:p(b)};let k=0;const w=l.split(/\r?\n/);for(const v of w){const y=k,b=k+v.length;if(a=d&&/^\s*$/.test(S.rest)&&(u=!1,c="",d=0):(u=!0,c=I,d=T)}if(a<=b)break;k=b+1}return u},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const l=s[i-1],a=l===" "||l===" "||l===` -`||l==="\r",u=s[i-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(i);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` -`||r[1]==="\r")||!n(r)?s:s.slice(0,i)}function gA(e,t){if(e===t)return;const n=e.split(/\r?\n/),o=t.split(/\r?\n/),s=[];let i=0;for(let r=0;r{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(lString(h??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=h=>h===" "||h===" ",s=h=>{const m=h.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||h==="_"||h==="-"||h===":"},i=h=>{if(!h)return!1;if(h[0]===" ")return!0;let m=0;for(let k=0;k=4)return!0;continue}if(w===" ")return!0;break}return!1},r=h=>{let m=!1,k=!1;for(let w=0;w")return w}return-1},l=h=>{let m=0;for(;m{if(i(h))return-1;const k=h.replace(/^[ \t]+/,"");if(!k||k.startsWith(">")||k.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(k))return-1;let w=!1,v=0;for(;v=S.length){w=!0,v++;continue}const T=S[I];if(T==="!"||T==="?"){w=!0,v+=b+1;continue}if(T==="/"){w=!0,v+=b+1;continue}const $=I;for(;I"&&R!=="/"){w=!0,v++;continue}const P=new RegExp(String.raw`<\s*\/\s*${F}\s*>`,"i"),M=/\/\s*>$/.test(S),D=P.test(h.slice(v+b+1)),B=P.test(e.slice(m+v+b+1)),z=/[\r\n]/.test(e.slice(m+v+b+1));if(w&&n.has(F)&&!M&&!D&&(B||z))return v;w=!0,v+=b+1}return-1};let u=!1,c="",d=0,f="",p=0;for(;pp&&e[h-1]==="\r",w=m?k?h-1:h:e.length,v=e.slice(p,w),y=m?k?`\r -`:` -`:"",b=l(v);let S=v;if(!u&&!b){const I=a(v,p);if(I!==-1){const T=y||` -`;S=`${v.slice(0,I).replace(/[ \t]+$/,"")}${T}${T}${v.slice(I).replace(/^[ \t]+/,"")}`}}f+=S,f+=y,b&&(u?b.markerChar===c&&b.markerLen>=d&&/^\s*$/.test(b.rest)&&(u=!1,c="",d=0):(u=!0,c=b.markerChar,d=b.markerLen)),p=m?h+1:e.length}return f}function nue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,p=!1;for(let h=0;h")return h}return-1},l=(d,f,p)=>{const h=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let k=m+1;for(;k=d.length||d[k]!=="/"){m=d.indexOf("<",m+1);continue}for(k++;kd.length){m=d.indexOf("<",m+1);continue}let w=!0;for(let y=0;y="A"&&b<="Z"?String.fromCharCode(b.charCodeAt(0)+32):b)!==h[y]){w=!1;break}}if(!w){m=d.indexOf("<",m+1);continue}let v=k+h.length;if(v")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const p=f;for(;fc&&e[d-1]==="\r",p=f?d-1:d,h=e.slice(c,p);u+=a(h),u+=f?`\r -`:` -`,c=d+1}return u}function oue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let p=0,h=!1,m=0;for(;p=f.length||f[p]!==">")break;for(h=!0,p++;p{let p=0;for(;pnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let l=!1,a="",u=0,c="",d=0;for(;dd&&e[f-1]==="\r",m=p?h?f-1:f:e.length,k=e.slice(d,m),w=p?h?`\r -`:` -`:"",v=s(k),y=v?.prefix??"",b=v?.content??k,S=i(b);S&&(l?S.markerChar===a&&S.markerLen>=u&&/^\s*$/.test(S.rest)&&(l=!1,a="",u=0):(l=!0,a=S.markerChar,u=S.markerLen));let I=b;if(!l&&I.includes("{if(P.replace(/^[\t ]+/,"").startsWith("|"))return $;const M=P.slice(0,R).replace(/^[\t ]+/,"");if(M.length>0){const D=F.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",B=M.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!D||!B||D!==B)return $}return`${F} - -`});if(y){const T=y+I.split(` -`).join(` -${y}`);c+=T}else c+=I;c+=w,d=p?f+1:e.length}return c}function sue(e,t){if(!e||!t.length)return e;const n=new Set(t.map(M=>String(M??"").toLowerCase()));if(!n.size)return e;const o=M=>M===" "||M===" ",s=M=>{if(!M)return!1;if(M[0]===" ")return!0;let D=0;for(let B=0;B=4)return!0;continue}if(z===" ")return!0;break}return!1},i=M=>{const D=M.charCodeAt(0);return D>=65&&D<=90||D>=97&&D<=122||D>=48&&D<=57||M==="_"||M==="-"||M===":"},r=M=>{let D=0;for(;D{let D=0,B=!1,z=0;for(;D=M.length||M[D]!==">")break;for(B=!0,D++;Dr(M).startsWith("<"),u=M=>{for(let D=0;D{if(s(M))return"";const D=r(M);if(!D.startsWith("<"))return"";let B=1;for(;B=D.length||D[B]==="/"||D[B]==="!"||D[B]==="?")return"";const z=B;for(;B"&&L!=="/"?"":A},d=M=>{if(s(M))return null;const D=r(M);if(!D.startsWith("<"))return null;let B=1;for(;B=D.length)return null;const z=D[B]==="/";if(z)for(B++;B"&&j!=="/")return null;if(z)return{type:"close",name:W};if(/\/\s*>\s*$/.test(D))return{type:"open",name:W,complete:!0};const re=D.indexOf(">",B);if(re!==-1){const Q=D.slice(re+1);if(new RegExp(`<\\s*\\/\\s*${W}\\s*>`,"i").test(Q))return{type:"open",name:W,complete:!0}}return{type:"open",name:W,complete:!1}},f=M=>{if(s(M))return null;const D=r(M).replace(/[ \t]+$/,"");if(!D.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(D))return null;const B=D.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(B?.[1])return B[1].toLowerCase();const z=D.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!z?.[1]||!z[2])return null;const A=z[1].toLowerCase();return A===z[2].toLowerCase()?A:null};let p=!1,h="",m=0;const k=M=>{let D=0;for(;Dk(M),v=M=>{const D=r(M);return D?s(M)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(D):!1},y=(M,D,B)=>{let z=M,A=0;for(;zz&&e[L-1]==="\r",re=W?j?L-1:L:e.length,Q=e.slice(z,re),Y=l(Q),G=Y?.key??"";if(A>0&&D&&G!==D)break;const X=Y?.content??Q,te=d(X);if(te?.name===B){if(te.type==="open")te.complete||A++;else if(A>0&&(A--,A===0))return!1}else if(A>0&&(u(X)||v(X)))return!0;if(W)z=L+1;else break}return!1};let b="",S=0,I=!0,T=!1,$=!1,F=` -`;const R=[];let P="";for(;SS&&e[M-1]==="\r",z=D?B?M-1:M:e.length,A=e.slice(S,z),L=D?B?`\r -`:` -`:"",W=l(A),j=W?.key??"",re=W?.content??A,Q=w(re);Q&&(p?Q.markerChar===h&&Q.markerLen>=m&&/^\s*$/.test(Q.rest)&&(p=!1,h="",m=0):(p=!0,h=Q.markerChar,m=Q.markerLen));const Y=R.length>0;if(!p&&!Y){const X=c(re),te=!!X&&!I&&T&&$&&y(S,j,X);X&&!I&&(!T||te)&&(j&&P&&j===P?b+=`${j}${F}`:j||(b+=F))}if(b+=A,b+=L,L&&(F=L),!p){const X=d(re);if(X){if(X.type==="open")X.complete||R.push(X.name);else for(let te=R.length-1;te>=0;te--)if(R[te]===X.name){R.length=te;break}}}const G=u(re);I=G,T=!G&&a(re),$=!G&&!!f(re),P=j,S=D?M+1:e.length}return b}function wI(e,t,n={}){const o=uI(n),s=o?_d():0,i=!!n.final,r=(e??"").toString();let l=r.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(hae(t,n)&&(t.stream.reset(),mae(t)),i||(l.endsWith("- *")&&(l=l.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*-\s*$/,v=>v.startsWith(` -`)?` -`:""):/(?:^|\n)\s*--\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*--\s*$/,v=>v.startsWith(` -`)?` -`:""):/(?:^|\n)\s*>\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*>\s*$/,v=>v.startsWith(` -`)?` -`:""):/\n\s*[*+]\s*$/.test(l)?l=l.replace(/\n\s*[*+]\s*$/,` -`):/(?:^|\n)\s*\d+\s*$/.test(l)?/^\d+$/.test(l.trim())||(l=l.replace(/(?:^|\n)\s*\d+\s*$/,v=>v.startsWith(` -`)?` -`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(l)?l=l.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(v,y,b)=>`${y}${b.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*\d+[.)]\s*$/,v=>v.startsWith(` -`)?` -`:""):/\n[[(]\n*$/.test(l)&&(l=l.replace(/(\n\[|\n\()+\n*$/g,` -`)),l=Aae(l,t),l=Sae(l,n.customHtmlTags)??l),n.customHtmlTags?.length&&l.includes("<")){const v=Xu(n.customHtmlTags);if(v.length&&(l=tue(l,v),l=nue(l,v),l=sue(l,v),l=oue(l,v),l.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");l=l.replace(b,"$1$2$2")}}i||(l=eue(l));const a=Oae(l);if(a){if(n.includeSourceMap){const b={...n,__sourceLineMapper:gA(r,l)};a[0].sourceMap=Up(l,0,l.length,b)}const v=n.preTransformTokens,y=n.postTransformTokens;if(zw(t,n)||typeof v=="function"||typeof y=="function"){const b=cA(t,l,{__markstreamFinal:i},n),S=typeof v=="function"&&v(b)||b;typeof y=="function"&&y(S)}return iA(a,n,o,s)}const u=cA(t,l,{__markstreamFinal:i},n);if(!u||!Array.isArray(u))return iA([],n,o,s);const c=n.preTransformTokens,d=n.postTransformTokens;let f=u;c&&typeof c=="function"&&(f=c(f)||f);const p=t,h=typeof p.validateLink=="function"&&p.__markstreamOriginalValidateLink&&p.validateLink!==p.__markstreamOriginalValidateLink?p.validateLink:void 0,m=n.validateLink??h??p.options?.validateLink??(typeof p.validateLink=="function"?p.validateLink:void 0),k={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?gA(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let w=cae(t,l,f,k,o);if(d&&typeof d=="function"){const v=d(f);if(Array.isArray(v)){const y=v[0],b=y?.type;y&&typeof b=="string"?w=rg(v,{...k,__customHtmlBlockCursor:0},o):w=v}}if(Zae(w)&&(w=Qae(w,i,l,k),w=bI(w,l,t,k,i)[0],w=Gae(w,t,k,i)),i){const v=new WeakSet,y=b=>{if(!b||typeof b!="object"||v.has(b))return;if(v.add(b),Array.isArray(b)){for(const I of b)y(I);return}const S=b;S.type==="html_block"&&S.loading===!0&&(S.loading=!1);for(const I of Object.values(S))y(I)};y(w)}return w=dI(w,n),n.debug&&console.log("Parsed Markdown Tree Structure:",w),cI(w,o,s)}function vA(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=Ha(t),s=t?.includeSourceMap===!0;let i=0;for(;ic.type==="html_block")){if(s)for(const c of u)Pn(c,l,t);for(const c of u)zr(c,l,t);n.push(...u)}else{const c={type:"paragraph",raw:a,children:u};s&&Pn(c,l,t);const d=pA(c,t);if(d){s&&fA(d,c);for(const f of d)zr(f,l,t);n.push(...d)}else zr(c,l,t),n.push(c)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const iue=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,rue=new Set([...uh,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),lue=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function yA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function aue(e){return typeof e=="string"?e:e==null?"":String(e)}function xI(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function ga(e){return aue(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function _I(e){return ga(e).replace(/`/g,"`")}function _0(e){return String(e??"").trim().toLowerCase()}function Uw(e,t="safe"){const n=_0(e);return n?t==="escape"?!0:t==="trusted"?uh.has(n):!lue.has(n):!1}function SI(e,t="safe"){const n=_0(e);return n?t==="escape"?!0:t==="trusted"?uh.has(n):rue.has(n):!1}function kA(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${_I(o)}"`).join("")}function CI(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(iue);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function uue(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||Ou(s,{tagName:t,attrName:"srcset"})})}function AI(e,t,n,o){return sse.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?uue(t,o):!!(ise.has(e)&&t&&Ou(t,{tagName:o,attrName:e}))}function wu(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function MI(e,t,n,o=!1){if(t!=="safe"||_0(n)!=="a")return e;const s=wu(e,"href");if(o&&(!s||!e[s])){const a=wu(e,"target"),u=wu(e,"rel");return a&&delete e[a],u&&delete e[u],e}const i=wu(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const r=wu(e,"rel"),l=new Set(String(r?e[r]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return l.add("noopener"),l.add("noreferrer"),r&&r!=="rel"&&delete e[r],e.rel=Array.from(l).join(" "),e}function bA(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!xI(r)||AI(l,i,t,n)||(o[r]=i)}return MI(o,t,n,!!wu(e,"href"))}function EI(e,t){const n=e.toLowerCase();return b9.has(n)?!1:yA(t,n)||yA(t,e)}function Vw(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!xI(r)||AI(l,i,t,n)||(o[r]=i)}return MI(o,t,n,!!wu(e,"href"))}function dp(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function lg(e,t="safe",n){const o=Vw(dp(e),t,n),s=Object.entries(o).map(([i,r])=>[i,r]);return s.length>0?s:void 0}function cue(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function due(e){const t={};for(const[n,o]of Object.entries(e))t[n]=cue(o,n);return t}function Py(e){return e.trim().length>0}function TI(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const r=e.slice(n,o);Py(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=CI(e.slice(o+1,s));if(!i){const r=e.slice(o,s+1);Py(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:i.isSelfClosing||Na.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r})}n=s+1}return t}function fue(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=CI(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:i.isSelfClosing||Na.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r}),n=s+1}return t}function pue(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${ga(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${ga(o)}`:` ${ga(o)}="${_I(s)}"`).join("");return e.type==="self_closing"?`<${ga(t)}${n} />`:`<${ga(t)}${n}>`}function hue(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of TI(e))if((n.type==="tag_open"||n.type==="self_closing")&&EI(n.tagName??"",t))return!0;return!1}function fd(e,t="safe"){if(!e)return"";if(t==="escape")return ga(e);const n=fue(e),o=[],s=[],i=[];for(const r of n){if(r.type==="text"){i.length===0&&s.push(ga(r.content??""));continue}const l=_0(r.tagName);if(!l)continue;if(SI(l,t)){r.type==="tag_open"?i.push(l):r.type==="tag_close"&&i[i.length-1]===l&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&Uw(l,t)){s.push(pue(r));continue}if(r.type==="self_closing"){s.push(`<${l}${kA(bA(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${kA(bA(r.attrs??{},t,l))}>`),Na.has(l)||o.push(l);continue}const a=o.lastIndexOf(l);if(a===-1)continue;for(;o.length>a+1;){const c=o.pop();c&&s.push(``)}const u=o.pop();u&&s.push(``)}for(;o.length>0;){const r=o.pop();r&&s.push(``)}return s.join("")}const mue=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],wA="http://www.w3.org/2000/svg",gue=new Set(["script","style","iframe","object","embed","link","meta"]),vue=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),yue=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),kue=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),bue=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function wue(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function xue(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function _ue(e){const t=e.nodeName.toLowerCase();return t==="use"?wue(e):t==="image"?xue(e):t==="text"||t==="tspan"?!!e.textContent?.trim():bue.has(t)}function Sue(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function Cue(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?Ou(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Ou(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":Ou(i,{tagName:o,attrName:s})?"":i:""}function Aue(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function $I(e){const t=II(e),n=t.toLowerCase();let o=0;for(;on.test(t))||$I(t)}function Mue(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function wm(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function NI(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!gue.has(o)){if(o==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))NI(s,t)}}function Eue(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];NI(t,n);const o=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=wm(t.getAttribute("width")),i=wm(t.getAttribute("height")),r=wm(t.getAttribute("x")),l=wm(t.getAttribute("y")),a=e.ownerDocument.createElementNS(wA,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const u=t.querySelector(".nodeLabel");if(u?.getAttribute("class")&&a.setAttribute("class",u.getAttribute("class")),o.length===1)a.textContent=o[0];else{const c=-.6*(o.length-1);for(const[d,f]of o.entries()){const p=e.ownerDocument.createElementNS(wA,"tspan");p.setAttribute("x",String(r+s/2)),p.setAttribute("dy",d===0?`${c}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function Tue(e){Eue(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!vue.has(o)){n.remove();continue}if(o==="style"&&xA(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const r=i.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(i.name);continue}if(r==="style"&&i.value&&xA(i.value)){n.removeAttribute(i.name);continue}if(r==="srcdoc"){n.removeAttribute(i.name);continue}if(yue.has(r)&&i.value){const l=Cue(o,r,i.value);if(!l){n.removeAttribute(i.name);continue}l!==i.value&&n.setAttribute(i.name,l);continue}if(kue.has(r)&&i.value&&$I(i.value)){n.removeAttribute(i.name);continue}if(i.value){const l=Sue(i.value);l!==i.value&&n.setAttribute(i.name,l)}}Mue(n)}}function vBe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return Tue(n),Iue(n)?null:n}catch{return null}}function Iue(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(r)||i<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){_ue(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const xm=[];function Dy(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $ue(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function Nue(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function _A(e=`editor-${Date.now()}`,t={}){const n=bre(t),o=n;o.__markstreamRegisteredPluginCount=xm.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||xm.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;i=m=>h[m]??s[m]??m}else i=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const m=h;if(Array.isArray(m)){const[k,...w]=m;typeof k=="function"&&n.use(k,...w)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(xm.length)for(const h of xm)if(Array.isArray(h)){const[m,...k]=h;typeof m=="function"&&n.use(m,...k)}else typeof h=="function"&&n.use(h);n.use(RQ),n.use(BQ),n.use(LQ);const r=QQ,l=r.default??r;n.use(l),n.use(NQ),n.use($Q),n.core.ruler.after("block","mark_fence_closed",h=>{const m=h,k=m.src,w=!!m.env?.__markstreamFinal,v=k.split(/\r?\n/);for(const y of m.tokens){if(y.type!=="fence"||!y.map||!y.markup)continue;const b=y.map[0],S=y.map[1],I=y.markup,T=I[0],$=I.length,F=v[Math.max(0,S-1)]??"";let R=0;for(;Rb+1&&P>=$&&M===F.length,B=y;B.meta=B.meta??{},B.meta.unclosed=!D,B.meta.closed=!!D}});const a=(h,m)=>{const k=h,w=k.pos;if(k.src[w]!=="~")return!1;const v=k.src[w-1],y=k.src[w+1];if(/\d/.test(v)&&/\d/.test(y)){if(!m){const b=k.push("text","",0);b.content="~"}return k.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(h,m)=>{const k=h[m],w=String(k.info??"").trim(),v=String(k.content??""),y=btoa(unescape(encodeURIComponent(v))),b=$ue(w),S=Dy(b),I=Nue(`editor-${e}-${m}-${b}`),T=Dy(i("common.copy"));return`
        -
        - ${Dy(b.toUpperCase())} - -
        -
        -
        `};const u=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,d=h=>{if(!h.startsWith("["))return!1;const m=c.exec(h);if(!m)return h!=="["&&!/^\[\d+$/.test(h);const k=String(m[1]??"");return h.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(k)},f=(h,m)=>{const k=h;if(k.src[k.pos]!=="[")return!1;const w=u.exec(k.src.slice(k.pos));if(!w)return!1;const v=k.src.slice(Math.max(0,k.pos-120),k.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(v))return!1;const y=k.src.slice(k.pos+w[0].length);if(y.startsWith("](")||y.startsWith("(")||d(y))return!1;if(!m){const b=w[1],S=k.push("reference","span",0);S.content=b,S.markup=w[0],S.raw=w[0]}return k.pos+=w[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(h,m)=>{const w=String(h[m].content??"");return`${w}`};const p=n.use.bind(n);return n.use=((...h)=>(o.__markstreamHasCustomParserExtensions=!0,p(...h))),n}function Lue({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function LI({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:Lue({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Fue={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Oue(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function FI(e){const t=Oue(e);return Fue[t]??t}function Rue(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>FI(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Pue(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function Due(e){return Pue(e)?.join("\0")??""}function Bue(e,t){return`${Due(e)}\0\0${Rue(t)?.join("\0")??""}`}function Cc(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function SA(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var zue=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const h=CA();this.startedAt=f&&this.hasStarted?h-this.normalizedStartDelayMs:h,this.lastTick=h,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=CA();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,k=Uue(h/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(k-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),v=jue(this.source.slice(this.visible.length),w,this.segmenter);v.text&&(this.visible+=v.text,this.charBudget=Math.max(0,this.charBudget-v.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Cc(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Cc(o,1e3,1)),this.normalizedTargetLatencyMs=Cc(s,900,1),this.normalizedCatchUpLatencyMs=Cc(i,350,1),this.normalizedCatchUpThreshold=SA(r,600),this.normalizedStartDelayMs=SA(a,80),this.maxCommitFps=Math.trunc(Cc(l,30,1)),this.maxCharsPerCommit=Math.trunc(Cc(u,80,1)),this.flushOnFinish=c,this.segmenter=Hue(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Wue(e={},t){const n=new zue(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Hue(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function jue(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function CA(){return typeof performance<"u"?performance.now():Date.now()}function Uue(e,t,n){return Math.min(n,Math.max(t,e))}var Vue=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const Nb=Symbol.for("markstream-vue:node-lifecycle");function yBe(){}const qw=new Map;let OI="material";const qc=new Map,AA=new Map;let Lb=null;function que(e){qw.set(e.id,e)}function Kue(e){const t=qw.get(OI);if(!t)return;const n=t.core[e];if(n)return n;const o=qc.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!qc.has(t.id)&&Zue(t)}function Gue(){var e,t;return(t=(e=qw.get(OI))==null?void 0:e.fallback)!=null?t:""}function Zue(e){return Vue(this,null,function*(){var t,n,o;if(qc.has(e.id))return(t=qc.get(e.id))!=null?t:null;let s=AA.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(qc.set(e.id,i),Lb?.(),i)).catch(()=>(qc.set(e.id,null),null)),AA.set(e.id,s)),s})}const MA='',EA='',Yue={id:"material",core:{"":EA,plain:'',text:EA,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:MA,csharp:MA,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Ts(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Jue=Co(0);Lb=()=>{Jue.value++},que(Yue);const Xue={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function S0(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[r]=i.split(":");return r.toLowerCase()})(e);return(t=Xue[n])!=null?t:n}function kBe(e){const t=S0(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function bBe(e){return Kue(S0(e))||Gue()}const TA={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var C0=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});let ei=null,Mu=!1,Eu=null,A0=Gw;function ph(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Kw(){try{const e=globalThis;return ph(e?.katex)}catch{return null}}function Gw(){return C0(null,null,function*(){const e=Kw();if(e)return e;const t=yield Ts(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Ts(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return ph(t)})}function RI(e){const t=Promise.resolve(e).then(n=>{var o;return Eu===t&&n?(ei=(o=ph(n))!=null?o:n,ei):null}).catch(()=>null).finally(()=>{Eu===t&&(Eu=null)});return Eu=t,Mu=!0,t}function Que(e){A0=e,ei=null,Mu=!1,Eu=null}function ece(e){Que(Gw)}function PI(){return typeof A0=="function"}function wBe(){var e;const t=A0;if(!t||t===Gw)return null;if(ei)return ei;const n=Kw();if(n)return ei=n,ei;if(Mu)return null;try{const o=t();return o?typeof o?.then=="function"?(RI(o),null):(ei=(e=ph(o))!=null?e:o,ei):null}catch{return null}}function DI(){return C0(this,null,function*(){var e;const t=Kw();if(t)return ei=t,ei;if(ei)return ei;if(Eu)return Eu;if(Mu)return null;const n=A0;if(!n)return Mu=!0,null;try{const o=n();if(typeof o?.then=="function")return RI(o);if(o)return ei=(e=ph(o))!=null?e:o,Mu=!0,ei}catch{}return Mu=!0,null})}function BI(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let ka=null,fa=null;const Ss=new Map,Tl=new Map;let qp=5;const Pu=new Set;function fp(){if(Ss.size{const{id:n,html:o,error:s}=t.data,i=Ss.get(n);if(i)if(Ss.delete(n),clearTimeout(i.timeoutId),i.cleanup(),fp(),s)i.aborted||i.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(Tl.set(a,o),Tl.size>200){const u=Tl.keys().next().value;Tl.delete(u)}}i.aborted||i.resolve(o)}},ka.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Ss.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Ss.clear(),zI()}}function nce(){var e;for(const t of Ss.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Ss.clear(),zI(),ka&&((e=ka.terminate)==null||e.call(ka)),ka=null,fa=null}function oce(e,t=!0,n=2e3,o){return C0(this,null,function*(){performance.now();const s=BI(e);if(!PI()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(fa)return Promise.reject(fa);const i=`${t?"d":"i"}:${s}`,r=Tl.get(i);if(r)return fp(),Promise.resolve(r);const l=ka||(fa=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),fa.name="WorkerInitError",fa.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(fa);if(Ss.size>=qp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Ss.size,a.max=qp,Promise.reject(a)}return new Promise((a,u)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void u(m)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Ss.get(c);if(!m)return;Ss.delete(c),m.cleanup();const k=new Error("Worker render timed out");k.name="WorkerTimeout",k.code="WORKER_TIMEOUT",m.aborted||m.reject(k),fp()},n);d=()=>{const m=Ss.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const k=new Error("Aborted");k.name="AbortError",u(k)},o&&o.addEventListener("abort",d,{once:!0});const p=a,h=u;Ss.set(c,{resolve:m=>{p(m)},reject:m=>{h(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const k=Ss.get(c);Ss.delete(c),clearTimeout(f),k?.cleanup(),k?.reject(m),fp()}})})}function xBe(e,t=!0,n){const o=`${t?"d":"i"}:${BI(e)}`;if(Tl.set(o,n),Tl.size>200){const s=Tl.keys().next().value;Tl.delete(s)}}const sce="WORKER_BUSY";function ice(e=2e3,t){return Ss.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Pu.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},Pu.add(l),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",o(u)},e),queueMicrotask(()=>fp()),t&&(r=()=>{if(i)return;i=!0,a();const u=new Error("Aborted");u.name="AbortError",o(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const xf={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function _Be(e){return C0(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!PI()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:xf.timeout,u=(i=o.waitTimeout)!=null?i:xf.waitTimeout,c=(r=o.backoffMs)!=null?r:xf.backoffMs,d=(l=o.maxRetries)!=null?l:xf.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):xf.maxRetries,p=o.signal;let h=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield oce(t,n,a,p)}catch(m){if(m?.code!==sce||h>=f)throw m;if(h++,yield ice(u,p).catch(()=>{}),p?.aborted){const k=new Error("Aborted");throw k.name="AbortError",k}c>0&&(yield new Promise(k=>globalThis.setTimeout(k,c*h)))}}})}function Kc(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function rce(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function f1(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=rce(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function p1(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function WI(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function h1(e,t=360,n=500){return WI(e,t,n)}function m1(e,t=360,n=500){return WI(e,t,n)}var lce=Object.defineProperty,ace=Object.defineProperties,uce=Object.getOwnPropertyDescriptors,IA=Object.getOwnPropertySymbols,cce=Object.prototype.hasOwnProperty,dce=Object.prototype.propertyIsEnumerable,$A=(e,t,n)=>t in e?lce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HI=(e,t)=>{for(var n in t||(t={}))cce.call(t,n)&&$A(e,n,t[n]);if(IA)for(var n of IA(t))dce.call(t,n)&&$A(e,n,t[n]);return e},NA=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const g1=()=>Ts(()=>import("./mermaid.core-Dza7SVX6.js").then(e=>e.bn),[]);let pl=null,Gc=g1,jf=null,Fb=!1,Ob=!1,Uf=0;function fce(e){Gc=e,Uf++,pl=null,jf=null,Fb=!1,Ob=!1}function pce(e){fce(g1)}function LA(){return typeof Gc=="function"}function FA(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=HI({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},ace(n,uce(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function OA(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=HI({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function SBe(){return NA(this,null,function*(){if(pl)return pl;const e=(function(){try{const o=globalThis;return FA(o?.mermaid)}catch{return null}})();if(e)return pl=e,OA(pl),pl;const t=Gc,n=Uf;return t?t===g1&&Fb?null:jf||(jf=NA(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===g1)return n===Uf&&t===Gc&&(Fb=!0,(function(i){Ob||(Ob=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===Uf&&t===Gc&&(jf=null)}return n!==Uf||t!==Gc?null:o?(pl=FA(o),OA(pl),pl):null}),jf):null})}let gi=null,pa=null;const kr=new Map,mu=new Map;function ag(e){for(const t of kr.values())t.reject(e);kr.clear(),mu.clear()}let RA=5,PA=!1;const hce="WORKER_BUSY",DA="MERMAID_DISABLED";function mce(e){if(gi&&gi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",ag(n)}gi=e,pa=null;const t=e;gi.onmessage=n=>{if(gi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=kr.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},gi.onerror=n=>{var o,s;if(gi===t)if(kr.size!==0){try{PA?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}ag(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},gi.onmessageerror=n=>{var o,s;if(gi===t)if(kr.size!==0){try{PA?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}ag(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function gce(){var e;if(gi)try{ag(new Error("Worker cleared")),(e=gi.terminate)==null||e.call(gi)}catch{}gi=null,pa=null}function jI(e,t,n,o){if(!LA()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=DA,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=mu.get(s);return i||(i=(function(r,l,a=1400){if(!LA()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=DA,Promise.reject(c)}if(pa)return Promise.reject(pa);const u=gi||(pa=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),pa.name="WorkerInitError",pa.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(pa);if(kr.size>=RA){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=hce,c.inFlight=kr.size,c.max=RA,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let p,h=!1;const m=()=>{h||(h=!0,p!=null&&globalThis.clearTimeout(p),kr.delete(f))},k={resolve:w=>{m(),c(w)},reject:w=>{m(),d(w)}};kr.set(f,k);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return kr.delete(f),void d(w)}p=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const v=kr.get(f);v&&v.reject(w)},a)})})(e,t,n),mu.set(s,i),i.then(()=>{mu.get(s)===i&&mu.delete(s)},()=>{mu.get(s)===i&&mu.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,u)=>{let c=()=>{};const d=()=>l.removeEventListener("abort",c);c=()=>{d();const f=new Error("Aborted");f.name="AbortError",u(f)},l.addEventListener("abort",c,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),u(f)})})})(i,o)}function CBe(e,t,n=1400,o){return jI("canParse",{code:e,theme:t},n,o)}function ABe(e,t,n=1400,o){return jI("findPrefix",{code:e,theme:t},n,o)}var vce=Object.defineProperty,yce=Object.defineProperties,kce=Object.getOwnPropertyDescriptors,BA=Object.getOwnPropertySymbols,bce=Object.prototype.hasOwnProperty,wce=Object.prototype.propertyIsEnumerable,zA=(e,t,n)=>t in e?vce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kt=(e,t)=>{for(var n in t||(t={}))bce.call(t,n)&&zA(e,n,t[n]);if(BA)for(var n of BA(t))wce.call(t,n)&&zA(e,n,t[n]);return e},fn=(e,t)=>yce(e,kce(t)),go=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const xce="__global__",By="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",Rb=(()=>{const e=globalThis;if(e[By])return e[By];const t={scopedCustomComponents:{},revision:Co(0)};return e[By]=t,t})(),WA=Rb.revision,_ce=Symbol("markstreamCustomComponents"),Sce=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function hh(e){return Sce.has(String(e).trim().toLowerCase())}function Cce(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function zy(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([ur(n),ur(Cce(n))]))!s||hh(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function os(e){const t=wn(_ce,null);return O(()=>{var n;return WA.value,(function(o,s={}){return WA.value,kt(kt(kt({},zy(Rb.scopedCustomComponents[xce]||{})),zy(s)),zy((function(i){return i&&Rb.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const Ace=["aria-label"],Mce={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},Ece={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},Gn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Di=Gn(Ze({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(g(),C("svg",Ece,[...n[1]||(n[1]=[_("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),_("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(g(),C("svg",Mce,[...n[0]||(n[0]=[_("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,Ace))}),[["__scopeId","data-v-be21ab83"]]);Di.install=e=>{e.component(Di.__name,Di)};const Tce={class:"emoji-node"},_i=Gn(Ze({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("span",Tce,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);_i.install=e=>{e.component(_i.__name,_i)};const Ice=["id"],$ce=["title"],Bi=Gn(Ze({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(g(),C("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[_("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,$ce)],8,Ice))}}),[["__scopeId","data-v-c1463a29"]]);Bi.install=e=>{e.component(Bi.__name,Bi)};const UI=(()=>{try{return!1}catch{}return!1})();function Wy(e){UI&&console.warn(e)}function HA(e,t="safe",n){return Vw(e,t,n)}function VI(e){return due(e)}function Hy(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Zw(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=lg((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Hy(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Hy(r.value)]):Object.entries(s).map(([r,l])=>[r,Hy(l)]):null,t,n);var s;if(!o)return;const i=VI(dp(o));return Object.keys(i).length>0?i:void 0}function jA(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,r])=>r===""?` ${i}`:` ${i}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function _f(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function jy(e,t,n,o,s,i,r=!1){const l=(function(d,f){return EI(d,f)})(e,o);if(uh.has(e.toLowerCase())||!l&&SI(e,i))return null;if(!l&&Uw(e,i))return r?[jA(e,t,!0)]:[jA(e,t),...n,``];const a=Vw(t,i,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=o[e]||o[e.toLowerCase()],f=VI(a);return cn(d,fn(kt({},f),{key:c}),n.length>0?n:void 0)}return cn(e,fn(kt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function qI(e,t){return hue(e,t)}function v1(e,t,n="safe"){if(!e)return[];try{return(function(i,r,l="safe"){let a=0;const u=[],c=[];for(const d of i)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=jy(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);_f(u.length>0?u[u.length-1].children:c,f)}else if(d.type==="tag_open")u.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let h=u.length-1;h>=0;h--)if(u[h].tagName.toLowerCase()===f){p=h;break}if(p!==-1)for(;u.length>p;){const h=u.pop(),m=jy(h.tagName,h.attrs||{},h.children,r,h.autoKey,l);u.length>0?_f(u[u.length-1].children,m):_f(c,m),h.tagName.toLowerCase()!==f&&u.length>p&&Wy(`Auto-closing unclosed tag: <${h.tagName}>`)}else Wy(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=jy(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?_f(u[u.length-1].children,f):_f(c,f),Wy(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(TI(e),t,n)}catch(s){return o=s,UI&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const Nce=["innerHTML"],zi=Gn(Ze({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=wn("markstreamHtmlPolicy",void 0),o=O(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=os(()=>t.customId),i=Ze({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=O(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:fd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=v1(l,s.value,o.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!qI(l,s.value))return{mode:"html",content:fd(l,o.value)};const a=v1(l,s.value,o.value);return a===null?{mode:"html",content:fd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(g(),C("span",{key:0,class:ze(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[K(x(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(g(),C("span",{key:1,class:ze(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(g(),C("span",{key:2,class:ze(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,Nce))}}),[["__scopeId","data-v-d17f12b0"]]);zi.install=e=>{e.component(zi.__name,zi)};const Lce={class:"inline-code"},Fce={key:0},js=Gn(Ze({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=sh(),o=wn("markstreamFade",void 0),s=wn("markstreamTextStreamState",void 0),i=wn("markstreamStreamVersion",void 0),r=O(()=>{const v=n.fade;return v===""||v===!0||v==="true"||v!==!1&&v!=="false"&&void 0}),l=O(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=O(()=>{var v;return String((v=t.node.code)!=null?v:"")}),u=O(()=>!l.value),c=O(()=>{var v;const y=(v=n["index-key"])!=null?v:n.indexKey;return y==null||y===""?"":String(y)}),d=V(t.node.code),f=V(""),p=V(0);let h;function m(){h?.(),h=void 0}function k(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ye([()=>t.node.code,c,l],([v])=>{const y=String(v??""),b=c.value,S=LI({nextContent:y,persistedContent:b?s?.get(b):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=S.settledContent,f.value=S.streamedDelta,S.appended?(p.value+=1,(function(){if(!f.value||h||!i)return;const I=i.value;h=Ye(()=>i.value,T=>{T!==I&&k()},{flush:"sync"})})()):f.value||m(),b&&s?.set(b,y)},{immediate:!0}),Ld(m);const w=O(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(v,y)=>(g(),C("code",Lce,[u.value?(g(),C(Te,{key:0},[qe(N(a.value),1)],64)):(g(),C(Te,{key:1},[d.value?(g(),C("span",Fce,N(d.value),1)):oe("",!0),f.value?(g(),C("span",{key:1,class:ze(["inline-code-stream-delta",[w.value]]),onAnimationend:k},N(f.value),35)):oe("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);js.install=e=>{e.component(js.__name,js)};const Pb=V(!1),UA=V(""),VA=V("top"),pp=V(null),hp=V(null),Db=V(null),Bb=V(null),qA=V(null);let ug=null,cg=null,zb=0;function KI(){ug&&(clearTimeout(ug),ug=null),cg&&(clearTimeout(cg),cg=null)}let _m=!1,Sm=null,KA=!1;function Oce(e,t,n="top",o=!1,s,i){if(!e)return;const r=++zb;KI();const l=()=>go(null,null,function*(){var a,u;if(yield(function(){return go(this,null,function*(){if(!_m&&!KA&&typeof document<"u"){Sm!=null||(Sm=go(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Ts(()=>import("./vue.runtime.esm-bundler-C95Vw23-.js"),[]),Ts(()=>import("./Tooltip-CQOv8A5U.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),c({setup:()=>()=>{var h;return d(f,{visible:Pb.value,"anchor-el":pp.value,content:UA.value,placement:VA.value,id:hp.value,originX:Db.value,originY:Bb.value,isDark:(h=qA.value)!=null?h:void 0})}}).mount(p),_m=!0}));try{yield Sm}catch(c){_m=!1,Sm=null,KA=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),_m&&r===zb){hp.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,pp.value=e,UA.value=t,VA.value=n,Db.value=(a=s?.x)!=null?a:null,Bb.value=(u=s?.y)!=null?u:null,qA.value=typeof i=="boolean"?i:null,Pb.value=!0;try{e.setAttribute("aria-describedby",hp.value)}catch{}}});o?l():ug=setTimeout(l,80)}function Rce(e=!1){zb+=1,KI();const t=()=>{if(pp.value&&hp.value)try{pp.value.removeAttribute("aria-describedby")}catch{}Pb.value=!1,pp.value=null,hp.value=null,Db.value=null,Bb.value=null};e?t():cg=setTimeout(t,120)}const Pce={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},Dce=Symbol("markstreamI18nFallback");function GI(e,t){var n;return(n=t?.[e])!=null?n:Pce[e]}const Wb=(e,t)=>{var n;return(n=GI(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function GA(e,t){return{t(n){const o=GI(n,t);if(e.te&&o!=null&&!e.te(n))return Wb(n,t);const s=e.t(n);return s===n&&o!=null?Wb(n,t):s}}}function Bce(){const e=(function(){var n,o,s;try{const i=es(),r=Dce,l=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=l?.[r])!=null?o:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=es(),i=s?.proxy,r=i?.$t;if(typeof r=="function"){const u=i?.$te;return{t:r.bind(i),te:typeof u=="function"?u.bind(i):void 0}}const l=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=l?.$t;if(typeof a=="function"){const u=l?.$te;return{t:a.bind(l),te:typeof u=="function"?u.bind(l):void 0}}}catch{}return null})();if(t)return GA(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return GA({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>Wb(n,e)}}const ZI=Symbol("ViewportPriority"),YI=Symbol("ViewportPriorityOptions"),JI=Symbol("OffscreenHeavyNodeDeferral"),zce=O(()=>!1),ju="400px";function Yw(){return wn(YI,void 0)}function Jw(){return wn(JI,zce)}function Wce(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?V(t):t,r=s?(n=window.requestIdleCallback)!=null?n:T=>window.setTimeout(()=>T({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(o=window.cancelIdleCallback)!=null?o:T=>window.clearTimeout(T):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let p=null,h=null;function m(T){if(!T)return"viewport";let $=a.get(T);return $||($=u++,a.set(T,$)),String($)}function k(){if(p!=null){try{l?.(p)}catch{}p=null}}function w(T){if(T){const $=c.get(T);if($&&!$.targets.size){try{$.io.disconnect()}catch{}c.delete(T)}}d.size||f.size||k()}function v(T){const $=d.get(T);if(!$)return;const F=c.get($.bucketKey);if(!$.visible.value){$.visible.value=!0;try{$.resolve()}catch{}}try{F?.io.unobserve(T)}catch{}F?.targets.delete(T),d.delete(T),f.delete(T),w($.bucketKey)}function y(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&p==null&&f.size&&(p=r(()=>{p=null;const T=f.values().next().value;T&&(f.delete(T),v(T),f.size&&y())},{timeout:1200}))}function b(T,$){if(!s||typeof IntersectionObserver>"u")return null;const F=(function(z,A){var L,W,j;return{root:(L=e?.(z??null))!=null?L:null,rootMargin:(W=A?.rootMargin)!=null?W:ju,threshold:(j=A?.threshold)!=null?j:0}})(T,$),R=[m((P=F).root),P.rootMargin,P.threshold].join("\0");var P;const M=c.get(R);if(M)return{key:R,bucket:M};let D;try{D=new IntersectionObserver(z=>{for(const A of z)(A.isIntersecting||A.intersectionRatio>0)&&v(A.target)},{root:F.root,rootMargin:F.rootMargin,threshold:F.threshold})}catch{return null}const B={io:D,targets:new Map};return c.set(R,B),{key:R,bucket:B}}function S(){if(s&&i.value)for(const[T,$]of Array.from(d.entries())){const F=b(T,$.opts);if(!F){v(T);continue}if(F.key===$.bucketKey)continue;const R=$.bucketKey,P=c.get(R);try{P?.io.unobserve(T)}catch{}P?.targets.delete(T),$.bucketKey=F.key,F.bucket.targets.set(T,$),F.bucket.io.observe(T),w(R)}}Ye(i,T=>{if(!T){for(const $ of Array.from(d.keys()))v($);k()}},{flush:"sync"});const I=(T,$)=>{const F=V(!1);let R,P=!1;const M=new Promise(A=>{R=()=>{P||(P=!0,A())}}),D=()=>{const A=d.get(T);if(!A)return f.delete(T),void w();const L=c.get(A.bucketKey);try{L?.io.unobserve(T)}catch{}L?.targets.delete(T),d.delete(T),f.delete(T),w(A.bucketKey)};if(!s||!i.value)return F.value=!0,R(),{isVisible:F,whenVisible:M,destroy:D};const B=b(T,$);if(!B)return F.value=!0,R(),{isVisible:F,whenVisible:M,destroy:D};const z={resolve:R,visible:F,bucketKey:B.key,opts:$};return d.set(T,z),B.bucket.targets.set(T,z),B.bucket.io.observe(T),s&&h==null&&(h=window.requestAnimationFrame(()=>{h=null,S()})),$?.allowIdle!==!1&&(f.add(T),y()),{isVisible:F,whenVisible:M,destroy:D}};return I.refresh=S,Vn(ZI,I),I}function Xw(){var e,t;const n=wn(ZI,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=p=>{if(!p)return;const h=s.get(p);if(h&&!h.targets.size){try{h.io.disconnect()}catch{}s.delete(p)}},d=p=>{const h=o.get(p);if(!h)return;const m=s.get(h.bucketKey);if(!h.visible.value){h.visible.value=!0;try{h.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}o.delete(p),m?.targets.delete(p),i.delete(p),c(h.bucketKey),i.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const p=i.values().next().value;p&&(i.delete(p),d(p),i.size&&f())},{timeout:1200}))};return(p,h)=>{const m=V(!1);let k,w=!1;const v=new Promise(S=>{k=()=>{w||(w=!0,S())}}),y=()=>{const S=o.get(p);if(!S)return i.delete(p),void(i.size||u());const I=s.get(S.bucketKey);try{I?.io.unobserve(p)}catch{}o.delete(p),I?.targets.delete(p),i.delete(p),c(S.bucketKey),i.size||u()},b=(S=>{var I,T;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const $=(D=>{var B,z;return[(B=D?.rootMargin)!=null?B:ju,(z=D?.threshold)!=null?z:0].join("\0")})(S),F=s.get($);if(F)return{key:$,bucket:F};const R=(I=S?.rootMargin)!=null?I:ju;let P;try{P=new IntersectionObserver(D=>{for(const B of D)(B.isIntersecting||B.intersectionRatio>0)&&d(B.target)},{root:null,rootMargin:R,threshold:(T=S?.threshold)!=null?T:0})}catch{return null}const M={io:P,targets:new Set};return s.set($,M),{key:$,bucket:M}})(h);return b?(o.set(p,{resolve:k,visible:m,bucketKey:b.key}),b.bucket.targets.add(p),b.bucket.io.observe(p),h?.allowIdle!==!1&&(i.add(p),f()),{isVisible:m,whenVisible:v,destroy:y}):(m.value=!0,k(),{isVisible:m,whenVisible:v,destroy:y})}}function Hce(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const jce=["data-markstream-viewport-pending"],Uce=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],Vce={key:1,class:"image-placeholder"},qce={key:1,class:"image-node__raw-text"},Kce={key:2,class:"image-shimmer-overlay"},Gce={key:1,class:"image-node__raw-text"},Zce={key:3,class:"image-error"},Sa=Gn(Ze({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,r=t,l=V(!1),a=V(!1),u=V(""),c=V("primary"),d=V(null),f=sh(),p=wn(Nb,null),h=Xw(),m=Yw(),k=Jw(),w=O(()=>y3(i.node.src)),v=O(()=>y3(i.fallbackSrc)),y=(s=(o=(n=es())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),b=typeof window<"u"&&y?.getAttribute("src")===(w.value||v.value),S=V(typeof window>"u"||b||!k.value),I=Co(null);let T="",$=null;const F=O(()=>u.value),R=O(()=>!i.lazy),P=O(()=>typeof window<"u"&&k.value&&!b),M=O(()=>!P.value||S.value),D=O(()=>M.value?F.value:""),B=O(()=>{var xe,We;return(We=(xe=m?.value.heavyBlockMargin)!=null?xe:m?.value.rootMargin)!=null?We:ju}),z=O(()=>!i.node.loading&&c.value!=="failed"&&u.value.length>0),A=O(()=>c.value==="failed"),L=O(()=>(!R.value||P.value&&!S.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),W=O(()=>Hce(i,f));function j(xe=W.value){xe&&d.value&&p?.reportHeight(xe,d.value.offsetHeight)}function re(xe=W.value){xe&&xt(()=>{j(xe)})}function Q(){$&&(clearTimeout($),$=null)}function Y(){const xe=W.value;xe&&T!==xe&&(T&&p?.markSettled(T),Q(),T=xe,p?.markPending(xe),typeof window<"u"&&($=window.setTimeout(()=>{T===xe&&(re(xe),G())},8e3)))}function G(){return go(this,null,function*(){const xe=T;xe&&(Q(),T="",yield xt(),j(xe),p?.markSettled(xe))})}function X(){if(c.value==="primary"&&v.value&&v.value!==u.value)return c.value="fallback",u.value=v.value,l.value=!1,a.value=!1,void re();c.value="failed",a.value=!0,r("error",u.value),re()}function te(){l.value=!0,a.value=!1,r("load",F.value),re()}function q(xe){xe.preventDefault(),l.value&&!a.value&&r("click",[xe,F.value])}const{t:me}=Bce();return Ye([w,v,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||w.value?(u.value=w.value,void(c.value="primary")):v.value?(u.value=v.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ye([d,P],([xe,We],he,ee)=>{var ne;if((ne=I.value)==null||ne.destroy(),I.value=null,!We||S.value)return void(S.value=!0);if(!xe)return void(S.value=!1);let H=!0;const Z=h(xe,{rootMargin:B.value,allowIdle:!1});I.value=Z,S.value=Z.isVisible.value,Z.whenVisible.then(()=>{H&&I.value===Z&&(S.value=!0)}),ee(()=>{H=!1,Z.destroy(),I.value===Z&&(I.value=null)})},{immediate:!0}),Ye([z,l,a,F,()=>i.lazy,M],([xe,We,he,ee,ne,H])=>xe&&ee&&!he&&H?We?(G(),void re()):ne?(Y(),void re()):void(We||he||Y()):(G(),void re()),{flush:"post",immediate:!0}),po(()=>{var xe;(xe=I.value)==null||xe.destroy(),I.value=null,(function(){const We=T;We&&(Q(),T="",p?.markSettled(We))})()}),(xe,We)=>{var he,ee,ne,H,Z;return g(),C("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":P.value&&!S.value?"true":void 0},[z.value?(g(),C("img",{key:0,src:D.value||void 0,alt:String((ee=(he=i.node.alt)!=null?he:i.node.title)!=null?ee:""),title:String((H=(ne=i.node.title)!=null?ne:i.node.alt)!=null?H:""),class:ze(["image-node__img",{"is-loading":!R.value&&!l.value,"is-loaded":R.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:R.value?"high":void 0,decoding:R.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Z=i.node.alt)!=null?Z:x(me)("image.preview"),onError:X,onLoad:te,onClick:q},null,42,Uce)):oe("",!0),e.node.loading&&!a.value?(g(),C("span",Vce,[i.usePlaceholder?An(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:F.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[We[0]||(We[0]=_("span",{class:"image-shimmer"},null,-1))],!0):(g(),C("span",qce,N(e.node.raw),1))])):oe("",!0),L.value&&!e.node.loading?(g(),C("span",Kce,[i.usePlaceholder?An(xe.$slots,"placeholder",{key:0,node:i.node,displaySrc:F.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[We[1]||(We[1]=_("span",{class:"image-shimmer"},null,-1))],!0):(g(),C("span",Gce,N(e.node.raw),1))])):oe("",!0),A.value?(g(),C("span",Zce,[An(xe.$slots,"error",{node:i.node,displaySrc:F.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[We[2]||(We[2]=_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[_("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),_("span",null,N(x(me)("image.loadError")),1)],!0)])):oe("",!0)],8,jce)}}}),[["__scopeId","data-v-046e82ac"]]);Sa.install=e=>{e.component(Sa.__name,Sa)};const Yce={key:2},el=Ze({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=os(()=>t.customId),o=wn("markstreamHtmlPolicy",void 0),s=wn("markstreamNestedRendererProps",void 0),i=O(()=>{var h;return(h=o?.value)!=null?h:"safe"}),r=O(()=>{var h,m;const k=(h=s?.value)!=null?h:{};return fn(kt({},k),{customId:(m=t.customId)!=null?m:k.customId,htmlPolicy:i.value})}),l=or({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1}),a=O(()=>t.components[String(t.node.type)]),u=O(()=>!!(a.value&&n.value[t.node.type]&&!hh(String(t.node.type)))),c=O(()=>u.value?Zw(t.node,i.value):void 0),d=O(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=O(()=>{var h;return String((h=t.node.content)!=null?h:"")}),p=O(()=>{var h,m;return String((m=(h=t.node.content)!=null?h:t.node.raw)!=null?m:"")});return(h,m)=>a.value&&u.value?(g(),pe(Ko(a.value),Dn({key:0},c.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:ve(()=>[d.value?(g(),pe(x(l),Dn({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(g(),pe(x(l),Dn({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(g(),pe(Ko(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(g(),C("span",Yce,N(p.value),1)):oe("",!0)}}),ZA=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Jce(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return fn(kt(kt({},ZA),n),{enabled:(t=n.enabled)==null||t})}return kt({},ZA)}function Qw(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function XI(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function YA(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function Xce(e){var t;return e.diff===!0||YA(e.language)||YA(XI(String((t=e.raw)!=null?t:"")))}function Qce(e,t,n){const o=(function(s){const i=XI(s);if(!i)return"";const r=i.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const u=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(u&&/[./\\-]/.test(u))return u}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const ede=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],tde={key:0,translate:"no",class:"markstream-pre__diff-code"},nde={class:"markstream-pre__diff-pane-content"},ode={class:"markstream-pre__diff-number","aria-hidden":"true"},sde={class:"markstream-pre__diff-content"},ide={class:"markstream-pre__diff-content-inner"},rde={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},lde=["textContent"],ade=["textContent"],vi=Ze({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(te,q){const me=String(te??"");return q?me:me.replace(/\r\n$|\n$|\r$/,"")}const o=O(()=>{var te,q,me;const xe=String((q=(te=t.node)==null?void 0:te.language)!=null?q:"");return String((me=String(xe).split(/\s+/g)[0])!=null?me:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=O(()=>`language-${o.value}`),i=O(()=>{var te;return t.loading===!0||((te=t.node)==null?void 0:te.loading)===!0}),r=O(()=>{var te;return n((te=t.node)==null?void 0:te.code,i.value)});let l="",a=1;const u=O(()=>(function(te){let q=0,me=1;te.startsWith(l)&&(q=l.length,me=a,q>0&&te[q-1]==="\r"&&te[q]===` -`&&q++);for(let xe=q;xer.value.split(/\r\n|\n|\r/));let d=0,f="";const p=O(()=>{const te=u.value;te{var te;return t.showLineNumbers===!0&&((te=t.node)==null?void 0:te.diff)===!0}),m=O(()=>h.value&&t.diffInline===!0),k=O(()=>{const te=Number(t.reservedHeightPx);if(!Number.isFinite(te)||te<=0)return;const q=`${Math.ceil(te)}px`;return i.value?{maxHeight:q,overflow:"auto"}:{height:q,minHeight:q,maxHeight:q,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function v(te){return String(te??"").trim().length===0}function y(te,q="context",me={}){const xe=v(te);return{code:te,kind:xe&&q!=="hunk"&&q!=="spacer"&&!me.preserveBlankKind?"context":q,empty:xe}}function b(te){const q=n(te,i.value);return q?q.split(/\r\n|\n|\r/):[]}function S(te,q){return!v(te[q])||qw.some(me=>q.startsWith(me)))}function F(te,q){return q||!te.startsWith(" ")||te.startsWith(" ")?te:` ${te}`}function R(te,q){const me=te.length,xe=q.length,We=[];let he=0;for(;he=he&&H>=he&&te[ne]===q[H];)ee.unshift({originalIndex:ne,modifiedIndex:H}),ne--,H--;const Z=ne-he+1,ye=H-he+1;if(Z<=0||ye<=0||i.value||(Z+1)*(ye+1)>15e5)return We.concat(ee);const fe=ye+1,de=new Uint32Array((Z+1)*(ye+1));for(let _e=Z-1;_e>=0;_e--)for(let ce=ye-1;ce>=0;ce--){const Se=_e*fe+ce;if(te[he+_e]===q[he+ce])de[Se]=de[(_e+1)*fe+ce+1]+1;else{const ie=de[(_e+1)*fe+ce],we=de[_e*fe+ce+1];de[Se]=ie>=we?ie:we}}const J=[];let ae=0,be=0;for(;ae=de[ae*fe+be+1]?ae++:be++;return We.concat(J,ee)}function P(te){var q;const me=(function(){var H,Z;const ye=t.diffHideUnchangedRegions;if(ye==null||ye===!1)return null;const fe=ye===!0?{}:ye;return fe.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((H=fe.contextLineCount)!=null?H:2)),minimumLineCount:Math.max(1,Math.floor((Z=fe.minimumLineCount)!=null?Z:4))}})();if(!me||te.length<1||te.length>2||te.length===2&&te[0].lines.length!==te[1].lines.length)return te;const xe=te[0].lines,We=(q=te[1])==null?void 0:q.lines,he=H=>xe[H].kind==="context"&&(We===void 0||We[H].kind==="context"&&xe[H].code===We[H].code),ee=[];let ne=0;for(;ne=me.minimumLineCount){const ye=H+(H===0?0:me.contextLineCount),fe=Z-(Z===xe.length?0:me.contextLineCount);fe-ye>=me.minimumLineCount&&ee.push({start:ye,end:fe})}ne===H&&ne++}return ee.length?te.map((H,Z)=>{const ye=[];let fe=0;for(const de of ee)ye.push(...H.lines.slice(fe,de.start)),ye.push({code:Z===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${H.key}-collapsed-${de.start}-${de.end}`,number:""}),fe=de.end;return ye.push(...H.lines.slice(fe)),fn(kt({},H),{lines:ye})}):te}const M=O(()=>{var te,q,me,xe;if(!h.value)return[];const We=(function(Z){const ye=Z.some(de=>I(de)),fe=Z.some(de=>T(de));return ye&&fe||(function(){var de,J,ae,be;if(o.value==="diff")return!0;const _e=(be=(ae=String((J=(de=t.node)==null?void 0:de.raw)!=null?J:"").split(/\r?\n/,1)[0])==null?void 0:ae.trim())!=null?be:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(_e)})()&&(ye||fe)})(c.value),he=(function(){var Z,ye;return((Z=t.node)==null?void 0:Z.originalCode)!=null||((ye=t.node)==null?void 0:ye.updatedCode)!=null})();if(m.value){const Z=he?(function(ye,fe){const de=b(ye),J=b(fe),ae=R(de,J);if(ae.length>0){const we=[];let Re=0,at=0;for(const ft of ae){for(;Re=_e&&Se>=_e&&de[ce]===J[Se];)ie.unshift(fn(kt({},y(J[Se])),{key:`inline-suffix-${Se}`,number:Se+1})),ce--,Se--;for(let we=_e;we<=ce;we++)be.push(fn(kt({},y(de[we],"removed",{preserveBlankKind:S(de,we)})),{key:`inline-removed-source-${we}`,number:we+1}));for(let we=_e;we<=Se;we++)be.push(fn(kt({},y(J[we],"added",{preserveBlankKind:S(J,we)})),{key:`inline-added-source-${we}`,number:we+1}));return be.concat(ie)})((te=t.node)==null?void 0:te.originalCode,(q=t.node)==null?void 0:q.updatedCode):(function(ye){const fe=[];let de=1,J=1;const ae=$(ye);for(const[be,_e]of ye.entries())if(_e.startsWith("@@")){const ce=_e.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);ce&&(de=Number(ce[1]),J=Number(ce[2])),fe.push(fn(kt({},y(_e,"hunk")),{key:`inline-hunk-${be}`,number:""}))}else if(I(_e))fe.push(fn(kt({},y(F(_e.slice(1),ae),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${be}`,number:de++}));else if(T(_e))fe.push(fn(kt({},y(F(_e.slice(1),ae),"added",{preserveBlankKind:!0})),{key:`inline-added-${be}`,number:J++}));else{const ce=ae&&_e.startsWith(" ")?_e.slice(1):_e;fe.push(fn(kt({},y(ce)),{key:`inline-context-${be}`,number:J})),de++,J++}return fe})(c.value);return P([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Z}])}if(!We&&he)return(function(Z,ye){const fe=b(Z),de=b(ye),J=R(fe,de),ae=[],be=[];let _e=0,ce=0,Se=0;const ie=(we,Re)=>{const at=Math.max(we-_e,Re-ce);for(let ft=0;ftfn(kt({},Z),{key:`original-${ye}`,number:ye+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ne.map((Z,ye)=>fn(kt({},Z),{key:`modified-${ye}`,number:ye+1}))}])}),D=O(()=>M.value.some(te=>te.lines.some(q=>q.kind==="collapsed"))),B=O(()=>{const te=o.value;return te?`Code block: ${te}`:"Code block"}),z=V(null),A=V([]);let L=null,W=!1,j=null;function re(te){const q=Number.parseFloat(String(te??""));return Number.isFinite(q)&&q>0?q:0}function Q(te,q){var me;if(!te)return q;if(te.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const xe=te.querySelector(".markstream-pre__diff-content"),We=xe?.getBoundingClientRect(),he=(me=We?.height)!=null?me:0;return Math.max(q,Math.ceil(he))}function Y(){W||typeof window>"u"||(L!=null&&window.cancelAnimationFrame(L),L=window.requestAnimationFrame(()=>{L=null,W||(function(){var te,q;L=null;const me=z.value;if(!me||!h.value||m.value||!me.classList.contains("is-wrap"))return void(A.value.length&&(A.value=[]));const xe=(function(ye){const fe=window.getComputedStyle(ye),de=re(fe.getPropertyValue("--markstream-pre-diff-line-height"));if(de>0)return de;const J=re(fe.lineHeight);return J>0?J:18})(me),We=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),he=Array.from(me.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ee=Math.max(We.length,he.length),ne=[];for(let ye=0;ye{const de=Z[fe];return de&&Math.abs(ye.rowHeight-de.rowHeight)<=.5&&Math.abs(ye.originalHeight-de.originalHeight)<=.5&&Math.abs(ye.modifiedHeight-de.modifiedHeight)<=.5})||(A.value=ne)})()}))}function G(te){j?.disconnect(),j=null,te&&h.value&&!m.value&&typeof ResizeObserver<"u"&&(j=new ResizeObserver(()=>{Y()}),j.observe(te))}function X(te,q){const me=A.value[te];if(!me)return;const xe=q==="original"?me.originalHeight:me.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(me.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(xe)}px`}}return Ye(z,te=>{G(te),xt(()=>Y())},{flush:"post"}),Ye([h,m,M],()=>{G(z.value),xt(()=>Y())},{flush:"post",immediate:!0}),po(()=>{W=!0,L!=null&&(window.cancelAnimationFrame(L),L=null),j?.disconnect(),j=null}),(te,q)=>(g(),C("pre",{ref_key:"preRef",ref:z,style:jt(k.value),class:ze([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":h.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":D.value}]),"aria-busy":i.value,"aria-label":B.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[h.value?(g(),C("code",tde,[(g(!0),C(Te,null,st(M.value,me=>(g(),C("span",{key:me.key,class:ze(["markstream-pre__diff-pane",me.className])},[_("span",nde,[(g(!0),C(Te,null,st(me.lines,(xe,We)=>(g(),C("span",{key:xe.key,class:ze(["markstream-pre__diff-line",[`markstream-pre__diff-line--${xe.kind}`,{"markstream-pre__diff-line--empty":xe.empty}]]),style:jt(X(We,me.key))},[q[0]||(q[0]=_("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),_("span",ode,N(xe.number),1),_("span",sde,[_("span",ide,N(xe.code),1)])],6))),128))])],2))),128))])):(g(),C(Te,{key:1},[t.showLineNumbers?(g(),C("span",rde,[_("span",{class:"markstream-pre__line-numbers-text",textContent:N(p.value)},null,8,lde)])):oe("",!0),_("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,ade)],64))],14,ede))}});vi.install=e=>{e.component(vi.__name,vi)};const ude={key:0},Ro=Gn(Ze({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=sh(),o=wn("markstreamFade",void 0),s=wn("markstreamTextStreamState",void 0),i=wn("markstreamStreamVersion",void 0),r=O(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=O(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=O(()=>{var k;const w=(k=n["index-key"])!=null?k:n.indexKey;return w==null||w===""?"":String(w)}),u=V(t.node.content),c=V(""),d=V(0);let f;function p(){f?.(),f=void 0}function h(){p(),c.value&&(u.value=u.value+c.value,c.value="")}Ye([()=>t.node.content,a,l],([k])=>{const w=String(k??""),v=a.value,y=LI({nextContent:w,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=y.settledContent,c.value=y.streamedDelta,y.appended?(d.value+=1,(function(){if(!c.value||f||!i)return;const b=i.value;f=Ye(()=>i.value,S=>{S!==b&&h()},{flush:"sync"})})()):c.value||p(),v&&s?.set(v,w)},{immediate:!0}),Ld(p);const m=O(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(k,w)=>(g(),C("span",{class:ze([[e.node.center?"text-node-center":""],"text-node"])},[u.value?(g(),C("span",ude,N(u.value),1)):oe("",!0),c.value?(g(),C("span",{key:1,class:ze(["text-node-stream-delta",[m.value]]),onAnimationend:h},N(c.value),35)):oe("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function Vf(e,t,n){return Ze({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=Xw(),u=Yw(),c=Jw(),d=typeof window<"u"&&((l=(r=es())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=V(typeof window>"u"||d||!c.value),p=Co(null);let h=null;function m(k){const w=k&&"$el"in k?k.$el:k;p.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Ye([p,c],([k,w],v,y)=>{if(h?.destroy(),h=null,!w||f.value)return void(f.value=!0);if(!k)return;let b=!0;const S=a(k,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});h=S,f.value=S.isVisible.value,S.whenVisible.then(()=>{b&&h===S&&(f.value=!0)}),y(()=>{b=!1,S.destroy(),h===S&&(h=null)})},{immediate:!0}),po(()=>{h?.destroy(),h=null}),()=>cn(f.value?t:n,fn(kt({},s),{ref:m}),i)}})}Ro.install=e=>{e.component(Ro.__name,Ro)};const y1=Ze({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,r,l,a,u;const c=S0(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=TA[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):TA[""]),f=Xce(n.node),p=Qce(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),h=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:Qw(h??{},typeof window>"u"?0:window.innerWidth)),k=h?.diffAppearance,w=k==="dark"||k!=="light"&&n.isDark===!0,v=typeof h?.fontSize=="number"&&Number.isFinite(h.fontSize)&&h.fontSize>0?h.fontSize:12,y=typeof h?.lineHeight=="number"&&Number.isFinite(h.lineHeight)&&h.lineHeight>0?h.lineHeight:v===12?18:Math.max(12,Math.round(1.5*v)),b=typeof h?.tabSize=="number"&&Number.isFinite(h.tabSize)&&h.tabSize>0?h.tabSize:4,S=f?0:8,I=typeof((a=h?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(h.padding.top)&&h.padding.top>=0?h.padding.top:S,T=typeof((u=h?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(h.padding.bottom)&&h.padding.bottom>=0?h.padding.bottom:S,$=typeof h?.fontFamily=="string"?h.fontFamily.trim():"",F=kt(kt({fontSize:`${v}px`,lineHeight:`${y}px`,tabSize:b,paddingTop:`${I}px`,paddingBottom:`${T}px`,"--markstream-pre-line-number-top":`${I}px`},f?{"--markstream-pre-diff-line-height":`${y}px`}:{}),$?{"--markstream-code-font-family":$}:{}),R=()=>cn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[cn("svg",{class:"action-icon"})]),P=n.isShowPreview!==!1&&(c==="html"||c==="svg"),M=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||P&&n.showPreviewButton!==!1,D=z=>{if(z!=null)return typeof z=="number"?`${z}px`:String(z)},B=kt(kt(kt({"--markstream-code-layout-character-width":"1ch"},D(n.minWidth)?{minWidth:D(n.minWidth)}:{}),D(n.maxWidth)?{maxWidth:D(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return cn("div",fn(kt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":w,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[B,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:cn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[cn("div",{class:"code-header-main"},[cn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),cn("div",{class:"code-header-copy"},[cn("div",{class:"code-header-title"},p.title),p.caption?cn("div",{class:"code-header-caption"},p.caption):null])]),cn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?cn("div",{class:"code-diff-stats","aria-hidden":"true"},[cn("span",{class:"code-diff-stat removed"},"-0"),cn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:R(),n.showCollapseButton===!1?null:R(),M?cn("div",{class:"relative"},[R()]):null])]),cn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[cn(vi,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?Jce(h?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:F,"data-markstream-code-loading":"1"})]),cn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[cn("div",{class:"loading-skeleton"},[cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line short"})])]),cn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Uy=Vf("ViewportDeferredCodeBlockNode",or({loader:()=>go(null,null,function*(){try{return(yield Ts(()=>import("./CodeBlockNode-CuG5i4rb.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),vi}}),loadingComponent:y1,delay:0,suspensible:!1}),y1),$r=or(()=>go(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return cn(Ro,fn(kt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield DI(),(yield Ts(()=>import("./index7-60leHAn4.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return cn(Ro,fn(kt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),QI=or(()=>go(null,null,function*(){try{return yield DI(),(yield Ts(()=>import("./index6-DW8kHBOa.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return cn(Ro,fn(kt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),ni=Gn(Ze({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(g(),C("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},N(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);ni.install=e=>{e.component(ni.__name,ni)};const cde={class:"superscript-node"},Si=Gn(Ze({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,footnote_reference:Bi,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,emoji:_i,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("sup",cde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"superscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Si.install=e=>{e.component(Si.__name,Si)};const dde={class:"subscript-node"},Ci=Gn(Ze({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,footnote_reference:Bi,strikethrough:si,highlight:Wi,insert:Ai,superscript:Si,emoji:_i,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("sub",dde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"subscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Ci.install=e=>{e.component(Ci.__name,Ci)};const fde={class:"strong-node"},oi=Gn(Ze({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,emphasis:ri,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("strong",fde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"strong"}-${l}`,components:o.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);oi.install=e=>{e.component(oi.__name,oi)};const pde={class:"strikethrough-node"},si=Gn(Ze({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("del",pde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"strikethrough"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);si.install=e=>{e.component(si.__name,si)};const hde=["href","title","aria-label","aria-hidden","target","rel"],mde=["aria-hidden"],gde={class:"link-text-wrapper relative inline-flex"},vde={class:"leading-[normal] link-text"},ii=Gn(Ze({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=wn("markstreamShowTooltips",void 0),o=O(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=O(()=>{var w,v,y,b,S;const I=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",T=(w=t.animationOpacity)!=null?w:.35,$=Math.max(.12,Math.min(.5*T,T)),F={"--underline-height":`${(v=t.underlineHeight)!=null?v:2}px`,"--underline-bottom":I,"--underline-opacity":String(T),"--underline-rest-opacity":String($),"--underline-duration":`${(y=t.animationDuration)!=null?y:1.6}s`,"--underline-timing":(b=t.animationTiming)!=null?b:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(S=t.animationIteration)!=null?S:"infinite"};return t.color&&(F["--link-color"]=t.color),F}),i=os(()=>t.customId),r=O(()=>kt({text:Ro,strong:oi,strikethrough:si,emphasis:ri,image:Sa,html_inline:zi,inline_code:js},i.value)),l=sh(),a=O(()=>{var w,v;const y=(w=t.node)==null?void 0:w.attrs;if(!y||typeof y!="object")return{};const b={};if(Array.isArray(y))for(const S of y)Array.isArray(S)&&S[0]&&(b[String(S[0])]=String((v=S[1])!=null?v:""));else for(const[S,I]of Object.entries(y))S&&I!=null&&I!==!1&&(b[S]=I===!0?"":String(I));return HA(b,"safe","a")}),u=O(()=>kt(kt({},l),a.value)),c=O(()=>{var w,v;return HA({href:String((v=(w=t.node)==null?void 0:w.href)!=null?v:"")},"safe","a").href}),d=O(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(fse(c.value)?"_blank":void 0)}),f=O(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),p=O(()=>{if(!c.value)return;const w=u.value.rel,v=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),y=new Set(Array.from(v).filter(b=>b.toLowerCase()!=="opener"));return f.value&&(y.add("noopener"),y.add("noreferrer")),y.size>0?Array.from(y).join(" "):void 0}),h=O(()=>{const w=kt({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function m(){o.value&&Rce()}const k=O(()=>{var w,v;const y=(w=t.node)==null?void 0:w.title;return typeof y=="string"&&y.trim().length>0?y:String((v=c.value)!=null?v:"")});return(w,v)=>{var y,b;return e.node.loading?(g(),C("span",Dn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},x(l),{style:s.value}),[_("span",gde,[_("span",vde,[K(x(Ro),{class:"leading-[normal] link-text",node:{type:"text",content:String((y=e.node.text)!=null?y:""),raw:String((b=e.node.text)!=null?b:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),v[1]||(v[1]=_("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,mde)):(g(),C("a",Dn({key:0,class:"link-node",href:c.value,title:o.value?"":k.value,"aria-label":`Link: ${k.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},h.value,{style:s.value,onMouseenter:v[0]||(v[0]=S=>(function(I){var T,$,F,R;if(!o.value)return;const P=I,M=P?.clientX!=null&&P?.clientY!=null?{x:P.clientX,y:P.clientY}:void 0,D=((T=t.node)==null?void 0:T.title)||(($=c.value)!=null&&$.includes("xn--")&&((R=(F=t.node)==null?void 0:F.text)!=null&&R.includes("://"))?t.node.text:c.value)||"";Oce(I.currentTarget,D,"top",!1,M)})(S)),onMouseleave:m}),[(g(!0),C(Te,null,st(e.node.children,(S,I)=>(g(),pe(x(el),{key:`${e.indexKey||"emphasis"}-${I}`,components:r.value,node:S,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${I}`},null,8,["components","node","custom-id","index-key"]))),128))],16,hde))}}}),[["__scopeId","data-v-367e6ca4"]]);ii.install=e=>{e.component(ii.__name,ii)};const yde={class:"insert-node"},Ai=Gn(Ze({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,strikethrough:si,highlight:Wi,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("ins",yde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"insert"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Ai.install=e=>{e.component(Ai.__name,Ai)};const kde={class:"highlight-node"},Wi=Gn(Ze({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,emphasis:ri,strikethrough:si,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("mark",kde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"highlight"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);Wi.install=e=>{e.component(Wi.__name,Wi)};const bde={class:"emphasis-node"},ri=Gn(Ze({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=O(()=>kt({text:Ro,inline_code:js,link:ii,html_inline:zi,strong:oi,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,footnote_reference:Bi,math_inline:$r,reference:ni},n.value));return(s,i)=>(g(),C("em",bde,[(g(!0),C(Te,null,st(e.node.children,(r,l)=>(g(),pe(x(el),{key:`${e.indexKey||"emphasis"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);ri.install=e=>{e.component(ri.__name,ri)};const wde={class:"hard-break"},Ca=Gn(Ze({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(g(),C("br",wde))}),[["__scopeId","data-v-50c58f70"]]);Ca.install=e=>{e.component(Ca.__name,Ca)};const Kp=Ze({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=Et({checkbox:Di,checkbox_input:Di,emoji:_i,emphasis:ri,hardbreak:Ca,highlight:Wi,inline_code:js,insert:Ai,link:ii,reference:ni,strikethrough:si,strong:oi,subscript:Ci,superscript:Si,text:Ro}),o=os(()=>t.customId),s=O(()=>{const i=o.value;return Object.keys(i).length>0?kt(kt({},n),i):n});return(i,r)=>(g(!0),C(Te,null,st(e.nodes,(l,a)=>(g(),pe(x(el),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function Hb(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(Hb)}function k1(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(Hb))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(Hb)?s:null}function Uu(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const xde=["cite"],_de={key:0,dir:"auto",class:"paragraph-node"},Sde=["custom-id"],dg=Gn(Ze({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=os(()=>t.customId),o=O(()=>!!n.value.paragraph),s=O(()=>!!n.value.text),i=O(()=>k1(t.node.children,!o.value)),r=O(()=>t.fade!==!1||s.value?null:Uu(i.value));return Vn("markstreamShowTooltips",O(()=>t.showTooltips)),Vn("markstreamFade",O(()=>t.fade)),(l,a)=>(g(),C("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(g(),C("p",_de,[r.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,Sde)):(g(),pe(x(Kp),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(g(),pe(x(Mi),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=u=>l.$emit("copy",u))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,xde))}}),[["__scopeId","data-v-abfecebc"]]);dg.install=e=>{e.component(dg.__name,dg)};const Cde={class:"definition-list"},Ade={class:"definition-term"},Mde={class:"definition-desc"},fg=Gn(Ze({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),C("dl",Cde,[(g(!0),C(Te,null,st(t.node.items,(s,i)=>(g(),C(Te,{key:i},[_("dt",Ade,[K(x(Mi),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),_("dd",Mde,[K(x(Mi),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);fg.install=e=>{e.component(fg.__name,fg)};const Ede=["href","title"],mp=Gn(Ze({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(i);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(g(),C("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Ede))}}),[["__scopeId","data-v-e1eb37b6"]]);mp.install=e=>{e.component(mp.__name,mp)};const Tde=["id"],Ide={class:"flex-1"},pg=Ze({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(g(),C("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[_("div",Ide,[K(x(Mi),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Tde))}});pg.install=e=>{e.component(pg.__name,pg)};const $de=["custom-id"],jb=Gn(Ze({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=os(()=>t.customId),o=wn("markstreamFade",void 0),s=O(()=>o?.value!==!1||n.value.text?null:Uu(t.node.children)),i=O(()=>kt({text:Ro,inline_code:js,link:ii,image:Sa,strong:oi,emphasis:ri,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,checkbox:Di,checkbox_input:Di,footnote_reference:Bi,hardbreak:Ca,math_inline:$r,reference:ni},n.value));return(r,l)=>(g(),pe(Ko(`h${e.node.level}`),Dn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ve(()=>[s.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,$de)):(g(!0),C(Te,{key:1},st(e.node.children,(a,u)=>(g(),pe(x(el),{key:u,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${u}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),M0=jb;M0.install=e=>{e.component(jb.__name,jb)};const Nde={key:0,dir:"auto",class:"paragraph-node"},Lde=["custom-id"],Fde={dir:"auto",class:"paragraph-node"},Ode=["custom-id"],pd=Gn(Ze({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=O(()=>{var p;return(p=t.node)!=null?p:t.item}),o=os(()=>t.customId),s=O(()=>!!o.value.paragraph),i=O(()=>!!o.value.text),r=O(()=>{var p;return k1((p=n.value)==null?void 0:p.children,!s.value)}),l=O(()=>{var p;if(s.value)return null;const h=(p=n.value)==null?void 0:p.children;if(!Array.isArray(h)||h.length<2)return null;const m=h[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const k=h.slice(1);if(!k.every(v=>v?.type==="list"))return null;const w=k1([m]);return w?{paragraphChildren:w,nestedLists:k}:null});function a(){return t.fade===!1&&!i.value}const u=O(()=>a()?Uu(r.value):null),c=O(()=>{var p;return a()?Uu((p=l.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=O(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return Vn("markstreamShowTooltips",O(()=>t.showTooltips)),Vn("markstreamFade",O(()=>t.fade)),(p,h)=>{var m,k;return g(),C("li",Dn({class:"list-item",dir:"auto"},f.value),[r.value?(g(),C("p",Nde,[u.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,Lde)):(g(),pe(x(Kp),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(g(),C(Te,{key:1},[_("p",Fde,[c.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,Ode)):(g(),pe(x(Kp),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(g(!0),C(Te,null,st(l.value.nestedLists,(w,v)=>(g(),pe(x(Mi),{key:v,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${v}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:h[0]||(h[0]=y=>p.$emit("copy",y))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(g(),pe(x(Mi),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(k=(m=n.value)==null?void 0:m.children)!=null?k:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:h[1]||(h[1]=w=>p.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);pd.install=e=>{e.component(pd.__name,pd)};const hd=Gn(Ze({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=os(()=>e.customId),n=O(()=>t.value.list_item||pd);return(o,s)=>(g(),pe(Ko(e.node.ordered?"ol":"ul"),{class:ze(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ve(()=>[(g(!0),C(Te,null,st(e.node.items,(i,r)=>{var l;return g(),pe(Ko(n.value),Dn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);hd.install=e=>{e.component(hd.__name,hd)};const Rde={key:2,class:"html-block-node__raw"},Pde=["innerHTML"],Dde={key:1,class:"html-block-node__placeholder"},gp=Gn(Ze({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=wn("markstreamHtmlPolicy",void 0),o=wn("markstreamNestedRendererProps",void 0),s=O(()=>{var M,D;return(D=(M=t.htmlPolicy)!=null?M:n?.value)!=null?D:"safe"}),i=O(()=>{var M,D;const B=(M=o?.value)!=null?M:{};return fn(kt({},B),{customId:(D=t.customId)!=null?D:B.customId,htmlPolicy:s.value})}),r=or({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1}),l=O(()=>{const M=lg(t.node.attrs,s.value);if(!M)return;const D=dp(M);return Object.keys(D).length>0?D:void 0}),a=O(()=>{const M=String(t.node.tag||"").trim(),D=lg(t.node.attrs,s.value,M);if(!D)return;const B=dp(D);return Object.keys(B).length>0?B:void 0}),u=os(()=>t.customId),c=Ze({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>"u"),p=V(t.node.content),h=O(()=>Array.isArray(t.node.children)?t.node.children:[]),m=O(()=>String(t.node.tag||"div")),k=O(()=>{var M;if(m.value.trim().toLowerCase()!=="details"||(M=t.node.attrs)!=null&&M.some(([B])=>String(B).toLowerCase()==="open"))return null;const D=h.value[0];return D?.type==="html_block"&&String(D.tag||"").toLowerCase()==="summary"?D:null}),w=O(()=>{var M;return Uu((M=k.value)==null?void 0:M.children)}),v=O(()=>{const M=k.value;if(!M)return;const D=lg(M.attrs,s.value,"summary");if(!D)return;const B=dp(D);return Object.keys(B).length>0?B:void 0}),y=O(()=>w.value==null?h.value:h.value.slice(1)),b=O(()=>{const M=m.value.trim().toLowerCase();return w9.has(M)||Uw(M,s.value)}),S=O(()=>h.value.length>0&&!!t.node.tag&&!b.value),I=O(()=>{var M,D,B;if(S.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(M=p.value)!=null?M:""};const z=(D=p.value)!=null?D:t.node.content;if(!z)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:fd(z,s.value)};if(t.node.loading){const L=v1(z,u.value,s.value);return L===null?{mode:"text",content:(B=t.node.raw)!=null?B:z}:{mode:"dynamic",nodes:L}}if(!qI(z,u.value))return{mode:"html",content:fd(z,s.value)};const A=v1(z,u.value,s.value);return A===null?{mode:"html",content:fd(z,s.value)}:{mode:"dynamic",nodes:A}}),T=Xw(),$=Yw(),F=Jw(),R=Co(null),P=!!t.node.loading;return typeof window<"u"?(Ye([()=>d.value,()=>$?.value.heavyBlockMargin,()=>$?.value.rootMargin],([M],D,B)=>{var z,A,L,W;if((A=(z=R.value)==null?void 0:z.destroy)==null||A.call(z),R.value=null,!P)return f.value=!0,void(p.value=t.node.content);if(!M)return void(f.value=!1);let j=!0;const re=(W=(L=$?.value.heavyBlockMargin)!=null?L:$?.value.rootMargin)!=null?W:ju,Q=T(M,{rootMargin:re,allowIdle:!F.value});R.value=Q,f.value=f.value||Q.isVisible.value,Q.whenVisible.then(()=>{j&&R.value===Q&&(f.value=!0)}),B(()=>{j=!1,Q.destroy(),R.value===Q&&(R.value=null)})},{immediate:!0}),Ye(()=>t.node.content,M=>{P&&!f.value||(p.value=M)})):f.value=!0,po(()=>{var M,D;(D=(M=R.value)==null?void 0:M.destroy)==null||D.call(M),R.value=null}),(M,D)=>(g(),pe(Ko(S.value?m.value:"div"),Dn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":x(F)&&!f.value?"true":void 0},S.value?a.value:void 0),{default:ve(()=>[f.value?(g(),C(Te,{key:0},[I.value.mode==="structured"?(g(),C(Te,{key:0},[w.value!==null?(g(),C(Te,{key:0},[_("summary",iF(B5(v.value)),N(w.value),17),y.value.length?(g(),pe(x(r),Dn({key:0},i.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):oe("",!0)],64)):(g(),pe(x(r),Dn({key:1},i.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):I.value.mode==="dynamic"?(g(),pe(x(c),{key:1,nodes:I.value.nodes},null,8,["nodes"])):I.value.mode==="text"?(g(),C("pre",Rde,N(I.value.content),1)):(g(),C("div",Dn({key:3},l.value,{innerHTML:I.value.content}),null,16,Pde))],64)):(g(),C("div",Dde,[An(M.$slots,"placeholder",{node:e.node},()=>[D[0]||(D[0]=_("span",{class:"html-block-node__placeholder-bar"},null,-1)),D[1]||(D[1]=_("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),D[2]||(D[2]=_("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);gp.install=e=>{e.component(gp.__name,gp)};const Bde={dir:"auto",class:"paragraph-node"},zde=["custom-id"],Du=Gn(Ze({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=os(()=>t.customId),o=wn("markstreamHtmlPolicy",void 0),s=wn("markstreamFade",void 0),i=wn("markstreamParseOptions",void 0),r=wn("markstreamCustomMarkdownIt",void 0),l=wn("markstreamNestedRendererProps",void 0),a=O(()=>{var $;return($=o?.value)!=null?$:"safe"}),u=O(()=>{var $;return($=t.parseOptions)!=null?$:i?.value}),c=O(()=>{var $;return($=t.customMarkdownIt)!=null?$:r?.value}),d=O(()=>{var $,F;return(F=t.customHtmlTags)!=null?F:($=l?.value)==null?void 0:$.customHtmlTags}),f=O(()=>{var $,F;const R=($=l?.value)!=null?$:{};return fn(kt({},R),{customId:(F=t.customId)!=null?F:R.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),p=or({loader:()=>Promise.resolve().then(()=>ux),suspensible:!1});function h($){var F;return $.type==="text"&&String((F=$.content)!=null?F:"").trim()===""}const m=O(()=>t.node.children.filter($=>!h($))),k=O(()=>m.value.length>0&&m.value.every($=>$.type==="image"||(function(F){var R;const P=(function(M){return M.type==="link"&&Array.isArray(M.children)?M.children.filter(D=>!h(D)):[]})(F);return P.length===1&&((R=P[0])==null?void 0:R.type)==="image"})($))),w=O(()=>new Set(Xu(d.value))),v=O(()=>{if(!k.value||m.value.length<=1)return t.node.children;const $=[];for(let F=0;F0,M=t.node.children.slice(F+1).some(D=>!h(D));P&&M&&$.push(fn(kt({},R),{content:" ",raw:" "}))}return $}),y=O(()=>s?.value===!1&&!n.value.text),b=O(()=>y.value?Uu(v.value):null);function S($,F){return{node:$,"index-key":`${t.indexKey}-${F}`,"custom-id":t.customId,"custom-html-tags":d.value}}const I=O(()=>kt({inline_code:js,image:Sa,link:ii,hardbreak:Ca,emphasis:ri,strong:oi,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,html_inline:zi,html_block:gp,emoji:_i,checkbox:Di,math_inline:$r,checkbox_input:Di,reference:ni,footnote_anchor:mp,footnote_reference:Bi,text:Ro},n.value)),T=O(()=>v.value.map(($,F)=>{var R;const P=(function(M){var D,B,z,A;if(M.type==="html_block"||M.type==="html_inline"){const L=String((D=M.tag)!=null?D:"").trim().toLowerCase()||A9(M.content);if(L&&!w.value.has(L)&&M9((B=M.content)!=null?B:M.raw,L)){const W=String((A=(z=M.content)!=null?z:M.raw)!=null?A:"");return{child:{type:"text",content:W,raw:W},component:Ro,isCustomComponent:!1}}}return{child:M,component:I.value[M.type],isCustomComponent:!!(n.value[M.type]&&!hh(String(M.type)))}})($);return fn(kt({},P),{index:F,key:`${t.indexKey||"paragraph"}-${F}`,customAttrs:P.isCustomComponent?Zw(P.child,a.value):void 0,hasSlotChildren:Array.isArray(P.child.children)&&P.child.children.length>0,slotContent:String((R=P.child.content)!=null?R:""),originalChild:$})}));return($,F)=>(g(),C("p",Bde,[b.value!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(b.value),9,zde)):(g(!0),C(Te,{key:1},st(T.value,R=>{return g(),C(Te,{key:R.key},[k.value&&h(R.originalChild)?(g(),C(Te,{key:0},[qe(N((P=R.originalChild,String((M=P.content)!=null?M:""))),1)],64)):R.isCustomComponent?(g(),pe(Ko(R.component),Dn({key:1,ref_for:!0},R.customAttrs,{node:R.child,loading:R.child.loading,"index-key":R.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ve(()=>[R.hasSlotChildren?(g(),pe(x(p),Dn({key:0,ref_for:!0},f.value,{nodes:R.child.children,"index-key":R.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):R.slotContent?(g(),pe(x(p),Dn({key:1,ref_for:!0},f.value,{content:R.slotContent,final:!R.child.loading,"index-key":`${R.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(g(),pe(Ko(R.component),Dn({key:2,ref_for:!0},S(R.child,R.index)),null,16))],64);var P,M}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Du.install=e=>{e.component(Du.__name,Du)};const Wde={class:"table-node-wrapper"},Hde=["aria-busy"],jde={key:0},Ude=["custom-id"],Vde=["aria-label","onPointerdown"],qde=["custom-id"],Kde={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},vp=Gn(Ze({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=O(()=>{var w;return(w=t.node.loading)!=null&&w}),o=O(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=V(null),i=V([]);let r=null;const l=O(()=>t.node.header.cells.length),a=O(()=>i.value.some(w=>Number.isFinite(w)&&w>0)),u=O(()=>a.value?i.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Vn("markstreamShowTooltips",O(()=>t.showTooltips)),Vn("markstreamFade",O(()=>t.fade));const c=os(()=>t.customId),d=O(()=>!!c.value.text),f=O(()=>!!c.value.paragraph),p=new WeakMap;function h(w){const v=t.fade===!1&&!d.value,y=!f.value,b=p.get(w);if(b?.children===w.children&&b.textFastPath===v&&b.paragraphFastPath===y)return b.info;const S=k1(w.children,y,!0),I={simpleChildren:S,plainText:S&&v?Uu(S):null};return p.set(w,{children:w.children,textFastPath:v,paragraphFastPath:y,info:I}),I}function m(w){if(!r)return;w.preventDefault();const v=r.startWidth+r.nextStartWidth,y=Math.min(48,Math.floor(v/2)),b=Math.max(y,Math.min(v-y,Math.round(r.startWidth+w.clientX-r.startX))),S=[...r.widths];S[r.index]=b,S[r.index+1]=v-b,i.value=S}function k(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),r=null)}return Ye(l,()=>{k(),i.value=[]}),po(k),(w,v)=>(g(),C("div",Wde,[_("table",{ref_key:"tableRef",ref:s,class:ze(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(g(),C("colgroup",jde,[(g(!0),C(Te,null,st(e.node.header.cells,(y,b)=>(g(),C("col",{key:b,style:jt(u.value[b])},null,4))),128))])):oe("",!0),_("thead",null,[_("tr",null,[(g(!0),C(Te,null,st(e.node.header.cells,(y,b)=>(g(),C("th",{key:b,dir:"auto",class:ze([y.align==="right"?"text-right":y.align==="center"?"text-center":"text-left"])},[h(y).plainText!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(h(y).plainText),9,Ude)):h(y).simpleChildren?(g(),pe(x(Kp),{key:1,nodes:h(y).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${b}`},null,8,["nodes","custom-id","index-key"])):(g(),pe(x(Mi),{key:2,nodes:y.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[0]||(v[0]=S=>w.$emit("copy",S))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),b(function(I,T){if(T.button!==0)return;const $=(function(){var P;const M=(P=s.value)==null?void 0:P.querySelectorAll("thead th");return Array.from(M??[],D=>Math.round(D.getBoundingClientRect().width))})(),F=$[I],R=$[I+1];F&&R&&(T.preventDefault(),r={index:I,startX:T.clientX,startWidth:F,nextStartWidth:R,widths:$},i.value=$,window.addEventListener("pointermove",m),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k))})(b,S)},null,40,Vde)):oe("",!0)],2))),128))])]),_("tbody",null,[(g(!0),C(Te,null,st(o.value,(y,b)=>(g(),C("tr",{key:b},[(g(!0),C(Te,null,st(y.cells,(S,I)=>(g(),C("td",{key:I,class:ze([S.align==="right"?"text-right":S.align==="center"?"text-center":"text-left"]),dir:"auto"},[h(S).plainText!==null?(g(),C("span",{key:0,class:"text-node","custom-id":t.customId},N(h(S).plainText),9,qde)):h(S).simpleChildren?(g(),pe(x(Kp),{key:1,nodes:h(S).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${b}-${I}`},null,8,["nodes","custom-id","index-key"])):(g(),pe(x(Mi),{key:2,nodes:S.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[1]||(v[1]=T=>w.$emit("copy",T))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Hde),K(Cr,{name:"table-node-fade"},{default:ve(()=>[n.value?(g(),C("div",Kde,[An(w.$slots,"loading",{isLoading:n.value},()=>[v[2]||(v[2]=_("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),v[3]||(v[3]=_("span",{class:"sr-only"},"Loading",-1))],!0)])):oe("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);vp.install=e=>{e.component(vp.__name,vp)};const Gde={class:"hr-node"},hg=Gn({},[["render",function(e,t){return g(),C("hr",Gde)}],["__scopeId","data-v-39b2349c"]]);hg.install=e=>{e.component(hg.__name,hg)};const Zde={class:"unknown-node"},Ub=Ze({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(g(),C("div",Zde,N(e.node.raw),1))}),mg=Gn(Ze({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=O(()=>`vmr-container vmr-container-${t.node.name}`),o=os(()=>t.customId),s=O(()=>kt({text:Ro,paragraph:Du,heading:M0,inline_code:js,link:ii,image:Sa,strong:oi,emphasis:ri,strikethrough:si,insert:Ai,subscript:Ci,superscript:Si,checkbox:Di,checkbox_input:Di,hardbreak:Ca,math_inline:$r,reference:ni,list:hd,math_block:QI,table:vp},o.value));return(i,r)=>(g(),C("div",Dn({class:n.value},e.node.attrs),[(g(!0),C(Te,null,st(e.node.children,(l,a)=>{return g(),pe(Ko((u=l.type,s.value[u]||Ub)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var u}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);mg.install=e=>{e.component(mg.__name,mg)};const Yde=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],JA=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Jde(e){if(e<=255)return Yde[e];let t=0,n=JA.length-1;for(;t<=n;){const o=t+n>>1,s=JA[o];if(es[1]))return s[2];t=o+1}}return"L"}const Xde=/[ \t\n\r\f]+/g,Qde=/[\t\n\r\f]| {2,}|^ | $/;let Vy=null;const efe=new RegExp("\\p{Script=Arabic}","u"),Oa=new RegExp("\\p{M}","u"),ex=new RegExp("\\p{Nd}","u");function XA(e){return efe.test(e)}function QA(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Yr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(QA(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(QA(n))return!0}}return!1}const tfe=new Set([" "," ","⁠","\uFEFF"]),nfe=new Set(["-","‐","–","—"]);function e$(e,t){return!((function(n){const o=yp(n);return o!==null&&tfe.has(o)})(e)||t&&((function(n){const o=yp(n);return o!==null&&(tx.has(o)||Vu.has(o))})(e)||(function(n){const o=yp(n);return o!==null&&nfe.has(o)})(e)))}const tx=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),E0=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),nx=new Set(["'","’"]),Vu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),ofe=new Set([":",".","،","؛"]),sfe=new Set(["၏"]),ife=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function rfe(e){if(ox(e))return!0;let t=!1;for(const n of e)if(Vu.has(n)||w1(n))t=!0;else if(!t||!Oa.test(n))return!1;return t}function lfe(e){for(const t of e)if(!tx.has(t)&&!Vu.has(t))return!1;return e.length>0}function afe(e){if(ox(e))return!0;for(const t of e)if(!(E0.has(t)||nx.has(t)||Oa.test(t)||w1(t)))return!1;return e.length>0}function ox(e){let t=!1;for(const n of e)if(n!=="\\"&&!Oa.test(n)){if(!(E0.has(n)||Vu.has(n)||nx.has(n)))return!1;t=!0}return t}function b1(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function yp(e){if(e.length===0)return null;const t=b1(e,e.length);return e.slice(t)}const ufe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function w1(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,ufe)}function cfe(e){const t=(function(n){for(const o of n)if(!Oa.test(o))return o;return null})(e);return t!==null&&ex.test(t)}function dfe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Oa.test(o))n--;else{if(!E0.has(o)&&!nx.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function ffe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function e8(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function t8(e,t){return e&&t!==null&&ofe.has(t)}function pfe(e){const t=yp(e);return t!==null&&sfe.has(t)}function hfe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function Vb(e){let t=e.length;for(;t>0;){const n=b1(e,t),o=e.slice(n,t);if(ife.has(o))return!0;if(!Vu.has(o))return!1;t=n}return!1}function mfe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const gfe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function yr(e){return e.length===1?e[0]:e.join("")}function vfe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),yr(n)}function yfe(e,t,n,o){if(!gfe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=mfe(c,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:yr(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return i!==null&&s.push({text:yr(r),isWordLike:a,kind:i,start:l}),s}function qy(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const kfe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function bfe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||kfe.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!Cfe.has(e)&&!Sfe.test(e)&&_fe.test(e)}function n8(e){let t=!1;for(const n of e)if(!Oa.test(n)){if(!t$(n))return!1;t=!0}return t}function Afe(e,t,n,o){const s=!t&&n8(e),i=!o&&n8(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=b1(c,d),p=c.slice(f,d);if(!Oa.test(p))return p;d=f}return null})(a);return u!==null&&w1(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=b1(a,u),d=a.slice(c,u);if(!Oa.test(d))return t$(d)||w1(d);u=c}return!1})(e);return!!(s||i||l)&&!Yr(e)&&!Yr(n)&&(t||s||r)&&(o||i)}function o8(e){for(const t of e)if(ex.test(t))return!0;return!1}function gg(e){if(e.length===0)return!1;for(const t of e)if(!ex.test(t)&&!xfe.has(t))return!1;return!0}function Mfe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,p;const h=(Vy===null&&(Vy=new Intl.Segmenter(void 0,{granularity:"word"})),Vy);let m=0;const k=[],w=[],v=[],y=[],b=[],S=[],I=[],T=[],$=[],F=[],R=[],P=[];for(const A of h.segment(a))for(const L of yfe(A.segment,(d=A.isWordLike)!=null&&d,A.index,c)){let W=function(){S[q]!==null&&(w[q]=[e8(k,S,I,q)],S[q]=null),w[q].push(L.text),v[q]=v[q]||L.isWordLike,T[q]=T[q]||Q,$[q]=$[q]||Y,F[q]=X,R[q]=te,P[q]=t8($[q],G)};const j=L.kind==="text",re=ffe(L.text,L.isWordLike,L.kind),Q=Yr(L.text),Y=XA(L.text),G=yp(L.text),X=Vb(L.text),te=pfe(L.text),q=m-1;u.carryCJKAfterClosingQuote&&j&&m>0&&y[q]==="text"&&Q&&T[q]&&F[q]||j&&m>0&&y[q]==="text"&&lfe(L.text)&&T[q]||j&&m>0&&y[q]==="text"&&R[q]?W():j&&m>0&&y[q]==="text"&&L.isWordLike&&Y&&P[q]?(W(),v[q]=!0):re!==null&&m>0&&y[q]==="text"&&S[q]===re?I[q]=((f=I[q])!=null?f:1)+1:j&&!L.isWordLike&&m>0&&y[q]==="text"&&!T[q]&&(rfe(L.text)||L.text==="-"&&v[q])?W():(k[m]=L.text,w[m]=[L.text],v[m]=L.isWordLike,y[m]=L.kind,b[m]=L.start,S[m]=re,I[m]=re===null?0:1,T[m]=Q,$[m]=Y,F[m]=X,R[m]=te,P[m]=t8(Y,G),m++)}for(let A=0;Anull);let D=-1;for(let A=m-1;A>=0;A--){const L=k[A];if(L.length!==0){if(y[A]==="text"&&!v[A]&&D>=0&&y[D]==="text"&&(afe(L)||L==="-"&&cfe(k[D]))){const W=(p=M[D])!=null?p:[];W.push(L),M[D]=W,b[D]=b[A],k[A]="";continue}D=A}}for(let A=0;AQ+1){L.push(yr(te)),W.push(me),j.push("text"),re.push(A.starts[Q]),Q=q;continue}}L.push(Y),W.push(X),j.push(G),re.push(A.starts[Q]),Q++}return{len:L.length,texts:L,isWordLike:W,kinds:j,starts:re}})((function(A){const L=[],W=[],j=[],re=[];for(let Q=0;Q1;for(let te=0;te=A.len||qy(A.kinds[G]))continue;const X=[],te=A.starts[G];let q=G;for(;q0&&(L.push(yr(X)),W.push(!0),j.push("text"),re.push(te),Q=q-1)}return{len:L.length,texts:L,isWordLike:W,kinds:j,starts:re}})((function(A){const L=A.texts.slice(),W=A.isWordLike.slice(),j=A.kinds.slice(),re=A.starts.slice();for(let Y=0;Y=0&&!e$(u.texts[y-1],c)&&v(y),m<0&&(m=y),k=k||Yr(b))}return v(u.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:h}})(i,r,t.breakKeepAllAfterPunctuation):r;return kt({normalized:i,chunks:Mfe(l,s)},l)}let Ac=null;const s8=new Map;let Mc=null;const Tfe=new RegExp("\\p{Emoji_Presentation}","u"),Ife=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Ky=null;const i8=new Map;function qb(){if(Ac!==null)return Ac;if(typeof OffscreenCanvas<"u")return Ac=new OffscreenCanvas(1,1).getContext("2d"),Ac;if(typeof document<"u")return Ac=document.createElement("canvas").getContext("2d"),Ac;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function oa(e,t){let n=t.get(e);return n===void 0&&(n={width:qb().measureText(e).width,containsCJK:Yr(e)},t.set(e,n)),n}function x1(){if(Mc!==null)return Mc;if(typeof navigator>"u")return Mc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mc;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Mc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mc}function n$(){return Ky===null&&(Ky=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Ky}function $fe(e){return Tfe.test(e)||e.includes("️")}function cu(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let r=0;const l=n$();for(const a of l.segment(i))$fe(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function Nfe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function r8(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function l8(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function sx(e,t){return t===0?0:e+t}function Ofe(e,t,n,o,s){return sx(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function a8(e,t,n,o){return sx(o,t==="tab"?0:e.lineEndFitAdvances[n])}function u8(e,t,n,o,s){return sx(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function Rfe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Pfe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Cm(e,t,n){let o=t;for(;oW){if(fe!==null&&J>H){q(ne,J,ae),be=J,de=Cm(fe,de,be+1),J=-1,ae=0;continue}q(),xe(ne,be,_e)}else re+=_e,Y=ne,G=be+1;else xe(ne,be,_e);const ce=be+1;fe!==null&&fe[de]===ce&&(J=ce,ae=re,de++),be++}Q&&Y===ne&&G===ye.length&&(Y=ne+1,G=0)}let ee=0;for(;ee=B.length)));){const ne=B[ee],H=r8(z[ee]);if(Q)if(re+ne>W){if(H){We(ee,ne),q(ee+1,0,re-ne),ee++;continue}if(X>=0){if(Y>X||Y===X&&G>0){q();continue}q(X,0,te);continue}if(ne>W&&A[ee]!==null){q(),he(ee,0),ee++;continue}q()}else We(ee,ne),H&&(X=ee+1,te=re-ne),ee++;else ne>W&&A[ee]!==null?he(ee,0):me(ee,ne),H&&(X=ee+1,te=re-ne),ee++}return Q&&q(),j})(n,o);const{widths:s,kinds:i,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=x1(),d=o+c.lineFitEpsilon;let f=0,p=0,h=!1,m=0,k=0,w=-1,v=0,y=null;function b(){w=-1,v=0,y=null}function S(M=m,D=k,B){f++,p=0,h=!1,b()}function I(M,D){h=!0,m=M+1,k=0,p=D}function T(M,D,B){h=!0,m=M,k=D+1,p=B}function $(M,D){h?(p+=D,m=M+1,k=0):I(M,D)}function F(M,D,B,z,A,L){if(!D)return;const W=a8(n,M,B,A);u8(n,M,B,A,z),w=B+1,v=p-L+W,y=M}function R(M,D){var B;const z=r[M],A=(B=l[M])!=null?B:null;let L=A===null?-1:Cm(A,0,D+1),W=-1,j=D;for(;jd){if(A!==null&&W>D){S(M,W),j=W,L=Cm(A,L,j+1),W=-1;continue}S(),T(M,j,re)}else p=G,m=M,k=j+1}else T(M,j,re);const Q=j+1;A!==null&&A[L]===Q&&(W=Q,L++),j++}h&&m===M&&k===z.length&&(m=M+1,k=0)}function P(M){f++,b()}for(let M=0;M=D.endSegmentIndex)));){const z=i[B],A=r8(z),L=Ffe(n,h,B),W=z==="tab"?Lfe(p+L,n.tabStopAdvance):s[B],j=L+W,re=Ofe(n,z,B,L,W);if(z!=="soft-hyphen")if(h){if(p+re>d){const Q=p+a8(n,z,B,L);if(u8(n,z,B,L,W),y==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&v<=d){S(w,0);continue}if(A&&Q<=d){$(B,j),S(B+1,0),B++;continue}if(w>=0&&v<=d){if(m>w||m===w&&k>0){S();continue}const Y=w;S(Y,0),B=Y;continue}if(re>d&&r[B]!==null){S(),R(B,0),B++;continue}S();continue}$(B,j),F(z,A,B,W,L,j),B++}else re>d&&r[B]!==null?R(B,0):I(B,W),F(z,A,B,W,L,j),B++;else h&&(m=B+1,k=0,w=B+1,v=p+a,y=z),B++}h&&(D.consumedEndSegmentIndex,S(D.consumedEndSegmentIndex,0))}return f})(e,t)}let Gy=null;function ix(){return Gy===null&&(Gy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Gy}function Bfe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,p){o=[d],s=f,i=p,r=Vb(d),l=E0.has(d)}function c(d,f){o.push(d),i=i||f;const p=Vb(d);r=d.length===1&&Vu.has(d)&&r||p,l=!1}for(const d of ix().segment(e)){const f=d.segment,p=Yr(f);o.length!==0?l||tx.has(f)||Vu.has(f)||t.carryCJKAfterClosingQuote&&p&&r?c(f,p):i||p?(a(),u(f,d.index,p)):c(f,p):u(f,d.index,p)}return a(),n}function zfe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(l){if(!(s<0)){if(i)s+1===l?o.push(t[s]):(function(a,u){const c=t[a].start,d=u=0&&!e$(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||Yr(a.text)}return r(t.length),o}function c8(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=ix();for(const s of o.segment(e))n++;return n}function Wfe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Hfe(e,t,n,o,s){const i=x1(),{cache:r,emojiCorrection:l}=(function(P,M){qb().font=P;const D=(function(A){let L=s8.get(A);return L||(L=new Map,s8.set(A,L)),L})(P),B=(function(A){const L=A.match(/(\d+(?:\.\d+)?)\s*px/);return L?parseFloat(L[1]):16})(P),z=M?(function(A,L){let W=i8.get(A);if(W!==void 0)return W;const j=qb();j.font=A;const re=j.measureText("😀").width;if(W=0,re>L+.5&&typeof document<"u"&&document.body!==null){const Q=document.createElement("span");Q.style.font=A,Q.style.display="inline-block",Q.style.visibility="hidden",Q.style.position="absolute",Q.textContent="😀",document.body.appendChild(Q);const Y=Q.getBoundingClientRect().width;document.body.removeChild(Q),re-Y>.5&&(W=re-Y)}return i8.set(A,W),W})(P,B):0;return{cache:D,fontSize:B,emojiCorrection:z}})(t,(a=e.normalized,Ife.test(a)));var a;const u=cu("-",oa("-",r),l)+(s===0?0:2*s),c=8*cu(" ",oa(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const w=null,v=[],y=[],b=[],S=null,I=Array.from({length:e.len});function T(P,M,D,B,z,A,L,W,j){z!=="text"&&z!=="space"&&z!=="zero-width-break"&&(k=!1),f.push(M),p.push(D),h.push(B),m.push(z),v.push(L),y.push(W),d&&b.push(j)}function $(P,M,D,B,z){const A=oa(P,r),L=d?c8(P,M):0,W=(function(Y,G,X){return G>1?Y+(G-1)*X:Y})(cu(P,A,l),L,s),j=M==="space"||M==="preserved-space"||M==="zero-width-break"?0:W,re=j===0?0:j+(L>0?s:0),Q=M==="space"||M==="zero-width-break"?0:W;if(z&&B&&P.length>1){let Y="sum-graphemes";s!==0?Y="segment-prefixes":gg(P)?Y="pair-context":i.preferPrefixWidthsForBreakableRuns&&(Y="segment-prefixes");const G=(function(te,q,me,xe,We){if(q.breakableFitAdvances!==void 0&&q.breakableFitMode===We)return q.breakableFitAdvances;q.breakableFitMode=We;const he=n$(),ee=[];for(const ye of he.segment(te))ee.push(ye.segment);if(ee.length<=1)return q.breakableFitAdvances=null,q.breakableFitAdvances;if(We==="sum-graphemes"){const ye=[];for(const fe of ee){const de=oa(fe,me);ye.push(cu(fe,de,xe))}return q.breakableFitAdvances=ye,q.breakableFitAdvances}if(We==="pair-context"||ee.length>96){const ye=[];let fe=null,de=0;for(const J of ee){const ae=cu(J,oa(J,me),xe);if(fe===null)ye.push(ae);else{const be=fe+J,_e=oa(be,me);ye.push(cu(be,_e,xe)-de)}fe=J,de=ae}return q.breakableFitAdvances=ye,q.breakableFitAdvances}const ne=[];let H="",Z=0;for(const ye of ee){H+=ye;const fe=cu(H,oa(H,me),xe);ne.push(fe-Z),Z=fe}return q.breakableFitAdvances=ne,q.breakableFitAdvances})(P,A,r,l,Y),X=G===null||o==="keep-all"?null:(function(te){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(te))return null;const q=[];let me=0;for(const xe of ix().segment(te))me++,Wfe(xe.segment)&&q.push(me);return q.length===0?null:q})(P);return void T(P,W,re,Q,M,D,G,X,L)}T(P,W,re,Q,M,D,null,null,L)}for(let P=0;P=55296&&te<=56319&&X+1=56320&&We<=57343&&(q=We-56320+(te-55296<<10)+65536,me=2)}const xe=Jde(q);xe!=="R"&&xe!=="AL"&&xe!=="AN"||(W=!0);for(let We=0;We=0&&L[te]==="ET";te--)L[te]="EN";for(te=X+1;te0?L[X-1]:Y)!=="L"?"R":"L";if(q===((te{const e=globalThis;if(e[Zy])return e[Zy];const t={configs:{},controllers:{},revision:Co(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Zy]=t,t})();let Sf=null;const Yy=is.revision;function d8(e){var t;return e&&(t=is.configs[e])!=null?t:null}function f8(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function Ufe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function Jy(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!Ufe(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function Xy(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Sf!=null)return Sf;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return Sf=!!((i=r.getContext)!=null&&i.call(r,"2d")),Sf}catch{return Sf=!1,!1}})())return null;try{const i=Math.round(100*t)/100,r=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),l=is.blockEstimateCache.get(r);if(l)return is.blockEstimateCache.delete(r),is.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(p,h,m){const k=`${m}\0${h}\0${p}`,w=is.preparedCache.get(k);if(w)return is.preparedCache.delete(k),is.preparedCache.set(k,w),w.prepared;const v=(function(y,b,S){return(function(I,T,$,F){var R,P;const M=(R=F?.wordBreak)!=null?R:"normal",D=(P=F?.letterSpacing)!=null?P:0;return Hfe(Efe(I,x1(),F?.whiteSpace,M),T,!1,M,D)})(y,b,0,S)})(p,h,{whiteSpace:m});for(is.preparedCache.set(k,{prepared:v});is.preparedCache.size>240;){const y=is.preparedCache.keys().next().value;if(!y)break;is.preparedCache.delete(y)}return v})(e,n.font,a),c=(function(p,h,m){const k=Dfe(p,h);return{lineCount:k,height:k*m}})(u,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(is.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});is.blockEstimateCache.size>4e3;){const p=is.blockEstimateCache.keys().next().value;if(!p)break;is.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function o$(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=Jy(e.children);return i&&n.paragraph?Xy(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=Jy(e.children),l=n.headings[i];return r&&l?Xy(r,t,l):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const r=Jy((s=i[0])==null?void 0:s.children);return r?Xy(r,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of i){const a=o$(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function Cf(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function du(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function Qy(e,t,n=0){return e.diff?Qw(t??{},n)?(function(o){const s=du(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!jfe.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return Cf(du(o.originalCode))+Cf(du(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(Cf(du(s)),Cf(du(i)));const r=du(o.code).split(/\r?\n/);let l=0,a=0;for(const u of r)u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):Cf(du(e.code,e.loading===!0))}function Vfe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function ek(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=f8(o.lineHeight,1.5*f8(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:Vfe(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const qfe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function p8(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(i))qfe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function h8(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,i-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=o.getNormalizedScrollTop(e,t,!1),h=Math.abs(p-r);hd&&(e.scrollTop=u)}function m8(e,t){let n=0,o=null,s=null;const i=()=>{const r=s;s=null,o=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(o&&(clearTimeout(o),o=null),n=l,s=null,e(...r)):o||(o=setTimeout(i,a))}}function g8(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const s$=Symbol("MarkstreamMathBlockMinHeightCache");function MBe(){return wn(s$,null)}const Kfe=new Set(["text","inline_code","emoji","footnote_reference"]),Gfe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Af(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function fu(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/i),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*o+12))}function i$(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(Kfe.has(o))return!0;if(!Gfe.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(i$)}function Kb(e){var t,n,o,s,i,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((o=(n=u.content)!=null?n:u.raw)!=null?o:"");if(c==="inline_code")return String((r=(i=(s=u.code)!=null?s:u.content)!=null?i:u.raw)!=null?r:"");if(c==="emoji")return String((a=(l=u.name)!=null?l:u.raw)!=null?a:"");if(typeof u.text=="string")return u.text;const d=[];for(const f of["children","items","cells","rows"]){const p=u[f];if(Array.isArray(p)){const h=p.map(Kb).filter(Boolean).join(" ");h&&d.push(h)}}return d.join(" ").replace(/\s+/g," ").trim()}function r$(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(r$)})}function Zfe(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function Yfe(e,t){var n,o,s,i,r,l,a,u,c,d,f,p,h,m;if(!e||typeof e!="object")return 32;const k=e,w=String((n=k.type)!=null?n:""),v=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(y){var b;const S=Number((b=y.level)!=null?b:y.depth);return S>=4?20:S===3?30:S===2?32:44})(k);case"paragraph":return(function(y,b){const S=String(y??"");if(!S)return 28;const I=Math.max(18,Math.floor(Math.max(320,b)/8)),T=S.split(/\r?\n/).length,$=Math.ceil(S.length/I);return Math.max(1,T,$)<=1?28:fu(S,b,34)})(String((s=(o=k.raw)!=null?o:k.content)!=null?s:""),v);case"list":return(function(y,b){var S;const I=Array.isArray(y.items)?y.items:[];if(!I.length)return 48;const T=Math.max(48,30*I.length+12);let $=12;for(const P of I)$+=Zfe(Kb(P)||String((S=P.raw)!=null?S:""),b);const F=Math.max(0,$-T);if(I.length>20){const P=Math.round(2.4*I.length);return Math.round(T+Math.max(P,Math.min(F,3*I.length)))}if(F<=0)return T;const R=I.length>8?8*I.length:F;return Math.round(T+Math.min(F,R))})(k,v);case"list_item":return fu(String((r=(i=k.raw)!=null?i:k.content)!=null?r:""),v,34);case"blockquote":return fu(String((a=(l=k.raw)!=null?l:k.content)!=null?a:""),v,56);case"table":return(function(y,b){const S=[...y.header?[y.header]:[],...Array.isArray(y.rows)?y.rows:[]];if(!S.length){const I=Array.isArray(y.children)?y.children.length:3;return Math.max(120,38*I+48)}return Math.max(120,Math.round(4+S.reduce((I,T)=>I+(function($,F){const R=Math.max(1,$.length),P=Math.max(80,(F-32)/R),M=Math.max(10,Math.floor(P/8)),D=Math.max(1,...$.map(B=>{var z;const A=Kb(B)||String((z=B?.raw)!=null?z:"");return Math.ceil(A.length/M)||1}));return 54+34*Math.max(0,D-1)+(R<=3&&$.some(r$)?14:0)})((function($){var F;return Array.isArray($?.cells)&&(F=$.cells)!=null?F:[]})(T),b),0)))})(k,v);case"code_block":{const y=String((u=k.language)!=null?u:"").trim().toLowerCase(),b=String((d=(c=k.code)!=null?c:k.raw)!=null?d:"");return y==="mermaid"?h1(f1(b)):y==="infographic"?m1(p1(b)):fu(b,v,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(y,b){var S,I,T;const $=y.match(/^\s*]*)>/i);return $&&!/(?:^|\s)open(?:\s|=|$)/i.test((S=$[1])!=null?S:"")?fu(((T=(I=y.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:I[1])==null?void 0:T.replace(/<[^>]*>/g,"").trim())||"Details",b,28,28):fu(y,b,96)})(String((p=(f=k.raw)!=null?f:k.content)!=null?p:""),v);case"thematic_break":return 24;default:return fu(String((m=(h=k.raw)!=null?h:k.content)!=null?m:""),v,40)}}function v8(e,t,n){return Math.min(Math.max(e,t),n)}const Jfe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Xfe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],Qfe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),l$=["raw","content","code","originalCode","updatedCode"],y8=new WeakMap,k8=new WeakMap;let epe=1;function gr(){return typeof performance<"u"?performance.now():Date.now()}function b8(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Ri(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=y8.get(t);return n||(n=epe++,y8.set(t,n)),String(n)}function w8(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Ri(t),customMarkdownIt:Ri(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Ri(e.validateLink),preTransformTokens:Ri(e.preTransformTokens),postTransformTokens:Ri(e.postTransformTokens),postTransformNodes:Ri(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function x8(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` -`,t-1)+1;return e.slice(n,t).trim()}function _8(e){const t=a$(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function a$(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function u$(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function rx(e){const t=String(e??"");return`${t.length}:${u$(t)}`}function Gb(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?rx(r):`${r.length}:${u$(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Ri(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${Ri(o)}`;const i=Ri(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>Gb(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(u=>`${u}:${Gb(r[u],t,n+1)}`).join(";")}`}return typeof e}function _1(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function c$(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>_1(o)?Ra(o,t,n+1):c$(o,t,n+1)).join(",")}`:_1(e)?Ra(e,t,n):Gb(e,t,n)}function tpe(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!l$.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${rx(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Ri(s)}`:Qfe.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${c$(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Ri(s)}`:""}).filter(Boolean).join(";")}function npe(e){return l$.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${rx(n)}`:""}).filter(Boolean).join(";")}function Ra(e,t=new WeakMap,n=0){const o=k8.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${Ri(s)}`;const r=Ri(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(h=>Ra(h,u,c+1)).join("|"):"";return[a.type,npe(d),tpe(d,u,c),f.length,p].join(":")})(e,t,n);return k8.set(s,l),l}function d$(e,t){return Ra(e)===Ra(t)}function lx(e,t,n){const o=gr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=gr()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function S8(e,t,n){return lx(t,n,()=>Ra(e))}function f$(e,t,n){return S8(e,n,"stabilizeSignatureMs")===S8(t,n,"stabilizeSignatureMs")}function Am(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function C8(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function A8(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function ope(e,t){return e.length===t.length&&e===t}function ax(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(i.length!==r.length)return!1;for(let c=0;c{o=ax(e,t)}),o??f$(e,t,n)}function rpe(e,t){const n={};for(const o of Jfe){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function lpe(e,t){var n;const o=_A(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:O(()=>!1),r=V(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let B="",z=0,A=!1,L=!1,W=!1,j=!1;function re(){B="",z=0,A=!1,L=!1,W=!1,j=!1}function Q(Y){let G=!1;for(let X=0;X{if(!Y||!G.startsWith(Y)||G.length<=Y.length)return re(),[!0,0];let X=0;B!==Y&&(re(),Q(Y),X=Y.length);const te=G.slice(Y.length),q=Q(te);return B=G,[q,X+te.length]}})();let p,h=0,m=0,k=gr(),w=-1,v=0;function y(B){w=Number.isInteger(B)?B:0,v+=1}function b(){p&&(clearTimeout(p),p=void 0)}function S(){b();const B=t.renderContent.value;r.value!==B&&(r.value=B),k=gr()}Ye([t.renderContent,t.effectiveFinal,i],([B,z,A])=>{r.value!==B&&(!A||z||(function(L,W){if(!L&&W||W.length<=80||W.length\s*|`{3,}|~{3,})/.test(j))||j.endsWith(` -`)&&!(function(re){const Q=x8(re);if(_8(Q))return!1;const Y=a$(Q);return Y.length>=2&&Y.some(G=>G.trim())})(W))})(r.value,B)?S():(function(){if(m+=1,p)return;const L=Math.max(0,(function(W){const j=W.parseCoalesceMs;return typeof j=="number"&&Number.isFinite(j)&&j>=0?j:80})(e)-(gr()-k));L<=0?S():p=setTimeout(S,L)})())},{flush:"sync",immediate:!0}),Ld(b);const I=O(()=>{var B,z,A,L;return yse(e.customHtmlTags,(B=e.parseOptions)==null?void 0:B.customHtmlTags,(L=(A=(z=t.customComponentsMap)==null?void 0:z.value)!=null?A:{},Object.entries(L).map(([W,j])=>{const re=ur(W);return j==null||!re||hh(re)||b9.has(re)||uh.has(re)?"":re}).filter(Boolean)))}),T=O(()=>{const{key:B,tags:z}=kse(I.value);if(!B)return o;const A=s.get(B);if(A)return A;const L=_A(t.instanceMsgId,{customHtmlTags:z});return s.set(B,L),L}),$=O(()=>{const B=T.value;if(!e.customMarkdownIt)return B;const z=e.customMarkdownIt(B);return B.__markstreamHasCustomParserExtensions=!0,z.__markstreamHasCustomParserExtensions=!0,z}),F=O(()=>{var B,z;const A=(B=e.parseOptions)!=null?B:{},L=t.effectiveFinal.value,W=I.value,j=L!=null,re=W.length>0;return j||re||A.streamParse==null?kt(kt(fn(kt({},A),{streamParse:(z=A.streamParse)==null||z}),j?{final:L}:{}),re?{customHtmlTags:W}:{}):A}),R=O(()=>{var B;return new Set(((B=F.value.customHtmlTags)!=null?B:[]).map(z=>String(z).trim().toLowerCase()).filter(Boolean))}),P=O(()=>w8(F.value,$.value,e.customMarkdownIt,{includeFinal:!0})),M=O(()=>w8(F.value,$.value,e.customMarkdownIt,{includeFinal:!1}));Ye([P,M],([B,z],[A,L])=>{A&&(B===A&&z===L||(S(),z!==L&&(l=[],c="")))},{flush:"sync"});const D=O(()=>{var B,z,A,L,W,j,re,Q,Y,G,X;if((B=e.nodes)!=null&&B.length)return l=[],c="",y(0),Et(e.nodes.slice());const te=r.value;if(!te)return l=[],c="",y(-1),[];const q=t.debugPerformanceEnabled.value,me=q?gr():0,xe=$.value,We=P.value,he=M.value;a&&We!==a&&(function(at){var ft,Mt;(Mt=(ft=at.stream)==null?void 0:ft.reset)==null||Mt.call(ft)})(xe),u&&he!==u&&(l=[],c="");const ee=Object.keys((A=(z=t.customComponentsMap)==null?void 0:z.value)!=null?A:{}).length>0||typeof F.value.postTransformNodes=="function";ee!==d&&(l=[],c="");const ne=!ee&&l.length>0&&te.startsWith(c)&&he===u,H=q?b8(xe):null,Z=q?{}:void 0,ye=A8(xe),fe=!ye&&!ee,de=kt(kt(fn(kt({},F.value),{__reuseStableTopLevelNodes:fe}),ye?{__disableStreamParse:!0}:{}),Z?{__timing:Z}:{}),J=wI(te,xe,de),ae=q?gr():0,be=q?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let _e,ce=q?Am(J.length):void 0,Se=0,ie=0,we=0;if(ne){const at=q?gr():0,[ft,Mt]=(function(tn){var Kt,Qe;const[nt,ut]=tn.scanGlobalReferenceAppend(tn.previousContent,tn.content),Pt=tn.parseOptions;return[tn.previousDirtyStartIndex>0&&Pt.final!==!0&&!tn.customMarkdownIt&&!A8(tn.md)&&!nt&&typeof Pt.preTransformTokens!="function"&&typeof Pt.postTransformTokens!="function"&&typeof Pt.postTransformNodes!="function"&&((Qe=(Kt=Pt.customHtmlTags)==null?void 0:Kt.length)!=null?Qe:0)===0?tn.previousDirtyStartIndex:0,ut]})({content:te,previousContent:c,previousDirtyStartIndex:w,parseOptions:F.value,customMarkdownIt:e.customMarkdownIt,md:xe,scanGlobalReferenceAppend:f});we=Mt;const Tt=ft<=0;if(be){const tn=(function(Kt,Qe,nt,ut={}){var Pt;if(!Qe.length)return{nodes:Kt,metrics:Am(Kt.length)};const Oe=(Pt=ut.scanStartIndex)!=null?Pt:0,Je=ut.reuseDirtyTail!==!1,it=(function(Nt,on,mn,Zt=0){const jn=Math.min(Nt.length,on.length);for(let Xt=Math.min(jn,Math.max(0,Zt));XtRa(at[Tt]))})(_e,be,ie):(function(at,ft=0){for(let Mt=Math.max(0,ft);Mt((W=H?.total)!=null?W:0);t.logPerf(ft?"parse(stream)":"parse(sync)",kt(kt(kt({rendererId:t.instanceMsgId,ms:Math.round(gr()-me),nodes:_e.length,contentLength:te.length,parseCommitCount:h,parseCoalescedCount:m,nodeReuseMs:Re,referenceDefinitionScanChars:we,signatureMs:(j=be?.signatureMs)!=null?j:0,stabilizeSignatureMs:(re=be?.stabilizeSignatureMs)!=null?re:0,primeSignatureMs:(Q=be?.primeSignatureMs)!=null?Q:0,signatureCallCount:(Y=be?.signatureCallCount)!=null?Y:0,stabilizeSignatureCallCount:(G=be?.stabilizeSignatureCallCount)!=null?G:0,primeSignatureCallCount:(X=be?.primeSignatureCallCount)!=null?X:0,stabilizeMs:Se},ce??{}),Z?Object.fromEntries(Xfe.map(Mt=>{var Tt;return[Mt,(Tt=Z[Mt])!=null?Tt:0]})):{}),at?{streamMode:at.lastMode,streamDelta:rpe(at,H),streamStats:at}:{}))}return Et(_e)});return{effectiveCustomHtmlTags:I,effectiveCustomHtmlTagsSet:R,mdBase:T,mdInstance:$,mergedParseOptions:F,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>v,parsedNodes:D}}function ape(e){const{isClient:t}=e,n=V(new Set),o=new Map,s=new Map,i=new Map;function r(u){if(!t)return;const c=i.get(u);c!=null&&(window.clearTimeout(c),i.delete(u))}function l(){if(t)for(const u of i.values())window.clearTimeout(u);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,p){if((m=(h=e.shouldTrackVisibleNodeIndices)==null?void 0:h.call(e))!=null&&!m)return;var h,m;const k=n.value,w=k.has(f);if(p){if(w)return;const y=new Set(k);return y.add(f),void(n.value=y)}if(!w)return;const v=new Set(k);v.delete(f),n.value=v})(u,c),c&&((d=e.onNodeMarkedVisible)==null||d.call(e,u))},resetNodeVisibleState:a,cleanupNodeVisibility:function(u){var c;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,o.value=c.done},r=s.subscribe(i);i();const l=O(()=>Math.max(0,t.value.length-n.value.length)),a=O(()=>l.value===0),u=O(()=>o.value&&a.value);return N2()&&Ld(()=>{r(),s.destroy()}),{source:t,visible:n,done:o,final:u,caughtUp:a,pendingChars:l,enqueue:c=>s.enqueue(c),finish:c=>s.finish(c),flush:()=>s.flush(),reset:c=>s.reset(c),pause:()=>s.pause(),resume:()=>s.resume()}}const cpe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},M8=/auto|scroll|overlay/i;function dpe(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return M8.test(t)||M8.test(n)}function fpe(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const ppe={class:"m-0 p-0"},hpe=["data-probe"],mpe=Gn(Ze(fn(kt({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(g(),C("div",{class:"height-estimation-probes",style:jt({width:`${e.width}px`}),"aria-hidden":"true"},[_("div",{ref:i=>e.setParagraphWrapper(i),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[K(x(Du),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),_("div",{ref:i=>e.setListItemWrapper(i),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[_("ul",ppe,[K(x(pd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),_("div",{ref:i=>e.setListWrapper(i),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[K(x(hd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(g(),C(Te,null,st(6,i=>_("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:ze(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[K(x(M0),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,hpe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),E8=Ze({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=O(()=>{var n,o;return m1((o=Kc(e.estimatedPreviewHeightPx))!=null?o:p1(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?cn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),cn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),cn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>cn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,cn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),cn("div",{class:"absolute inset-0"},[cn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),T8=Ze({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=O(()=>{var n,o;return h1((o=Kc(e.estimatedPreviewHeightPx))!=null?o:f1(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?cn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),cn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>cn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[cn("span",{class:"action-icon block"})])))]):null,cn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),cn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),gpe={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function ps(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const vpe=["data-custom-id"],ype=["data-node-index","data-node-type"],I8="typewriter-simple-cursor-target",p$=Gn(Ze(fn(kt({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(E){if(!(typeof Event<"u"&&E instanceof Event))return typeof E=="string"&&s("copy-code",E),void s("copy",E)}const r=es(),l=wn("markstreamNestedRendererProps",void 0);function a(E){const U=r?.vnode.props;return!!U&&(Object.prototype.hasOwnProperty.call(U,E)||Object.prototype.hasOwnProperty.call(U,String(E).replace(/[A-Z]/g,se=>`-${se.toLowerCase()}`)))}function u(E){var U,se;const le=o[E];return a(E)?le:(se=(U=l?.value)==null?void 0:U[E])!=null?se:le}const c=O(()=>{return(E=u("mode"))==="chat"||E==="minimal"||E==="docs"?E:"docs";var E}),d=O(()=>g8(u("typewriter"))),f=O(()=>d.value!=="off"),p=O(()=>u("domMode")==="minimal"?"minimal":"full"),h=O(()=>{return(E={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":E.codeRenderer==="pre"||E.codeRenderer==="shiki"||E.codeRenderer==="monaco"?E.codeRenderer:E.renderCodeBlocksAsPre===!1||E.mode==="docs"?"monaco":"pre";var E}),m=O(()=>gpe[c.value]),k=O(()=>{var E;return(E=u("showTooltips"))!=null?E:m.value.showTooltips}),w=O(()=>{var E;return(E=u("fade"))!=null?E:m.value.fade}),v=O(()=>{var E;return(E=u("batchRendering"))!=null?E:m.value.batchRendering}),y=O(()=>{var E;return(E=u("initialRenderBatchSize"))!=null?E:m.value.initialRenderBatchSize}),b=O(()=>{var E;return(E=u("renderBatchSize"))!=null?E:m.value.renderBatchSize}),S=O(()=>{var E;return(E=u("renderBatchDelay"))!=null?E:m.value.renderBatchDelay}),I=O(()=>{var E;return(E=u("renderBatchBudgetMs"))!=null?E:m.value.renderBatchBudgetMs}),T=O(()=>{var E;return(E=u("renderBatchIdleTimeoutMs"))!=null?E:m.value.renderBatchIdleTimeoutMs}),$=O(()=>{var E;return(E=u("deferNodesUntilVisible"))!=null?E:m.value.deferNodesUntilVisible}),F=O(()=>{var E;return(E=u("maxLiveNodes"))!=null?E:m.value.maxLiveNodes}),R=O(()=>{var E;return(E=u("liveNodeBuffer"))!=null?E:m.value.liveNodeBuffer}),P=O(()=>{var E;return(E=u("nodeVirtual"))!=null?E:m.value.nodeVirtual}),M={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return p.value},get htmlPolicy(){return u("htmlPolicy")},get viewportPriority(){return u("viewportPriority")},get viewportPriorityOptions(){return u("viewportPriorityOptions")},get codeBlockStream(){return u("codeBlockStream")},get codeBlockDarkTheme(){return u("codeBlockDarkTheme")},get codeBlockLightTheme(){return u("codeBlockLightTheme")},get codeBlockMonacoOptions(){return u("codeBlockMonacoOptions")},get codeRenderer(){return u("codeRenderer")},get renderCodeBlocksAsPre(){return u("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return u("codeBlockMinWidth")},get codeBlockMaxWidth(){return u("codeBlockMaxWidth")},get codeBlockProps(){return u("codeBlockProps")},get mermaidProps(){return u("mermaidProps")},get d2Props(){return u("d2Props")},get infographicProps(){return u("infographicProps")},get showTooltips(){return k.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return o.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return w.value},get batchRendering(){return v.value},get initialRenderBatchSize(){return y.value},get renderBatchSize(){return b.value},get renderBatchDelay(){return S.value},get renderBatchBudgetMs(){return I.value},get renderBatchIdleTimeoutMs(){return T.value},get deferNodesUntilVisible(){return $.value},get maxLiveNodes(){return F.value},get liveNodeBuffer(){return R.value},get nodeVirtual(){return P.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function D(E){s("height-change",E)}function B(E){s("virtual-state-change",E)}function z(E){s("anchor-change",E)}const A=V(),L=V(null),W=V(null),j=V(null),re=Ms({1:null,2:null,3:null,4:null,5:null,6:null}),Q=V(!1),Y=new Map,G=V(0),X=V(0),te=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function q(E,U){return typeof E!="string"?U:E.trim()||U}function me(E){const U=Number(E);return Number.isFinite(U)&&U>0?Math.max(1,Math.trunc(U)):640}const xe=O(()=>{var E;const U=(E=M.viewportPriorityOptions)!=null?E:{},se=q(U.rootMargin,ju);return{rootMargin:se,heavyBlockMargin:q(U.heavyBlockMargin,se),maxTargets:me(U.maxTargets)}}),We=O(()=>{var E;return(E=xe.value.rootMargin)!=null?E:ju}),he=O(()=>{var E;return(E=xe.value.maxTargets)!=null?E:640});function ee(){var E,U;if(((E=o.virtualScroll)==null?void 0:E.enabled)!==!0)return null;const se=(U=o.virtualScroll)==null?void 0:U.scrollRoot;return ne(typeof se=="function"?se():se)}function ne(E){return E?typeof HTMLElement<"u"&&E instanceof HTMLElement?E:typeof E=="object"&&"value"in E?ne(E.value):typeof E=="object"&&"$el"in E?ne(E.$el):null:null}Vn(YI,xe);const{isClient:H,renderAsFragment:Z,debugPerformanceEnabled:ye,resolvedShowTooltips:fe,resolvedHtmlPolicy:de,inheritedSmoothStreaming:J,ownsTypewriterCursor:ae}=(function(E){const U=typeof window<"u",se=sh(),le=wn("markstreamHtmlPolicy",void 0),ke=wn("markstreamTypewriterCursor",void 0),$e=wn("markstreamSmoothStreaming",void 0),De=O(()=>E.renderAsFragment===!0),He=O(()=>!!(E.debugPerformance&&U&&typeof console<"u")),tt=O(()=>{var et;if(typeof E.showTooltips=="boolean")return E.showTooltips;const Be=(et=se.showTooltips)!=null?et:se["show-tooltips"];return Be===""||Be===!0||Be==="true"||Be!==!1&&Be!=="false"&&void 0}),je=O(()=>{var et,Be;return(Be=(et=E.htmlPolicy)!=null?et:le?.value)!=null?Be:"safe"}),Ke=O(()=>ke?.value!==!0);return{isClient:U,renderAsFragment:De,debugPerformanceEnabled:He,resolvedShowTooltips:tt,resolvedHtmlPolicy:je,inheritedSmoothStreaming:$e,inheritedTypewriterCursor:ke,ownsTypewriterCursor:Ke}})(M),{resolveViewportRoot:be,resolveScrollContainer:_e,isReverseFlexScrollRoot:ce,getNormalizedScrollTop:Se,getOffsetTopWithinRoot:ie}=(function(E,U){function se(){var He,tt;return(tt=(He=U.scrollRoot)==null?void 0:He.call(U))!=null?tt:null}function le(He){if(typeof window>"u")return null;const tt=se();if(tt)return tt;const je=He??E.value;if(!je)return null;const Ke=je.ownerDocument||document,et=Ke.scrollingElement||Ke.documentElement;let Be=je;for(;Be&&Be!==Ke.body&&Be!==et;){if(dpe(window.getComputedStyle(Be))&&fpe(Be))return Be;Be=Be.parentElement}return null}function ke(He){if(!U.isClient)return!1;try{const tt=window.getComputedStyle(He);return!!(tt.display||"").toLowerCase().includes("flex")&&(tt.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function $e(He,tt,je){var Ke,et;if(je)return De(tt);const Be=He.scrollTop;if(!ke(He))return Be;const Ge=Be<0?-Be:Be;return Math.max(0,((Ke=He.scrollHeight)!=null?Ke:0)-((et=He.clientHeight)!=null?et:0))-Ge}function De(He){var tt,je,Ke,et,Be;const Ge=Number((tt=He.scrollingElement)==null?void 0:tt.scrollTop),pt=Number((Ke=(je=He.documentElement)==null?void 0:je.scrollTop)!=null?Ke:0),lt=Number((Be=(et=He.body)==null?void 0:et.scrollTop)!=null?Be:0);return Math.max(0,Number.isFinite(Ge)?Ge:0,Number.isFinite(pt)?pt:0,Number.isFinite(lt)?lt:0)}return{resolveViewportRoot:le,resolveScrollContainer:function(He){var tt,je,Ke,et;const Be=se();if(Be)return Be;const Ge=le((tt=He??E.value)!=null?tt:null);if(Ge)return Ge;const pt=(et=(Ke=He?.ownerDocument)!=null?Ke:(je=E.value)==null?void 0:je.ownerDocument)!=null?et:typeof document<"u"?document:null;return pt?.scrollingElement||pt?.documentElement||null},isReverseFlexScrollRoot:ke,getNormalizedScrollTop:$e,getOffsetTopWithinRoot:function(He,tt){const je=tt.ownerDocument||He.ownerDocument||document;if((function(Ge,pt){return Ge===pt.documentElement||Ge===pt.body||Ge===pt.scrollingElement})(tt,je))return He.getBoundingClientRect().top+De(je);const Ke=tt.getBoundingClientRect(),et=He.getBoundingClientRect(),Be=$e(tt,je,!1);return et.top-Ke.top+Be}}})(A,{isClient:H,scrollRoot:ee});Vn("markstreamShowTooltips",fe),Vn("markstreamHtmlPolicy",de),Vn("markstreamTypewriter",f),Vn("markstreamFade",O(()=>M.fade!==!1)),Vn("markstreamTypewriterCursor",O(()=>!0)),Vn("markstreamTextStreamState",Y),Vn("markstreamStreamVersion",G),Vn("markstreamParseOptions",O(()=>M.parseOptions)),Vn("markstreamCustomMarkdownIt",O(()=>M.customMarkdownIt));const{smoothStreamingEnabled:we,renderContent:Re,requestedFinal:at,effectiveFinal:ft}=(function(E,U){const se=upe(kt(kt({},cpe),E.smoothStreamingOptions)),le=O(()=>{var Be,Ge,pt;return E.smoothStreaming!==!1&&!((Be=E.nodes)!=null&&Be.length)&&(E.smoothStreaming===!0||!((Ge=U.inheritedSmoothStreaming)!=null&&Ge.value))&&(E.smoothStreaming===!0||g8(E.typewriter)!=="off"||((pt=E.maxLiveNodes)!=null?pt:0)<=0)}),ke=V(!U.isClient||E.smoothStreaming===!0);Sn(()=>{ke.value=!0});const $e=O(()=>ke.value&&le.value),De=O(()=>{var Be;return $e.value?se.visible.value:(Be=E.content)!=null?Be:""}),He=O(()=>{var Be,Ge;const pt=(Be=E.parseOptions)!=null?Be:{};return(Ge=E.final)!=null?Ge:pt.final}),tt=O(()=>{const Be=He.value;return $e.value&&Be!=null?!!Be&&se.caughtUp.value:Be});let je=0,Ke=!1;function et(){je=0,Ke=!1}return Ye([()=>E.content,()=>E.nodes,$e,He],([Be,Ge,pt,lt])=>{if(Ge?.length)return et(),void se.reset("");const At=Be??"";if(!pt)return et(),se.reset(At),void(lt&&se.finish({flush:!0}));const gt=se.source.value;if(At){if(At!==gt)if(At.startsWith(gt)){const Rt=At.slice(gt.length),Bt=se.pendingChars.value;Rt.length<=8?(je++,Ke||je>=2&&Bt<=8?(Ke=!0,se.reset(At)):se.enqueue(Rt)):(et(),se.enqueue(Rt))}else et(),se.reset(At)}else et(),se.reset("");lt&&se.finish()},{immediate:!0}),{smoothStream:se,smoothStreamingEligible:le,smoothStreamingEnabled:$e,renderContent:De,requestedFinal:He,effectiveFinal:tt}})(M,{isClient:H,inheritedSmoothStreaming:J}),Mt=at.value===!0;Vn("markstreamSmoothStreaming",we);const Tt=V(!1),tn=V(!1),Kt=V(!1);let Qe="",nt=!1,ut=null;function Pt(){H&&ut!=null&&(window.clearTimeout(ut),ut=null)}function Oe(){Tt.value=!1,Pt()}function Je(E,U){if(!ye.value)return;const se=(function(){if(!ye.value)return null;const le=on(it),ke=on(rt),$e=Math.max(Nt,ke);if(le<=0&&$e<=0)return null;const De={total:le,maxPerFrame:$e,byLabel:(He=it,Object.fromEntries(Array.from(He.entries()).sort((tt,je)=>je[1]-tt[1]||tt[0].localeCompare(je[0]))))};var He;return it.clear(),rt.clear(),Nt=0,De})();console.info(`[markstream-vue][perf] ${E}`,se?fn(kt({},U),{layoutReads:se}):U)}Ye([()=>M.indexKey,()=>M.customId],()=>{var E,U;Oe(),tn.value=!1,Kt.value=!((E=o.nodes)!=null&&E.length)&&at.value!==!0&&!!o.content,Qe=(U=Re.value)!=null?U:"",nt=Qe.length>0},{flush:"sync"}),Ye([()=>o.content,()=>o.nodes,at],([E,U,se])=>{!U?.length&&se!==!0&&E&&(Kt.value=!0)},{flush:"sync",immediate:!0}),Ye([Re,()=>o.nodes,at],([E,U,se])=>{const le=E??"";return U?.length||se===!0?(Oe(),tn.value=!1,Qe=le,void(nt=!0)):(le.length>0&&(Kt.value=!0),nt?(Qe&&le.length>Qe.length&&le.startsWith(Qe)?(Tt.value=!0,tn.value=!0,H&&(Pt(),ut=window.setTimeout(()=>{var ke;ut=null,ft.value===!0||(ke=o.nodes)!=null&&ke.length||(mc(),Tt.value=!1,rl())},1200))):(le.length"u")return null;const $e=window;if($e.__markstreamLayoutReadPerformance)return $e.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return $e.__markstreamLayoutReadPerformance=De,De})();ke&&(ke.total=Number(ke.total||0)+1,ke.byLabel[le]=Number(ke.byLabel[le]||0)+1,ke.currentFrameTotal=Number(ke.currentFrameTotal||0)+1,ke.frameScheduled||(ke.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Zt(ke),0):queueMicrotask(()=>Zt(ke)):window.requestAnimationFrame(()=>Zt(ke))))})(E),vt||(vt=!0,H&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(mn):typeof queueMicrotask!="function"?setTimeout(mn,0):queueMicrotask(mn)))}function Xt(E,U){return jn(E),U()}const xo=M.customId?`renderer-${M.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Wo=(function(E){const U=new Map;return{scope:E,cache:U,clear:()=>U.clear()}})(xo),vo=xo;Vn(s$,Wo);const Un=os(()=>M.customId),{effectiveCustomHtmlTagsSet:$s,mergedParseOptions:ot,parsedNodes:Ae,getParsedNodesDirtyStartIndex:wt,getParsedNodesRevision:Lt}=lpe(M,{instanceMsgId:xo,renderContent:Re,effectiveFinal:ft,smoothStreamingEnabled:we,debugPerformanceEnabled:ye,customComponentsMap:Un,logPerf:Je});Ye(Ae,()=>{Tt.value||Wo.clear(),G.value+=1},{immediate:!0});const Qt=O(()=>({customId:M.customId,customHtmlTags:ot.value.customHtmlTags,parseOptions:M.parseOptions,customMarkdownIt:M.customMarkdownIt,htmlPolicy:de.value,viewportPriority:M.viewportPriority,viewportPriorityOptions:xe.value,mode:c.value,domMode:M.domMode,codeRenderer:h.value,codeBlockStream:M.codeBlockStream,codeBlockDarkTheme:M.codeBlockDarkTheme,codeBlockLightTheme:M.codeBlockLightTheme,codeBlockMonacoOptions:M.codeBlockMonacoOptions,renderCodeBlocksAsPre:M.renderCodeBlocksAsPre,codeBlockMinWidth:M.codeBlockMinWidth,codeBlockMaxWidth:M.codeBlockMaxWidth,codeBlockProps:M.codeBlockProps,mermaidProps:M.mermaidProps,d2Props:M.d2Props,infographicProps:M.infographicProps,showTooltips:fe.value,themes:M.themes,langs:M.langs,isDark:M.isDark,typewriter:f.value,smoothStreamingOptions:M.smoothStreamingOptions,parseCoalesceMs:M.parseCoalesceMs,fade:M.fade}));Vn("markstreamNestedRendererProps",Qt);const _o=O(()=>Ae.value),Zn=O(()=>Ae.value.length),Xn=V(null),io=V(null),ro=V(null),ys=V(null),Ti=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),Ns=!Ti&&M.customId?d8(M.customId):null,Us=O(()=>Ns?(Yy.value,d8(M.customId)):null),Vs=O(()=>{var E;return!!(!Z.value&&M.customId&&!Ti&&((E=Us.value)!=null&&E.enabled))}),li=O(()=>!!(H&&Vs.value)),ss=O(()=>{var E;return!!(!Z.value&&((E=o.virtualScroll)!=null&&E.enabled))}),ai=O(()=>ss.value),ui=V(!1);Sn(()=>{ui.value=!0});const Cn=O(()=>!!(H&&ss.value));Vn("markstreamHostScrollManaged",Cn);const Ls=O(()=>!!(ui.value&&Cn.value)),Fn=O(()=>li.value||Cn.value),Io=O(()=>li.value||Ls.value),Ho=O(()=>{var E;return Fn.value&&((E=Us.value)==null?void 0:E.textEstimation)!==!1});function Fs(){const E=X.value||Xt("getMeasuredContainerWidth.clientWidth",()=>{var U;return((U=A.value)==null?void 0:U.clientWidth)||0});return Number.isFinite(E)&&E>0?E:0}const qs=O(()=>{const E=Fs();return E>0?Math.max(1,Math.round(E)):640}),Ii=O(()=>{var E,U;return!(ft.value!==!0||ss.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(E=o.nodes)!=null&&E.length||Kt.value||!(((U=M.maxLiveNodes)!=null?U:0)<=0))}),cs=O(()=>{var E;return Ii.value?50:Math.max(1,(E=M.maxLiveNodes)!=null?E:320)}),Po=O(()=>{var E;return Ii.value?16:Math.max(0,(E=M.liveNodeBuffer)!=null?E:60)}),ln=O(()=>{var E;return!Z.value&&M.nodeVirtual!==!1&&!(((E=M.maxLiveNodes)!=null?E:0)<=0&&!Ii.value)&&(M.nodeVirtual===!0?Ae.value.length>0:Ae.value.length>cs.value)}),Os=O(()=>ln.value||li.value||Cn.value),ds=O(()=>M.viewportPriority!==!1),jo=O(()=>!!ds.value&&!Q.value);var Ks;Ks=O(()=>ds.value),Vn(JI,Ks);const $i=O(()=>{var E;return!(Z.value||M.deferNodesUntilVisible===!1||((E=M.maxLiveNodes)!=null?E:0)<=0||ln.value||Ae.value.length>900||M.viewportPriority===!1)}),ks=Wce(E=>{var U;return be((U=E??A.value)!=null?U:null)},ds),{requestFrame:Nn,cancelFrame:$o,hasIdleCallback:Lr,isTestEnv:Me}=(function(E){const U=E.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,se=E.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,le=E.isClient&&typeof window.requestIdleCallback=="function",ke=(function(){var $e;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=($e=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:$e.value;return De?.env})();return{requestFrame:U,cancelFrame:se,hasIdleCallback:le,isTestEnv:ke?.NODE_ENV==="test"}})({isClient:H}),Ie=O(()=>ft.value===!0&&!ss.value),{resolvedBatchSize:Ve,resolvedInitialBatch:an,batchingEnabled:gn,incrementalRenderingActive:Ln,renderedCount:xn,previousRenderContext:ue,adaptiveBatchSize:Ce,previousBatchConfig:Ne}=(function(E,U){var se;const le=O(()=>{var et;const Be=Math.trunc((et=E.renderBatchSize)!=null?et:80);return Number.isFinite(Be)?Math.max(0,Be):0}),ke=O(()=>{var et;const Be=Math.trunc((et=E.initialRenderBatchSize)!=null?et:le.value);return Number.isFinite(Be)?Math.max(0,Be):le.value}),$e=O(()=>!U.renderAsFragment.value&&E.batchRendering!==!1&&le.value>0&&U.isClient&&!U.isTestEnv),De=V(0),He=V({key:E.indexKey,total:0}),tt=V(Math.max(1,le.value||1)),je=O(()=>{var et,Be,Ge;return $e.value&&!((et=U.continuousStreaming)!=null&&et.value)&&!((Be=U.forceFullRenderFinalContent)!=null&&Be.value)&&((Ge=E.maxLiveNodes)!=null?Ge:0)<=0}),Ke=V({batchSize:le.value,initial:ke.value,delay:(se=E.renderBatchDelay)!=null?se:16,enabled:je.value});return{resolvedBatchSize:le,resolvedInitialBatch:ke,batchingEnabled:$e,incrementalRenderingActive:je,renderedCount:De,previousRenderContext:He,adaptiveBatchSize:tt,previousBatchConfig:Ke}})(M,{isClient:H,isTestEnv:Me,renderAsFragment:Z,forceFullRenderFinalContent:Ie,continuousStreaming:O(()=>tn.value&&ft.value!==!0)}),Ue=O(()=>{var E;return!Z.value&&M.batchRendering!==!1&&Ve.value>0&&!Me&&((E=M.maxLiveNodes)!=null?E:0)<=0&&!Ie.value}),dt=O(()=>Ue.value),yt=O(()=>Fn.value||dt.value),Yt=O(()=>{var E;return yt.value&&((E=Us.value)==null?void 0:E.codeBlockEstimation)!==!1}),sn=new Map,Qn=new Map,kn=new WeakMap;let Tn=null;const No=new WeakMap,Dt=new Map,Vt=[];let dn=[],lo=[],Yn=-1;const Xe=Co(Vt),ge=new Set,Le=V(0);let un=0;const tl=V(0),nl=O(()=>(tl.value,Array.from(sn.entries()).sort((E,U)=>E[0]-U[0]))),Pe=V(null),ct=V(null);let bt,pn=null,Ni=0,dr=null;function ci(){bt.markFallbackHeightPrefixDirty()}function K0(E){return bt.getFallbackNodeHeight(E)}function tc(E,U){return bt.estimateHeightRange(E,U)}function G0(E){return bt.estimateIndexForOffset(E)}const{activeRestoreAnchor:nc,getRelativeScrollTopWithinContainer:UN,setRelativeScrollTopWithinContainer:VN,resolveAnchorOffset:qN,clearRestoreReconcile:xh,scheduleRestoreReconcile:jd,captureRestoreAnchor:h_,restoreAnchor:m_,getAnchorDrift:KN}=(function(E){const{isClient:U,containerRef:se,parsedNodeCount:le,requestFrame:ke,cancelFrame:$e,resolveScrollContainer:De,getNormalizedScrollTop:He,getOffsetTopWithinRoot:tt,isReverseFlexScrollRoot:je,estimateIndexForOffset:Ke,estimateHeightRange:et,getFallbackNodeHeight:Be,clamp:Ge}=E,pt=V(null);let lt=null,At=[];function gt(){const Gt=De(),yn=se.value;if(!Gt||!yn)return null;const _n=Gt.ownerDocument||yn.ownerDocument||document;if(Gt===_n.documentElement||Gt===_n.body||Gt===_n.scrollingElement){const eo=yn.getBoundingClientRect();return Math.max(0,-eo.top)}return Math.max(0,He(Gt,_n,!1)-tt(yn,Gt))}function Rt(Gt){var yn;const _n=De(),eo=se.value;if(!_n||!eo)return;const xs=Math.max(0,Gt),fs=_n.ownerDocument||eo.ownerDocument||document,pr=fs.defaultView||(typeof window<"u"?window:null);if(_n===fs.documentElement||_n===fs.body||_n===fs.scrollingElement){const Pr=He(_n,fs,!0)+eo.getBoundingClientRect().top;return void((yn=pr?.scrollTo)==null||yn.call(pr,0,Math.max(0,Pr+xs)))}h8(_n,fs,tt(eo,_n)+xs,{isReverseFlexScrollRoot:Pr=>{var df;return(df=je?.(Pr))!=null&&df},getNormalizedScrollTop:He})}function Bt(Gt){const yn=le.value,_n=Ge(Gt.nodeIndex,0,Math.max(0,yn-1));return et(0,_n)+Math.max(0,Gt.offsetWithinNodePx)}function qt(){if(lt!=null&&($e?.(lt),lt=null),U)for(const Gt of At)window.clearTimeout(Gt);At=[]}function Wt(Gt){const yn=Bt(Gt),_n=gt();_n!=null&&Math.abs(_n-yn)<=.5||Rt(yn)}return{activeRestoreAnchor:pt,getRelativeScrollTopWithinContainer:gt,setRelativeScrollTopWithinContainer:Rt,resolveAnchorOffset:Bt,clearRestoreReconcile:qt,applyRestoreAnchor:Wt,scheduleRestoreReconcile:function(){pt.value&&U&<==null&&(lt=ke?ke(()=>{lt=null,pt.value&&Wt(pt.value)}):null,lt==null&&pt.value&&Wt(pt.value))},captureRestoreAnchor:function(){const Gt=gt(),yn=le.value;if(Gt==null||yn<=0)return null;const _n=Ge(Ke(Gt+1),0,yn-1),eo=et(0,_n),xs=Be(_n);return{nodeIndex:_n,offsetWithinNodePx:Ge(Gt-eo,0,Math.max(0,xs-1))}},restoreAnchor:function(Gt){const yn=le.value;if(pt.value={nodeIndex:Ge(Gt.nodeIndex,0,Math.max(0,yn-1)),offsetWithinNodePx:Math.max(0,Gt.offsetWithinNodePx)},qt(),Wt(pt.value),U)for(const _n of[0,120,280,480])At.push(window.setTimeout(()=>{pt.value&&Wt(pt.value)},_n))},getAnchorDrift:function(Gt){const yn=gt();return yn==null?null:yn-Bt(Gt)}}})({isClient:H,containerRef:A,parsedNodeCount:Zn,requestFrame:Nn,cancelFrame:$o,resolveScrollContainer:()=>Pe.value||_e(),getNormalizedScrollTop:Se,getOffsetTopWithinRoot:ie,isReverseFlexScrollRoot:ce,estimateIndexForOffset:G0,estimateHeightRange:tc,getFallbackNodeHeight:K0,clamp:ws}),{nodeHeights:oc,heightStats:Gi,heightTreeSize:Z0,heightSumTree:GN,heightKnownTree:ZN,averageNodeHeight:g_,resetHeightMeasurements:YN,pruneHeightMeasurements:JN,rebuildHeightTrees:_h,recordNodeHeight:XN,removeNodeHeights:QN,exportHeightCache:eL,importHeightCache:tL,fenwickRangeSum:nL}=(function(E={}){const U=Ms({}),se=Ms({total:0,count:0}),le=V(0),ke=V([]),$e=V([]);function De(){for(const Be of Object.keys(U))delete U[Number(Be)];se.total=0,se.count=0,le.value=0,ke.value=[],$e.value=[]}function He(Be,Ge,pt){for(let lt=Ge+1;lt0;lt-=lt&-lt)pt+=Be[lt];return pt}function je(Be){le.value=Be;const Ge=new Array(Be+1).fill(0),pt=new Array(Be+1).fill(0);for(const[lt,At]of Object.entries(U)){const gt=Number(lt),Rt=Number(At);!Number.isFinite(gt)||gt<0||gt>=Be||!Number.isFinite(Rt)||Rt<=0||(He(Ge,gt,Rt),He(pt,gt,1))}ke.value=Ge,$e.value=pt}function Ke(Be){if(!Number.isInteger(Be)||Be<0)return!1;const Ge=U[Be];if(!Number.isFinite(Ge)||Ge<=0)return!1;if(delete U[Be],se.total=Math.max(0,se.total-Ge),se.count=Math.max(0,se.count-1),le.value>Be){const pt=ke.value,lt=$e.value;pt.length&<.length&&(He(pt,Be,-Ge),He(lt,Be,-1))}return!0}const et=O(()=>se.count>0?Math.max(12,se.total/se.count):32);return{nodeHeights:U,heightStats:se,heightTreeSize:le,heightSumTree:ke,heightKnownTree:$e,averageNodeHeight:et,resetHeightMeasurements:De,pruneHeightMeasurements:function(Be){if(Be<=0)return void De();let Ge=0,pt=0;for(const[lt,At]of Object.entries(U)){const gt=Number(lt),Rt=Number(At);!Number.isFinite(gt)||gt<0||gt>=Be||!Number.isFinite(Rt)||Rt<=0?delete U[gt]:(Ge+=Rt,pt++)}se.total=Ge,se.count=pt},rebuildHeightTrees:je,recordNodeHeight:function(Be,Ge,pt={}){(function(lt,At,gt={}){var Rt;if(!Number.isFinite(At)||At<=0)return!1;const Bt=U[lt];if(Bt&&(gt.allowShrink===!1&&Atlt){const qt=ke.value,Wt=$e.value;if(qt.length&&Wt.length)if(Bt){const Gt=At-Bt;Gt!==0&&He(qt,lt,Gt)}else He(qt,lt,At),He(Wt,lt,1)}gt.notify!==!1&&((Rt=E.onHeightRecorded)==null||Rt.call(E))})(Be,Ge,fn(kt({},pt),{notify:!0}))},removeNodeHeight:function(Be,Ge={}){var pt;const lt=Ke(Be);return lt&&Ge.notify!==!1&&((pt=E.onHeightRecorded)==null||pt.call(E)),lt},removeNodeHeights:function(Be,Ge={}){var pt;let lt=0;for(const At of Be)Ke(Number(At))&<++;return lt>0&&Ge.notify!==!1&&((pt=E.onHeightRecorded)==null||pt.call(E)),lt},exportHeightCache:function(){return Object.entries(U).map(([Be,Ge])=>({index:Number(Be),height:Number(Ge)})).filter(Be=>Number.isFinite(Be.index)&&Be.index>=0&&Number.isFinite(Be.height)&&Be.height>0).sort((Be,Ge)=>Be.index-Ge.index)},importHeightCache:function(Be,Ge={}){var pt;if(!Array.isArray(Be))return;const lt=le.value;let At=!1;if(Ge.mode!=="merge"){const gt=Object.keys(U);if(gt.length>0){for(const Rt of gt)delete U[Number(Rt)];At=!0}}for(const gt of Be){const Rt=Number(gt.index),Bt=Number(gt.height);if(!Number.isInteger(Rt)||Rt<0||lt>0&&Rt>=lt||!Number.isFinite(Bt)||Bt<=0)continue;const qt=U[Rt];qt&&Math.abs(qt-Bt)<=1||(U[Rt]=Bt,At=!0)}At&&((function(){let gt=0,Rt=0;const Bt=le.value;for(const[qt,Wt]of Object.entries(U)){const Gt=Number(qt),yn=Number(Wt);!Number.isFinite(Gt)||Gt<0||Bt>0&&Gt>=Bt||!Number.isFinite(yn)||yn<=0?delete U[Gt]:(gt+=yn,Rt++)}se.total=gt,se.count=Rt})(),lt>0&&je(lt),(pt=E.onHeightRecorded)==null||pt.call(E))},fenwickRangeSum:function(Be,Ge,pt){if(pt<=Ge)return 0;const lt=tt(Be,pt-1);return Ge<=0?lt:lt-tt(Be,Ge-1)}}})({onHeightRecorded:()=>{ci(),Cn.value&&sf(),nc.value&&jd(),ct.value&&fc(),ho("node-resize")}});function v_(E){Number.isInteger(E)&&E>=0&&ge.add(E)}function y_(E){for(const U of E)v_(Number(U))}function sc(E){un++;let U=!0;try{const se=E();return U=se!==!1,se}finally{un--,un===0&&U&&Le.value++}}function Y0(){dn=[],lo=[],Yn=-1,ge.clear(),Xe.value=Vt}function Sh(){Y0(),sc(()=>YN()),Dt.clear()}function k_(E){!Number.isInteger(E)||E<0||E>=Ae.value.length||Dt.set(E,Kd(E))}function b_(E,U,se={}){const le=oc[E];v_(E),XN(E,U,se);const ke=oc[E];return Object.is(le,ke)?(ge.delete(E),!1):(ke&&ke>0?k_(E):le&&Dt.delete(E),!0)}function w_(E,U){const se=Xt("getNodeLayoutHeight.slot.offsetHeight",()=>{var le,ke;return(ke=(le=sn.get(E))==null?void 0:le.offsetHeight)!=null?ke:0});return se>0?se:Xt("getNodeLayoutHeight.content.offsetHeight",()=>U.offsetHeight)}function x_(E,U={}){U.mode!=="merge"?Y0():y_(E.map(se=>se.index)),sc(()=>tL(E,U)),Sv()}const Fr=O(()=>$i.value&&jo.value),oL=O(()=>{var E;return!Z.value&&M.batchRendering!==!1&&Ve.value>0&&((E=M.maxLiveNodes)!=null?E:0)<=0}),sL=O(()=>!Z.value&&Mt&&ft.value===!0&&!ln.value&&!ss.value&&!Vs.value&&!Fr.value&&!oL.value),__=O(()=>!!ks&&Fr.value),S_=O(()=>ln.value||Cn.value),{focusIndex:ol,liveRange:bs,updateLiveRange:Ud}=(function(E,U){const{parsedNodeCount:se,virtualizationEnabled:le,maxLiveNodesResolved:ke,liveNodeBufferResolved:$e,clamp:De}=U,He=$e??O(()=>{var Ke;return Math.max(0,(Ke=E.liveNodeBuffer)!=null?Ke:60)}),tt=V(0),je=Ms({start:0,end:0});return{liveNodeBufferResolved:He,focusIndex:tt,liveRange:je,updateLiveRange:function(){const Ke=se.value;if(!le.value||Ke===0)return je.start=0,void(je.end=Ke);const et=Math.min(ke.value,Ke),Be=He.value,Ge=De(tt.value-Be,0,Math.max(0,Ke-et));je.start=Ge,je.end=Math.min(Ke,Ge+et)}}})(M,{parsedNodeCount:Zn,virtualizationEnabled:ln,maxLiveNodesResolved:cs,liveNodeBufferResolved:Po,clamp:ws}),Or=new Map,Za=new Map,Vl=new Map,Ch=[],sl=new Map,ql=new Set,C_=V(0);let J0=!1;const A_=O(()=>(C_.value,ql.size)),Li=new Map,Rr=new Map,M_=V(0),X0=O(()=>{M_.value;let E=0;for(const U of Li.values())E+=Math.max(0,U);return E});let Fi=null;const Ah=O(()=>{if(!ln.value)return Ae.value.length;const E=Po.value,U=Math.max(bs.end+E,an.value),se=Math.min(Ae.value.length,U);return Math.max(xn.value,se)});function Mh(){J0||(J0=!0,queueMicrotask(()=>{J0=!1,C_.value+=1}))}function E_(E,U,se="node-resize"){if(!H||typeof window>"u")return null;const le=window.setTimeout(()=>{ql.delete(le)&&Mh();try{U()}finally{ho(se)}},Math.max(0,E));return ql.add(le),Mh(),le}function Eh(E){H&&E!=null&&(ql.delete(E)&&Mh(),window.clearTimeout(E))}function T_(){if(H&&typeof window<"u")for(const E of ql)window.clearTimeout(E);ql.size&&(ql.clear(),Mh()),Ch.length=0,Vl.clear()}function iL(E){L.value=E}function rL(E){W.value=E}function lL(E){j.value=E}const{cancelScheduledFocusSync:Q0,scheduleFocusSync:fr}=(function(E){const{isClient:U,containerRef:se,virtualizationEnabled:le,requestFrame:ke,cancelFrame:$e,syncFocusToScroll:De}=E;let He=null;function tt(){var Ke,et,Be;return(Be=(et=(Ke=se.value)==null?void 0:Ke.ownerDocument)==null?void 0:et.defaultView)!=null?Be:typeof window<"u"?window:null}function je(){if(!He)return;const Ke=tt();He.viaTimeout?Ke?Ke.clearTimeout(He.id):clearTimeout(He.id):$e?.(He.id),He=null}return{cancelScheduledFocusSync:je,scheduleFocusSync:function(Ke={}){if(!le.value)return;if(!U)return void De(!0);if(Ke.immediate)return je(),void De(!0);if(He)return;const et=()=>{He=null,De()};if(ke)return void(He={id:ke(et),viaTimeout:!1});const Be=tt();He={id:Be?Be.setTimeout(et,16):setTimeout(et,16),viaTimeout:!0}}}})({isClient:H,containerRef:A,virtualizationEnabled:ln,requestFrame:Nn,cancelFrame:$o,syncFocusToScroll:function(E=!1){var U;if(!ln.value)return;const se=Pe.value||_e();if(!se)return;const le=se.ownerDocument||((U=A.value)==null?void 0:U.ownerDocument)||document,ke=le?.defaultView||(typeof window<"u"?window:null),$e=se===le?.documentElement||se===le?.body,De=Ae.value.length;if(De<=0)return;if(!$e&&De>0&&ce(se)){const lt=Xt("syncFocusToScroll.clientHeight",()=>se.clientHeight||0),At=Xt("syncFocusToScroll.scrollTop",()=>se.scrollTop),gt=At<0?-At:At;return void $h(ws((He=Math.max(0,gt)+.5*Math.max(0,lt),bt.estimateIndexForOffsetFromEnd(He)),0,Math.max(0,De-1)),E)}var He;const tt=(function(lt,At,gt,Rt){const Bt=A.value;if(!Bt)return null;const qt=Rt?0:Xt("syncFocusToScroll.model.root.getBoundingClientRect",()=>lt.getBoundingClientRect().top),Wt=Xt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Bt.getBoundingClientRect().top),Gt=Math.max(0,qt-Wt),yn=Rt?Xt("syncFocusToScroll.model.viewport.clientHeight",()=>{var _n,eo,xs,fs;return(fs=(xs=(eo=gt?.innerHeight)!=null?eo:(_n=At.documentElement)==null?void 0:_n.clientHeight)!=null?xs:lt.clientHeight)!=null?fs:0}):Xt("syncFocusToScroll.model.root.clientHeight",()=>lt.clientHeight);return ws(G0(Gt+.5*Math.max(0,yn)),0,Math.max(0,Ae.value.length-1))})(se,le,ke,$e);if(tt!=null)return void $h(tt,E);const je=$e?null:Xt("syncFocusToScroll.root.getBoundingClientRect",()=>se.getBoundingClientRect()),Ke=$e?0:je.top,et=$e?Xt("syncFocusToScroll.viewport.clientHeight",()=>{var lt,At;return(At=(lt=ke?.innerHeight)!=null?lt:se.clientHeight)!=null?At:0}):je.bottom,Be=nl.value;let Ge=null,pt=null;for(const[lt,At]of Be){if(!At)continue;const gt=Xt("syncFocusToScroll.slot.getBoundingClientRect",()=>At.getBoundingClientRect());gt.bottom<=Ke||gt.top>=et||(Ge==null&&(Ge=lt),pt=lt)}if(Ge==null||pt==null){const lt=A.value;if(!lt)return;const At=$e?{top:0}:Xt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>se.getBoundingClientRect()),gt=Xt("syncFocusToScroll.fallback.scrollTop",()=>Se(se,le,$e)),Rt=$e?(()=>{const qt=Xt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>lt.getBoundingClientRect()),Wt=($e?0:At.top)-qt.top;return Math.max(0,Wt)})():(()=>{const qt=ie(lt,se);return Math.max(0,gt-qt)})(),Bt=$e?Xt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var qt,Wt,Gt,yn;return(yn=(Gt=(Wt=ke?.innerHeight)!=null?Wt:(qt=le?.documentElement)==null?void 0:qt.clientHeight)!=null?Gt:se.clientHeight)!=null?yn:0}):Xt("syncFocusToScroll.fallback.root.clientHeight",()=>se.clientHeight);return void $h(ws(G0(Rt+.5*Math.max(0,Bt)),0,Math.max(0,Ae.value.length-1)),!0)}$h(Math.round((Ge+pt)/2),E)}}),{visibleNodeIndices:ev,nodeVisibilityHandles:ic,nodeVisibilityWatchStops:Th,nodeVisibilityFallbackTimers:I_,clearVisibilityFallback:Ih,markNodeVisible:Kl,cleanupNodeVisibility:aL,destroyNodeVisibilityState:tv}=ape({isClient:H,shouldTrackVisibleNodeIndices:()=>Fr.value,shouldCleanupNodeVisibility:()=>ln.value,onNodeMarkedVisible:E=>{ln.value?fr():ol.value=ws(E,0,Math.max(0,Ae.value.length-1))},onNodeVisibilityCleaned:E=>{sn.delete(E)&&sS()}}),{cleanupScrollListener:$_,setupScrollListener:uL}=(function(E){const{isClient:U,virtualizationEnabled:se,listenerEnabled:le,scrollRootElement:ke,resolveScrollContainer:$e,scheduleFocusSync:De,onScroll:He}=E;let tt=null,je=null;function Ke(){tt&&(tt(),tt=null),je=null,ke.value=null}function et(Be){const Ge=E.getScrollTop?E.getScrollTop(Be):Be.scrollTop;return Math.max(0,Number.isFinite(Ge)?Math.abs(Ge):0)}return{cleanupScrollListener:Ke,setupScrollListener:function(){if(!U)return;if(!((Be=le?.value)!=null?Be:se.value))return void Ke();var Be;const Ge=$e();if(!Ge)return void Ke();if(ke.value===Ge&&tt)return;Ke(),je=et(Ge);const pt=()=>{if(He?.(),se.value){const lt=(function(At){const gt=et(At),Rt=je;je=gt;const Bt=Math.max(480,.75*(At.clientHeight||0));return Rt==null?gt>Bt?{immediate:!0}:void 0:Math.abs(gt-Rt)>Bt?{immediate:!0}:void 0})(Ge);lt?De(lt):De()}};Ge.addEventListener("scroll",pt,{passive:!0}),ke.value=Ge,tt=()=>{Ge.removeEventListener("scroll",pt)}}}})({isClient:H,virtualizationEnabled:ln,listenerEnabled:S_,scrollRootElement:Pe,resolveScrollContainer:_e,scheduleFocusSync:fr,onScroll:function(){const E=ct.value;if(!E)return;const U=qd();if(!U||(function(le){if(Xd()>=Ni)return dr=null,!1;const ke=dr;if(ke==null)return!0;const $e=Math.abs(le.scrollTop-ke)<=2;return $e||(dr=null),$e})(U))return;const se=q_(U);se!=null?(se<-32||Math.abs(Math.max(0,se)-Math.max(0,E.distanceFromBottomPx))>32)&&dc("restore"):dc("restore")},getScrollTop:E=>{var U;const se=E.ownerDocument||((U=A.value)==null?void 0:U.ownerDocument)||document,le=E===se.documentElement||E===se.body||E===se.scrollingElement;return Xt("scrollListener.getScrollTop",()=>Se(E,se,le))}});function $h(E,U=!1){const se=ws(E,0,Math.max(0,Ae.value.length-1));!U&&Math.abs(se-ol.value)<=1||(ol.value=se,Ud())}function ws(E,U,se){return Math.min(Math.max(E,U),se)}function nv(E=Ae.value.length){const U=wt();return!Number.isInteger(U)||U<0?E:ws(U,0,E)}function ov(E){return E?.firstElementChild}function N_(E,U){var se;return E?(se=E.matches)!=null&&se.call(E,U)?E:E.querySelector(U):null}function cL(E,U){E<1||E>6||(re[E]=U)}function L_(){if(!Fn.value)return void(X.value=0);const E=Xt("updateExperimentContainerWidth.clientWidth",()=>{var U,se;return(se=(U=A.value)==null?void 0:U.clientWidth)!=null?se:0});X.value=E>0?E:0}let Vd=null;function sv(){Vd?.disconnect(),Vd=null}const F_=Vf("ViewportDeferredMarkdownCodeBlockNode",or({loader:()=>go(null,null,function*(){return(yield Ts(()=>import("./index5-Def2Zrxa.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:y1,delay:0,suspensible:!1}),y1);function O_(E){return E===F_}const R_=O(()=>h.value==="pre"?vi:h.value==="shiki"?F_:Uy);function P_(){var E;return((E=M.codeBlockProps)==null?void 0:E.showHeader)!==!1}function D_(E,U,se){const le=oc[U],ke=typeof le=="number"&&le>0;if(Ho.value&&!ke&&!(function($e){return!!Un.value.paragraph&&($e.type==="paragraph"||$e.type==="list_item"||$e.type==="list")})(E)){const $e=o$(E,se,te.value);if($e)return $e}if(Yt.value&&E.type==="code_block"){const $e=(function(De){if(De.type!=="code_block")return null;const He=gS(De,Wh(De));return O_(He)?"markdown":He===vi?"pre":He===R_.value||He===Uy?"monaco":null})(E);if($e==="monaco"||$e==="markdown"||$e==="pre")return(function(De,He){var tt,je,Ke;if(!De||De.type!=="code_block")return null;const et=He.rendererKind,Be=et!=="pre"&&He.showHeader!==!1,Ge=!!De.diff;let pt=0,lt=500;if(et==="monaco"){const gt=(tt=He.monacoOptions)!=null?tt:{},Rt=Qy(De,gt,He.width),Bt=(function(Wt){const Gt=typeof Wt?.fontSize=="number"&&Wt.fontSize>0?Wt.fontSize:12;return typeof Wt?.lineHeight=="number"&&Wt.lineHeight>0?Wt.lineHeight:Math.round(1.5*Gt)})(gt),qt=(function(Wt,Gt){var yn,_n;const eo=typeof((yn=Wt?.padding)==null?void 0:yn.top)=="number"?Wt.padding.top:Gt?0:8,xs=typeof((_n=Wt?.padding)==null?void 0:_n.bottom)=="number"?Wt.padding.bottom:Gt?0:8;return Math.max(0,eo)+Math.max(0,xs)})(gt,Ge);lt=typeof gt.MAX_HEIGHT=="number"&>.MAX_HEIGHT>0?gt.MAX_HEIGHT:500,pt=Math.round(Rt*Bt+qt)}else if(et==="markdown"){const gt=Qy(De);pt=Math.round(21*gt+32)}else{const gt=Qy(De);pt=Math.round(28*gt),lt=Number.POSITIVE_INFINITY}const At=Math.max(1,Math.min(pt,lt));return kt({kind:"code-block",height:Math.round(At+(Be?40:0)),contentHeight:At,rendererKind:et},Ge&&et==="monaco"?{diffInline:Qw((je=He.monacoOptions)!=null?je:{},(Ke=He.width)!=null?Ke:0)}:{})})(E,{rendererKind:$e,monacoOptions:M.codeBlockMonacoOptions,showHeader:P_(),width:se})}return null}s5(()=>{if(Le.value,un>0)return;const E=Ae.value,U=Lt();if(!E.length||!yt.value)return dn=[],lo=[],Yn=-1,ge.clear(),void(Xe.value=Vt);const se=X.value||Xt("estimatedNodeHeights.clientWidth",()=>{var je;return((je=A.value)==null?void 0:je.clientWidth)||0});if(!Number.isFinite(se)||se<=0)return dn=[],lo=[],Yn=-1,ge.clear(),void(Xe.value=Vt);const le=(function(je){return[Math.round(je),Ho.value,Yt.value,te.value,M.codeBlockMonacoOptions,P_(),h.value,Un.value,Yy.value]})(se),ke=dn.length<=E.length&&(De=le,($e=lo).length===De.length&&$e.every((je,Ke)=>Object.is(je,De[Ke])));var $e,De;const He=ke&&Yn===U?E.length:ke?nv(E.length):0,tt=ke?Array.from(ge):[];dn.length=E.length;for(let je=He;je=0&&jeXe.value);bt=(function(E){let U=!0,se=[0],le="";function ke(Ke){var et;const Be=E.nodeHeights[Ke];if(Number.isFinite(Be)&&Be>0)return Be;const Ge=E.parsedNodes.value[Ke],pt=Ge?.type,lt=!!((et=E.hasCustomParagraphComponent)!=null&&et.call(E)),At=E.estimatedNodeHeights.value[Ke],gt=At?.height;if(!(function(Bt,qt,Wt){return!!(Wt&&qt?.kind==="simple-text"&&(Bt==="paragraph"||Bt==="list_item"||Bt==="list"))})(pt,At,lt)&&Number.isFinite(gt)&>>0)return gt;const Rt=Yfe(Ge,E.getContainerWidth()||640);return pt==="heading"||pt==="paragraph"&&Rt<=28&&(function(Bt,qt){if(qt)return!1;const Wt=Bt.children;return!Array.isArray(Wt)||!Wt.length||Wt.every(i$)})(Ge,lt)?Rt:Math.max(E.averageNodeHeight.value,Rt)}function $e(){var Ke;const et=E.parsedNodes.value.length,Be=E.getPrefixCacheKeyParts().join(":");if(!U&&le===Be)return se;const Ge=new Array(et+1);Ge[0]=0;for(let pt=0;pt=((et=pt[Ge])!=null?et:0))return Ge-1;let lt=0,At=Ge-1,gt=Ge-1;for(;lt<=At;){const Rt=lt+At>>1;((Be=pt[Rt+1])!=null?Be:0)>=Ke?(gt=Rt,At=Rt-1):lt=Rt+1}return gt}function He(Ke,et){var Be,Ge;if(Ke>=et)return 0;if(E.heightEstimationActive.value)return(function(At,gt){var Rt,Bt;const qt=E.parsedNodes.value.length,Wt=v8(Math.trunc(At),0,qt),Gt=v8(Math.trunc(gt),Wt,qt);if(Wt>=Gt)return 0;const yn=$e();return((Rt=yn[Gt])!=null?Rt:0)-((Bt=yn[Wt])!=null?Bt:0)})(Ke,et);if(E.heightTreeSize.value!==E.parsedNodes.value.length){let At=0;for(let gt=Ke;gtWt<=0?0:E.fenwickRangeSum(lt,0,Wt)+(Wt-E.fenwickRangeSum(At,0,Wt))*pt;let Rt=0,Bt=Be.length-1,qt=Be.length-1;for(;Rt<=Bt;){const Wt=Rt+Bt>>1;gt(Wt+1)>=Ke?(qt=Wt,Bt=Wt-1):Rt=Wt+1}return qt}let Ge=Ke;for(let pt=0;pt0||Ke++}return Ke}return{markFallbackHeightPrefixDirty:function(){U=!0},getFallbackNodeHeight:ke,estimateHeightRange:He,estimateIndexForOffset:tt,estimateIndexForOffsetFromEnd:function(Ke){var et,Be;const Ge=E.parsedNodes.value;if(!Ge.length)return 0;if(Ke<=0)return Math.max(0,Ge.length-1);if(E.heightEstimationActive.value){const lt=(et=$e()[Ge.length])!=null?et:0;return De(Math.max(0,lt-Ke))}if(E.heightTreeSize.value===Ge.length){const lt=He(0,Ge.length);return tt(Math.max(0,lt-Ke))}let pt=Ke;for(let lt=Ge.length-1;lt>=0;lt--){const At=(Be=E.nodeHeights[lt])!=null?Be:E.averageNodeHeight.value;if(pt<=At)return lt;pt-=At}return 0},getEstimatedNodeHeightCount:je,buildVirtualHeightSummary:function(Ke){var et;const Be=E.parsedNodes.value.length;return{totalNodes:Be,measuredCount:E.heightStats.count,estimatedCount:je(),averageNodeHeight:E.averageNodeHeight.value,topSpacerHeight:Ke.topSpacerHeight,bottomSpacerHeight:Ke.bottomSpacerHeight,estimatedTotalHeight:He(0,Be),width:(et=Ke.width)!=null?et:E.getContainerWidth()}}}})({parsedNodes:Ae,nodeHeights:oc,heightStats:Gi,heightTreeSize:Z0,heightSumTree:GN,heightKnownTree:ZN,averageNodeHeight:g_,heightEstimationActive:Fn,estimatedNodeHeights:rc,getContainerWidth:Fs,hasCustomParagraphComponent:()=>!!Un.value.paragraph,getPrefixCacheKeyParts:()=>{var E;const U=Af(X.value||Xt("getFallbackHeightPrefix.clientWidth",()=>{var le;return((le=A.value)==null?void 0:le.clientWidth)||0})),se=((E=o.virtualScroll)==null?void 0:E.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[Ae.value.length,Gi.count,Math.round(Gi.total),Math.round(100*g_.value),se,U,Fn.value?1:0,Yy.value,G.value,Un.value.paragraph?1:0]},fenwickRangeSum:nL}),Ye(()=>Ae.value.length,E=>{var U;ci(),E<=0?Sh():(EJN(U))),E!==Z0.value&&_h(E))},{immediate:!0});const dL=O(()=>{if(!ln.value)return Ae.value.map((le,ke)=>({node:le,index:ke}));const E=Ae.value.length,U=ws(bs.start,0,E),se=ws(bs.end,U,E);return Ae.value.slice(U,se).map((le,ke)=>({node:le,index:U+ke}))}),iv=O(()=>ln.value?tc(0,Math.min(bs.start,Ae.value.length)):0),rv=O(()=>{if(!ln.value)return 0;const E=Ae.value.length;return tc(Math.min(bs.end,E),E)});function B_(){return bt.buildVirtualHeightSummary({topSpacerHeight:iv.value,bottomSpacerHeight:rv.value,width:Ya()})}function fL(){const E=Ae.value,U=B_();return fn(kt({},U),{probe:{paragraphReady:!!te.value.paragraph,listItemReady:!!te.value.listItem,listWrapperOverhead:te.value.listWrapperOverhead,headingReadyLevels:Object.entries(te.value.headings).filter(([,se])=>!!se).map(([se])=>Number(se))},nodes:E.map((se,le)=>{var ke,$e,De,He,tt,je,Ke,et,Be;return{index:le,type:se.type,estimateKind:($e=(ke=rc.value[le])==null?void 0:ke.kind)!=null?$e:null,rendererKind:(He=(De=rc.value[le])==null?void 0:De.rendererKind)!=null?He:null,estimatedHeight:(je=(tt=rc.value[le])==null?void 0:tt.height)!=null?je:null,estimatedContentHeight:(et=(Ke=rc.value[le])==null?void 0:Ke.contentHeight)!=null?et:null,measuredHeight:(Be=oc[le])!=null?Be:null}})})}function lv(){return o.indexKey!=null?String(o.indexKey):ss.value?`virtual-${yo()}`:"markdown-renderer"}function z_(E){const U=String(E),se=`${lv()}-`;if(!U.startsWith(se))return null;const le=U.slice(se.length).match(/^(\d+)(?:$|-)/);if(!le)return null;const ke=Number(le[1]);return!Number.isInteger(ke)||ke<0||ke>=Ae.value.length?null:ke}function yo(){var E,U,se;const le=(E=o.virtualScroll)==null?void 0:E.sessionKey;return String(le!=null&&le!==""?le:(se=(U=o.indexKey)!=null?U:M.customId)!=null?se:xo)}function Uo(){var E;const U=(E=o.virtualScroll)==null?void 0:E.threadKey;return U==null||U===""?void 0:String(U)}const pL=O(()=>{var E,U,se;return(se=Uo())!=null?se:String((U=(E=o.indexKey)!=null?E:M.customId)!=null?U:xo)});function av(E){var U;return(E??"")===((U=Uo())!=null?U:"")}function il(){var E,U,se;return U=(E=o.virtualScroll)==null?void 0:E.measurementKey,se=(function(){const le=h.value;return(function(ke){var $e,De;const He=ke.renderer,tt=He==="monaco"?ke.codeBlockMonacoOptions:void 0,je=ke.codeBlockProps,Ke=He==="shiki";return[ke.isDark?"dark":"light",He==="monaco"?"code-rich":He==="pre"?"code-pre":"code-shiki",ke.codeBlockStream===!1?"code-static":"code-stream",ps(ke.codeBlockMinWidth),ps(ke.codeBlockMaxWidth),...Ke?[Bue(($e=je?.themes)!=null?$e:ke.themes,(De=je?.langs)!=null?De:ke.langs)]:[],ps(tt?.fontSize),ps(tt?.lineHeight),ps(tt?.fontFamily),ps(tt?.tabSize),ps(tt?.MAX_HEIGHT),ps(tt?.wordWrap),ps(tt?.wrappingIndent),ps(tt?.padding),ps(je?.showHeader),ps(je?.showCopyButton),ps(je?.showExpandButton),ps(je?.showPreviewButton),ps(je?.showCollapseButton),ps(je?.showFontSizeButtons)].join("\0")})({renderer:le,isDark:M.isDark,codeBlockStream:M.codeBlockStream,codeBlockMinWidth:M.codeBlockMinWidth,codeBlockMaxWidth:M.codeBlockMaxWidth,codeBlockMonacoOptions:le==="monaco"?M.codeBlockMonacoOptions:void 0,codeBlockProps:M.codeBlockProps,themes:le==="shiki"?M.themes:void 0,langs:le==="shiki"?M.langs:void 0})})(),[U==null?"":String(U),se].join("\0")}function Ya(){return Fs()}const Nh=O(()=>Af(Ya())),Oi=O(()=>[il(),Nh.value].join("\0")),hL=O(()=>{var E;return ss.value?["virtual",(E=Uo())!=null?E:"",yo(),Oi.value].join("\0"):o.indexKey});function lc(){M_.value+=1}function uv(E){return!(!E||!Number.isInteger(E.index)||E.index<0||E.index>=Ae.value.length||E.sessionKey!==yo()||E.threadKey!==Uo()||E.layoutEpochKey!==Oi.value)}function W_(E){const U=String(E),se=Rr.get(U);return se?uv(se)?se.index:null:z_(U)}function H_(E="async-node"){(Li.size||Rr.size)&&(Li.clear(),Rr.clear(),lc(),ho(E))}const ac=wn(Nb,null),cv={reportHeight(E,U){if(!Cn.value)return;const se=W_(E);if(se==null)return;const le=Or.get(se);if(!le)return;const ke=Number(U),$e=w_(se,le);(function(De,He,tt={}){sc(()=>b_(De,He,tt))})(se,Number.isFinite(ke)&&ke>0?Math.max(ke,$e||0):$e)},markPending(E){if(!Cn.value)return;const U=z_(E);U!=null&&(function(se,le){var ke;const $e=Rr.get(se);if($e&&uv($e))return Li.set(se,Math.max(0,(ke=Li.get(se))!=null?ke:0)+1),lc(),void ho("async-node");Li.set(se,1),Rr.set(se,(function(De){return{index:De,sessionKey:yo(),threadKey:Uo(),layoutEpochKey:Oi.value}})(le)),lc(),ho("async-node")})(String(E),U)},markSettled(E){if(!Cn.value)return;const U=String(E),se=W_(E);(se!=null||(function(le){return Li.has(String(le))})(U))&&(function(le){var ke;const $e=(ke=Li.get(le))!=null?ke:0;return!($e<=0||($e<=1?(Li.delete(le),Rr.delete(le)):Li.set(le,$e-1),lc(),$e===1&&ho("async-node"),0))})(U)&&se!=null&&rl()}};function mL(){let E=0;for(const U of Or.values())E+=Xt("getVisibleDomHeight.offsetHeight",()=>{var se;return(se=U?.offsetHeight)!=null?se:0});return Math.ceil(Math.max(0,E))}Vn(Nb,{reportHeight(E,U){cv.reportHeight(E,U),ac?.reportHeight(E,U)},markPending(E){cv.markPending(E),ac?.markPending(E)},markSettled(E){cv.markSettled(E),ac?.markSettled(E)}});let dv,fv=null,uc=null;function Lh(E){return E!==!1&&E!=null&&E!==""}function j_(){return ln.value?(function(){if(!ln.value)return!0;const E=Ae.value.length,U=ws(bs.start,0,E),se=ws(bs.end,U,E);if(U>=se)return!0;for(let le=U;le=Ah.value}function pv(){return ft.value===!0&&!Tt.value&&X0.value===0&&ql.size===0&&sl.size===0&&Fi==null&&j_()}function U_(){var E,U;if(((E=o.virtualScroll)==null?void 0:E.settleMode)!=="manual"||fv===yo()&&dv===Uo())return!0;const se=(U=o.virtualScroll)==null?void 0:U.settledToken;return!!Lh(se)&&uc===rf(se)}function hv(){return pv()&&U_()}function gL(E,U){return U.totalNodes<=0?E==="final"?"final":"estimate":U.measuredCount>=U.totalNodes?E==="final"?"final":"measured":U.measuredCount>0||U.estimatedCount>0?"mixed":"estimate"}function Ja(E="manual",U){const se=B_(),le=(function(ke){return ke||(ft.value!==!0?Ae.value.length>0?"streaming":"estimating":!j_()||sl.size>0||Fi!=null?"measuring":hv()?"settled":"settling")})(U);return{sessionKey:yo(),threadKey:Uo(),phase:le,nodeCount:se.totalNodes,liveRange:{start:bs.start,end:bs.end},renderedCount:xn.value,measuredCount:se.measuredCount,estimatedCount:se.estimatedCount,averageNodeHeight:se.averageNodeHeight,topSpacerHeight:se.topSpacerHeight,bottomSpacerHeight:se.bottomSpacerHeight,visibleDomHeight:mL(),totalHeight:V_(),width:se.width,final:ft.value===!0,stable:hv(),confidence:gL(le,se),reason:E}}function qd(){const E=Pe.value||_e(),U=A.value;if(!E||!U)return null;const se=E.ownerDocument||U.ownerDocument||document,le=E===se.documentElement||E===se.body||E===se.scrollingElement,ke=Xt("getScrollBox.scrollTop",()=>Se(E,se,le)),$e=Xt("getScrollBox.scrollHeight",()=>{var He,tt,je,Ke,et;return le?Math.max((tt=(He=se.documentElement)==null?void 0:He.scrollHeight)!=null?tt:0,(Ke=(je=se.body)==null?void 0:je.scrollHeight)!=null?Ke:0,(et=E.scrollHeight)!=null?et:0):E.scrollHeight}),De=Xt("getScrollBox.clientHeight",()=>{var He;return le?((He=se.documentElement)==null?void 0:He.clientHeight)||E.clientHeight||0:E.clientHeight});return{root:E,doc:se,isViewportRoot:le,scrollTop:ke,scrollHeight:$e,clientHeight:De}}function V_(){const E=Ae.value.length,U=Math.max(0,tc(0,E)),se=Xt("getRendererLogicalHeight.offsetHeight",()=>{var ke,$e;return($e=(ke=A.value)==null?void 0:ke.offsetHeight)!=null?$e:0}),le=Math.max(0,se>0?se:Xt("getRendererLogicalHeight.scrollHeight",()=>{var ke,$e;return($e=(ke=A.value)==null?void 0:ke.scrollHeight)!=null?$e:0}));return E<=0?Math.ceil(se):ln.value?U>0?Math.max(1,Math.ceil(U),(function(){let ke=iv.value+rv.value;for(const $e of sn.values())$e&&(ke+=Math.max(0,Xt("getVirtualizedDomLogicalHeight.offsetHeight",()=>$e.offsetHeight||0)));return Math.ceil(Math.max(0,ke))})(),(function(ke,$e){return ke<=0||$e<=0?0:$e<=ke+Math.max(512,.05*ke)?Math.ceil($e):0})(U,le)):Math.max(1,Math.ceil(le)):Cn.value?U>0||Gi.count>0||bt.getEstimatedNodeHeightCount()>0?(Ln.value&&xn.value,Math.max(1,Math.ceil(le),Math.ceil(U))):Math.ceil(le):Math.max(1,Math.ceil(le),Math.ceil(U))}function q_(E){const U=A.value;if(!U)return null;const se=Xt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>U.getBoundingClientRect());return(function(ke){return ke.isViewportRoot?ke.clientHeight:Xt("getViewportBottomInRoot.getBoundingClientRect",()=>ke.root.getBoundingClientRect().bottom)})(E)-se.bottom}function vL(E={}){const U=E.requireViewport!==!1,se=(function($e=64){const De=qd(),He=A.value;if(!De||!He)return!1;const tt=(function(Ke){if(Ke.isViewportRoot)return{top:0,bottom:Ke.clientHeight};const et=Xt("getVirtualViewportRect.getBoundingClientRect",()=>Ke.root.getBoundingClientRect());return{top:et.top,bottom:et.bottom}})(De),je=Xt("isRendererNearVirtualViewport.getBoundingClientRect",()=>He.getBoundingClientRect());return je.bottom>=tt.top-$e&&je.top<=tt.bottom+$e})();if(U&&!se)return null;const le=(function(){const $e=qd(),De=A.value;if(!$e||!De||Math.max(0,$e.scrollHeight-$e.scrollTop-$e.clientHeight)>64)return null;const He=q_($e);return He==null?null:He>=-8&&He<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,He)}:null})();if(le)return{anchor:le,captured:!0};const ke=h_();if(ke)return{anchor:{type:"node",nodeIndex:ke.nodeIndex,offsetWithinNodePx:ke.offsetWithinNodePx},captured:se};if(E.allowFallback===!0){const $e=(function(){const De=Ae.value.length;return De<=0?null:{type:"node",nodeIndex:ws(ol.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return $e?{anchor:$e,captured:!1}:null}return null}function mv(E){let U=2166136261;for(let se=0;se>>0).toString(36)}function yL(E,U){let se=E;for(let le=0;le8192?`${le.slice(0,8192)}...${le.length}`:le;return`${le.length}:${mv(ke)}`})(E)}`;if(typeof E=="function")return"fn";if(typeof E!="object")return typeof E;if(U.has(E))return"cycle";if(se>=6)return"max-depth";U.add(E);try{if(Array.isArray(E)){if(E.length<=160){const je=[];for(let Ke=0;Ke=He&&De.push(Ke)}return[`a:${E.length}`,`h=${$e.join(",")}`,`t=${De.join(",")}`,`all=${(tt>>>0).toString(36)}`].join(":")}const le=E,ke=Object.keys(le).filter($e=>{const De=le[$e];return $e!=="parent"&&$e!=="el"&&$e!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||kL.has($e))}).sort();return`o:${ke.length}:${ke.map($e=>`${$e}=${Fh(le[$e],U,se+1)}`).join(";")}`}finally{U.delete(E)}}let gv=-1,vv="",Xa=[2166136261];function Kd(E){const U=Ae.value[E];return U?mv(Fh(U)):""}function bL(E,U){let se=E;for(let le=0;le>>0}function yv(){var E,U;const se=G.value;if(gv===se)return vv;const le=Ae.value.length;let ke=nv(le);(gv!==se-1||ke>le||Xa.length>>0).toString(36),gv=se,vv}function cc(E,U={}){var se;const le=U.includeHeightCache===!0,ke=(se=U.includeContentHash)!=null?se:le,$e=le?(function(He){const tt=(function(){var lt,At;const gt=Number((At=(lt=o.virtualScroll)==null?void 0:lt.heightCacheLimit)!=null?At:5e3);return!Number.isFinite(gt)||gt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(gt))})();if(!Number.isFinite(tt)||He.length<=tt)return He;const je=new Map,Ke=lt=>{!lt||je.size>=tt||je.set(lt.index,lt)},et=Ae.value.length,Be=ws(bs.start-2*Po.value,0,et),Ge=ws(bs.end+2*Po.value,Be,et);for(const lt of He)lt.index>=Be&<.index=0&&je.sizelt.index-At.index).slice(0,tt)})(eL().map(He=>{var tt;const je=Ae.value[He.index];return je?fn(kt({},He),{nodeType:String((tt=je.type)!=null?tt:""),signature:Kd(He.index)}):null}).filter(He=>!!He)):[],De=vL({allowFallback:U.allowAnchorFallback===!0,requireViewport:U.requireViewport});return De||$e.length||U.includeEmptyState===!0?fn(kt({sessionKey:E.sessionKey,threadKey:E.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:E,width:E.width,contentHash:ke?yv():void 0,measurementKey:il()||void 0,heightCache:$e.length?$e:void 0}):null}function kv(E){var U,se;const le=qd();if(!le)return;const ke=(function(He){const tt=A.value;if(!tt)return null;const je=ie(tt,He.root),Ke=Ae.value.length,et=Xt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>tt.offsetHeight||0),Be=Math.max(0,et>0?et:Ke>0?Xt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>tt.scrollHeight||0):0),Ge=V_();return je+Math.max(Be,Ge)})(le);if(ke==null)return;const $e=Math.max(0,E.distanceFromBottomPx),De=Math.max(0,ke-le.clientHeight-$e);(function(He){Ni=Xd()+120,dr=He})(De),le.isViewportRoot?(se=(U=le.doc.defaultView)==null?void 0:U.scrollTo)==null||se.call(U,0,De):h8(le.root,le.doc,De,{isReverseFlexScrollRoot:ce,getNormalizedScrollTop:Se})}const bv=[];function K_(){if(H)for(pn!=null&&($o?.(pn),pn=null);bv.length;){const E=bv.pop();E!=null&&window.clearTimeout(E)}}function dc(E){const U=!!ct.value;ct.value=null,Ni=0,dr=null,K_(),U&&E&&ho(E)}function fc(){if(!ct.value||!H||pn!=null)return;const E=()=>{pn=null;const U=ct.value;U&&kv(U)};pn=Nn?Nn(E):null,pn==null&&E()}function G_(E,U={}){const se=Ae.value.length;return se<=0?[]:E.filter(le=>!(!Number.isInteger(le.index)||le.index<0||le.index>=se)&&!(!Number.isFinite(le.height)||le.height<=0)&&!(U.requireSignature&&!le.signature)&&!(U.requireCompatibilityMetadata&&!le.nodeType&&!le.signature)&&(function(ke){var $e;const De=Ae.value[ke.index];return!(!De||ke.nodeType&&ke.nodeType!==String(($e=De.type)!=null?$e:"")||ke.signature&&ke.signature!==Kd(ke.index))})(le))}function Z_(E){const U=Af(Ya()),se=Af(E);return U!==-1&&se!==-1&&U===se}function wv(E){var U;const se=Number(E?.width);if(Number.isFinite(se)&&se>0)return se;const le=Number((U=E?.metrics)==null?void 0:U.width);return Number.isFinite(le)&&le>0?le:null}function Y_(E){var U;return E.sessionKey===yo()&&!!av(E.threadKey)&&((U=E.measurementKey)!=null?U:"")===il()&&!!Z_(wv(E))&&!!(function(se){const le=se.heightCache;return!!le?.length&&(J_(se)?le.some(ke=>!!(ke.nodeType||ke.signature)):le.some(ke=>!!ke.signature))})(E)}function J_(E){return!!(E.contentHash&&E.contentHash===yv())}function wL(E){return!J_(E)}let Qa=null,eu=null,Oh=null,Gd=null,Zd=null;function xv(E){var U;const se=E.map(ke=>{var $e,De;return[ke.index,Math.round(10*ke.height),($e=ke.nodeType)!=null?$e:"",(De=ke.signature)!=null?De:""].join("")}).join(""),le=Af(Ya());return[(U=Uo())!=null?U:"",yo(),il(),Ae.value.length,le,E.length,mv(se)].join(":")}function X_(E=(U=>(U=o.virtualScroll)==null?void 0:U.heightCache)()){if(!Cn.value||!E?.length||Ae.value.length<=0||!Z_((U=o.virtualScroll)==null?void 0:U.heightCacheWidth))return!1;var U;const se=G_(E,{requireSignature:!0});if(!se.length)return!1;const le=xv(se);return le===Qa?(eu="standalone",!0):(x_(se,{mode:"merge"}),ci(),Qa=le,eu="standalone",ef(),ho("restore"),!0)}function _v(E,U={}){var se,le,ke;if(!Cn.value||!E||E.sessionKey!==yo()||!av(E.threadKey)||Ae.value.length<=0)return!1;const $e=!!((se=E.heightCache)!=null&&se.length)&&!Rh(),De=!E.anchor||E.anchorCaptured===!1&&U.allowUncapturedAnchor!==!0?null:E.anchor,He=U.restoreAnchor===!0&&!!De&&!Rh()&&Number(wv(E))>0;let tt=!1;if((le=E.heightCache)!=null&&le.length&&Y_(E)){const Ke=G_(E.heightCache,{requireCompatibilityMetadata:!E.contentHash,requireSignature:wL(E)});Ke.length&&(x_(Ke,{mode:"merge"}),ci(),Qa=xv(Ke),eu="restore",ef(),tt=!0)}if($e||He)return!1;if(!U.restoreAnchor||!De)return tt&&ho("restore"),!0;const je=(function(Ke,et){var Be;const Ge=Ke.anchor,pt=Ge?Ge.type==="bottom"?`bottom:${Math.round(Ge.distanceFromBottomPx)}`:`node:${Ge.nodeIndex}:${Math.round(Ge.offsetWithinNodePx)}`:"none";return[(Be=Uo())!=null?Be:"",yo(),il(),Nh.value,et,pt].join(":")})(E,(ke=U.restoreToken)!=null?ke:"imperative");return Oh===je?(tt&&ho("restore"),!0):(Oh=je,(function(Ke){const et=()=>{if(Ke.type==="node")return dc(),void m_({nodeIndex:Ke.nodeIndex,offsetWithinNodePx:Ke.offsetWithinNodePx});if(xh(),nc.value=null,ct.value=Ke,K_(),kv(Ke),H)for(const Be of[0,120,280,480])bv.push(window.setTimeout(()=>{const Ge=ct.value;Ge&&kv(Ge)},Be))};(function(Be){if(!ln.value)return!1;const Ge=Ae.value.length;return!(Ge<=0||(ol.value=Be.type==="node"?ws(Be.nodeIndex,0,Ge-1):Ge-1,Ud(),0))})(Ke)?xt(et):et()})(De),ho("restore"),!0)}function Rh(){const E=Ya();return Number.isFinite(E)&&E>0}function Q_(E){var U;return E.sessionKey===yo()&&!!av(E.threadKey)&&(Ae.value.length<=0||!(!((U=E.heightCache)!=null&&U.length)||Rh())||!(!(E.anchor&&Number(wv(E))>0)||Rh()))}function Sv(){Dt.clear();for(const E of Object.keys(oc)){const U=Number(E);Number.isInteger(U)&&U>=0&&U{let U=!1,se=null;const le=()=>{U||(U=!0,se!=null&&window.clearTimeout(se),E())};if(Nn)return Nn(le),void(se=window.setTimeout(le,50));se=window.setTimeout(le,0)})}function Cv(E,U=Uo(),se=Oi.value){return yo()===E&&Uo()===U&&Oi.value===se}function Av(){return go(this,arguments,function*(E={}){var U,se,le,ke,$e;const De=yo(),He=Uo(),tt=Oi.value,je=(U=E.frames)!=null?U:2,Ke=(se=E.timeoutMs)!=null?se:120,et=(le=E.reason)!=null?le:"manual",Be=E.expectedSettledTokenKey,Ge=E.flushPendingTimers===!0,pt=Ja(et),lt=()=>fn(kt({},pt),{phase:pt.final?"settling":pt.phase,stable:!1,confidence:pt.confidence==="final"?"mixed":pt.confidence,reason:et}),At=()=>Cv(De,He,tt)&&(Be==null||Qd()===Be);for(let qt=0;qtwindow.setTimeout(Wt,qt))})(Ke),!At()||(Ge&&T_(),rl(),Yd(),!At()))return lt();const gt=pv();gt&&(fv=De,dv=He,((ke=o.virtualScroll)==null?void 0:ke.settleMode)==="manual"&&Be!=null&&Lh(($e=o.virtualScroll)==null?void 0:$e.settledToken)&&Qd()===Be&&(uc=rf(o.virtualScroll.settledToken)));const Rt=At()&>&&U_(),Bt=Ja(et,Rt?"final":void 0);return $v(Bt,!0),Bt})}let Mv="content",tu=null,nu=null,Ev=0,Jd=null,pc=null,Tv=null,Iv=null;function Xd(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function tS(E){var U,se;const le=Jd;if(!le)return!0;const ke=(se=(U=o.virtualScroll)==null?void 0:U.heightDiffThresholdPx)!=null?se:1;return Math.abs(E.totalHeight-le.totalHeight)>ke||E.sessionKey!==le.sessionKey||E.phase!==le.phase||E.stable!==le.stable||E.final!==le.final||E.threadKey!==le.threadKey||E.nodeCount!==le.nodeCount||E.measuredCount!==le.measuredCount||E.width!==le.width}function Qd(E=(U=>(U=o.virtualScroll)==null?void 0:U.settledToken)()){return ps(E)}function nS(E,U){var se,le;return[E,U.sessionKey,(se=U.threadKey)!=null?se:"",il(),yv(),ps((le=o.virtualScroll)==null?void 0:le.settledToken),Math.round(U.totalHeight),Math.round(U.width)].join("\0")}function ef(){Tv=null,Iv=null,pc=null}function xL(E){const U=E.heightCache;return U?.length?xv(U):""}function tf(E){var U,se,le;const ke=E.metrics,$e=E.anchor?(De=E.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[E.sessionKey,(U=E.threadKey)!=null?U:"",(se=E.measurementKey)!=null?se:il(),(le=E.contentHash)!=null?le:"",xL(E),$e,E.anchorCaptured?1:0,ke.liveRange.start,ke.liveRange.end,ke.renderedCount,ke.nodeCount,Math.round(ke.totalHeight),Math.round(ke.width),ke.phase,ke.stable?1:0].join("\0")}function $v(E,U=!1){if(!Cn.value||(function(De=!1){return!De&&ss.value&&!Ls.value})(U))return;const se=U||tS(E),le=(function(De,He=!1){return He||De.stable||De.phase==="final"?{state:cc(De,{includeHeightCache:!0})}:{state:cc(De)}})(E,U),ke=le.state,$e=!!(ke&&(se||(function(De,He=!1){return!!He||tf(De)!==pc})(ke,U)));if(se&&(D(E),Jd=E,Ev=Xd()),ke&&$e&&(B(ke),ke.anchor&&z(ke.anchor),pc=tf(ke)),E.stable){const De=nS("settled",E);if(De!==Tv){Tv=De;const He=cc(E,{includeHeightCache:!0});He&&(B(He),pc=tf(He)),(function(tt){s("render-settled",tt)})(E)}}if(E.phase==="final"){const De=nS("final",E);if(De!==Iv){Iv=De;const He=cc(E,{includeHeightCache:!0});He&&(B(He),pc=tf(He)),(function(tt){s("render-final",tt)})(E)}}}function Nv(){tu!=null&&($o?.(tu),tu=null),nu!=null&&H&&(window.clearTimeout(nu),nu=null)}function oS(){tu=null,nu=null,(function(E){if(sl.size>0||Fi!=null)return!0;switch(E){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(Mv)&&(rl(),Yd()),$v(Ja(Mv))}function ho(E){var U,se;if(!Cn.value||(Mv=E,tu!=null||nu!=null))return;const le=Math.max(0,(se=(U=o.virtualScroll)==null?void 0:U.emitIntervalMs)!=null?se:32),ke=Math.max(0,le-(Xd()-Ev)),$e=()=>{nu=null,tu=Nn?Nn(oS):null,tu==null&&oS()};H&&ke>0?nu=window.setTimeout($e,ke):$e()}function sS(){tl.value+=1}function Ph(E){if(Ln.value&&E>=xn.value){const U=Ae.value[E],se=at.value===!0&&ft.value!==!0&&E>=Ae.value.length-2,le=U?.type==="code_block"||U?.type==="image"||U?.type==="mermaid"||U?.type==="infographic";if(!se||le)return!1}return!Fr.value||E=he.value&&(Q.value||(Q.value=!0,tv()),!__.value||!ks))return hc(E),void(U&&Kl(E,!0));if(E{if(I_.delete($e),!Fr.value||ev.value.has($e))return;const tt=sn.get($e);if(!tt)return;const je=_e(tt),Ke=tt.ownerDocument||document,et=Ke.defaultView||window,Be=!je||je===Ke.documentElement||je===Ke.body,Ge=!Be&&je?Xt("nodeVisibilityFallback.root.getBoundingClientRect",()=>je.getBoundingClientRect()):null,pt=Be?0:Ge.top,lt=Be?Xt("nodeVisibilityFallback.clientHeight",()=>{var gt,Rt;return(Rt=(gt=et.innerHeight)!=null?gt:je?.clientHeight)!=null?Rt:0}):Ge.bottom,At=Xt("nodeVisibilityFallback.node.getBoundingClientRect",()=>tt.getBoundingClientRect());At.bottom>=pt-500&&At.top<=lt+500&&Kl($e,!0)},1800+De);I_.set($e,He)})(E);let ke=null;ke=Ye(()=>le.isVisible.value,$e=>{if($e){Ih(E),Kl(E,!0),ke?.(),Th.delete(E),ic.get(E)===le&&ic.delete(E);try{le.destroy()}catch{}}},{immediate:!0}),Th.set(E,ke),ln.value&&fr()}function Lv(){Fi=null,sc(()=>{let E=!1;for(const[U,se]of sl)sl.delete(U),Or.get(U)===se.el&&Za.get(U)===se.version&&(E=b_(U,se.height,{allowShrink:se.allowShrink})||E);return E})}function mc(){Fi!=null&&($o?.(Fi),Fi=null),sl.clear()}function Bh(E,U){(function(se,le,ke){var $e;if(!Number.isFinite(ke)||ke<=0||Or.get(se)!==le)return;const De=Za.get(se);if(De==null)return;const He=Ae.value[se],tt=Tt.value&&ft.value!==!0&&!(($e=o.nodes)!=null&&$e.length)&&se>=Ae.value.length-2,je=!(He?.loading===!0||tt),Ke=sl.get(se),et=Ke?Ke.allowShrink&&je:je,Be=Ke&&!et?Math.max(Ke.height,ke):ke;sl.set(se,{height:Be,allowShrink:et,version:De,el:le}),Fi==null&&(Fi=Nn?Nn(Lv):null,Fi==null&&Lv())})(E,U,w_(E,U))}function rl(){for(const[E,U]of Or)U&&Bh(E,U)}function iS(){Tn?.disconnect(),Tn=null,Qn.clear()}function Fv(){for(;Ch.length;)Eh(Ch.pop())}Ye(Ls,E=>{E&&ho("content")},{flush:"post"}),t({getVirtualMetrics:Ja,captureVirtualState:function(E={}){var U;return cc(Ja("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:E.allowFallbackAnchor===!0,requireViewport:E.requireViewport===!0,includeEmptyState:(U=E.includeEmptyState)==null||U})},restoreVirtualState:function(E,U={}){const se=U.restoreAnchor===!0,le=U.restoreToken==null?"imperative":String(U.restoreToken);Gd=E,Zd={restoreAnchor:se,restoreToken:le,allowUncapturedAnchor:U.allowUncapturedAnchor===!0},!_v(E,{restoreAnchor:se,restoreToken:le,allowUncapturedAnchor:U.allowUncapturedAnchor===!0})&&Q_(E)||(Gd=null,Zd=null)},forceMeasure:function(E="manual"){return go(this,null,function*(){yield xt(),yield eS(),rl(),Yd(),yield xt();const U=Ja(E);return $v(U,!0),U})},settle:Av,scrollToNode:function(E,U="start"){dc(),xh();const se=Ae.value.length;if(se<=0)return;const le=ws(E,0,se-1),ke=()=>{var $e;const De=qN({nodeIndex:le,offsetWithinNodePx:0}),He=K0(le),tt=qd(),je=($e=tt?.clientHeight)!=null?$e:0,Ke=UN();let et=De;if(U==="center")et=De-je/2+He/2;else if(U==="end")et=De-je+He;else if(U==="nearest"&&Ke!=null){if(De>=Ke&&De+He<=Ke+je)return;et=DeOs.value,E=>{if(!E){iS();for(const U of Vl.values())for(const se of U)Eh(se);Vl.clear(),Za.clear(),Fv(),mc()}},{immediate:!0}),Ye(ft,E=>{E&&(function(){if(H&&ft.value&&Or.size){Fv();for(const U of[80,240,640]){const se=E_(U,()=>{for(const[le,ke]of Or)ke&&Bh(le,ke)},"final");se!=null&&Ch.push(se)}}})(),ho(E?"final":"content")});const _L=m8(()=>ho("content"),16),SL=m8(()=>ho("batch"),16);Ye([()=>Ae.value.length,()=>xn.value],()=>{ct.value&&fc(),_L()},{flush:"post",immediate:!0}),Ye([()=>bs.start,()=>bs.end],()=>{SL()},{flush:"post"});const{cleanupBatchScheduler:CL}=(function(E){const{props:U,isClient:se,isTestEnv:le,parsedNodesIdentity:ke,parsedNodeCount:$e,desiredRenderedCount:De,datasetKey:He,batchingEnabled:tt,incrementalRenderingActive:je,resolvedBatchSize:Ke,resolvedInitialBatch:et,renderedCount:Be,adaptiveBatchSize:Ge,previousRenderContext:pt,previousBatchConfig:lt,requestFrame:At,cancelFrame:gt,hasIdleCallback:Rt,cleanupNodeVisibility:Bt,onDatasetKeyChanged:qt,onDatasetChanged:Wt}=E;let Gt=null,yn="raf",_n=null,eo=0,xs=!1,fs=!1;const pr=new Set,Pr=new Set;function df(){if(se){Gt!=null&&(yn==="raf"&>?gt(Gt):yn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Gt):yn==="timeout"&&window.clearTimeout(Gt),Gt=null),eo+=1;for(const Rs of pr)gt&>(Rs);for(const Rs of Pr)window.clearTimeout(Rs);pr.clear(),Pr.clear(),_n=null,xs=!1,fs=!1}}function Gh(){return typeof performance<"u"?performance.now():Date.now()}function _S(Rs){(function(ll){var Zl;if(!je.value)return;const al=Math.max(2,(Zl=U.renderBatchBudgetMs)!=null?Zl:6),ul=Math.max(1,Ke.value||1),hr=Math.max(1,Math.floor(ul/4));ll>1.5*al?Ge.value=Math.max(hr,Math.floor(.8*Ge.value)):ll<.6*al&&Ge.value=al)return;const ul=Math.max(1,Rs),hr=()=>{const yc=Gh();Gt=null;const ff=_n??ul;_n=null;const kc=Gh();Be.value=Math.min(al,Be.value+ff),Bt(Be.value),(function(Wv,Zh){if(!se)return void _S(Zh);xs=!0;const MS=++eo;xt().then(()=>{var ES;if(MS!==eo)return;const qL=Gh(),KL=Math.max(Zh,qL-Wv),TS=()=>{MS===eo&&_S(KL)};if(At){let su=null,bc=null,$S=!1;const NS=()=>{$S||($S=!0,su!==null&&(pr.delete(su),su=null),bc!==null&&(Pr.delete(bc),window.clearTimeout(bc),bc=null),TS())};return su=At(()=>{NS()}),pr.add(su),bc=window.setTimeout(()=>{su!==null&>&>(su),NS()},Math.max(32,(ES=U.renderBatchIdleTimeoutMs)!=null?ES:120)),void Pr.add(bc)}const IS=window.setTimeout(()=>{Pr.delete(IS),TS()},0);Pr.add(IS)})})(yc,Gh()-kc)};if(!se||fi.immediate)return void hr();const Yl=Math.max(0,(ll=U.renderBatchDelay)!=null?ll:16);if(_n=_n!=null?Math.max(_n,ul):ul,Gt==null){if(!le&&Rt&&window.requestIdleCallback){const yc=Math.max(0,(Zl=U.renderBatchIdleTimeoutMs)!=null?Zl:120);return yn="idle",void(Gt=window.requestIdleCallback(()=>hr(),{timeout:yc}))}if(At&&!le)return yn="raf",void(Gt=At(()=>{Yl===0?hr():(yn="timeout",Gt=window.setTimeout(()=>hr(),Yl))}));yn="timeout",Gt=window.setTimeout(()=>hr(),Yl)}}function CS(Rs,fi={}){xs?fs=!0:Rs==null?AS():SS(Rs,fi)}function AS(){je.value&&SS(tt.value?Math.max(1,Math.round(Ge.value)):Math.max(1,Ke.value))}return Ye([ke,$e,He,je,Ke,et,()=>U.renderBatchDelay],()=>{var Rs;const fi=$e.value,ll=pt.value,Zl=He.value,al=!Object.is(Zl,ll.key),ul=fi!==ll.total,hr=al||ul;pt.value={key:Zl,total:fi};const Yl=lt.value,yc=(Rs=U.renderBatchDelay)!=null?Rs:16,ff=Yl.batchSize!==Ke.value||Yl.initial!==et.value||Yl.delay!==yc||Yl.enabled!==je.value;lt.value={batchSize:Ke.value,initial:et.value,delay:yc,enabled:je.value},al&&qt(fi),(hr||ff||!je.value)&&df(),(hr||ff)&&(Ge.value=Math.max(1,Ke.value||1)),hr&&Wt();const kc=De.value;if(!fi)return Be.value=0,void Bt(0);if(!je.value)return Be.value=kc,void Bt(Be.value);const Wv=al||ll.total===0;Be.value=Wv||ff?Math.min(kc,et.value):Math.min(Be.value,kc);const Zh=Math.max(1,et.value||Ke.value||fi);Be.value{je.value&&(typeof fi=="number"&&Rs<=fi||Rs>Be.value&&CS())}),{cleanupBatchScheduler:df}})({props:M,isClient:H,isTestEnv:Me,parsedNodesIdentity:_o,parsedNodeCount:Zn,desiredRenderedCount:Ah,datasetKey:hL,batchingEnabled:gn,incrementalRenderingActive:Ln,resolvedBatchSize:Ve,resolvedInitialBatch:an,renderedCount:xn,adaptiveBatchSize:Ce,previousRenderContext:ue,previousBatchConfig:Ne,requestFrame:Nn,cancelFrame:$o,hasIdleCallback:Lr,cleanupNodeVisibility:aL,onDatasetKeyChanged:E=>{mc(),Sh(),ci(),ef(),E>0&&_h(E)},onDatasetChanged:()=>{ln.value&&fr({immediate:!0})}});Ye([S_,ln,()=>A.value,()=>ee()],([E,U])=>{if(!E)return $_(),void Q0();uL(),U?fr({immediate:!0}):Q0()},{flush:"post",immediate:!0}),Ye([()=>Ae.value.length,()=>ln.value],E=>go(null,[E],function*([U,se]){se&&U&&H&&(yield xt(),fr({immediate:!0}))}),{flush:"post"}),Ye(Fn,E=>{E&&(function(){var U;if(Xn.value&&io.value&&ro.value&&((U=ys.value)!=null&&U[1]))return;const se=Et({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),le=Et({type:"list_item",children:[se],raw:"- Probe paragraph text"}),ke=Et({type:"list",ordered:!1,items:[le],raw:"- Probe paragraph text"});Xn.value=se,io.value=le,ro.value=ke;const $e={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)$e[De]=Et({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});ys.value=$e})()},{immediate:!0}),Ye([()=>A.value,Fn],()=>{if(!Fn.value)return sv(),void(X.value=0);L_(),sv(),Fn.value&&A.value&&typeof ResizeObserver<"u"&&(Vd=new ResizeObserver(()=>{L_(),nc.value&&jd(),ct.value&&fc(),ho("resize")}),Vd.observe(A.value))},{immediate:!0}),Ye([Fn,qs,Oi],()=>go(null,null,function*(){if(!Fn.value)return te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void ci();yield xt(),(function(){if(!Fn.value||typeof window>"u")return te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void ci();const E={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},U=N_(ov(L.value),".paragraph-node");E.paragraph=ek(L.value,U,"pre-wrap");const se=ov(W.value),le=se?.querySelector(".paragraph-node");E.listItem=ek(W.value,le,"pre-wrap");const ke=Xt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,He;return(He=(De=j.value)==null?void 0:De.offsetHeight)!=null?He:0}),$e=Xt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,He;return(He=(De=W.value)==null?void 0:De.offsetHeight)!=null?He:0});E.listWrapperOverhead=Math.max(0,ke-$e);for(let De=1;De<=6;De++){const He=N_(ov(re[De]),`h${De}`);E.headings[De]=ek(re[De],He,"pre-wrap")}te.value=E,ci()})()}),{flush:"post",immediate:!0}),Ye(()=>Ae.value.length,()=>{ln.value&&fr({immediate:!0})}),Ye([Fn,X],()=>{ci(),ln.value&&fr({immediate:!0}),nc.value&&jd(),ct.value&&fc(),ho("resize")},{immediate:!1}),Ye(()=>Fr.value,E=>{if(E)for(const[U,se]of sn)Dh(U,se);else if(tv(),ln.value)fr({immediate:!0});else for(const[U,se]of sn)se&&Kl(U,!0)},{immediate:!1}),Ye([We,he,()=>ee()],()=>{var E;(E=ks.refresh)==null||E.call(ks);for(const[U,se]of sn)Dh(U,se)},{immediate:!1}),Ye([()=>M.viewportPriority,()=>Ae.value.length,he],([E,U,se])=>{if(E!==!1){if(Q.value&&(U<=200||U<=se)){Q.value=!1;for(const[le,ke]of sn)Dh(le,ke)}}else Q.value=!1}),Ye(()=>xn.value,()=>{ln.value&&fr({immediate:!0})}),Ye([ol,cs,Po,()=>Ae.value.length,ln],()=>{Ud()},{immediate:!0});let nf=null,of=!1,gc=null;function sf(){nf=null,fv=null,dv=void 0,uc=null,ef()}function Ov(){mc(),Sh(),ci(),Dt.clear();const E=Ae.value.length;E>0&&_h(E),Sv()}function Rv(){Nv(),T_(),Jd=null,Qa=null,eu=null,Oh=null,Gd=null,Zd=null,of=!1,sf(),H_("restore"),xh(),dc()}function rf(E){var U;return[(U=Uo())!=null?U:"",yo(),il(),Nh.value,Qd(E),Ae.value.length,Math.round(tc(0,Ae.value.length)),Math.round(Ya()),Gi.count,Math.round(Gi.total)].join(":")}function rS(){return go(this,null,function*(){var E,U,se,le;const ke=(E=o.virtualScroll)==null?void 0:E.settledToken,$e=Qd(ke),De=yo(),He=Uo(),tt=Oi.value;if(Cn.value&&((U=o.virtualScroll)==null?void 0:U.settleMode)==="manual"&&Lh(ke))if(pv()){if(rf(ke)!==uc&&!of){of=!0;try{const je=yield Av({reason:"manual",expectedSettledTokenKey:$e}),Ke=Qd()===$e;Cv(De,He,tt)&&je.sessionKey===De&&je.threadKey===He&&Ke&&je.stable&&je.phase==="final"&&(uc=rf((se=o.virtualScroll)==null?void 0:se.settledToken))}finally{of=!1,yield xt();const je=(le=o.virtualScroll)==null?void 0:le.settledToken,Ke=Lh(je)?rf(je):"";Cv(De,He,tt)&&Ke&&uc!==Ke&&rS()}}}else ho("manual")})}Ye(Cn,(E,U)=>{if(E!==U){if(!E)return Rv(),void Nv();Rv(),Ov(),gc=Oi.value,ho("content")}},{flush:"post"}),Ye([Cn,Oi],([E,U])=>{E?gc!=null?gc!==U&&(gc=U,(function(se="resize"){mc(),Sh(),ci(),Dt.clear();const le=Ae.value.length;le>0&&_h(le),Sv(),Qa=null,eu=null,Oh=null,Jd=null,of=!1,sf(),X_(),xt(()=>{rl(),nc.value&&jd(),ct.value&&fc(),ho(se)})})("resize")):gc=U:gc=null},{flush:"post",immediate:!0}),Ye([Cn,()=>yo(),()=>Uo()],([E])=>{E&&(Rv(),Ov(),H_("content"),ho("content"))}),Ye([Cn,()=>yo(),()=>Uo(),Oi,()=>Ae.value.length],([E])=>{E&&(function(U="async-node"){let se=!1;for(const[le,ke]of Array.from(Rr.entries()))uv(ke)||(Rr.delete(le),Li.delete(le),se=!0);se&&(lc(),ho(U))})("async-node")},{flush:"post"}),Ye([Cn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.sessionKey},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>o.indexKey,()=>G.value],([E])=>{E&&(ef(),(function(U="content"){if(!Cn.value)return;const se=[],le=Ae.value.length,ke=nv(le);for(const $e of Array.from(Dt.keys())){if($e>=le){se.push($e);continue}if($e=le&&Dt.delete($e);se.length&&((function($e,De={}){const He=Array.from($e,Number);y_(He);let tt=0;if(sc(()=>(tt=QN(He,De),tt>0)),tt>0)(function(je){for(const Ke of je)Dt.delete(Ke)})(He);else for(const je of He)ge.delete(je)})(se,{notify:!1}),ci(),sf(),nc.value&&jd(),ct.value&&fc(),ho(U))})("content"))},{flush:"post",immediate:!0}),Ye([Cn,()=>Ae.value.length,()=>yo(),()=>Uo()],([E,U,se,le],[ke,$e,De,He])=>{E&&ke&&se===De&&le===He&&U!==$e&&sf()},{flush:"post"}),Ye([Cn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCache},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCacheWidth},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>Ae.value.length,()=>yo(),X],()=>{X_()},{flush:"post",immediate:!0}),Ye([Cn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreAnchor},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>Ae.value.length,()=>yo(),X],E=>go(null,[E],function*([U,se]){if(!U||!se)return;yield xt();const le=(function(){var ke;const $e=(ke=o.virtualScroll)==null?void 0:ke.restoreAnchor;return $e==null||$e===!1?null:$e===!0?"true":String($e)})();_v(se,{restoreAnchor:le!=null,restoreToken:le??void 0})}),{flush:"post",immediate:!0}),Ye([Cn,X,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey}],([E])=>{var U;if(!E)return;const se=(U=o.virtualScroll)==null?void 0:U.restoreState;se&&Qa&&eu==="restore"&&(Y_(se)||(Ov(),Qa=null,eu=null,ho("resize")))},{flush:"post"}),Ye([Cn,()=>Ae.value.length,()=>yo(),X],E=>go(null,[E],function*([U]){var se;const le=Gd,ke=Zd;U&&le&&(yield xt(),!_v(le,{restoreAnchor:ke?.restoreAnchor===!0,restoreToken:(se=ke?.restoreToken)!=null?se:"imperative",allowUncapturedAnchor:ke?.allowUncapturedAnchor===!0})&&Q_(le)||(Gd=null,Zd=null))}),{flush:"post",immediate:!0}),Ye([Cn,ft,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>yo(),()=>Uo(),Oi,X0,A_,()=>xn.value,Ah,()=>Gi.count,()=>Gi.total],([E,U,se])=>{if(!E||U!==!0||se==="manual"||!hv())return;const le=(function(){var ke;const $e=Ae.value.length;return[(ke=Uo())!=null?ke:"",yo(),il(),Nh.value,$e,Math.round(tc(0,$e)),Math.round(Ya()),Gi.count,Math.round(Gi.total)].join(":")})();nf!==le&&(nf=le,Av({reason:"final"}).then(ke=>{ke.stable||nf!==le||(nf=null)}))},{flush:"post",immediate:!0}),Ye([Cn,ft,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settledToken},()=>yo(),()=>Uo(),Oi,X0,A_,()=>xn.value,Ah,()=>Ae.value.length,()=>Gi.count,()=>Gi.total],()=>{rS()},{flush:"post",immediate:!0}),Ye([()=>Ae.value.length,ln,cs,Po,()=>bs.start,()=>bs.end],([E,U,se,le,ke,$e])=>{ye.value&&Je("virtualization",{nodes:E,virtualization:U,maxLiveNodes:se,buffer:le,focusIndex:ol.value,scroll:U?(()=>{const De=Pe.value||_e();return De?{reverse:ce(De),scrollTop:Math.round(De.scrollTop),scrollTopAbs:Math.round(Math.abs(De.scrollTop)),scrollHeight:Math.round(De.scrollHeight),clientHeight:Math.round(De.clientHeight)}:null})():null,liveRange:{start:ke,end:$e},rendered:xn.value})}),Ye([()=>M.customId],([E],U,se)=>{if(!E||Ti)return;const le=(function(ke,$e){return ke?(is.controllers[ke]=$e,()=>{is.controllers[ke]===$e&&delete is.controllers[ke]}):()=>{}})(E,{captureRestoreAnchor:h_,restoreAnchor:m_,getAnchorDrift:KN,getReport:fL});se(()=>{le()})},{immediate:!0}),po(()=>{(function(){if(Cn.value)try{rl(),Yd();const E=Ja("manual");tS(E)&&(D(E),Jd=E,Ev=Xd());const U=cc(E,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});U&&(B(U),U.anchor&&z(U.anchor),pc=tf(U))}catch{}})(),CL(),tv(),Pt(),iS();for(const E of Vl.values())for(const U of E)Eh(U);Vl.clear(),Za.clear(),Dt.clear(),Fv(),mc(),sv(),xh(),dc(),Nv(),$_(),Q0()});const AL=Vf("ViewportDeferredMermaidBlockNode",or({loader:()=>go(null,null,function*(){try{return(yield Ts(()=>import("./index11-Dc3KsH1m.js"),__vite__mapDeps([7,5]))).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',E),vi}}),loadingComponent:T8,delay:0}),T8),ML=Vf("ViewportDeferredInfographicBlockNode",or({loader:()=>go(null,null,function*(){try{return(yield Ts(()=>import("./index10-BQgn6eNW.js"),[])).default}catch(E){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',E),vi}}),loadingComponent:E8,delay:0}),E8),EL=Vf("ViewportDeferredD2BlockNode",or(()=>go(null,null,function*(){try{return(yield Ts(()=>import("./index8-Q1qyQj7P.js"),[])).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',E),vi}})),vi),lS={text:Ro,paragraph:Du,heading:M0,code_block:Uy,list:hd,list_item:pd,blockquote:dg,table:vp,definition_list:fg,footnote:pg,footnote_reference:Bi,footnote_anchor:mp,admonition:vg,vmr_container:mg,hardbreak:Ca,link:ii,image:Sa,thematic_break:hg,math_inline:$r,math_block:QI,strong:oi,emphasis:ri,strikethrough:si,highlight:Wi,insert:Ai,subscript:Ci,superscript:Si,emoji:_i,checkbox:Di,checkbox_input:Di,inline_code:js,html_inline:zi,reference:ni,html_block:gp},TL=O(()=>lv()),aS=O(()=>p8(M.codeBlockProps)),IL=O(()=>p8(M.codeBlockProps,{omit:["langs"]})),uS=O(()=>kt(kt({stream:M.codeBlockStream,darkTheme:M.codeBlockDarkTheme,lightTheme:M.codeBlockLightTheme,monacoOptions:M.codeBlockMonacoOptions,themes:M.themes,langs:h.value==="shiki"?M.langs:void 0,minWidth:M.codeBlockMinWidth,maxWidth:M.codeBlockMaxWidth},typeof fe.value=="boolean"?{showTooltips:fe.value}:{}),IL.value)),cS=O(()=>kt(fn(kt({},uS.value),{langs:M.langs}),aS.value));function dS(E){return typeof E=="boolean"?E:void 0}const $L=O(()=>{const E=M.codeBlockProps||{},U={},se=dS(E.showLineNumbers);se!==void 0&&(U.showLineNumbers=se);const le=dS(E.diffInline);le!==void 0&&(U.diffInline=le);const ke=(function($e){const De=Number($e);return Number.isFinite(De)&&De>0?De:void 0})(E.reservedHeightPx);return ke!==void 0&&(U.reservedHeightPx=ke),U}),NL=O(()=>kt(kt({stream:M.codeBlockStream,darkTheme:M.codeBlockDarkTheme,lightTheme:M.codeBlockLightTheme,themes:M.themes,langs:M.langs,minWidth:M.codeBlockMinWidth,maxWidth:M.codeBlockMaxWidth},typeof fe.value=="boolean"?{showTooltips:fe.value}:{}),aS.value)),LL=O(()=>kt({},M.mermaidProps||{})),fS=O(()=>kt({},M.d2Props||{})),FL=O(()=>kt({},M.infographicProps||{})),lf=O(()=>({typewriter:f.value,fade:M.fade,customHtmlTags:ot.value.customHtmlTags})),OL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltip:fe.value}:{})),RL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltips:fe.value}:{})),PL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltips:fe.value}:{})),DL=O(()=>kt(kt({},lf.value),typeof fe.value=="boolean"?{showTooltips:fe.value}:{}));function BL(E){return Array.isArray(E.children)&&E.children.length>0}const zh=O(()=>dL.value.map(E=>{var U,se,le,ke,$e,De,He,tt;let je=(function(gt){var Rt,Bt,qt,Wt,Gt,yn,_n;if(gt.type!=="code_block")return gt;const eo=gt,xs=[String((Rt=eo.language)!=null?Rt:""),String((Bt=eo.loading)!=null?Bt:""),String((qt=eo.diff)!=null?qt:""),String((Wt=eo.code)!=null?Wt:""),String((Gt=eo.originalCode)!=null?Gt:""),String((yn=eo.updatedCode)!=null?yn:""),String((_n=eo.raw)!=null?_n:"")].join("\0"),fs=No.get(eo);if(fs&&fs.signature===xs)return fs.node;const pr=kt({},eo);return No.set(eo,{signature:xs,node:pr}),pr})(E.node);const Ke=Wh(je);let et=gS(je,Ke);if((je.type==="html_block"||je.type==="html_inline")&&et===lS[je.type]){const gt=je,Rt=String((U=gt.tag)!=null?U:"").trim().toLowerCase()||A9(gt.content);if(Rt){const Bt=Un.value[Rt];if($s.value.has(Rt)&&Bt)et=Bt,je=fn(kt({},gt),{type:Rt,tag:Rt,content:wse(gt.content,Rt)});else if(M9((se=gt.content)!=null?se:gt.raw,Rt)){const qt=String((ke=(le=gt.content)!=null?le:gt.raw)!=null?ke:"");je.type==="html_inline"?(et=Ro,je={type:"text",content:qt,raw:qt}):(et=Du,je={type:"paragraph",children:[{type:"text",content:qt,raw:qt}],raw:qt})}}}const Be=je.type==="code_block"&&h.value==="pre"&&et===vi&&!Pv(Un.value,Ke);let Ge=kt({},(function(gt,Rt,Bt){const qt=Rt??Wh(gt);if(gt.type==="code_block"){const Wt=qt?Pv(Un.value,qt):void 0;if(Bt&&h.value==="pre"&&!Wt&&Bt===vi)return $L.value;if(Bt&&qt&&Bt===Wt)return qt==="mermaid"?hS(gt):qt==="infographic"?mS(gt):qt==="d2"||qt==="d2lang"?fS.value:cS.value;if(Bt&&Bt===Un.value.code_block)return cS.value;if(O_(Bt))return NL.value}return qt==="mermaid"?hS(gt):qt==="infographic"?mS(gt):qt==="d2"||qt==="d2lang"?fS.value:gt.type==="link"?OL.value:gt.type==="list"?RL.value:gt.type==="blockquote"?PL.value:gt.type==="table"?DL.value:gt.type==="code_block"?uS.value:lf.value})(je,Ke,et));const pt=Fn.value?rc.value[E.index]:null;je.type==="code_block"&&pt?.kind==="code-block"&&(Ge=fn(kt({},Ge),Be?{reservedHeightPx:($e=pt.height)!=null?$e:pt.contentHeight}:{estimatedHeightPx:pt.height,estimatedContentHeightPx:pt.contentHeight,estimatedDiffInline:pt.diffInline})),Be||je.type!=="code_block"||Ke!=="mermaid"||Kc(Ge.estimatedPreviewHeightPx)!=null||(Ge=fn(kt({},Ge),{estimatedPreviewHeightPx:h1(f1(String((De=je.code)!=null?De:"")))})),Be||je.type!=="code_block"||Ke!=="infographic"||Kc(Ge.estimatedPreviewHeightPx)!=null||(Ge=fn(kt({},Ge),{estimatedPreviewHeightPx:m1(p1(String((He=je.code)!=null?He:"")))})),je.type==="math_block"&&(Ge=fn(kt({},Ge),{cacheScope:vo}));const lt=(function(gt,Rt){const Bt=String(gt.type);return!hh(Bt)&&Un.value[Bt]===Rt})(je,et),At=lt?Zw(je,de.value):void 0;return fn(kt({},E),{node:je,component:et,bindings:Ge,customBindings:kt(kt({},At??{}),Ge),rendersCustomNode:lt,hasSlotChildren:BL(je),slotContent:String((tt=je.content)!=null?tt:""),isCodeBlock:je.type==="code_block",indexKey:`${TL.value}-${E.index}`,vnodeKey:`${pL.value}\0${E.index}\0${je.type}`})}));function Wh(E){var U;return E?.type==="code_block"?String((U=E.language)!=null?U:"").trim().toLowerCase():""}function Pv(E,U){const se=U.trim().toLowerCase();if(se)for(const le of[se,S0(se),FI(se)]){const ke=le&&E[le];if(ke)return ke}}function pS(E,U,se,le){var ke,$e;const De=kt({},E.value);return Kc(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=le(se(String((ke=U?.code)!=null?ke:"")),void 0,De.maxHeight==="none"?null:($e=Kc(De.maxHeight))!=null?$e:void 0)),De}function hS(E){return pS(LL,E,f1,h1)}function mS(E){return pS(FL,E,p1,m1)}function gS(E,U){if(!E)return Ub;const se=Un.value,le=se[String(E.type)];if(E.type==="code_block"){const ke=U??Wh(E),$e=ke?Pv(se,ke):void 0;return $e||(h.value==="pre"?se.code_block||vi:ke==="mermaid"?se.mermaid||AL:ke==="infographic"?se.infographic||ML:ke==="d2"||ke==="d2lang"?se.d2||EL:le||se.code_block||R_.value)}return le||lS[String(E.type)]||Ub}function Dv(E){s("click",E)}function zL(E){var U;(U=E.target)!=null&&U.closest("[data-node-index]")&&s("mouseover",E)}function WL(E){var U;(U=E.target)!=null&&U.closest("[data-node-index]")&&s("mouseout",E)}function vS(E){s("mouseover",E)}function yS(E){s("mouseout",E)}const ou=V(null),di=V(!1),af=V(null),HL=O(()=>!(M.domMode!=="minimal"||Z.value||M.fade!==!1||f.value||di.value||Ue.value||ln.value||ai.value||Vs.value||$i.value||Object.keys(Un.value).length!==0));let uf,vc=null,Bv=0,Hh=0,jh=0;const kS=["code_block","admonition","table","math_block","html_block","image","thematic_break"],jL=new Set(kS),bS=[".typewriter-cursor",".height-estimation-probes",...kS.map(E=>`[data-node-type="${E}"]`),"script","style"].join(",");function wS(E){if(!E||typeof E!="object")return!1;const U=E.type;return typeof U=="string"&&jL.has(U)}function Uh(E){var U,se;if(!E||typeof E!="object")return 0;const le=E,ke=(se=(U=le.raw)!=null?U:le.content)!=null?se:le.code;if(typeof ke=="string")return ke.length;const $e=le.children;if(Array.isArray($e))return $e.reduce((He,tt)=>He+Uh(tt),0);const De=le.items;return Array.isArray(De)?De.reduce((He,tt)=>He+Uh(tt),0):0}function Vh(){uf&&(clearTimeout(uf),uf=void 0)}function zv(){Bv+=1,vc!=null&&($o?.(vc),vc=null)}function cf(){zv(),Gl(),ou.value&&(ou.value.style.visibility="hidden")}function UL(E){var U;if(E.nodeType!==Node.TEXT_NODE||!((U=E.textContent)!=null?U:"").trim())return!1;const se=E.parentElement;return!!se&&!se.closest(bS)}function VL(E){let U=E.lastChild;for(;U;){if(UL(U))return U;if(U.nodeType===Node.ELEMENT_NODE){const se=U;if(!se.matches(bS)&&se.lastChild){U=se.lastChild;continue}}for(;U&&U!==E&&!U.previousSibling;)U=U.parentNode;if(!U||U===E)break;U=U.previousSibling}return null}function xS(){const E=zh.value;for(let U=E.length-1;U>=0;U--){const se=E[U];if(!se||wS(se.node)||!Ph(se.index))continue;const le=sn.get(se.index);if(!le)continue;const ke=VL(le);if(ke)return ke}return null}function Gl(){af.value&&(af.value.classList.remove(I8),af.value=null)}function qh(){if(d.value!=="simple"||!H||!di.value||!A.value)return void Gl();const E=xS(),U=E?(function(se){var le;const ke=(le=se.parentElement)==null?void 0:le.closest(".text-node");return ke instanceof HTMLElement?ke:se.parentElement})(E):null;U!==af.value&&(Gl(),U&&(U.classList.add(I8),af.value=U))}function Kh(){if(d.value!=="precise"||!H||!di.value||vc!=null)return;const E=Bv,U=()=>{vc=null,E===Bv&&(function(){var se,le;if(d.value!=="precise"||!(H&&di.value&&A.value&&ou.value))return;const ke=A.value,$e=ou.value;$e.style.visibility="hidden";const De=xS();if(!De)return;let He=0,tt=0,je=20,Ke=!1;if(De?.textContent){const et=De.textContent.length,Be=document.createRange();Be.setStart(De,Math.max(0,et-1)),Be.setEnd(De,et);const Ge=typeof Be.getClientRects=="function"?Be.getClientRects():void 0,pt=(le=Ge?.[Ge.length-1])!=null?le:(se=De.parentElement)==null?void 0:se.getBoundingClientRect();if(pt){const lt=Xt("typewriterCursor.root.getBoundingClientRect",()=>ke.getBoundingClientRect());He=pt.right-lt.left+ke.scrollLeft,tt=pt.top-lt.top+ke.scrollTop,je=pt.height||je,Ke=!0}Be.detach()}Ke&&($e.style.transform=`translate(${Math.max(0,He)}px, ${Math.max(0,tt)}px)`,$e.style.height=`${je}px`,$e.style.visibility="visible")})()};Nn?vc=Nn(U):U()}return Ye([Re,()=>o.content,()=>o.nodes,()=>M.typewriter,ft],()=>go(null,null,function*(){var E,U;if(!H||Z.value||!ae.value)return;if(ft.value)return di.value=!1,Vh(),void cf();if((E=o.nodes)!=null&&E.length)return di.value=!1,Vh(),cf(),Hh=((U=o.content)!=null?U:"").length,void(jh=Re.value.length);const se=(function(){var He,tt;return(He=o.nodes)!=null&&He.length?o.nodes.reduce((je,Ke)=>je+Uh(Ke),0):((tt=o.content)!=null?tt:"").length})(),le=(function(){var He;return(He=o.nodes)!=null&&He.length?o.nodes.reduce((tt,je)=>tt+Uh(je),0):Re.value.length})(),ke=!wS(Ae.value[Ae.value.length-1]),$e=se>Hh,De=le>jh;if(!f.value||!ke||!$e&&!De)return f.value&&ke||(di.value=!1,cf()),Hh=se,void(jh=le);Hh=se,jh=le,di.value=!0,d.value==="precise"&&ou.value&&(ou.value.style.visibility="hidden"),Vh(),yield xt(),d.value==="simple"?qh():(Gl(),Kh()),uf=setTimeout(()=>{uf=void 0,di.value=!1},3e3)}),{flush:"post",immediate:!0}),Ye(di,E=>go(null,null,function*(){E?(yield xt(),d.value!=="simple"?(Gl(),d.value==="precise"&&Kh()):qh()):cf()}),{flush:"post"}),Ye(d,()=>go(null,null,function*(){if(H&&!Z.value&&ae.value&&di.value){if(yield xt(),d.value==="simple")return zv(),void qh();Gl(),d.value!=="precise"?cf():Kh()}}),{flush:"post"}),Ye([()=>xn.value,()=>bs.start,()=>bs.end],()=>go(null,null,function*(){H&&!Z.value&&ae.value&&di.value&&(yield xt(),d.value!=="simple"?(Gl(),d.value==="precise"&&Kh()):qh())}),{flush:"post"}),po(()=>{Vh(),zv(),Gl(),Wo.clear()}),(E,U)=>{const se=kO("NodeRenderer",!0);return x(Z)?(g(!0),C(Te,{key:0},st(zh.value,le=>(g(),C(Te,{key:le.vnodeKey},[le.rendersCustomNode?(g(),pe(Ko(le.component),Dn({key:0,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onClick:Dv,onMouseover:vS,onMouseout:yS,onCopy:U[0]||(U[0]=ke=>i(ke)),onHandleArtifactClick:U[1]||(U[1]=ke=>s("handleArtifactClick",ke))}),{default:ve(()=>[le.hasSlotChildren?(g(),pe(se,Dn({key:0,ref_for:!0},Qt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(g(),pe(se,Dn({key:1,ref_for:!0},Qt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Ko(le.component),Dn({key:1,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onClick:Dv,onMouseover:vS,onMouseout:yS,onCopy:U[2]||(U[2]=ke=>i(ke)),onHandleArtifactClick:U[3]||(U[3]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(g(),C("div",{key:1,ref_key:"containerRef",ref:A,class:ze(["markstream-vue markdown-renderer",[{dark:M.isDark},{virtualized:ln.value},{"virtual-scroll-coordinated":Ls.value},{"stable-layout":sL.value},{"typewriter-simple-cursor":di.value&&d.value==="simple"}]]),"data-custom-id":M.customId,onClick:Dv,onMouseover:zL,onMouseout:WL},[Io.value||ln.value?(g(),C(Te,{key:0},[Io.value?(g(),pe(mpe,{key:0,width:qs.value,"flow-root":ln.value||Ls.value,"paragraph-node":Xn.value,"list-item-node":io.value,"list-node":ro.value,"heading-nodes":ys.value,"set-paragraph-wrapper":iL,"set-list-item-wrapper":rL,"set-list-wrapper":lL,"set-heading-wrapper":cL},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):oe("",!0),ln.value?(g(),C("div",{key:1,class:"node-spacer",style:jt({height:`${iv.value}px`}),"aria-hidden":"true"},null,4)):oe("",!0)],64)):oe("",!0),HL.value?(g(!0),C(Te,{key:1},st(zh.value,le=>(g(),C(Te,{key:le.vnodeKey},[Ph(le.index)?(g(),pe(Ko(le.component),Dn({key:0,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onMouseover:U[4]||(U[4]=ke=>s("mouseover",ke)),onMouseout:U[5]||(U[5]=ke=>s("mouseout",ke)),onCopy:U[6]||(U[6]=ke=>i(ke)),onHandleArtifactClick:U[7]||(U[7]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"])):oe("",!0)],64))),128)):(g(!0),C(Te,{key:2},st(zh.value,le=>(g(),C("div",{key:le.vnodeKey,ref_for:!0,ref:ke=>Dh(le.index,ke),class:"node-slot","data-node-index":le.index,"data-node-type":le.node.type},[Ph(le.index)?(g(),C("div",{key:0,ref_for:!0,ref:ke=>(function($e,De){var He;De||(function(et){const Be=`${lv()}-${et}`;let Ge=!1;for(const pt of Array.from(Li.keys())){const lt=Rr.get(pt);(lt?.index===et||pt===Be||pt.startsWith(`${Be}-`))&&(Li.delete(pt),Rr.delete(pt),Ge=!0)}Ge&&(lc(),ho("async-node"))})($e),sl.delete($e),(function(et){var Be;const Ge=((Be=Za.get(et))!=null?Be:0)+1;Za.set(et,Ge)})($e);const tt=Vl.get($e);if(tt){for(const et of tt)Eh(et);Vl.delete($e)}if((function(et){const Be=Qn.get(et);Be&&(Tn?.unobserve(Be),kn.delete(Be),Qn.delete(et))})($e),!De||!Os.value)return Or.delete($e),void Za.delete($e);Or.set($e,De);const je=()=>{Bh($e,De)};queueMicrotask(je);const Ke=(Tn||typeof ResizeObserver>"u"||(Tn=new ResizeObserver(et=>{if(et.length)for(const Be of et){const Ge=kn.get(Be.target),pt=Qn.get(Ge??-1);Ge!=null&&pt&&Bh(Ge,pt)}else rl()})),Tn);if(Ke&&(Qn.set($e,De),kn.set(De,$e),Ke.observe(De)),typeof window<"u"){const et=((He=Ae.value[$e])==null?void 0:He.type)==="code_block"?[16,80,240,800]:ft.value?[80]:[];if(et.length){const Be=et.map(Ge=>E_(Ge,je,"node-resize")).filter(Ge=>Ge!=null);Be.length&&Vl.set($e,Be)}}})(le.index,ke),class:"node-content"},[le.isCodeBlock?le.rendersCustomNode?(g(),pe(Ko(le.component),Dn({key:1,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[12]||(U[12]=ke=>i(ke)),onHandleArtifactClick:U[13]||(U[13]=ke=>s("handleArtifactClick",ke))}),{default:ve(()=>[le.hasSlotChildren?(g(),pe(se,Dn({key:0,ref_for:!0},Qt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(g(),pe(se,Dn({key:1,ref_for:!0},Qt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Ko(le.component),Dn({key:2,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[14]||(U[14]=ke=>i(ke)),onHandleArtifactClick:U[15]||(U[15]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Cr,{key:0,name:"fade",css:M.fade!==!1,appear:M.fade!==!1},{default:ve(()=>[le.rendersCustomNode?(g(),pe(Ko(le.component),Dn({key:0,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[8]||(U[8]=ke=>i(ke)),onHandleArtifactClick:U[9]||(U[9]=ke=>s("handleArtifactClick",ke))}),{default:ve(()=>[le.hasSlotChildren?(g(),pe(se,Dn({key:0,ref_for:!0},Qt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(g(),pe(se,Dn({key:1,ref_for:!0},Qt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):oe("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(g(),pe(Ko(le.component),Dn({key:1,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":M.customId,"is-dark":M.isDark,onCopy:U[10]||(U[10]=ke=>i(ke)),onHandleArtifactClick:U[11]||(U[11]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(g(),C("div",{key:1,class:"node-placeholder",style:jt({height:`${K0(le.index)}px`})},null,4))],8,ype))),128)),di.value&&d.value==="precise"?(g(),C("span",{key:3,ref_key:"typewriterCursorRef",ref:ou,class:"typewriter-cursor","aria-hidden":"true"},null,512)):oe("",!0),ln.value?(g(),C("div",{key:4,class:"node-spacer",style:jt({height:`${rv.value}px`}),"aria-hidden":"true"},null,4)):oe("",!0)],42,vpe))}}})),[["__scopeId","data-v-a9489508"]]),Mi=p$;Mi.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Mi.__name,Mi.name].filter(n=>!!n));for(const n of t)e.component(n,p$)};const ux=Object.freeze(Object.defineProperty({__proto__:null,default:Mi},Symbol.toStringTag,{value:"Module"})),kpe={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},bpe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},wpe={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},xpe={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},_pe={class:"admonition-title"},Spe=["aria-expanded","aria-controls"],Cpe=["id"],vg=Gn(Ze({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=O(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const u=o.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=V(!!o.node.collapsible&&!((n=o.node.open)==null||n));function l(){o.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(g(),C("div",{class:ze(["admonition",[`admonition-${o.node.kind}`]])},[_("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(g(),C("svg",kpe,[...c[1]||(c[1]=[_("circle",{cx:"12",cy:"12",r:"10"},null,-1),_("path",{d:"M12 16v-4"},null,-1),_("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(g(),C("svg",bpe,[...c[2]||(c[2]=[_("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),_("path",{d:"M9 18h6"},null,-1),_("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(g(),C("svg",wpe,[...c[3]||(c[3]=[_("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),_("path",{d:"M12 9v4"},null,-1),_("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(g(),C("svg",xpe,[...c[4]||(c[4]=[_("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),_("path",{d:"M12 8v4"},null,-1),_("path",{d:"M12 16h.01"},null,-1)])])):oe("",!0),_("span",_pe,N(i.value),1),o.node.collapsible?(g(),C("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(g(),C("svg",{style:jt({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...c[5]||(c[5]=[_("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,Spe)):oe("",!0)]),Bn(_("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[K(x(Mi),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,Cpe),[[yi,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);vg.install=e=>{e.component(vg.__name,vg)};const Zb=()=>Ts(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let Mm=null,Em=Zb,Tm=null,$8=!1,N8=!1;function EBe(){return go(this,null,function*(){if(Mm)return Mm;const e=Em;return e?e===Zb&&$8?null:Tm||(Tm=go(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===Zb)return e===Em&&($8=!0,(function(o){N8||(N8=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===Em&&(Tm=null)}return e!==Em?null:t?(Mm=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),Mm):null}),Tm):null})}let Im=null,h$=null,$m=null;function TBe(){return typeof h$=="function"}function IBe(){return go(this,null,function*(){if(Im)return Im;const e=h$;return e?$m||($m=go(null,null,function*(){const t=yield e(),n=(function(o){var s,i,r;if(!o)return null;const l=(s=o.default)!=null?s:o,a=typeof l=="function"&&typeof((i=l.prototype)==null?void 0:i.render)=="function"?l:(r=o.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Im=n,Im):null}).finally(()=>{$m=null}),$m):null})}const $Be=Symbol("markstreamLanguageIconResolver"),Nm=V(!1);let L8=!1;function tk(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function m$(){return!L8&&typeof window<"u"&&typeof document<"u"&&(L8=!0,Nm.value=tk(),new MutationObserver(()=>{Nm.value=tk()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Nm.value=tk()})),Nm}const g$=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],Ape=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),Yb=[...g$].toSorted((e,t)=>t.length-e.length).join("|"),nk=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${Yb}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${Yb})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(""),"gi"),v$=/[),.;!?]+$/;function Mpe(e){const t=e.toLowerCase();return g$.some(n=>t.endsWith(`.${n}`))}function Epe(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${Yb}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function Tpe(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(v$,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=Ape.has(i),a=Mpe(i);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(i);if(!d)return null;s=d}const u=o[2]??o[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function Ipe(e,t={}){const n=[];nk.lastIndex=0;let o;for(;(o=nk.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",r=s.indexOf(i);if(r<0)continue;const l=o[2]??o[3];let a=i+(l?s.slice(r+i.length):"");const u=a.replace(v$,""),c=a.length-u.length;a=u;const d=Tpe(a,t);if(!d)continue;const f=o.index+r,p=f+a.length;n.push({...d,start:f,end:p,text:a}),c>0&&(nk.lastIndex-=c)}return n}const $pe=12e4,Npe=6e4,Lpe=32,Fpe=3e4,F8=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function Ope(e){let t=0,n=0,o=0;F8.lastIndex=0;let s;for(;(s=F8.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=$pe||n>=Npe||t>=Lpe||o>=Fpe?"pre":"shiki",codeFenceCount:t,codeChars:n}}function Lm(e,t){let n=0;for(let o=t-1;o>=0&&e[o]==="\\";o--)n++;return n%2===1}const Rpe=/\s/,Ppe=/\p{Nd}/u;function Aa(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function Dpe(e,t){if(t<=0)return;const n=e.codePointAt(t-1),o=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function O8(e){return e!==void 0&&Rpe.test(e)}function Sd(e){return e!==void 0&&Ppe.test(e)}function S1(e){return e!==void 0&&e>="A"&&e<="Z"}const y$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function Bpe(e,t){if(!S1(e[t-1]))return!1;let n=t-1;for(;n>0&&S1(e[n-1]);)n--;return y$.test(e.slice(n,t))||Sd(Aa(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Aa(e,t+1)??"")}function zpe(e,t){if(!S1(e[t-1]))return!1;let n=t-1;for(;n>0&&S1(e[n-1]);)n--;return y$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}function Wpe(e,t){const n=e[t+1];return Sd(Aa(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&Sd(Aa(e,t+2))}const Hpe=/^[-–—,,、;;::~~(([【//]$/;function jpe(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Sd(Aa(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&Hpe.test(o)}const ok=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;function Upe(e){let t=e.replace(new RegExp(String.raw`^(?:${ok})+`,"u"),"");for(;;){const o=t.replace(new RegExp(String.raw`^\p{L}+(?:${ok})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(o===t)break;t=o}if(!/\p{Nd}/u.test(t))return!1;const n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${ok})+${n}(?:\p{L}+)?)*$`,"u").test(t)}const R8=1,P8=2,D8=3,Wr=-1;function Vpe(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(Wr),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const A=[];for(let re=0;re`「」『』【】〔〕()*—–“”‘’'),u=[];for(const A of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))u.push(A.index);for(const A of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))u.push(A.index);for(const A of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(A.index===0||!/[\w~/.-]/.test(e[A.index-1]??""))&&u.push(A.index);u.sort((A,L)=>A-L);let c=-1;for(const A of u){if(AA+7&&!/[\w/?#@~.+&=%-]/.test(e[L+1]??""))break}}r.push([A,L]),c=L}const d=[];for(let A=0;A]/.test(Q))continue;let Y=Wr,G=Wr;for(;W"){G=W;break}if(!j&&X==="/"&&e[W+1]===">"){G=W+1;break}if(!/\s/.test(X)){Y=W;break}for(;W"){G=W;break}if(j){Y=W;break}if(te==="/"&&e[W+1]===">"){G=W+1;break}const q=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(W));if(!q){Y=W;break}W+=q[0].length;let me=W;for(;me`]+/.exec(e.slice(me));if(!We){Y=me;break}W=me+We[0].length}}}if(G!==Wr)d.push([A,G+1]),A=G;else if(Y!==Wr){const X=e.indexOf("<",A+1);A=(X!==-1&&X",A+2);Y===-1?f=!1:(d.push([A,Y+2]),A=Y+1,W=!0)}else if(L==="!"){if(e[A+2]==="-"&&e[A+3]==="-"){if(p){const Y=e.indexOf("-->",A+4);Y===-1?p=!1:(d.push([A,Y+3]),A=Y+2,W=!0)}}else if(e.startsWith("[CDATA[",A+2)){if(h){const Y=e.indexOf("]]>",A+9);Y===-1?h=!1:(d.push([A,Y+3]),A=Y+2,W=!0)}}else if(m&&/[A-Z]/.test(e[A+2]??"")){const Y=e.indexOf(">",A+3);Y===-1?m=!1:(d.push([A,Y+1]),A=Y,W=!0)}}if(W)continue;if(L!==void 0&&/[a-zA-Z]/.test(L)){const Y=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(A+1));if(Y){let G=A+1+Y[0].length;for(;G"&&e[G]!=="<"&&!/\s/.test(e[G]);)G++;if(e[G]===">"){d.push([A,G+1]),A=G;continue}}}if(L===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(L))continue;let j=A+1;for(;j"&&(d.push([A,j+1]),A=j)}}d.sort((A,L)=>A[0]-L[0]);const k=[];for(const A of d){const L=k.at(-1);L&&A[0]<=L[1]?L[1]=Math.max(L[1],A[1]):k.push([A[0],A[1]])}r.push(...k);const w=A=>{let L=0;for(;L=(l[L]?.[1]??0);)L++;const W=l[L];return W!==void 0&&A>=W[0]},v=A=>{let L=0;for(;L=(k[L]?.[1]??0);)L++;const W=k[L];return W!==void 0&&A>=W[0]},y=[];let b=null,S=0,I=!1;for(let A=0;A"&&(I=!1);continue}if(!(w(A)||v(A))){if(b!==null){e[A]===b&&(b=null);continue}if(y.length>0&&(e[A]==='"'||e[A]==="'")&&A>0&&/\s/.test(e[A-1]??""))b=e[A];else if(e[A]==="[")S++;else if(e[A]==="]")S>0&&e[A+1]==="("&&(y.push(A),I=e[A+2]==="<",A++),S=Math.max(0,S-1);else if(e[A]==="("&&y.length>0)y.push(-1);else if(e[A]===")"&&y.length>0){const L=y.pop();if(L!==void 0&&L>=0){const W=e.slice(L+2,A);(/\s/.exec(W)===null||W.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(W)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(W))&&r.push([L,A+1])}}}}r.sort((A,L)=>A[0]-L[0]);const T=[];for(const A of r){const L=T.at(-1);L&&A[0]<=L[1]?L[1]=Math.max(L[1],A[1]):T.push([A[0],A[1]])}const $=A=>{let L=0,W=T.length-1;for(;L<=W;){const j=L+W>>1,re=T[j];if(re===void 0)return!1;if(A=re[1])L=j+1;else return!0}return!1},F=new Uint8Array(t);{let A=-1,L=!1,W=!1,j=0;for(let re=0;re<=t;re++){const Q=re0&&(Y==="{"?j++:Y==="}"&&j--)}}for(let A=0;A=0;A--)n[A]===D8&&(R=A),o[A]=R;const P=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,M=/[^\p{L}\p{Nd}\s]$/u,D=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,B=/(?:^|\s)[a-z]{2,}/,z=(A,L)=>{const W=Aa(e,A+1);if(W===void 0||!P.test(W))return!1;const j=o[A+1]??Wr;if(j!==Wr){const re=e.slice(A+1,j);return!(j-(A+1)===((e.codePointAt(A+1)??0)>65535?2:1))&&D.test(re)||/[,;:!?]$/.test(re)||/^[a-z]{2,}$/.test(re)?!1:(s[j]??0)-(s[A+1]??0)===0&&(i[j]??0)-(i[A+1]??0)===0}return M.test(L)||D.test(L)||B.test(L)};return(A,L=-1)=>{if(e[A]!=="$"||n[A]===R8||e[A+1]==="$"||e[A-1]==="$"&&L!==A||Bpe(e,A)||A+1>=t||O8(Aa(e,A+1)))return null;const W=o[A+1]??Wr;if(W===Wr||(s[W]??0)-(s[A+1]??0)>0||(i[W]??0)-(i[A+1]??0)>0)return null;const j=e.slice(A+1,W);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(j)||e[W+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(j)||Sd(Dpe(e,A))&&Upe(j)||Wpe(e,A)&&(z(W,j)||zpe(e,W)||/\s/.test(j)&&/\p{Nd}$/u.test(j)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(j)||!1)||e[W+1]==="$"&&!/\p{L}/u.test(j)&&M.test(j)?null:{content:j,end:W+1}}}const qpe=/^---[ \t]*(?:\r\n|\n)/,Kpe=/^---[ \t]*$/;function Gpe(e){const t=qpe.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const o=n;for(;n<=e.length;){let s=e.indexOf(` -`,n);s===-1&&(s=e.length);let i=e.slice(n,s);if(i.endsWith("\r")&&(i=i.slice(0,-1)),Kpe.test(i)){const r=e.slice(o,n);if(r==="")return{frontmatter:null,body:e};const l=s\n]*>|[^()\s]+)\)/g,Zpe=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,Ype=/^[a-zA-Z]:(?:[\\/]|%5c)/i,Jpe=/^[A-Za-z0-9._~-]$/;let z8;function Xpe(e){return e.replaceAll("%","%25").replaceAll("&","%26").replaceAll("<","%3C").replaceAll(">","%3E").replace(/[[\]\\]/g,"\\$&").replaceAll(` -`,"%0A").replaceAll("\r","%0D")}function Qpe(e){return e.replace(/\\([\\[\]])/g,"$1").replaceAll("%26","&").replaceAll("%3C","<").replaceAll("%3E",">").replaceAll("%0A",` -`).replaceAll("%0D","\r").replaceAll("%25","%")}function ehe(e){const t=e.split("/").map(n=>{let o="";for(const s of n){const i=s.codePointAt(0);i>127||Jpe.test(s)?o+=s:o+=`%${i.toString(16).toUpperCase().padStart(2,"0")}`}return o}).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function k$(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function the(e){const t=k$(e);try{return decodeURIComponent(t)}catch{return t}}function nhe(e){const t=k$(e);return!t||t.startsWith("#")||t.startsWith("?")||t.startsWith("//")||Zpe.test(t)&&!Ype.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?"folder":"file"}function sk(e,t){if(!t)return;const n=e.at(-1);n?.type==="text"?n.value+=t:e.push({type:"text",value:t})}function b$(e){const t=e.kind==="folder"&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${Xpe(e.name)}](${ehe(t)})`}function ohe(e){const t=[];let n=0;B8.lastIndex=0;for(const o of e.matchAll(B8)){const s=o.index;sk(t,e.slice(n,s));const i=o[0],r=o[1],l=o[2],a=e[s-1]==="!"?null:nhe(l);a&&r?t.push({type:"mention",attrs:{kind:a,name:Qpe(r),path:the(l)}}):sk(t,i),n=s+i.length}return sk(t,e.slice(n)),t}function W8(e){return z8??=new Intl.Segmenter("und",{granularity:"grapheme"}),Array.from(z8.segment(e),({segment:t})=>t)}function w$(e){const t=W8(e);if(t.length<=32)return e;const n=e.lastIndexOf("."),s=(n>=0?W8(e.slice(n)).length:0)+4,i=31-s;return i<8?`${t.slice(0,31).join("")}…`:`${t.slice(0,i).join("")}…${t.slice(-s).join("")}`}function she(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function ihe(e){return new Worker("/assets/mermaidParser.worker-Dx4jPi9z.js",{type:"module",name:e?.name})}const rhe={key:0,class:"md-frontmatter"},lhe={key:1,class:"diff-wrap"},ahe={class:"diff-bar"},uhe=["aria-label","onClick"],che={class:"diff-pre"},dhe={key:0,class:"diff-sign"},fhe={class:"diff-text"},phe="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Fm="pythinker-code://skill/",H8="md-table-wide",j8="md-table-toggle",U8="md-table-fade",V8="md-table-toggle--show",hhe="md-table-at-end",mhe=26,q8="github-light",K8="github-dark",ghe=Ze({__name:"Markdown",props:{text:{},openFile:{},skills:{},streaming:{type:Boolean,default:!1}},setup(e){ece(),pce(),nce(),gce(),tce(new she),mce(new ihe);const t=new WeakMap;function n(Oe,Je){if(Oe.src[Oe.pos]!=="$")return!1;let it=t.get(Oe);(!it||it.src!==Oe.src)&&(it={src:Oe.src,match:Vpe(Oe.src),lastEnd:-1},t.set(Oe,it));const rt=it.match(Oe.pos,it.lastEnd);if(!rt||rt.end>Oe.posMax)return!1;if(it.lastEnd=rt.end,Je)return Oe.pos=rt.end,!0;const vt=Oe.push("math_inline","math",0);return vt.content=rt.content,vt.markup="$",vt.raw=Oe.src.slice(Oe.pos,rt.end),vt.loading=!1,Oe.pos=rt.end,!0}function o(Oe){return Oe.set({typographer:!1}),Oe.inline.ruler.disable("math"),Oe.inline.ruler.before("escape","math",n),Oe}const{t:s}=$t(),i=wn("resolveImage"),r=V(null),l=e,a=O(()=>!l.streaming),u=O(()=>Gpe(l.text??"")),c=O(()=>u.value.body),d=O(()=>Epe(c.value)),f=O(()=>l.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:Ope(c.value)),p=m$(),h=O(()=>!l.streaming),m=Ms(new Map),k=new Set,w=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,v=/(]*?\bsrc=")([^"]+)(")/gi;function y(Oe){return!/^(https?:|data:|blob:)/i.test(Oe)}function b(Oe){if(!i)return;const Je=[];for(const it of[w,v]){it.lastIndex=0;let rt;for(;(rt=it.exec(Oe))!==null;)Je.push(rt[2]??"")}for(const it of Je)!it||!y(it)||m.has(it)||k.has(it)||(k.add(it),i(it).then(rt=>{m.set(it,rt!==it?rt:"")}).catch(()=>{m.set(it,"")}).finally(()=>{k.delete(it)}))}function S(Oe){if(!i)return Oe;const Je=it=>{if(!y(it))return null;const rt=m.get(it);return rt===void 0?phe:rt===""?null:rt};return Oe.replace(w,(it,rt,vt,Nt)=>{const on=Je(vt);return on===null?it:`${rt}${on}${Nt}`}).replace(v,(it,rt,vt,Nt)=>{const on=Je(vt);return on===null?it:`${rt}${on}${Nt}`})}Ye(()=>c.value,Oe=>b(Oe),{immediate:!0});function I(){if(!r.value||!l.openFile||l.streaming)return;const Oe=document.createTreeWalker(r.value,NodeFilter.SHOW_TEXT),Je=[];let it=Oe.nextNode();for(;it;){const rt=it,vt=rt.parentElement;vt&&!vt.closest("a, pre, .md-file-link, svg")&&rt.data.trim().length>0&&Je.push(rt),it=Oe.nextNode()}for(const rt of Je){const vt=Ipe(rt.data,{aliases:d.value});if(vt.length===0||!rt.parentNode)continue;const Nt=document.createDocumentFragment();let on=0;for(const mn of vt){mn.start>on&&Nt.append(document.createTextNode(rt.data.slice(on,mn.start)));const Zt=document.createElement("button");Zt.type="button",Zt.className="md-file-link",Zt.textContent=mn.text,Zt.title=mn.line?`${mn.path}:${mn.line}`:mn.path,Zt.addEventListener("click",jn=>{jn.preventDefault(),jn.stopPropagation(),l.openFile?.({path:mn.path,line:mn.line})}),Nt.append(Zt),on=mn.end}onFm.length?"skill":Oe.startsWith("#")||Oe.startsWith("?")||Oe.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(Oe)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(Oe)?null:Oe.endsWith("/")||Oe.endsWith("\\")||/%5c$/i.test(Oe)?"folder":"file":null}function R(Oe){try{return decodeURIComponent(Oe.slice(Fm.length))}catch{return Oe.slice(Fm.length)}}function P(Oe){return Oe.replace(/%0A/g,` -`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function M(){if(!r.value||l.streaming)return;const Oe=r.value.querySelectorAll("a[href]");for(const Je of Oe){if(Je.dataset.mdLinkHandled==="true"||Je.closest("svg")||Je.querySelector("img"))continue;const it=Je.getAttribute("href")??"",rt=F(it);if(rt===null)continue;Je.dataset.mdLinkHandled="true",Je.removeAttribute("title");const vt=rt==="skill"?it:T(it),Nt=P(Je.textContent??"");Je.classList.add("mention-pill",`mention-${rt}`),Je.dataset.mentionKind=rt,Je.dataset.mentionName=rt==="skill"?R(it):Nt,Je.dataset.mentionPath=vt,(rt==="skill"||l.openFile)&&Je.removeAttribute("href"),(rt==="skill"||rt==="file"&&l.openFile)&&(Je.tabIndex=0,Je.setAttribute("role","button"));const on=w$(Nt),mn=document.createElement("span");if(mn.className="mention-pill-name",mn.textContent=on,Je.replaceChildren(mn),!Je.querySelector(".mention-pill-icon")){const Zt=document.createElement("span");Zt.className="mention-pill-icon",Zt.setAttribute("aria-hidden","true"),Zt.innerHTML=rt==="skill"?ki("sparkles","sm"):rt==="folder"?ki("folder","sm"):aw(vt,Nt),Je.prepend(Zt)}Je.addEventListener("click",Zt=>{rt!=="skill"&&!l.openFile||(Zt.preventDefault(),Zt.stopPropagation(),rt==="file"&&l.openFile?.({path:$(T(it))}))}),rt==="file"&&l.openFile&&Je.addEventListener("keydown",Zt=>{Zt.key!=="Enter"&&Zt.key!==" "||(Zt.preventDefault(),Zt.stopPropagation(),l.openFile?.({path:$(T(it))}))}),fe(Je)}}function D(Oe){const Je=Oe.dataset.mentionKind??(Oe.classList.contains("mention-skill")?"skill":Oe.classList.contains("mention-folder")?"folder":"file"),it=Oe.dataset.mentionName??Oe.querySelector(".mention-pill-name")?.textContent??"";return{kind:Je,name:it,path:Oe.dataset.mentionPath??""}}function B(Oe,Je){let it;return()=>{if(it===void 0){const rt=getComputedStyle(document.documentElement).getPropertyValue(Oe).trim(),vt=parseFloat(rt);it=Number.isFinite(vt)?rt.endsWith("s")?vt*1e3:vt:Je}return it}}const z=B("--space-1-5",6),A=B("--p-mention-tip-vmargin",12),L=B("--duration-tooltip",150),W=B("--duration-fast",120),j=B("--duration-flash",1e3),re=V(null);let Q=null,Y=0,G=0;function X(Oe){return re.value?.contains(Oe)??!1}function te(){let Oe=re.value;return Oe||(Oe=document.createElement("div"),Oe.className="mention-tip",Oe.id="mention-tip",Oe.setAttribute("role","tooltip"),Oe.addEventListener("mouseenter",()=>window.clearTimeout(G)),Oe.addEventListener("mouseleave",()=>H()),Oe.addEventListener("focusin",()=>window.clearTimeout(G)),Oe.addEventListener("focusout",Je=>{const it=Je.relatedTarget;it instanceof Node&&(Oe.contains(it)||Q?.contains(it))||ee()}),document.body.append(Oe),re.value=Oe),Oe}function q(){const Oe=re.value,Je=Q;if(!Oe||!Je)return;const it=Je.getBoundingClientRect(),rt=z(),vt=A();let Nt=it.top-rt-Oe.offsetHeight;NtJe.name===Oe)}function xe(Oe){const Je=document.createElement("div");Je.className="mention-tip-path";const it=document.createElement("div");it.className="mention-tip-path-text";const rt=Oe.split(/([/\\])/);let vt=rt.length-1;for(;vt>0&&(rt[vt]===""||rt[vt]==="/"||rt[vt]==="\\");)vt--;for(let mn=0;mn{mn.preventDefault(),mn.stopPropagation(),Jo(Oe).then(Zt=>{Zt&&(Nt.innerHTML=ki("check","sm"),window.setTimeout(()=>{Nt.innerHTML=on},j()))})}),Je.append(Nt),Je}function We(Oe){const Je=document.createElement("div");Je.className="mention-tip-skill";const it=document.createElement("div");it.className="mention-tip-head";const rt=document.createElement("span");if(rt.className="mention-tip-name",rt.textContent=Oe.name,it.append(rt),Oe.path&&l.openFile){const vt=document.createElement("button");vt.type="button",vt.className="mention-tip-open",vt.setAttribute("aria-label",s("mention.openSkill")),vt.innerHTML=ki("external-link","sm");const Nt=Oe.path;vt.addEventListener("click",on=>{on.preventDefault(),on.stopPropagation(),ee(),l.openFile?.({path:Nt})}),it.append(vt)}if(Je.append(it),Oe.description){const vt=document.createElement("div");vt.className="mention-tip-desc",vt.textContent=Oe.description,Je.append(vt)}return Je}function he(Oe){const Je=te();Q?.removeAttribute("aria-describedby"),Q=Oe,Oe.setAttribute("aria-describedby",Je.id);const it=D(Oe);Je.replaceChildren(it.kind==="skill"?We(me(it.name)??{name:it.name,description:""}):xe(it.path||it.name)),Je.classList.remove("positioned"),q(),Je.classList.add("positioned"),Je.removeAttribute("inert")}function ee(){window.clearTimeout(Y),window.clearTimeout(G),Q?.removeAttribute("aria-describedby"),Q=null;const Oe=re.value;Oe?.classList.remove("positioned"),Oe?.setAttribute("inert","")}function ne(Oe){window.clearTimeout(G),window.clearTimeout(Y);const Je=re.value?.classList.contains("positioned")&&Q===Oe;Y=window.setTimeout(()=>{Oe.isConnected&&he(Oe)},Je?0:L())}function H(){window.clearTimeout(Y),window.clearTimeout(G),G=window.setTimeout(ee,W())}function Z(Oe){const Je=re.value;if(!(!Je||!Je.classList.contains("positioned")||!Q)){if(Oe.key==="Escape"){Oe.target instanceof Node&&Je.contains(Oe.target)&&Q.focus(),ee(),Oe.preventDefault(),Oe.stopImmediatePropagation();return}if(Oe.key==="Tab"&&Oe.target instanceof Node&&Je.contains(Oe.target)){const it=Array.from(Je.querySelectorAll("button")),rt=it[0],vt=it[it.length-1];(!Oe.shiftKey&&Oe.target===vt||Oe.shiftKey&&Oe.target===rt)&&(Oe.preventDefault(),Q.focus(),ee())}}}function ye(Oe){const Je=Oe.target;Je instanceof Node&&(X(Je)||Q?.contains(Je))||ee()}function fe(Oe){Oe.addEventListener("mouseenter",()=>ne(Oe)),Oe.addEventListener("mouseleave",Je=>{const it=Je.relatedTarget;it instanceof Node&&X(it)||H()}),Oe.addEventListener("focus",()=>ne(Oe)),Oe.addEventListener("blur",Je=>{const it=Je.relatedTarget;it instanceof Node&&X(it)||H()})}function de(){ee()}function J(Oe){return Oe.querySelector(`button.${j8}`)}function ae(Oe){return Oe.querySelector(`.${U8}`)}function be(Oe){const Je=J(Oe);if(!Je)return;const it=Oe.querySelector("thead tr")??Oe.querySelector("tr");if(!it)return;const rt=it.getBoundingClientRect(),vt=Oe.getBoundingClientRect().top,Nt=Math.max(2,Math.round(rt.top-vt+(rt.height-mhe)/2));Je.style.top=`${Nt}px`,Je.style.right=`${Nt}px`}function _e(Oe){const Je=Oe.querySelector("table");return Je!==null&&Je.scrollWidth>Oe.clientWidth+1}function ce(Oe){const Je=`translateX(${Oe.scrollLeft}px)`,it=ae(Oe);it&&(it.style.transform=Je);const rt=J(Oe);rt&&(rt.style.transform=Je);const vt=Oe.scrollLeft+Oe.clientWidth>=Oe.scrollWidth-2;Oe.classList.toggle(hhe,vt)}function Se(Oe){const Je=J(Oe);if(!Je)return;const it=_e(Oe),rt=Oe.classList.contains(H8);Je.classList.toggle(V8,it||rt),ae(Oe)?.classList.toggle(V8,it),be(Oe),ce(Oe)}function ie(Oe){const Je=J(Oe);if(Je)return Je;if(!Oe.closest(".a-msg .msg"))return null;const it=document.createElement("div");it.className=U8,it.setAttribute("aria-hidden","true");const rt=document.createElement("button");return rt.type="button",rt.className=j8,rt.innerHTML=ki("expand","sm"),rt.setAttribute("aria-label",s("conversation.widenTable")),rt.title=s("conversation.widenTable"),rt.addEventListener("click",vt=>{vt.preventDefault(),vt.stopPropagation(),we(Oe)}),Oe.append(it,rt),Oe.addEventListener("scroll",()=>ce(Oe),{passive:!0}),Se(Oe),rt}function we(Oe){const Je=Oe.classList.toggle(H8),it=J(Oe);if(it){it.innerHTML=ki(Je?"collapse":"expand","sm");const rt=s(Je?"conversation.restoreTableWidth":"conversation.widenTable");it.setAttribute("aria-label",rt),it.title=rt}Se(Oe),Oe.dispatchEvent(new CustomEvent("kimi-table-layout",{bubbles:!0}))}function Re(){if(!(!r.value||l.streaming))for(const Oe of r.value.querySelectorAll(".table-node-wrapper"))ie(Oe)}function at(){if(!(!r.value||l.streaming))for(const Oe of r.value.querySelectorAll(".table-node-wrapper"))Se(Oe)}function ft(){ee(),xt().then(()=>{I(),M(),Re()})}Ye(()=>l.text,ft),Ye(()=>l.streaming,ft);let Mt=null,Tt=null;Sn(()=>{ft(),r.value&&(Mt=new MutationObserver(ft),Mt.observe(r.value,{childList:!0,subtree:!0}),typeof ResizeObserver<"u"&&(Tt=new ResizeObserver(at),Tt.observe(r.value))),window.addEventListener("scroll",de,{capture:!0}),window.addEventListener("resize",de),document.addEventListener("pointerdown",ye,{capture:!0}),document.addEventListener("keydown",Z,{capture:!0})}),En(()=>{Mt?.disconnect(),Tt?.disconnect(),window.removeEventListener("scroll",de,{capture:!0}),window.removeEventListener("resize",de),document.removeEventListener("pointerdown",ye,{capture:!0}),document.removeEventListener("keydown",Z,{capture:!0}),ee(),re.value?.remove(),re.value=null});const tn={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},Kt=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,Qe=O(()=>{const Oe=S(c.value),Je=[];let it=0;Kt.lastIndex=0;let rt;for(;(rt=Kt.exec(Oe))!==null;){const Nt=rt[1]??"",on=Oe.slice(it,rt.index)+(Nt||"");on.trim()&&Je.push({kind:"md",text:on}),Je.push({kind:"diff",code:rt[2]??""}),it=Kt.lastIndex}const vt=Oe.slice(it);return(vt.trim()||Je.length===0)&&Je.push({kind:"md",text:vt}),Je});function nt(Oe){return Oe.split(` -`).map(Je=>Je.startsWith("@@")?{type:"hunk",sign:"",text:Je}:/^\+(?!\+\+)/.test(Je)?{type:"add",sign:"+",text:Je.slice(1)}:/^-(?!--)/.test(Je)?{type:"del",sign:"-",text:Je.slice(1)}:Je.startsWith(" ")?{type:"ctx",sign:"",text:Je.slice(1)}:{type:"ctx",sign:"",text:Je})}const ut=V(null);function Pt(Oe,Je){Jo(Oe).then(it=>{it&&(ut.value=Je,setTimeout(()=>{ut.value=null},1400))})}return(Oe,Je)=>(g(),C("div",{ref_key:"mdRef",ref:r,class:"md"},[u.value.frontmatter!==null?(g(),C("pre",rhe,N(u.value.frontmatter),1)):oe("",!0),(g(!0),C(Te,null,st(Qe.value,(it,rt)=>(g(),C(Te,{key:rt},[it.kind==="md"?(g(),pe(x(Mi),{key:0,content:it.text,"custom-markdown-it":o,mode:"chat","code-renderer":f.value.codeRenderer,"is-dark":x(p),"code-block-light-theme":q8,"code-block-dark-theme":K8,themes:[q8,K8],"code-block-props":tn,final:a.value,"smooth-streaming":e.streaming,"batch-rendering":h.value,"defer-nodes-until-visible":!1,onCopy:x(nB)},null,8,["content","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(g(),C("div",lhe,[_("div",ahe,[Je[0]||(Je[0]=_("span",{class:"diff-lang"},"diff",-1)),K(Mn,{text:x(s)("filePreview.copyCode")},{default:ve(()=>[_("button",{class:"diff-copy","aria-label":x(s)("filePreview.copyCode"),onClick:vt=>Pt(it.code,rt)},[K(Fe,{name:ut.value===rt?"check":"copy",size:"sm"},null,8,["name"])],8,uhe)]),_:2},1032,["text"])]),_("pre",che,[_("code",null,[(g(!0),C(Te,null,st(nt(it.code),(vt,Nt)=>(g(),C("span",{key:Nt,class:ze(["diff-line",`diff-${vt.type}`])},[vt.type!=="hunk"?(g(),C("span",dhe,N(vt.sign),1)):oe("",!0),_("span",fhe,N(vt.text),1)],2))),128))])])]))],64))),128))],512))}}),Bl=ht(ghe,[["__scopeId","data-v-9fc85391"]]),vhe=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"})),yhe={class:"activity-notice",role:"status"},khe={"aria-hidden":"true"},bhe={class:"an-label"},whe=Ze({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(g(),C("div",yhe,[_("span",khe,[K(ns,{size:"sm"})]),_("span",bhe,N(e.label),1)]))}}),xhe=ht(whe,[["__scopeId","data-v-5e7a6420"]]);function _he(e,t="Yesterday"){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=c=>String(c).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===o.getFullYear(),l=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(r&&l&&a)return i;const u=new Date(o);return u.setDate(o.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${i}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const She=Ze({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=$t(),o=V(!1),s=O(()=>{const l=new Date(t.time);if(Number.isNaN(l.getTime()))return t.time;const a=u=>String(u).padStart(2,"0");return`${l.getFullYear()}-${a(l.getMonth()+1)}-${a(l.getDate())} ${a(l.getHours())}:${a(l.getMinutes())}`}),i=O(()=>o.value?s.value:_he(t.time,n("conversation.yesterday")));function r(){o.value=!o.value}return(l,a)=>(g(),C("button",{type:"button",class:"msg-time",onClick:Ct(r,["stop"])},N(i.value),1))}}),x$=ht(She,[["__scopeId","data-v-6761370d"]]);function Che(e){return e.length===1?`0${e}`:e}function Ahe(e,t){return`${String(Number(e))}:${Che(t)}`}const G8=e=>/^\d+$/.test(e);function Mhe(e,t){const n=e.trim().split(/\s+/);if(n.length!==5)return e;const[o,s,i,r,l]=n,a=i==="*"&&r==="*"&&l==="*",u=i==="*"&&r==="*";if(o==="*"&&s==="*"&&a)return t("conversation.cron.everyMinute");const c=/^\*\/(\d+)$/.exec(o);if(c&&s==="*"&&a)return c[1]==="1"?t("conversation.cron.everyMinute"):t("conversation.cron.everyNMinutes",{n:c[1]});if(o==="0"&&s==="*"&&a)return t("conversation.cron.everyHour");const d=/^\*\/(\d+)$/.exec(s);if(o==="0"&&d&&a)return t("conversation.cron.everyNHours",{n:d[1]});if(G8(o)&&G8(s)&&u){const f=Ahe(s,o);if(l==="1-5")return t("conversation.cron.weekdaysAt",{time:f});if(l==="*")return t("conversation.cron.dailyAt",{time:f})}return e}const Ehe=["data-turn-id"],The={class:"cn-bubble"},Ihe={class:"cn-title"},$he={key:0,class:"cn-prompt"},Nhe={class:"cn-meta"},Lhe={key:0,class:"cn-meta-item"},Fhe={key:1,class:"cn-meta-item"},Ohe=["aria-label"],Rhe=["title"],Phe=Ze({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=$t(),o=O(()=>t.cron),s=O(()=>o.value?.missedCount!==void 0),i=O(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=O(()=>{const c=o.value?.cron;return c?Mhe(c,n):""}),l=O(()=>s.value?"error":"ok"),a=O(()=>{const c=o.value;if(!c)return"";const d=[];return c.recurring===!1&&d.push(n("conversation.cron.oneShot")),typeof c.coalescedCount=="number"&&c.coalescedCount>1&&d.push(n("conversation.cron.coalesced",{n:c.coalescedCount})),c.missedCount!==void 0&&d.push(n("conversation.cron.missedCount",{n:c.missedCount})),c.stale===!0&&d.push(n("conversation.cron.finalDelivery")),d.join(" · ")}),u=O(()=>t.text??"");return(c,d)=>(g(),C("div",{class:ze(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[_("div",The,[_("span",Ihe,N(i.value),1),u.value?(g(),C("span",$he,N(u.value),1)):oe("",!0)]),_("div",Nhe,[K(Fe,{name:"clock",size:"sm",class:"cn-meta-ico","aria-hidden":"true"}),r.value?(g(),C("span",Lhe,N(r.value),1)):oe("",!0),a.value?(g(),C("span",Fhe,N(a.value),1)):oe("",!0),_("span",{class:ze(["cn-status",l.value]),"aria-label":l.value},[l.value==="ok"?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):(g(),pe(Fe,{key:1,name:"close",size:"sm"}))],10,Ohe),o.value?.jobId?(g(),C("span",{key:2,class:"cn-meta-item cn-id",title:x(n)("conversation.cron.job",{id:o.value.jobId})},N(o.value.jobId),9,Rhe)):oe("",!0),e.createdAt?(g(),pe(x$,{key:3,time:e.createdAt},null,8,["time"])):oe("",!0)])],10,Ehe))}}),Dhe=ht(Phe,[["__scopeId","data-v-d3807b0f"]]),Z8=rn.clientId,Bhe="pythinker-code-web",zhe="web";function _$(){return{serverHttpUrl:Hhe(),clientId:Uhe(),clientName:Bhe,clientVersion:Vhe(),clientUiMode:zhe}}function Whe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Hhe(e){const t=Whe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Zc(e,t){return`${e}/api/v1${t.startsWith("/")?t:`/${t}`}`}function jhe(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}function Uhe(){const e=zo(Z8);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return ts(Z8,t),t}function Vhe(){return"0.1.2".trim()?"0.1.2":"0.0.0-dev"}function qhe(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}function Khe(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}const Ghe={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function Zhe(e,t){switch(t.op){case"reset":return Yhe(e,t);case"turn.upsert":return Xhe(e,t.turn);case"step.upsert":return eme(e,t.turnId,t.step);case"frame.upsert":return nme(e,t);case"append":return sme(e,t);case"marker.upsert":return J8(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return J8(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return lme(e,t.task);case"interaction.upsert":return ame(e,t.interaction);case"attachment.upsert":return cme(e,t.attachment);case"todo.upsert":return fme(e,t.todo);case"prompt.upsert":return hme(e,t.prompt);case"meta.merge":return vme(e,t.meta);case"items.remove":return rme(e,t.ids)}}function Yhe(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function Y8(e,t){return{...e,kind:"turn",steps:[...t]}}function S$(e){return{kind:"turn",turnId:e,ordinal:qhe(e),state:"running",origin:{kind:"other"},steps:[]}}function Jhe(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Cd(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function cx(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function T0(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function Xhe(e,t){const n=Cd(e,t.turnId);return n?Qhe(n,t)?{state:e,changed:!1}:{state:{...e,items:T0(e.items,t.turnId,o=>Y8(t,o.steps))},changed:!0}:{state:{...e,items:cx(e.items,Y8(t,[]))},changed:!0}}function Qhe(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&("taskId"in e.origin?e.origin.taskId:void 0)===("taskId"in t.origin?t.origin.taskId:void 0)&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function eme(e,t,n){const o=Cd(e,t)??S$(t),s=o.steps.findIndex(u=>u.stepId===n.stepId);let i,r=!0;if(s>=0){const u=o.steps[s];u&&tme(u,n)?(r=!1,i=o.steps):i=o.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...o,steps:[...i]},a=Cd(e,t)?T0(e.items,t,()=>l):cx(e.items,l);return{state:{...e,items:a},changed:!0}}function tme(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function nme(e,t){const n=Cd(e,t.turnId)??S$(t.turnId),o=n.steps.find(c=>c.stepId===t.stepId)??Jhe(t.stepId,t.turnId),s=o.frames.findIndex(c=>c.frameId===t.frame.frameId);let i;if(s>=0){const c=o.frames[s];if(c!==void 0&&ome(c,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const r={...o,frames:[...i]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=Cd(e,t.turnId)?T0(e.items,t.turnId,()=>a):cx(e.items,a);return{state:{...e,items:u},changed:!0}}function ome(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail&&e.source===t.source:!1}function sme(e,t){if(t.target.type==="task")return ime(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Cd(e,n),r=i?.steps.find(f=>f.stepId===o),l=r?.frames.find(f=>f.frameId===s);if(!i||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=C$(l.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?c:f)};return{state:{...e,items:T0(e.items,n,()=>d)},changed:!0}}function ime(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=C$(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const r=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function C$(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function J8(e,t,n,o){if(e.items.some(i=>Jb(i)===n)){let i=!1;const r=e.items.map(l=>Jb(l)!==n||l===t?l:(i=!0,t));return i?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let r=i.length;for(let l=0;l=o){r=l;break}}return i.splice(r,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function Jb(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function rme(e,t){const n=new Set(t),o=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(Jb(l)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,r=e.interactions;if(o.length>0){const l=new Set,a=new Set(i),u=new Set;for(const c of o)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}i=a}return{state:{...e,items:s,interactions:r,pendingInteractions:i},changed:!0}}function lme(e,t){const n=e.tasks.get(t.taskId);if(n&&gme(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function ame(e,t){const n=e.interactions.get(t.interactionId);if(n&&ume(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function ume(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function cme(e,t){const n=e.attachments.get(t.attachmentId);if(n&&dme(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function dme(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function fme(e,t){const n=e.todos.get(t.todoId);if(n&&pme(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function pme(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function hme(e,t){const n=e.prompts.get(t.promptId);if(n&&mme(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function mme(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function gme(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function vme(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,dynamic_workflow:t.modes.dynamic_workflow===null?void 0:t.modes.dynamic_workflow??e.meta.modes?.dynamic_workflow}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal===null?void 0:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.dynamic_workflow===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class yme{constructor(t){this.agentId=t}#e=Ghe;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const r=Zhe(s,i);if(r.gap){o={target:i.target,...r.gap};continue}r.changed&&(s=r.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const r of this.#t)r(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,r)=>r.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=i)continue;r.push(a)}else l>i&&r.push(a);n=r,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}var X8;function mt(e,t,n){function o(l,a){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:a,constr:r,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,a);const u=r.prototype,c=Object.keys(u);for(let d=0;dn?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class md extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class A$ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(X8=globalThis).__zod_globalConfig??(X8.__zod_globalConfig={});const dx=globalThis.__zod_globalConfig;function zl(e){return dx}function M$(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function Xb(e,t){return typeof t=="bigint"?t.toString():t}function I0(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fx(e){return e==null}function px(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function kme(e,t){const n=e/t,o=Math.round(n),s=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o){};function Gp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wme=I0(()=>{if(dx.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ad(e){if(Gp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Gp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function T$(e){return Ad(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const xme=new Set(["string","number","symbol"]);function Md(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function en(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function _me(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Sme={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Cme(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=ja(e._zod.def,{get shape(){const r={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(r[l]=n.shape[l])}return Qu(this,"shape",r),r},checks:[]});return Ua(e,i)}function Ame(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=ja(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete r[l]}return Qu(this,"shape",r),r},checks:[]});return Ua(e,i)}function Mme(e,t){if(!Ad(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(i,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=ja(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Qu(this,"shape",i),i}});return Ua(e,s)}function Eme(e,t){if(!Ad(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Qu(this,"shape",o),o}});return Ua(e,n)}function Tme(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=ja(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Qu(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ua(e,n)}function Ime(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=ja(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Qu(this,"shape",a),a},checks:[]});return Ua(t,r)}function $me(e,t,n){const o=ja(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const r in n){if(!(r in i))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(i[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)i[r]=new e({type:"nonoptional",innerType:s[r]});return Qu(this,"shape",i),i}});return Ua(t,o)}function Yc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Om(e){return typeof e=="string"?e:e?.message}function Wl(e,t,n){const o=e.message?e.message:Om(e.inst?._zod.def?.error?.(e))??Om(t?.error?.(e))??Om(n.customError?.(e))??Om(n.localeError?.(e))??"Invalid input",{inst:s,continue:i,input:r,...l}=e;return l.path??(l.path=[]),l.message=o,t?.reportInput&&(l.input=r),l}function hx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Zp(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const I$=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$$=mt("$ZodError",I$),N$=mt("$ZodError",I$,{Parent:Error});function Lme(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function Fme(e,t=n=>n.message){const n={_errors:[]},o=(s,i=[])=>{for(const r of s.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(l=>o({issues:l},[...i,...r.path]));else if(r.code==="invalid_key")o({issues:r.issues},[...i,...r.path]);else if(r.code==="invalid_element")o({issues:r.issues},[...i,...r.path]);else{const l=[...i,...r.path];if(l.length===0)n._errors.push(t(r));else{let a=n,u=0;for(;u(t,n,o,s)=>{const i=o?{...o,async:!1}:{async:!1},r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new md;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Wl(a,i,zl())));throw E$(l,s?.callee),l}return r.value},gx=e=>async(t,n,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Wl(a,i,zl())));throw E$(l,s?.callee),l}return r.value},$0=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new md;return i.issues.length?{success:!1,error:new(e??$$)(i.issues.map(r=>Wl(r,s,zl())))}:{success:!0,data:i.value}},Ome=$0(N$),N0=e=>async(t,n,o)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(r=>Wl(r,s,zl())))}:{success:!0,data:i.value}},Rme=N0(N$),Pme=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return mx(e)(t,n,s)},Dme=e=>(t,n,o)=>mx(e)(t,n,o),Bme=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return gx(e)(t,n,s)},zme=e=>async(t,n,o)=>gx(e)(t,n,o),Wme=e=>(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return $0(e)(t,n,s)},Hme=e=>(t,n,o)=>$0(e)(t,n,o),jme=e=>async(t,n,o)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return N0(e)(t,n,s)},Ume=e=>async(t,n,o)=>N0(e)(t,n,o),Vme=/^[cC][0-9a-z]{6,}$/,qme=/^[0-9a-z]+$/,Kme=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gme=/^[0-9a-vA-V]{20}$/,Zme=/^[A-Za-z0-9]{27}$/,Yme=/^[a-zA-Z0-9_-]{21}$/,Jme=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xme=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,t6=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Qme=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ege="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tge(){return new RegExp(ege,"u")}const nge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ige=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rge=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,L$=/^[A-Za-z0-9_-]*$/,lge=/^https?$/,age=/^\+[1-9]\d{6,14}$/,F$="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",uge=new RegExp(`^${F$}$`);function O$(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cge(e){return new RegExp(`^${O$(e)}$`)}function dge(e){const t=O$({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${F$}T(?:${o})$`)}const fge=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pge=/^-?\d+$/,R$=/^-?\d+(?:\.\d+)?$/,hge=/^(?:true|false)$/i,mge=/^[^A-Z]*$/,gge=/^[^a-z]*$/,Ei=mt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),P$={number:"number",bigint:"bigint",object:"date"},D$=mt("$ZodCheckLessThan",(e,t)=>{Ei.init(e,t);const n=P$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Ei.init(e,t);const n=P$[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vge=mt("$ZodCheckMultipleOf",(e,t)=>{Ei.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):kme(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yge=mt("$ZodCheckNumberFormat",(e,t)=>{Ei.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=Sme[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=pge)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?r.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):r.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}li&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),kge=mt("$ZodCheckMaxLength",(e,t)=>{var n;Ei.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const r=hx(s);o.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),bge=mt("$ZodCheckMinLength",(e,t)=>{var n;Ei.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const r=hx(s);o.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),wge=mt("$ZodCheckLengthEquals",(e,t)=>{var n;Ei.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!fx(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const r=hx(s),l=i>t.length;o.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),L0=mt("$ZodCheckStringFormat",(e,t)=>{var n,o;Ei.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),xge=mt("$ZodCheckRegex",(e,t)=>{L0.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_ge=mt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mge),L0.init(e,t)}),Sge=mt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=gge),L0.init(e,t)}),Cge=mt("$ZodCheckIncludes",(e,t)=>{Ei.init(e,t);const n=Md(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Age=mt("$ZodCheckStartsWith",(e,t)=>{Ei.init(e,t);const n=new RegExp(`^${Md(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Mge=mt("$ZodCheckEndsWith",(e,t)=>{Ei.init(e,t);const n=new RegExp(`.*${Md(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Ege=mt("$ZodCheckOverwrite",(e,t)=>{Ei.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Tge{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` -`).filter(r=>r),s=Math.min(...o.map(r=>r.length-r.trimStart().length)),i=o.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of i)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` -`))}}const Ige={major:4,minor:4,patch:3},Mo=mt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ige;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(r,l,a)=>{let u=Yc(r),c;for(const d of l){if(d._zod.def.when){if(Nme(r)||!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,p=d._zod.check(r);if(p instanceof Promise&&a?.async===!1)throw new md;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,r.issues.length!==f&&(u||(u=Yc(r,f)))});else{if(r.issues.length===f)continue;u||(u=Yc(r,f))}}return c?c.then(()=>r):r},i=(r,l,a)=>{if(Yc(r))return r.aborted=!0,r;const u=s(l,o,a);if(u instanceof Promise){if(a.async===!1)throw new md;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>i(c,r,l)):i(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new md;return a.then(u=>s(u,o,l))}return s(a,o,l)}}oo(e,"~standard",()=>({validate:s=>{try{const i=Ome(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Rme(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),vx=mt("$ZodString",(e,t)=>{Mo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??fge(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),wo=mt("$ZodStringFormat",(e,t)=>{L0.init(e,t),vx.init(e,t)}),$ge=mt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xme),wo.init(e,t)}),Nge=mt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=t6(o))}else t.pattern??(t.pattern=t6());wo.init(e,t)}),Lge=mt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qme),wo.init(e,t)}),Fge=mt("$ZodURL",(e,t)=>{wo.init(e,t),e._zod.check=n=>{try{const o=n.value.trim();if(!t.normalize&&t.protocol?.source===lge.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Oge=mt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=tge()),wo.init(e,t)}),Rge=mt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yme),wo.init(e,t)}),Pge=mt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vme),wo.init(e,t)}),Dge=mt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=qme),wo.init(e,t)}),Bge=mt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Kme),wo.init(e,t)}),zge=mt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gme),wo.init(e,t)}),Wge=mt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zme),wo.init(e,t)}),Hge=mt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dge(t)),wo.init(e,t)}),jge=mt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=uge),wo.init(e,t)}),Uge=mt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=cge(t)),wo.init(e,t)}),Vge=mt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Jme),wo.init(e,t)}),qge=mt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=nge),wo.init(e,t),e._zod.bag.format="ipv4"}),Kge=mt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oge),wo.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Gge=mt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sge),wo.init(e,t)}),Zge=mt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ige),wo.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const r=Number(i);if(`${r}`!==i)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function z$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Yge=mt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rge),wo.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{z$(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Jge(e){if(!L$.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return z$(n)}const Xge=mt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=L$),wo.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Jge(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Qge=mt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=age),wo.init(e,t)});function e1e(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const t1e=mt("$ZodJWT",(e,t)=>{wo.init(e,t),e._zod.check=n=>{e1e(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),W$=mt("$ZodNumber",(e,t)=>{Mo.init(e,t),e._zod.pattern=e._zod.bag.pattern??R$,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),n1e=mt("$ZodNumberFormat",(e,t)=>{yge.init(e,t),W$.init(e,t)}),o1e=mt("$ZodBoolean",(e,t)=>{Mo.init(e,t),e._zod.pattern=hge,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),s1e=mt("$ZodUnknown",(e,t)=>{Mo.init(e,t),e._zod.parse=n=>n}),i1e=mt("$ZodNever",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function n6(e,t,n){e.issues.length&&t.issues.push(...Jc(n,e.issues)),t.value[n]=e.value}const r1e=mt("$ZodArray",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let r=0;rn6(u,n,r))):n6(a,n,r)}return i.length?Promise.all(i).then(()=>n):n}});function C1(e,t,n,o,s,i){const r=n in o;if(e.issues.length){if(s&&i&&!r)return;t.issues.push(...Jc(n,e.issues))}if(!r&&!s){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?r&&(t.value[n]=void 0):t.value[n]=e.value}function H$(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=_me(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function j$(e,t,n,o,s,i){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optin==="optional",d=a.optout==="optional";for(const f in t){if(f==="__proto__"||l.has(f))continue;if(u==="never"){r.push(f);continue}const p=a.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(h=>C1(h,n,f,t,c,d))):C1(p,n,f,t,c,d)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const l1e=mt("$ZodObject",(e,t)=>{if(Mo.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...l};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=I0(()=>H$(t));oo(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=Gp,i=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=o.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const p=d[f],h=p._zod.optin==="optional",m=p._zod.optout==="optional",k=p._zod.run({value:u[f],issues:[]},a);k instanceof Promise?c.push(k.then(w=>C1(w,l,f,u,h,m))):C1(k,l,f,u,h,m)}return i?j$(c,u,l,a,o.value,e):c.length?Promise.all(c).then(()=>l):l}}),a1e=mt("$ZodObjectJIT",(e,t)=>{l1e.init(e,t);const n=e._zod.parse,o=I0(()=>H$(t)),s=f=>{const p=new Tge(["shape","payload","ctx"]),h=o.value,m=y=>{const b=e6(y);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};p.write("const input = payload.value;");const k=Object.create(null);let w=0;for(const y of h.keys)k[y]=`key_${w++}`;p.write("const newResult = {};");for(const y of h.keys){const b=k[y],S=e6(y),I=f[y],T=I?._zod?.optin==="optional",$=I?._zod?.optout==="optional";p.write(`const ${b} = ${m(y)};`),T&&$?p.write(` - if (${b}.issues.length) { - if (${S} in input) { - payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${S}, ...iss.path] : [${S}] - }))); - } - } - - if (${b}.value === undefined) { - if (${S} in input) { - newResult[${S}] = undefined; - } - } else { - newResult[${S}] = ${b}.value; - } - - `):T?p.write(` - if (${b}.issues.length) { - payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${S}, ...iss.path] : [${S}] - }))); - } - - if (${b}.value === undefined) { - if (${S} in input) { - newResult[${S}] = undefined; - } - } else { - newResult[${S}] = ${b}.value; - } - - `):p.write(` - const ${b}_present = ${S} in input; - if (${b}.issues.length) { - payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${S}, ...iss.path] : [${S}] - }))); - } - if (!${b}_present && !${b}.issues.length) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: undefined, - path: [${S}] - }); - } - - if (${b}_present) { - if (${b}.value === undefined) { - newResult[${S}] = undefined; - } else { - newResult[${S}] = ${b}.value; - } - } - - `)}p.write("payload.value = newResult;"),p.write("return payload;");const v=p.compile();return(y,b)=>v(f,y,b)};let i;const r=Gp,l=!dx.jitless,u=l&&wme.value,c=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=o.value);const h=f.value;return r(h)?l&&u&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),f=i(f,p),c?j$([],h,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function o6(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!Yc(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(r=>Wl(r,o,zl())))}),t)}const U$=mt("$ZodUnion",(e,t)=>{Mo.init(e,t),oo(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),oo(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),oo(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),oo(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>px(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(n)return n(o,s);let i=!1;const r=[];for(const l of t.options){const a=l._zod.run({value:o.value,issues:[]},s);if(a instanceof Promise)r.push(a),i=!0;else{if(a.issues.length===0)return a;r.push(a)}}return i?Promise.all(r).then(l=>o6(l,o,e,s)):o6(r,o,e,s)}}),u1e=mt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,U$.init(e,t);const n=e._zod.parse;oo(e._zod,"propValues",()=>{const s={};for(const i of t.options){const r=i._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const o=I0(()=>{const s=t.options,i=new Map;for(const r of s){const l=r._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const a of l){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,r)}}return i});e._zod.parse=(s,i)=>{const r=s.value;if(!Gp(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=o.value.get(r?.[t.discriminator]);return l?l._zod.run(s,i):t.unionFallback||i.direction==="backward"?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:r,path:[t.discriminator],inst:e}),s)}}),c1e=mt("$ZodIntersection",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),r=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||r instanceof Promise?Promise.all([i,r]).then(([a,u])=>s6(n,a,u)):s6(n,i,r)}});function Qb(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ad(e)&&Ad(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const r=Qb(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};s[i]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;ol.l&&l.r).map(([l])=>l);if(i.length&&s&&e.issues.push({...s,keys:i}),Yc(e))return e;const r=Qb(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const d1e=mt("$ZodRecord",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Ad(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.keyType._zod.run({value:u,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>Wl(p,o,zl())),input:u,path:[u],inst:e});continue}const d=c.value,f=t.valueType._zod.run({value:s[u],issues:[]},o);f instanceof Promise?i.push(f.then(p=>{p.issues.length&&n.issues.push(...Jc(u,p.issues)),n.value[d]=p.value})):(f.issues.length&&n.issues.push(...Jc(u,f.issues)),n.value[d]=f.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const l of Reflect.ownKeys(s)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,l))continue;let a=t.keyType._zod.run({value:l,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&R$.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[l]=s[l]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Wl(d,o,zl())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},o);c instanceof Promise?i.push(c.then(d=>{d.issues.length&&n.issues.push(...Jc(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Jc(l,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),f1e=mt("$ZodEnum",(e,t)=>{Mo.init(e,t);const n=M$(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>xme.has(typeof s)).map(s=>typeof s=="string"?Md(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const r=s.value;return o.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),p1e=mt("$ZodLiteral",(e,t)=>{if(Mo.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Md(o):o?Md(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),h1e=mt("$ZodTransform",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new A$(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n.fallback=!0,n));if(s instanceof Promise)throw new md;return n.value=s,n.fallback=!0,n}});function i6(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const V$=mt("$ZodOptional",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",e._zod.optout="optional",oo(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),oo(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${px(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(r=>i6(r,s)):i6(i,s)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),m1e=mt("$ZodExactOptional",(e,t)=>{V$.init(e,t),oo(e._zod,"values",()=>t.innerType._zod.values),oo(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),g1e=mt("$ZodNullable",(e,t)=>{Mo.init(e,t),oo(e._zod,"optin",()=>t.innerType._zod.optin),oo(e._zod,"optout",()=>t.innerType._zod.optout),oo(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${px(n.source)}|null)$`):void 0}),oo(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),v1e=mt("$ZodDefault",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",oo(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>r6(i,t)):r6(s,t)}});function r6(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const y1e=mt("$ZodPrefault",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",oo(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),k1e=mt("$ZodNonOptional",(e,t)=>{Mo.init(e,t),oo(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>l6(i,e)):l6(s,e)}});function l6(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const b1e=mt("$ZodCatch",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",oo(e._zod,"optout",()=>t.innerType._zod.optout),oo(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(r=>Wl(r,o,zl()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Wl(i,o,zl()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),w1e=mt("$ZodPipe",(e,t)=>{Mo.init(e,t),oo(e._zod,"values",()=>t.in._zod.values),oo(e._zod,"optin",()=>t.in._zod.optin),oo(e._zod,"optout",()=>t.out._zod.optout),oo(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(r=>Rm(r,t.in,o)):Rm(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>Rm(i,t.out,o)):Rm(s,t.out,o)}});function Rm(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const x1e=mt("$ZodReadonly",(e,t)=>{Mo.init(e,t),oo(e._zod,"propValues",()=>t.innerType._zod.propValues),oo(e._zod,"values",()=>t.innerType._zod.values),oo(e._zod,"optin",()=>t.innerType?._zod?.optin),oo(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(a6):a6(s)}});function a6(e){return e.value=Object.freeze(e.value),e}const _1e=mt("$ZodCustom",(e,t)=>{Ei.init(e,t),Mo.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>u6(i,n,o,e));u6(s,n,o,e)}});function u6(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(Zp(s))}}var c6;class S1e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function C1e(){return new S1e}(c6=globalThis).__zod_globalRegistry??(c6.__zod_globalRegistry=C1e());const qf=globalThis.__zod_globalRegistry;function A1e(e,t){return new e({type:"string",...en(t)})}function M1e(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...en(t)})}function d6(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...en(t)})}function E1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...en(t)})}function T1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...en(t)})}function I1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...en(t)})}function $1e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...en(t)})}function N1e(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...en(t)})}function L1e(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...en(t)})}function F1e(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...en(t)})}function O1e(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...en(t)})}function R1e(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...en(t)})}function P1e(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...en(t)})}function D1e(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...en(t)})}function B1e(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...en(t)})}function z1e(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...en(t)})}function W1e(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...en(t)})}function H1e(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...en(t)})}function j1e(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...en(t)})}function U1e(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...en(t)})}function V1e(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...en(t)})}function q1e(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...en(t)})}function K1e(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...en(t)})}function G1e(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...en(t)})}function Z1e(e,t){return new e({type:"string",format:"date",check:"string_format",...en(t)})}function Y1e(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...en(t)})}function J1e(e,t){return new e({type:"string",format:"duration",check:"string_format",...en(t)})}function X1e(e,t){return new e({type:"number",checks:[],...en(t)})}function Q1e(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...en(t)})}function e0e(e,t){return new e({type:"boolean",...en(t)})}function t0e(e){return new e({type:"unknown"})}function n0e(e,t){return new e({type:"never",...en(t)})}function f6(e,t){return new D$({check:"less_than",...en(t),value:e,inclusive:!1})}function ik(e,t){return new D$({check:"less_than",...en(t),value:e,inclusive:!0})}function p6(e,t){return new B$({check:"greater_than",...en(t),value:e,inclusive:!1})}function rk(e,t){return new B$({check:"greater_than",...en(t),value:e,inclusive:!0})}function h6(e,t){return new vge({check:"multiple_of",...en(t),value:e})}function q$(e,t){return new kge({check:"max_length",...en(t),maximum:e})}function A1(e,t){return new bge({check:"min_length",...en(t),minimum:e})}function K$(e,t){return new wge({check:"length_equals",...en(t),length:e})}function o0e(e,t){return new xge({check:"string_format",format:"regex",...en(t),pattern:e})}function s0e(e){return new _ge({check:"string_format",format:"lowercase",...en(e)})}function i0e(e){return new Sge({check:"string_format",format:"uppercase",...en(e)})}function r0e(e,t){return new Cge({check:"string_format",format:"includes",...en(t),includes:e})}function l0e(e,t){return new Age({check:"string_format",format:"starts_with",...en(t),prefix:e})}function a0e(e,t){return new Mge({check:"string_format",format:"ends_with",...en(t),suffix:e})}function Wd(e){return new Ege({check:"overwrite",tx:e})}function u0e(e){return Wd(t=>t.normalize(e))}function c0e(){return Wd(e=>e.trim())}function d0e(){return Wd(e=>e.toLowerCase())}function f0e(){return Wd(e=>e.toUpperCase())}function p0e(){return Wd(e=>bme(e))}function h0e(e,t,n){return new e({type:"array",element:t,...en(n)})}function m0e(e,t,n){return new e({type:"custom",check:"custom",fn:t,...en(n)})}function g0e(e,t){const n=v0e(o=>(o.addIssue=s=>{if(typeof s=="string")o.issues.push(Zp(s,o.value,n._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Zp(i))}},e(o.value,o)),t);return n}function v0e(e,t){const n=new Ei({check:"custom",...en(t)});return n._zod.check=e,n}function G$(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??qf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qo(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const r={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,r);const l=e._zod.toJSONSchema?.();if(l)r.schema=l;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),Qo(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&Zs(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&"_prefault"in r.schema&&((o=r.schema).default??(o.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function Z$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=o.get(l);if(a&&a!==r[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(l,r[0])}}const s=r=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(r[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const p=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},i=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$ref=a};if(e.cycles==="throw")for(const r of e.seen.entries()){const l=r[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const l=r[1];if(t===r[0]){i(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id){i(r);continue}if(l.cycle){i(r);continue}if(l.count>1&&e.reused==="ref"){i(r);continue}}}function Y$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=l=>{const a=e.seen.get(l);if(a.ref===null)return;const u=a.def??a.schema,c={...u},d=a.ref;if(a.ref=null,d){o(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,c),l._zod.parent===d)for(const k in u)k==="$ref"||k==="allOf"||k in c||delete u[k];if(h.$ref&&p.def)for(const k in u)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(u[k])===JSON.stringify(p.def[k])&&delete u[k]}const f=l._zod.parent;if(f&&f!==d){o(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:l,jsonSchema:u,path:a.path??[]})};for(const l of[...e.seen.entries()].reverse())o(l[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(l)}Object.assign(s,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&s.id===i&&delete s.id;const r=e.external?.defs??{};for(const l of e.seen.entries()){const a=l[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,r[a.defId]=a.def)}e.external||Object.keys(r).length>0&&(e.target==="draft-2020-12"?s.$defs=r:s.definitions=r);try{const l=JSON.parse(JSON.stringify(s));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:M1(t,"input",e.processors),output:M1(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Zs(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Zs(o.element,n);if(o.type==="set")return Zs(o.valueType,n);if(o.type==="lazy")return Zs(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Zs(o.innerType,n);if(o.type==="intersection")return Zs(o.left,n)||Zs(o.right,n);if(o.type==="record"||o.type==="map")return Zs(o.keyType,n)||Zs(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Zs(o.in,n)||Zs(o.out,n);if(o.type==="object"){for(const s in o.shape)if(Zs(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(Zs(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(Zs(s,n))return!0;return!!(o.rest&&Zs(o.rest,n))}return!1}const y0e=(e,t={})=>n=>{const o=G$({...n,processors:t});return Qo(e,o),Z$(o,e),Y$(o,e)},M1=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},r=G$({...s??{},target:i,io:t,processors:n});return Qo(e,r),Z$(r,e),Y$(r,e)},k0e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},b0e=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof r=="number"&&(s.maxLength=r),l&&(s.format=k0e[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},w0e=(e,t,n,o)=>{const s=n,{minimum:i,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number";const d=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(r??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c:typeof i=="number"&&(s.minimum=i),f?p?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u:typeof r=="number"&&(s.maximum=r),typeof a=="number"&&(s.multipleOf=a)},x0e=(e,t,n,o)=>{n.type="boolean"},_0e=(e,t,n,o)=>{n.not={}},S0e=(e,t,n,o)=>{},C0e=(e,t,n,o)=>{const s=e._zod.def,i=M$(s.entries);i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),n.enum=i},A0e=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const r of s.values)if(r===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(r))}else i.push(r);if(i.length!==0)if(i.length===1){const r=i[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),i.every(r=>typeof r=="boolean")&&(n.type="boolean"),i.every(r=>r===null)&&(n.type="null"),n.enum=i},M0e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},E0e=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},T0e=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:r,maximum:l}=e._zod.bag;typeof r=="number"&&(s.minItems=r),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=Qo(i.element,t,{...o,path:[...o.path,"items"]})},I0e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const r=i.shape;for(const u in r)s.properties[u]=Qo(r[u],t,{...o,path:[...o.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=i.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=Qo(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},$0e=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,r=s.options.map((l,a)=>Qo(l,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=r:n.anyOf=r},N0e=(e,t,n,o)=>{const s=e._zod.def,i=Qo(s.left,t,{...o,path:[...o.path,"allOf",0]}),r=Qo(s.right,t,{...o,path:[...o.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(i)?i.allOf:[i],...l(r)?r.allOf:[r]];n.allOf=a},L0e=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const r=i.keyType,a=r._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const c=Qo(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Qo(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=Qo(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},F0e=(e,t,n,o)=>{const s=e._zod.def,i=Qo(s.innerType,t,o),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},O0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},R0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},P0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},D0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let r;try{r=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=r},B0e=(e,t,n,o)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),r=t.io==="input"?i?s.out:s.in:s.out;Qo(r,t,o);const l=t.seen.get(e);l.ref=r},z0e=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},J$=(e,t,n,o)=>{const s=e._zod.def;Qo(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},W0e=mt("ZodISODateTime",(e,t)=>{Hge.init(e,t),To.init(e,t)});function H0e(e){return G1e(W0e,e)}const j0e=mt("ZodISODate",(e,t)=>{jge.init(e,t),To.init(e,t)});function U0e(e){return Z1e(j0e,e)}const V0e=mt("ZodISOTime",(e,t)=>{Uge.init(e,t),To.init(e,t)});function q0e(e){return Y1e(V0e,e)}const K0e=mt("ZodISODuration",(e,t)=>{Vge.init(e,t),To.init(e,t)});function G0e(e){return J1e(K0e,e)}const Z0e=(e,t)=>{$$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Fme(e,n)},flatten:{value:n=>Lme(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Xb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Xb,2)}},isEmpty:{get(){return e.issues.length===0}}})},cr=mt("ZodError",Z0e,{Parent:Error}),Y0e=mx(cr),J0e=gx(cr),X0e=$0(cr),Q0e=N0(cr),eve=Pme(cr),tve=Dme(cr),nve=Bme(cr),ove=zme(cr),sve=Wme(cr),ive=Hme(cr),rve=jme(cr),lve=Ume(cr),m6=new WeakMap;function mh(e,t,n){const o=Object.getPrototypeOf(e);let s=m6.get(o);if(s||(s=new Set,m6.set(o,s)),!s.has(t)){s.add(t);for(const i in n){const r=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const l=r.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}const Eo=mt("ZodType",(e,t)=>(Mo.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:M1(e,"input"),output:M1(e,"output")}}),e.toJSONSchema=y0e(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Y0e(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>X0e(e,n,o),e.parseAsync=async(n,o)=>J0e(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Q0e(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>eve(e,n,o),e.decode=(n,o)=>tve(e,n,o),e.encodeAsync=async(n,o)=>nve(e,n,o),e.decodeAsync=async(n,o)=>ove(e,n,o),e.safeEncode=(n,o)=>sve(e,n,o),e.safeDecode=(n,o)=>ive(e,n,o),e.safeEncodeAsync=async(n,o)=>rve(e,n,o),e.safeDecodeAsync=async(n,o)=>lve(e,n,o),mh(e,"ZodType",{check(...n){const o=this.def;return this.clone(ja(o,{checks:[...o.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return Ua(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(eye(n,o))},superRefine(n,o){return this.check(tye(n,o))},overwrite(n){return this.check(Wd(n))},optional(){return k6(this)},exactOptional(){return Wve(this)},nullable(){return b6(this)},nullish(){return k6(b6(this))},nonoptional(n){return Kve(this,n)},array(){return zn(this)},or(n){return Lve([this,n])},and(n){return Rve(this,n)},transform(n){return w6(this,Bve(n))},default(n){return Uve(this,n)},prefault(n){return qve(this,n)},catch(n){return Zve(this,n)},pipe(n){return w6(this,n)},readonly(){return Xve(this)},describe(n){const o=this.clone();return qf.add(o,{description:n}),o},meta(...n){if(n.length===0)return qf.get(this);const o=this.clone();return qf.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return qf.get(e)?.description},configurable:!0}),e)),X$=mt("_ZodString",(e,t)=>{vx.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>b0e(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,mh(e,"_ZodString",{regex(...o){return this.check(o0e(...o))},includes(...o){return this.check(r0e(...o))},startsWith(...o){return this.check(l0e(...o))},endsWith(...o){return this.check(a0e(...o))},min(...o){return this.check(A1(...o))},max(...o){return this.check(q$(...o))},length(...o){return this.check(K$(...o))},nonempty(...o){return this.check(A1(1,...o))},lowercase(o){return this.check(s0e(o))},uppercase(o){return this.check(i0e(o))},trim(){return this.check(c0e())},normalize(...o){return this.check(u0e(...o))},toLowerCase(){return this.check(d0e())},toUpperCase(){return this.check(f0e())},slugify(){return this.check(p0e())}})}),ave=mt("ZodString",(e,t)=>{vx.init(e,t),X$.init(e,t),e.email=n=>e.check(M1e(uve,n)),e.url=n=>e.check(N1e(cve,n)),e.jwt=n=>e.check(K1e(Cve,n)),e.emoji=n=>e.check(L1e(dve,n)),e.guid=n=>e.check(d6(g6,n)),e.uuid=n=>e.check(E1e(Pm,n)),e.uuidv4=n=>e.check(T1e(Pm,n)),e.uuidv6=n=>e.check(I1e(Pm,n)),e.uuidv7=n=>e.check($1e(Pm,n)),e.nanoid=n=>e.check(F1e(fve,n)),e.guid=n=>e.check(d6(g6,n)),e.cuid=n=>e.check(O1e(pve,n)),e.cuid2=n=>e.check(R1e(hve,n)),e.ulid=n=>e.check(P1e(mve,n)),e.base64=n=>e.check(U1e(xve,n)),e.base64url=n=>e.check(V1e(_ve,n)),e.xid=n=>e.check(D1e(gve,n)),e.ksuid=n=>e.check(B1e(vve,n)),e.ipv4=n=>e.check(z1e(yve,n)),e.ipv6=n=>e.check(W1e(kve,n)),e.cidrv4=n=>e.check(H1e(bve,n)),e.cidrv6=n=>e.check(j1e(wve,n)),e.e164=n=>e.check(q1e(Sve,n)),e.datetime=n=>e.check(H0e(n)),e.date=n=>e.check(U0e(n)),e.time=n=>e.check(q0e(n)),e.duration=n=>e.check(G0e(n))});function _t(e){return A1e(ave,e)}const To=mt("ZodStringFormat",(e,t)=>{wo.init(e,t),X$.init(e,t)}),uve=mt("ZodEmail",(e,t)=>{Lge.init(e,t),To.init(e,t)}),g6=mt("ZodGUID",(e,t)=>{$ge.init(e,t),To.init(e,t)}),Pm=mt("ZodUUID",(e,t)=>{Nge.init(e,t),To.init(e,t)}),cve=mt("ZodURL",(e,t)=>{Fge.init(e,t),To.init(e,t)}),dve=mt("ZodEmoji",(e,t)=>{Oge.init(e,t),To.init(e,t)}),fve=mt("ZodNanoID",(e,t)=>{Rge.init(e,t),To.init(e,t)}),pve=mt("ZodCUID",(e,t)=>{Pge.init(e,t),To.init(e,t)}),hve=mt("ZodCUID2",(e,t)=>{Dge.init(e,t),To.init(e,t)}),mve=mt("ZodULID",(e,t)=>{Bge.init(e,t),To.init(e,t)}),gve=mt("ZodXID",(e,t)=>{zge.init(e,t),To.init(e,t)}),vve=mt("ZodKSUID",(e,t)=>{Wge.init(e,t),To.init(e,t)}),yve=mt("ZodIPv4",(e,t)=>{qge.init(e,t),To.init(e,t)}),kve=mt("ZodIPv6",(e,t)=>{Kge.init(e,t),To.init(e,t)}),bve=mt("ZodCIDRv4",(e,t)=>{Gge.init(e,t),To.init(e,t)}),wve=mt("ZodCIDRv6",(e,t)=>{Zge.init(e,t),To.init(e,t)}),xve=mt("ZodBase64",(e,t)=>{Yge.init(e,t),To.init(e,t)}),_ve=mt("ZodBase64URL",(e,t)=>{Xge.init(e,t),To.init(e,t)}),Sve=mt("ZodE164",(e,t)=>{Qge.init(e,t),To.init(e,t)}),Cve=mt("ZodJWT",(e,t)=>{t1e.init(e,t),To.init(e,t)}),Q$=mt("ZodNumber",(e,t)=>{W$.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>w0e(e,o,s),mh(e,"ZodNumber",{gt(o,s){return this.check(p6(o,s))},gte(o,s){return this.check(rk(o,s))},min(o,s){return this.check(rk(o,s))},lt(o,s){return this.check(f6(o,s))},lte(o,s){return this.check(ik(o,s))},max(o,s){return this.check(ik(o,s))},int(o){return this.check(v6(o))},safe(o){return this.check(v6(o))},positive(o){return this.check(p6(0,o))},nonnegative(o){return this.check(rk(0,o))},negative(o){return this.check(f6(0,o))},nonpositive(o){return this.check(ik(0,o))},multipleOf(o,s){return this.check(h6(o,s))},step(o,s){return this.check(h6(o,s))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ht(e){return X1e(Q$,e)}const Ave=mt("ZodNumberFormat",(e,t)=>{n1e.init(e,t),Q$.init(e,t)});function v6(e){return Q1e(Ave,e)}const Mve=mt("ZodBoolean",(e,t)=>{o1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>x0e(e,n,o)});function gh(e){return e0e(Mve,e)}const Eve=mt("ZodUnknown",(e,t)=>{s1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>S0e()});function ls(){return t0e(Eve)}const Tve=mt("ZodNever",(e,t)=>{i1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>_0e(e,n,o)});function Ive(e){return n0e(Tve,e)}const $ve=mt("ZodArray",(e,t)=>{r1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>T0e(e,n,o,s),e.element=t.element,mh(e,"ZodArray",{min(n,o){return this.check(A1(n,o))},nonempty(n){return this.check(A1(1,n))},max(n,o){return this.check(q$(n,o))},length(n,o){return this.check(K$(n,o))},unwrap(){return this.element}})});function zn(e,t){return h0e($ve,e,t)}const Nve=mt("ZodObject",(e,t)=>{a1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>I0e(e,n,o,s),oo(e,"shape",()=>t.shape),mh(e,"ZodObject",{keyof(){return bo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ls()})},loose(){return this.clone({...this._zod.def,catchall:ls()})},strict(){return this.clone({...this._zod.def,catchall:Ive()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Mme(this,n)},safeExtend(n){return Eme(this,n)},merge(n){return Tme(this,n)},pick(n){return Cme(this,n)},omit(n){return Ame(this,n)},partial(...n){return Ime(t7,this,n[0])},required(...n){return $me(n7,this,n[0])}})});function Ft(e,t){const n={type:"object",shape:e??{},...en(t)};return new Nve(n)}const e7=mt("ZodUnion",(e,t)=>{U$.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>$0e(e,n,o,s),e.options=t.options});function Lve(e,t){return new e7({type:"union",options:e,...en(t)})}const Fve=mt("ZodDiscriminatedUnion",(e,t)=>{e7.init(e,t),u1e.init(e,t)});function Va(e,t,n){return new Fve({type:"union",options:t,discriminator:e,...en(n)})}const Ove=mt("ZodIntersection",(e,t)=>{c1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>N0e(e,n,o,s)});function Rve(e,t){return new Ove({type:"intersection",left:e,right:t})}const y6=mt("ZodRecord",(e,t)=>{d1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>L0e(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function yx(e,t,n){return!t||!t._zod?new y6({type:"record",keyType:_t(),valueType:e,...en(t)}):new y6({type:"record",keyType:e,valueType:t,...en(n)})}const e2=mt("ZodEnum",(e,t)=>{f1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(o,s,i)=>C0e(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const r of o)if(n.has(r))i[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new e2({...t,checks:[],...en(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const r of o)if(n.has(r))delete i[r];else throw new Error(`Key ${r} not found in enum`);return new e2({...t,checks:[],...en(s),entries:i})}});function bo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new e2({type:"enum",entries:n,...en(t)})}const Pve=mt("ZodLiteral",(e,t)=>{p1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>A0e(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function bn(e,t){return new Pve({type:"literal",values:Array.isArray(e)?e:[e],...en(t)})}const Dve=mt("ZodTransform",(e,t)=>{h1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>E0e(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new A$(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Zp(i,n.value,t));else{const r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Zp(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function Bve(e){return new Dve({type:"transform",transform:e})}const t7=mt("ZodOptional",(e,t)=>{V$.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>J$(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function k6(e){return new t7({type:"optional",innerType:e})}const zve=mt("ZodExactOptional",(e,t)=>{m1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>J$(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Wve(e){return new zve({type:"optional",innerType:e})}const Hve=mt("ZodNullable",(e,t)=>{g1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>F0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function b6(e){return new Hve({type:"nullable",innerType:e})}const jve=mt("ZodDefault",(e,t)=>{v1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>R0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Uve(e,t){return new jve({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():T$(t)}})}const Vve=mt("ZodPrefault",(e,t)=>{y1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>P0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function qve(e,t){return new Vve({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():T$(t)}})}const n7=mt("ZodNonOptional",(e,t)=>{k1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>O0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Kve(e,t){return new n7({type:"nonoptional",innerType:e,...en(t)})}const Gve=mt("ZodCatch",(e,t)=>{b1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>D0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zve(e,t){return new Gve({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Yve=mt("ZodPipe",(e,t)=>{w1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>B0e(e,n,o,s),e.in=t.in,e.out=t.out});function w6(e,t){return new Yve({type:"pipe",in:e,out:t})}const Jve=mt("ZodReadonly",(e,t)=>{x1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>z0e(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Xve(e){return new Jve({type:"readonly",innerType:e})}const Qve=mt("ZodCustom",(e,t)=>{_1e.init(e,t),Eo.init(e,t),e._zod.processJSONSchema=(n,o,s)=>M0e(e,n)});function eye(e,t={}){return m0e(Qve,e,t)}function tye(e,t){return g0e(e,t)}const qu=_t().min(1),kx=_t().min(1),vh=_t().min(1),Ku=_t().min(1),Vi=_t().min(1),nye=/^[A-Za-z0-9._-]{1,128}$/;function oye(e){return nye.test(e)&&e!=="."&&e!==".."}const o7=Va("kind",[Ft({kind:bn("user"),payload:ls().optional()}),Ft({kind:bn("cron"),taskId:Ku.optional(),payload:ls().optional()}),Ft({kind:bn("task"),taskId:Ku,payload:ls().optional()}),Ft({kind:bn("hook"),payload:ls().optional()}),Ft({kind:bn("compaction"),payload:ls().optional()}),Ft({kind:bn("side"),payload:ls().optional()}),Ft({kind:bn("other"),payload:ls().optional()})]),sye=Ft({inputTokens:Ht().optional(),outputTokens:Ht().optional(),cachedTokens:Ht().optional(),cost:Ht().optional()}),kp=Ft({inputOther:Ht(),output:Ht(),inputCacheRead:Ht(),inputCacheCreation:Ht()}),iye=Ft({llmFirstTokenLatencyMs:Ht().optional(),llmStreamDurationMs:Ht().optional(),llmRequestBuildMs:Ht().optional(),llmServerFirstTokenMs:Ht().optional(),llmServerDecodeMs:Ht().optional(),llmClientConsumeMs:Ht().optional()}),rye=Ft({failedAttempt:Ht(),nextAttempt:Ht(),maxAttempts:Ht(),delayMs:Ht(),errorName:_t(),errorMessage:_t(),statusCode:Ht().optional()}),s7=bo(["queued","running","completed","failed","cancelled"]),lye=bo(["running","completed","interrupted","failed"]),aye=Ft({kind:bn("text"),frameId:vh,role:bo(["assistant","user"]),text:_t(),attachmentIds:zn(_t()).optional(),taskId:Ku.optional()}),uye=Ft({kind:bn("thinking"),frameId:vh,text:_t()}),cye=Ft({agentId:Vi,role:bo(["child","member"]).optional()}),dye=Ft({kind:bo(["stdout","stderr","progress","status","custom"]),text:_t().optional(),percent:Ht().optional(),customKind:_t().optional(),customData:ls().optional()}),fye=Ft({kind:bn("tool"),frameId:vh,toolCallId:_t(),name:_t(),view:_t().optional(),state:bo(["running","done","error"]),input:ls().optional(),output:ls().optional(),display:ls().optional(),error:_t().optional(),inputText:_t().optional(),progress:dye.optional(),taskId:Ku.optional(),approvalId:_t().optional(),todoId:_t().optional(),agentRefs:zn(cye).optional()}),bx=Ft({interactionId:_t(),interactionKind:bo(["approval","question"]),toolCallId:_t().optional(),state:bo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:ls().optional(),response:ls().optional()}),pye=Ft({kind:bn("notice"),frameId:vh,level:bo(["error","warning","info"]),source:_t().optional(),message:_t(),detail:ls().optional()}),i7=Va("kind",[aye,uye,fye,pye]),r7=Ft({kind:bn("step"),stepId:kx,turnId:qu,ordinal:Ht().int(),state:lye,frames:zn(i7),startedAt:_t().optional(),endedAt:_t().optional(),usage:kp.optional(),finishReason:_t().optional(),timing:iye.optional(),retry:rye.optional(),endReason:_t().optional(),endMessage:_t().optional()}),l7=Ft({kind:bn("turn"),turnId:qu,ordinal:Ht().int(),state:s7,origin:o7,prompt:_t().optional(),attachmentIds:zn(_t()).optional(),steps:zn(r7),startedAt:_t().optional(),endedAt:_t().optional(),usage:sye.optional(),durationMs:Ht().optional(),error:_t().optional()}),a7=Ft({kind:bn("marker"),markerId:_t(),marker:_t(),payload:ls().optional(),at:_t().optional()}),u7=Ft({kind:bn("taskref"),refId:_t(),taskId:Ku,at:_t().optional()}),c7=Va("kind",[l7,a7,u7]),wx=Ft({taskId:Ku,kind:bo(["shell","subagent","tool","other"]),state:bo(["running","completed","failed","timed_out","killed","lost"]),detached:gh(),description:_t().optional(),agentId:Vi.optional(),outputTail:_t(),startedAt:_t().optional(),endedAt:_t().optional(),resultSummary:_t().optional(),error:_t().optional(),stateReason:_t().optional(),usage:kp.optional()}),d7=Ft({objective:_t(),status:bo(["active","paused","blocked","complete"]),completionCriterion:_t().optional(),budgetUsed:Ht().optional(),budgetLimit:Ht().optional()}),hye=Ft({plan:Ft({reviewPath:_t().optional(),version:Ht().optional()}).optional(),dynamic_workflow:Ft({trigger:_t().optional()}).optional()}),mye=Ft({plan:Ft({reviewPath:_t().optional(),version:Ht().optional()}).nullable().optional(),dynamic_workflow:Ft({trigger:_t().optional()}).nullable().optional()}),gye=Va("kind",[Ft({kind:bn("idle")}),Ft({kind:bn("running"),turnId:Ht(),step:Ht(),stepId:_t(),since:Ht()}),Ft({kind:bn("streaming"),turnId:Ht(),step:Ht(),stepId:_t(),stream:bo(["assistant","thinking","tool_call"]),toolCallId:_t().optional(),toolName:_t().optional(),since:Ht()}),Ft({kind:bn("tool_call"),turnId:Ht(),step:Ht(),toolCallId:_t(),name:_t(),since:Ht()}),Ft({kind:bn("retrying"),turnId:Ht(),step:Ht(),stepId:_t(),failedAttempt:Ht(),nextAttempt:Ht(),maxAttempts:Ht(),delayMs:Ht(),errorName:_t().optional(),statusCode:Ht().optional(),since:Ht()}),Ft({kind:bn("awaiting_approval"),turnId:Ht(),step:Ht().optional(),approval:ls().optional(),since:Ht()}),Ft({kind:bn("interrupted"),turnId:Ht(),step:Ht().optional(),reason:bo(["aborted","max_steps","error"]),message:_t().optional(),at:Ht()}),Ft({kind:bn("ended"),turnId:Ht(),reason:bo(["completed","cancelled","failed","blocked"]),durationMs:Ht().optional(),at:Ht()})]),vye=Ft({byModel:yx(_t(),kp).optional(),currentTurn:kp.optional(),total:kp.optional()}),yye=Ft({model:_t().optional(),thinkingEffort:_t().optional(),usage:vye.optional(),contextTokens:Ht().optional(),maxContextTokens:Ht().optional(),contextUsage:Ht().optional(),permission:bo(["manual","yolo","auto"]).optional(),phase:gye.optional()}),xx=Ft({goal:d7.optional(),modes:hye.optional(),activity:bo(["idle","turn","disposing","unknown"]).optional(),agent:yye.optional()}),kye=xx.extend({goal:d7.nullable().optional(),modes:mye.optional()}),F0=Ft({attachmentId:_t(),mediaType:_t(),name:_t().optional(),size:Ht().optional(),source:Va("kind",[Ft({kind:bn("url"),url:_t()}),Ft({kind:bn("file"),fileId:_t()}),Ft({kind:bn("session_media"),fileId:_t()})]).optional(),placeholder:_t().optional()}),bye=Ft({title:_t(),status:bo(["pending","in_progress","done"])}),_x=Ft({todoId:_t(),items:zn(bye),updatedAt:_t().optional()}),Sx=Ft({promptId:_t(),status:bo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:_t().optional(),content:ls().optional(),createdAt:_t(),finishedAt:_t().optional(),steeredAt:_t().optional()}),f7=Ft({items:zn(c7),tasks:zn(wx),interactions:zn(bx).default([]),attachments:zn(F0).default([]),todos:zn(_x).default([]),prompts:zn(Sx).default([]),meta:xx,hasMoreOlder:gh().optional()}),wye=l7.omit({steps:!0}),xye=r7.omit({frames:!0}),_ye=Va("type",[Ft({type:bn("frame"),turnId:qu,stepId:kx,frameId:vh}),Ft({type:bn("task"),taskId:Ku})]),Cx=Va("op",[Ft({op:bn("reset"),agentId:Vi,snapshot:f7}),Ft({op:bn("turn.upsert"),turn:wye}),Ft({op:bn("step.upsert"),turnId:qu,step:xye}),Ft({op:bn("frame.upsert"),turnId:qu,stepId:kx,frame:i7}),Ft({op:bn("append"),target:_ye,offset:Ht().int().nonnegative(),text:_t()}),Ft({op:bn("marker.upsert"),item:a7,beforeTurn:Ht().int().optional()}),Ft({op:bn("taskref.upsert"),item:u7,beforeTurn:Ht().int().optional()}),Ft({op:bn("task.upsert"),task:wx}),Ft({op:bn("interaction.upsert"),interaction:bx}),Ft({op:bn("attachment.upsert"),attachment:F0}),Ft({op:bn("todo.upsert"),todo:_x}),Ft({op:bn("prompt.upsert"),prompt:Sx}),Ft({op:bn("meta.merge"),meta:kye}),Ft({op:bn("items.remove"),ids:zn(_t())})]);Ft({agentId:Vi,ops:zn(Cx)});const Sye=bo(["off","turn","block","delta"]),Ed=Ht().int().nonnegative(),Cye=yx(_t(),Sye);Ft({session_id:_t().min(1),transcript:Cye,transcript_since:yx(_t(),Ed).optional()});Ft({agent_id:Vi,before_turn:_t().min(1).optional(),after_turn:_t().min(1).optional(),page_size:Ht().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),oye(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const Aye=Ft({agentId:Vi,type:bo(["main","sub","independent"]).optional(),parentAgentId:Vi.optional(),label:_t().optional(),createdAt:_t().optional(),disposedAt:_t().optional()}),Mye=Ft({agent_id:Vi,items:zn(c7),has_more:gh(),tasks:zn(wx),interactions:zn(bx).default([]),attachments:zn(F0).default([]),todos:zn(_x).default([]),prompts:zn(Sx).default([]),meta:xx,agents:zn(Aye),pending_interactions:zn(_t()),seq:Ed.optional()});Ft({agent_id:Vi,batches:zn(Ft({seq:Ed,ops:zn(Cx)})),latest_seq:Ed,complete:gh()});const Eye=Ft({turn_id:qu,ordinal:Ht().int(),state:s7,origin:o7,prompt:_t(),attachment_ids:zn(_t()).optional(),started_at:_t().optional()});Ft({agents:zn(Ft({agent_id:Vi,messages:zn(Eye),attachments:zn(F0).default([])}))});const Tye=Ft({state:bo(["pending","approved","rejected","cancelled"]),selected_option:_t().optional(),feedback:_t().optional()}),Iye=Ft({tool_call_id:_t(),turn_id:qu,source:bo(["interaction","display","output"]),plan:_t(),path:_t().optional(),options:zn(Ft({label:_t(),description:_t().optional()})).optional(),review:Tye.optional()});Ft({agent_id:Vi,plans:zn(Iye)});const $ye=Ft({agent_id:Vi,snapshot:f7,has_more_older:gh(),seq:Ed.optional()}),Nye=Ft({agent_id:Vi,ops:zn(Cx),seq:Ed.optional()}),p7=$ye.extend({type:bn("transcript.reset")}),h7=Nye.extend({type:bn("transcript.ops")});Va("type",[p7,h7]);const Lye=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],m7=500,E1=256*1024,x6=200,lk=16384,ak=500,uk=50,ck=50,Fye=6,Oye=/api[_-]?key|authorization|token|secret|password|cookie|credential/i,Rye=/^[A-Za-z0-9+/=_-]{200,}$/;let dk=null;function Nr(){if(dk!==null)return dk;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=zo(rn.debug)==="1"),dk=e,e}const Ma=[],Xc=[];let Kf=0;const xu=[];let Gf=0,Pye=1;const T1=new TextEncoder,Dye=new Set(Lye),Ax=V(0),Zf=Co(!1);function Bye(){return Ma}function zye(){Ma.length=0,Xc.length=0,Kf=0,xu.length=0,Gf=0,Ax.value++}function Ul(e){if(!Zf.value){try{const t={id:Pye++,ts:Date.now(),source:e.source,kind:String(gd(e.kind)),label:String(gd(e.label)),sessionId:e.sessionId===void 0?void 0:String(gd(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:qa(e.detail)},n=JSON.stringify(t),o=T1.encode(n).byteLength;if(o>E1)return;for(Ma.push(t),Xc.push(n),Kf+=o+(Xc.length>1?1:0);Ma.length>m7||Kf>E1;){const s=Xc.shift();Ma.shift(),s!==void 0&&(Kf-=T1.encode(s).byteLength,Xc.length>0&&(Kf-=1))}}catch{return}Ax.value++}}function pu(e){if(typeof e=="string")return e.length<=x6?e:e.slice(0,x6)}function Yi(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Wye(e,t){if(Dye.has(e))try{const n={ts:Date.now(),event:e,sessionId:pu(t?.sessionId),status:pu(t?.status),operation:pu(t?.operation),seq:Yi(t?.seq),durationMs:Yi(t?.durationMs),messageCount:Yi(t?.messageCount),contentCount:Yi(t?.contentCount),mediaCount:Yi(t?.mediaCount),sessionCount:Yi(t?.sessionCount),workspaceCount:Yi(t?.workspaceCount),promptId:pu(t?.promptId),zipBytes:Yi(t?.zipBytes),errorName:pu(t?.errorName),errorCode:Yi(t?.errorCode),requestId:pu(t?.requestId),phase:pu(t?.phase),httpStatus:Yi(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Yi(t?.line),col:Yi(t?.col)},o=JSON.stringify(n),s=T1.encode(o).byteLength;if(s>E1)return;for(xu.push(o),Gf+=s+(xu.length>1?1:0);xu.length>m7||Gf>E1;){const i=xu.shift();i!==void 0&&(Gf-=T1.encode(i).byteLength,xu.length>0&&(Gf-=1))}}catch{return}}function gd(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return Rye.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>ak?`${i.slice(0,ak)}… [+${i.length-ak} chars]`:i}if(n!=="object")return String(e);if(t>=Fye)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,uk).map(r=>gd(r,t+1));return e.length>uk&&i.push(`[+${e.length-uk} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,ck))o[i]=Oye.test(i)?"[redacted]":gd(r,t+1);return s.length>ck&&(o._truncatedKeys=s.length-ck),o}function qa(e){if(e===void 0)return;const t=gd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>lk)return{_truncated:`detail JSON was ${n.length} chars; first ${lk} kept`,preview:n.slice(0,lk)}}catch{return"[unserializable detail]"}return t}function Dm(e){Nr()&&Ul({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:qa(e.body)}})}function Ec(e){if(!Nr())return;const t=e.code!==0;Ul({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:qa(e.data)}})}function sa(e){Nr()&&Ul({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Tc(e,t){Nr()&&Ul({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:qa(t)})}function Hye(e){if(!Nr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;Ul({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:qa(e)})}function jye(e){if(!Nr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,r=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Ul({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:qa(t.payload)})}const Uye={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Vye(e,t,n){Nr()&&Ul({source:"client",kind:`client:${e}`,label:`${Uye[e]} ${t}`,detail:qa(n)})}function wl(e,t){Nr()&&Ul({source:"client",kind:"client:event",label:`· ${e}`,detail:qa(t)})}function Go(e,t){Wye(e,t),Ul({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let fk=!1,Bm=null;function qye(){if(fk)return()=>Bm?.();fk=!0;const e=[];try{if(typeof window<"u"){const n=s=>{Go("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno})},o=s=>{const i=s.reason;Go("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i})};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(Nr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Vye(n,i.map(Kye).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(Bm===t){for(const n of e.toReversed())n();Bm=null,fk=!1}};return Bm=t,t}function Kye(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function g7(e=Ma){if(typeof document>"u")return;const t=new Blob([Gye(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`pythinker-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Gye(e=Ma){return e===Ma?Xc.join(` -`):e.map(t=>JSON.stringify(t)).join(` -`)}function Zye(){return xu.join(` -`)}function v7(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function t2(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function vr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:v7(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function bp(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function _6(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url,id:e.id}}function Mx(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:_6(e.source)};case"video":return{type:"video",source:_6(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function n2(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(Mx),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function Yye(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url,id:t.id},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function Jye(e){return{content:e.content.map(Yye),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,dynamic_workflow_mode:e.dynamicWorkflowMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function Xye(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function y7(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function Qye(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function eke(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(Qye),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function k7(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(eke),createdAt:e.created_at}}function tke(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function nke(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=tke(o);return{answers:t,method:e.method,note:e.note}}function yg(e){return{id:e.id,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,agentId:e.agent_id,model:e.model,thinkingEffort:e.thinking_effort,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,dynamicWorkflowIndex:e.dynamic_workflow_index,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function S6(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function ia(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Ic(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Ji(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function b7(e){if(!e||typeof e!="object")return null;const t=e,n=ia(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:ia(t,"goalId")??ia(t,"goal_id")??"goal",objective:ia(t,"objective")??"",completionCriterion:ia(t,"completionCriterion")??ia(t,"completion_criterion"),status:n,turnsUsed:Ic(t,"turnsUsed")??Ic(t,"turns_used")??0,tokensUsed:Ic(t,"tokensUsed")??Ic(t,"tokens_used")??0,wallClockMs:Ic(t,"wallClockMs")??Ic(t,"wall_clock_ms")??0,terminalReason:ia(t,"terminalReason")??ia(t,"terminal_reason"),budget:{tokenBudget:Ji(s,"tokenBudget")??Ji(s,"token_budget"),remainingTokens:Ji(s,"remainingTokens")??Ji(s,"remaining_tokens"),turnBudget:Ji(s,"turnBudget")??Ji(s,"turn_budget"),remainingTurns:Ji(s,"remainingTurns")??Ji(s,"remaining_turns"),wallClockBudgetMs:Ji(s,"wallClockBudgetMs")??Ji(s,"wall_clock_budget_ms"),remainingWallClockMs:Ji(s,"remainingWallClockMs")??Ji(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function oke(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:vr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:vr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:bp(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:bp(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:v7(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=b7(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:n2(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(Mx),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:y7(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:k7(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:yg(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:o2(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function ske(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort,adaptiveThinking:e.adaptive_thinking}}function pk(e){return{loginId:e.login_id,state:e.state,defaultModel:e.default_model,message:e.message}}function Mf(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function w7(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function ike(e){return{provider:w7(e.provider),modelsImported:e.models_imported}}function o2(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultThinking:e.default_thinking,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,disabledSkills:e.disabled_skills,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry,raw:e.raw}}function rke(e){return e.session_id}function lke(e){return e.seq}const ake="main",uke=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function vl(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function cke(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}const s2=new Map;function dke(e){return s2.get(e)}function C6(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0}}function Js(e,t){const n=e[t];return typeof n=="string"?n:void 0}function gu(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Xi(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function fke(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,o=n&&typeof n=="object"?n:{},s=Js(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const i=Js(t,"goalId")??Js(t,"goal_id")??"goal",r=Js(t,"objective")??"";return{goalId:i,objective:r,completionCriterion:Js(t,"completionCriterion")??Js(t,"completion_criterion"),status:s,turnsUsed:gu(t,"turnsUsed")??gu(t,"turns_used")??0,tokensUsed:gu(t,"tokensUsed")??gu(t,"tokens_used")??0,wallClockMs:gu(t,"wallClockMs")??gu(t,"wall_clock_ms")??0,terminalReason:Js(t,"terminalReason")??Js(t,"terminal_reason"),budget:{tokenBudget:Xi(o,"tokenBudget")??Xi(o,"token_budget"),remainingTokens:Xi(o,"remainingTokens")??Xi(o,"remaining_tokens"),turnBudget:Xi(o,"turnBudget")??Xi(o,"turn_budget"),remainingTurns:Xi(o,"remainingTurns")??Xi(o,"remaining_turns"),wallClockBudgetMs:Xi(o,"wallClockBudgetMs")??Xi(o,"wall_clock_budget_ms"),remainingWallClockMs:Xi(o,"remainingWallClockMs")??Xi(o,"remaining_wall_clock_ms"),overBudget:o.overBudget===!0||o.over_budget===!0}}}function _u(e,t,n,o){if(typeof n!="string"||n.length===0)return null;const s=e.subagentMeta.get(n)??{id:n,sessionId:t,kind:"subagent",description:"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},r=(s.status==="completed"||s.status==="failed"||s.status==="cancelled")&&o.status==="running"?{...o,status:s.status,subagentPhase:s.subagentPhase,startedAt:s.startedAt,completedAt:s.completedAt,outputPreview:s.outputPreview,outputBytes:s.outputBytes,suspendedReason:s.suspendedReason}:o,l={...s,...r,id:n,agentId:n,sessionId:t,kind:"subagent"};return e.subagentMeta.set(n,l),l}function pke(e,t){if(e==="turn.step.started")return null;if(e==="tool.use"||e==="tool.call.started"){const n=Js(t,"name")??Js(t,"toolName")??"tool",o=Is(hke(n)),s=mke(n,t.args??t.input);return s?`Calling ${o}: ${s}`:`Calling ${o}`}if(e==="tool.progress"){const n=t.update;if(n&&typeof n=="object"){const s=Js(n,"text");if(s)return hk(s);const i=Js(n,"message");if(i)return hk(i)}const o=Js(t,"message");if(o)return hk(o)}return null}function hke(e){return e.replace(/_\d+$/,"")}const A6=2e3;function hk(e){return e.length>A6?`${e.slice(0,A6)}…`:e}function mke(e,t){if(t==null)return"";const n=typeof t=="string"?t:JSON.stringify(t);return Rl(e,n)}function gke(e,t,n,o,s,i){if(i.has(n)&&o==="turn.step.started")return[];if(o==="assistant.delta"){const c=Js(s,"delta");if(!c)return[];const d=e.subagentMeta.get(n),f=_u(e,t,n,{status:"running",subagentPhase:"working",startedAt:d?.startedAt??new Date().toISOString()}),p=[];return f&&p.push({type:"taskCreated",sessionId:t,task:f}),p.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:c,stream:"stdout",kind:"text"}),p}const r=pke(o,s);if(r===null||r.length===0)return[];const l=e.subagentMeta.get(n),a=_u(e,t,n,{status:"running",subagentPhase:"working",startedAt:l?.startedAt??new Date().toISOString()}),u=[];return a&&u.push({type:"taskCreated",sessionId:t,task:a}),u.push({type:"taskProgress",sessionId:t,taskId:n,outputChunk:r,stream:"stdout"}),u}function Ef(e){return{...e,content:e.content.map(t=>({...t}))}}function M6(e,t,n){const o={id:vl("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(o),o}function vke(e,t,n,o,s,i){const r={id:o,sessionId:t,role:"user",content:s,createdAt:i,promptId:n};return e.messages.push(r),r}function yke(e){return Array.isArray(e)?e.map(t=>Mx(t)):[]}function E6(e,t,n,o){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const i=s.content.at(-1);return i&&i.type===n?(n==="text"?i.text+=o:i.thinking+=o,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:o}:{type:"thinking",thinking:o}),s.content.length-1)}function kke(e,t,n,o,s,i){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:o,input:s,outputLines:i})}function bke(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",i=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return i.length>0?{outputChunk:i,stream:s}:null}function T6(e,t){e.messages.find(n=>n.id===t)}function wke(e,t,n,o,s,i){const r={id:vl("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:o,isError:s}],createdAt:new Date().toISOString(),promptId:i};return e.messages.push(r),r}function Tf(e,t){return e.messages.find(n=>n.id===t)}function I6(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function xke(){const e=new Map,t=new Set;function n(c){let d=e.get(c);return d||(d=C6(),e.set(c,d)),d}function o(c){e.set(c,C6())}function s(c){t.add(c)}function i(c,d){const f=n(c);f.currentPromptId=d}function r(c,d){o(c);const f=n(c),p=d.promptId??vl("pr_");f.currentPromptId=p,f.turnPromptId.set(d.turnId,p);const h=M6(f,c,p);d.thinkingText.length>0&&h.content.push({type:"thinking",thinking:d.thinkingText}),d.assistantText.length>0&&h.content.push({type:"text",text:d.assistantText});for(const m of d.runningTools){const k=typeof m.lastProgress?.text=="string"&&m.lastProgress.text.length>0?[m.lastProgress.text]:void 0;h.content.push({type:"toolUse",toolCallId:m.toolCallId,toolName:m.name,input:m.args??{},outputLines:k}),f.toolStartTimes.set(m.toolCallId,Date.now())}return f.currentAssistantMsgId=h.id,f.turnTextLen=d.assistantText.length,f.turnThinkLen=d.thinkingText.length,[{type:"messageCreated",message:Ef(h)}]}function l(c,d,f,p){try{return u(c,d,f,p)}catch(h){return console.error("[agentProjector] Error projecting event:",c,h instanceof Error?h.message:h),[]}}function a(c,d){return d===void 0?"append":dc?"gap":"append"}function u(c,d,f,p){const h=n(f),m=d,k=[],w=m?.agentId;if(typeof w=="string"&&w!==ake){const v=t.has(w);if(v&&(c==="thinking.delta"||c==="assistant.delta")){const y=m?.delta??"";return y?[{type:"agentDelta",sessionId:f,agentId:w,delta:{[c==="thinking.delta"?"thinking":"text"]:y}}]:[]}if(v&&c==="turn.ended")return[{type:"agentTurnEnded",sessionId:f,agentId:w,reason:m?.reason}];if(uke.has(c))return gke(h,f,w,c,m??{},t)}switch(c){case"session.meta.updated":{const v=m?.patch?.title??m?.title,y=m?.patch?.lastPrompt,b={};typeof v=="string"&&v.length>0&&(b.title=v),typeof y=="string"&&(b.lastPrompt=y),(b.title!==void 0||b.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:f,...b});break}case"prompt.submitted":{const v=m?.promptId,y=m?.userMessageId;if(!v||!y)break;const b=yke(m?.content);if(b.length===0)break;h.currentPromptId=v;const S=vke(h,f,v,y,b,typeof m?.createdAt=="string"?m.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:Ef(S)});break}case"turn.started":{const v=m?.turnId,y=h.currentPromptId??vl("pr_");h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y),h.turnTextLen=0,h.turnThinkLen=0,s2.delete(f),k.push({type:"turnActiveChanged",sessionId:f,active:!0});break}case"turn.step.started":{const v=m?.turnId;let y=h.turnPromptId.get(v)??h.currentPromptId;if(y||(y=vl("pr_"),h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y)),h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId!==void 0){const S=h.retryReuseMsgId;if(h.retryReuseMsgId=void 0,Tf(h,S)!==void 0){h.currentAssistantMsgId=S;break}}const b=M6(h,f,y);h.currentAssistantMsgId=b.id,k.push({type:"messageCreated",message:Ef(b)});break}case"thinking.delta":{const v=h.currentAssistantMsgId;if(!v)break;const y=m?.delta??"";if(!y)break;p?.offset===0&&h.turnThinkLen>0&&(h.turnThinkLen=0);const b=a(h.turnThinkLen,p?.offset);if(b==="skip")break;if(b==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const S=E6(h,v,"thinking",y);if(S<0)break;h.turnThinkLen+=y.length,k.push({type:"assistantDelta",sessionId:f,messageId:v,contentIndex:S,delta:{thinking:y}});break}case"assistant.delta":{const v=h.currentAssistantMsgId;if(!v)break;const y=m?.delta??"";if(!y)break;p?.offset===0&&h.turnTextLen>0&&(h.turnTextLen=0);const b=a(h.turnTextLen,p?.offset);if(b==="skip")break;if(b==="gap"){k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"delta_gap"});break}const S=E6(h,v,"text",y);if(S<0)break;h.turnTextLen+=y.length,k.push({type:"assistantDelta",sessionId:f,messageId:v,contentIndex:S,delta:{text:y}});break}case"tool.use":case"tool.call.started":{const v=h.currentAssistantMsgId,y=m?.turnId,b=h.turnPromptId.get(y)??h.currentPromptId;if(!v||!b)break;const S=m?.toolCallId,I=m?.name??m?.toolName??"",T=m?.args??m?.input??{};kke(h,v,S,I,T);const $=Tf(h,v);$&&$.content.length-1,h.toolStartTimes.set(S,Date.now()),$&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:$.content.map(F=>({...F})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=m?.toolCallId,y=bke(m??{});v&&y&&k.push({type:"toolOutput",sessionId:f,toolCallId:v,outputChunk:y.outputChunk,stream:y.stream});break}case"tool.result":{const v=m?.turnId;let y=h.turnPromptId.get(v)??h.currentPromptId;y||(y=vl("pr_"),h.currentPromptId=y,v!==void 0&&h.turnPromptId.set(v,y));const b=m?.toolCallId,S=m?.output,I=m?.isError??!1;h.toolStartTimes.get(b)??Date.now(),h.toolStartTimes.delete(b);const T=wke(h,f,b,S,I,y);k.push({type:"messageCreated",message:Ef(T)}),h.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=h.currentAssistantMsgId,y=cke(m?.usage);if(h.totalInput+=y.input,h.totalOutput+=y.output,h.totalCacheRead+=y.cacheRead,h.totalCacheCreate+=y.cacheCreate,v){T6(h,v);const b=Tf(h,v);b&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:b.content.map(S=>({...S})),status:"completed"})}break}case"agent.status.updated":{m?.model&&(h.model=m.model),m?.contextTokens!==void 0&&(h.contextTokens=m.contextTokens),m?.maxContextTokens!==void 0&&(h.contextLimit=m.maxContextTokens),k.push({type:"sessionUsageUpdated",sessionId:f,usage:I6(h),model:h.model||void 0,dynamicWorkflowMode:m?.dynamicWorkflowMode===!0?!0:m?.dynamicWorkflowMode===!1?!1:void 0,planMode:m?.planMode===!0?!0:m?.planMode===!1?!1:void 0,thinking:typeof m?.thinkingEffort=="string"&&m.thinkingEffort.length>0?m.thinkingEffort:void 0});break}case"turn.ended":{const v=h.currentAssistantMsgId,y=m?.reason??"completed",b=gu(m??{},"durationMs");if(k.push({type:"turnActiveChanged",sessionId:f,active:!1,reason:m?.reason}),v){T6(h,v);const I=Tf(h,v);I&&k.push({type:"messageUpdated",sessionId:f,messageId:v,content:I.content.map(T=>({...T})),status:y==="failed"||y==="blocked"?"error":"completed",durationMs:b})}h.turnCount++;const S=I6(h);k.push({type:"sessionUsageUpdated",sessionId:f,usage:S}),h.currentAssistantMsgId=void 0,h.currentPromptId=void 0,h.turnTextLen=0,h.turnThinkLen=0,h.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=m?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptCompleted",sessionId:f,promptId:v,reason:m?.reason??"completed"});break}case"prompt.aborted":{const v=m?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptAborted",sessionId:f,promptId:v});break}case"turn.step.retrying":{const v=h.currentAssistantMsgId;if(v!==void 0){const y=Tf(h,v);y!==void 0&&(y.content=y.content.filter(b=>b.type!=="text"&&b.type!=="thinking"&&b.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:f,messageId:v,content:y.content.map(b=>({...b})),status:"pending"}),h.retryReuseMsgId=v)}h.turnTextLen=0,h.turnThinkLen=0,h.toolStartTimes.clear();break}case"turn.step.interrupted":{h.currentAssistantMsgId=void 0,h.retryReuseMsgId=void 0;const v=typeof m?.reason=="string"&&m.reason.length>0?m.reason:"error",y=typeof m?.message=="string"&&m.message.length>0?m.message:void 0;s2.set(f,{reason:v,message:y,turnId:typeof m?.turnId=="number"?m.turnId:void 0,at:Date.now()});break}case"subagent.spawned":{const v=typeof m?.subagentId=="string"&&m.subagentId.length>0?m.subagentId:vl("task_"),y={id:v,agentId:v,sessionId:f,kind:"subagent",description:typeof m?.description=="string"?m.description:m?.subagentName??"Sub Agent",status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof m?.subagentName=="string"?m.subagentName:void 0,model:typeof m?.model=="string"?m.model:void 0,thinkingEffort:typeof m?.thinkingEffort=="string"?m.thinkingEffort:void 0,parentToolCallId:typeof m?.parentToolCallId=="string"?m.parentToolCallId:void 0,dynamicWorkflowIndex:typeof m?.dynamicWorkflowIndex=="number"?m.dynamicWorkflowIndex:void 0,runInBackground:m?.runInBackground===!0};h.subagentMeta.set(y.id,y),k.push({type:"taskCreated",sessionId:f,task:y});break}case"subagent.started":{const v=_u(h,f,m?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});v&&k.push({type:"taskCreated",sessionId:f,task:v});break}case"subagent.suspended":{const v=_u(h,f,m?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof m?.reason=="string"?m.reason:void 0});v&&k.push({type:"taskCreated",sessionId:f,task:v});break}case"subagent.completed":{const v=typeof m?.resultSummary=="string"?m.resultSummary:void 0,y=_u(h,f,m?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),outputPreview:v});y&&k.push({type:"taskCreated",sessionId:f,task:y}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof m?.error=="string"?m.error:void 0,y=_u(h,f,m?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),outputPreview:v});y&&k.push({type:"taskCreated",sessionId:f,task:y}),k.push({type:"taskCompleted",sessionId:f,taskId:m?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:m?.code,message:m?.message,name:m?.name,details:m?.details,retryable:m?.retryable}});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:m?.message}});break}case"task.started":{const v=m?.info??{},y=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,b=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):vl("task_"),S=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:fo.global.t("tasks.defaultDescription");if(v.kind==="agent"){const T=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(T!==void 0){const $=_u(h,f,T,{description:S,backgroundTaskId:b,model:typeof v.model=="string"?v.model:void 0,thinkingEffort:typeof v.thinkingEffort=="string"?v.thinkingEffort:void 0,runInBackground:!0});$&&k.push({type:"taskCreated",sessionId:f,task:$})}else k.push({type:"taskCreated",sessionId:f,task:{id:b,sessionId:f,kind:"subagent",description:S,status:"running",createdAt:y??new Date().toISOString(),startedAt:y,subagentPhase:"queued",runInBackground:!0}});break}const I=typeof v.command=="string"?v.command:void 0;k.push({type:"taskCreated",sessionId:f,task:{id:b,sessionId:f,kind:"bash",description:S,command:I,status:"running",createdAt:y??new Date().toISOString(),startedAt:y,outputPreview:I!==void 0?`$ ${I}`:void 0}});break}case"task.terminated":{const v=m?.info??{},y=v.status==="failed"||typeof v.exitCode=="number"&&v.exitCode!==0;k.push({type:"taskCompleted",sessionId:f,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:y?"failed":"completed"});break}case"compaction.completed":{const v=m?.result??{};k.push({type:"compactionCompleted",sessionId:f,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),k.push({type:"historyCompacted",sessionId:f,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:f,trigger:m?.trigger==="manual"?"manual":"auto",instruction:typeof m?.instruction=="string"?m.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:f});break}case"goal.updated":{const v=fke(m?.snapshot??null);k.push({type:"goalUpdated",sessionId:f,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=m?.origin,y=Js(m??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&y){const b={id:vl("cron_"),sessionId:f,role:"user",content:[{type:"text",text:y}],createdAt:new Date().toISOString(),metadata:{origin:v}};h.messages.push(b),k.push({type:"messageCreated",message:Ef(b)})}break}}return k}return{project:l,bindNextPromptId:i,seedInFlight:r,reset:o,markSideChannelAgent:s}}const _ke=new Set(["server_hello","ack","ping","resync_required","error","pong"]),$6=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","background.task.started","background.task.terminated","cron.fired"]),Ske=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),Cke=new Set(["assistant.delta","thinking.delta"]);function Ake(e,t){if(_ke.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return Cke.has(o)?Mke(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?Ske.has(o)?{route:"protocol"}:$6.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:$6.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function Mke(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}class Yf extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class hl extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}function nr(e){return e instanceof Yf||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function Ex(e){return e instanceof hl||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}const _s="pythinker-web.server-credential",Eke="token",Tke=10080*60*1e3;let Jr;const i2=new Set;function Ike(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(Eke);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function r2(e){return{version:1,credential:e,expiresAt:Date.now()+Tke}}function $ke(e){return JSON.stringify(e)}function Tx(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function l2(e){globalThis.localStorage?.setItem(_s,$ke(e))}function Nke(){try{const e=globalThis.localStorage?.getItem(_s);if(e){const n=Tx(e);if(n===void 0){const o=r2(e);let s=!1;try{l2(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(_s)===e&&globalThis.localStorage?.removeItem(_s),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(_s)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(_s),globalThis.localStorage?.getItem(_s)===e&&globalThis.localStorage?.removeItem(_s);return}const t=globalThis.sessionStorage?.getItem(_s);if(t){const n=r2(t);let o=!1;try{l2(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(_s),o=!0}catch{}return o?n:void 0}return}catch{return}}function Lke(){const e=Ike();return e?(_7(e),!0):(Jr=Nke(),Jr!==void 0)}function x7(){if(Jr!==void 0){if(Jr.expiresAt<=Date.now()){Fke(Jr);return}return Jr.credential}}function Fke(e){Jr=void 0;try{globalThis.sessionStorage?.removeItem(_s);const t=globalThis.localStorage?.getItem(_s),n=t==null?void 0:Tx(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(_s)}catch{}}function _7(e){const t=r2(e);Jr=t;try{l2(t)}catch{}try{globalThis.sessionStorage?.removeItem(_s)}catch{}}function Oke(){const e=Jr;Jr=void 0;try{const t=globalThis.localStorage?.getItem(_s),o=(t==null?void 0:Tx(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(_s),globalThis.sessionStorage?.removeItem(_s)}catch{}}function Rke(e){return i2.add(e),()=>{i2.delete(e)}}function Pke(){Oke();for(const e of i2)try{e()}catch{}}const Bc=3e4,zm=5*6e4,S7="0123456789ABCDEFGHJKMNPQRSTVWXYZ",N6=500,C7=40101;function Wm(e=Bc){try{return AbortSignal.timeout(e)}catch{return}}function Dke(e,t){let n="",o=e;for(let s=0;sS7[n%32]).join("")}function Hm(){return`${Dke(Date.now(),10)}${Bke(16)}`}function zke(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function mk(e){try{const t=await e.text();return t?t.length>N6?`${t.slice(0,N6)}...`:t:void 0}catch{return}}class A7{constructor(t,n){this.origin=t,this.identity=n}async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t){const n=Zc(this.origin,t),o=Hm(),s={"X-Request-Id":o};this.addClientHeaders(s);const i=Date.now();Dm({method:"GET",path:t,url:n,requestId:o});let r;try{r=await fetch(n,{method:"GET",headers:s,signal:Wm()})}catch(a){throw sa({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-i,error:a}),new hl({message:`Network error calling GET ${t}`,cause:a,method:"GET",path:t,url:n,requestId:o,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-i})}if(r.ok)return Ec({method:"GET",path:t,requestId:o,status:r.status,durationMs:Date.now()-i,code:0,msg:""}),r.blob();let l;try{l=await r.clone().json()}catch{}throw this.checkAuthRequired(r,l?.code??0),Ec({method:"GET",path:t,requestId:o,status:r.status,durationMs:Date.now()-i,code:l?.code??r.status,msg:l?.msg??r.statusText,envelopeRequestId:l?.request_id}),new Yf({code:l?.code??r.status,msg:l?.msg??r.statusText,requestId:l?.request_id??o,details:l?.details,timestamp:Date.now(),durationMs:Date.now()-i})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async postZip(t,n,o){const s="POST",i=Zc(this.origin,t),r=Hm(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();Dm({method:s,path:t,url:i,requestId:r,body:o});let u;try{u=await fetch(i,{method:s,headers:l,body:JSON.stringify(n),signal:Wm(zm)})}catch(p){throw sa({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:p}),new hl({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:r,phase:"fetch",timeoutMs:zm,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let p;try{p=await u.clone().json()}catch{}if(this.checkAuthRequired(u,p?.code??0),!u.ok||p!==void 0&&p.code!==0){const k=p?.code??u.status,w=p?.msg??u.statusText;throw Ec({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:k,msg:w,envelopeRequestId:p?.request_id}),new Yf({code:k,msg:w,requestId:p?.request_id??r,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const h=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw sa({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new hl({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:zm,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await mk(h),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(p){throw sa({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:p}),new hl({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:zm,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return Ec({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=Zc(this.origin,t),s=Hm(),i={"X-Request-Id":s};this.addClientHeaders(i);const r=Date.now();Dm({method:"POST",path:t,url:o,requestId:s,body:zke(n)});let l;try{l=await fetch(o,{method:"POST",headers:i,body:n,signal:Wm()})}catch(c){throw sa({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new hl({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw sa({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new hl({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:Bc,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await mk(u),timestamp:Date.now(),durationMs:Date.now()-r})}if(Ec({method:"POST",path:t,requestId:s,status:l.status,durationMs:Date.now()-r,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(l,a.code),a.code!==0)throw new Yf({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-r});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[]){let r=Zc(this.origin,n);if(s){const p=new URLSearchParams;for(const[m,k]of Object.entries(s))k!==void 0&&p.set(m,String(k));const h=p.toString();h&&(r=`${r}?${h}`)}const l=Hm(),a={"X-Request-Id":l};this.addClientHeaders(a),o!==void 0&&(a["Content-Type"]="application/json; charset=utf-8");const u=Date.now();Dm({method:t,path:n,url:r,requestId:l,body:o});let c;try{c=await fetch(r,{method:t,headers:a,body:o!==void 0?JSON.stringify(o):void 0,signal:Wm()})}catch(p){throw sa({method:t,path:n,requestId:l,phase:"fetch",durationMs:Date.now()-u,error:p}),new hl({message:`Network error calling ${t} ${n}`,cause:p,method:t,path:n,url:r,requestId:l,phase:"fetch",timeoutMs:Bc,timestamp:Date.now(),durationMs:Date.now()-u})}let d;const f=c.clone();try{d=await c.json()}catch(p){throw sa({method:t,path:n,requestId:l,phase:"parse",durationMs:Date.now()-u,status:c.status,error:p}),new hl({message:`Failed to parse JSON response from ${t} ${n}`,cause:p,method:t,path:n,url:r,requestId:l,phase:"parse",timeoutMs:Bc,status:c.status,statusText:c.statusText,contentType:c.headers.get("content-type")??void 0,bodyPreview:await mk(f),timestamp:Date.now(),durationMs:Date.now()-u})}if(Ec({method:t,path:n,requestId:l,status:c.status,durationMs:Date.now()-u,code:d.code,msg:d.msg,envelopeRequestId:d.request_id,data:d.data}),this.checkAuthRequired(c,d.code),d.code!==0&&!i.includes(d.code))throw new Yf({code:d.code,msg:d.msg,requestId:d.request_id,details:d.details,timestamp:Date.now(),durationMs:Date.now()-u});return d.data}addClientHeaders(t){const n=x7();n!==void 0&&(t.Authorization=`Bearer ${n}`),this.identity!==void 0&&(t["X-Pythinker-Client-Id"]=this.identity.clientId,t["X-Pythinker-Client-Name"]=this.identity.clientName,t["X-Pythinker-Client-Version"]=this.identity.clientVersion,t["X-Pythinker-Client-Ui-Mode"]=this.identity.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===C7)&&Pke()}}const Wke="pythinker-code.bearer.",Hke=3e4;class jke{constructor(t,n,o){this.wsUrl=t,this.clientId=n,this.handlers=o}ws=null;connected=!1;closed=!1;subscriptions=new Map;pendingSubscriptions=[];transcriptSubscriptions=new Map;terminalAttachments=new Map;msgSeq=0;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),Tc("connect",{url:this.wsUrl,attempt:this.reconnectAttempts});const t=x7(),n=t!==void 0?[`${Wke}${t}`]:void 0,o=new WebSocket(this.wsUrl,n);this.ws=o,o.onopen=()=>{Tc("open")},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));jye(i),this.handleFrame(i)}catch(i){Tc("parse-error",{error:String(i)}),this.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{Tc("error"),this.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{Tc("close",s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0),this.connected=!1,this.ws=null,this.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,Tc("reconnect-scheduled",{delayMs:n,attempt:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,sinceSeq:o}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=jm(t,n),i=this.terminalAttachments.get(s),r=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(jm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(jm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,Hke),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=p7.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.handlers.onTranscriptReset?.(i,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(i);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(o==="transcript.ops"){const s=h7.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.handlers.onTranscriptOps?.(i,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(i);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.handlers.onRawAgentEvent?this.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,r=n.seq,l=jm(s,i),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.handlers.onTerminalOutput?.(s,i,u,r);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.handlers.onTerminalExit?.(s,i,l);break}default:{this.trackCursor(n);const s=n.type,i=Ake(s,n.payload);if(i.route==="protocol"){this.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.handlers.onRawAgentEvent({type:i.agentType,seq:r.seq,session_id:r.session_id,timestamp:r.timestamp,payload:r.payload,...l.volatile!==void 0?{volatile:l.volatile}:{},...l.offset!==void 0?{offset:l.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const o of this.pendingSubscriptions)this.subscriptions.set(o.sessionId,o.cursor),t.includes(o.sessionId)||t.push(o.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[o,s]of this.subscriptions.entries())n[o]=s;this.send({type:"client_hello",id:this.nextId(),payload:{client_id:this.clientId,subscriptions:t,cursors:n}});for(const[o,s]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(o,s.agentId,s.sinceSeq);for(const o of this.terminalAttachments.values())this.sendTerminalAttach(o.sessionId,o.terminalId,o.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n}})}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),Hye(t)}catch{}}nextId(){return`c_${++this.msgSeq}`}}function jm(e,t){return`${e}\0${t}`}function Uke(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function L6(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function Vke(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function F6(e){return{transport:e.transport,command:e.command,args:e.args,env:e.env,url:e.url,headers:e.headers}}function O6(e){const t={type:e.type,models:e.models.map(n=>({model:n.model,max_context_size:n.maxContextSize,display_name:n.displayName,capabilities:n.capabilities,max_output_size:n.maxOutputSize,support_efforts:n.supportEfforts,adaptive_thinking:n.adaptiveThinking}))};return"id"in e&&(t.id=e.id),"newId"in e&&e.newId!==void 0&&(t.new_id=e.newId),e.apiKey!==void 0&&(t.api_key=e.apiKey),e.baseUrl!==void 0&&(t.base_url=e.baseUrl),e.defaultModel!==void 0&&(t.default_model=e.defaultModel),t}function gk(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function R6(e){return e==="auto_compact"||e==="manual_compact"}class qke{http;config;constructor(t){this.config=t,this.http=new A7(t.serverHttpUrl,{clientId:t.clientId,clientName:t.clientName,clientVersion:t.clientVersion,clientUiMode:t.clientUiMode})}async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,backend:t.backend==="v2"?"v2":"v1"}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(vr),hasMore:o.has_more}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return vr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return vr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.dynamicWorkflowMode!==void 0&&(s.dynamic_workflow_mode=n.dynamicWorkflowMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),n.tools!==void 0&&(s.tools=n.tools),n.mcpServers!==void 0&&(s.mcp_servers=n.mcpServers),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return vr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,dynamicWorkflowMode:n.dynamic_workflow_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return b7(n)}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return vr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(n2),hasMore:s.has_more}}async getSessionTranscript(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=Mye.parse(o);return{agentId:s.agent_id,snapshot:{items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more},agents:s.agents,pendingInteractions:s.pending_interactions,seq:s.seq}}async getSessionSnapshot(t){const n=Date.now();Go("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:vr(o.session),messages:o.messages.items.map(n2),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(y7),pendingQuestions:o.pending_questions.map(k7),subagents:(o.subagents??[]).map(yg)};return Go("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw Go("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...L6(o)}),o}}async exportSession(t,n){const o=n===void 0?0:new TextEncoder().encode(n).byteLength,s=n===void 0||n.length===0?0:n.split(` -`).length,i=await this.http.postZip(`/sessions/${encodeURIComponent(t)}/export`,{web_log:n},{web_log_bytes:o,web_log_entries:s}),r=`${t}.zip`;return{blob:i.blob,fileName:Uke(i.contentDisposition,r)}}async submitPrompt(t,n){const o=Date.now();Go("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,Jye(n));return Go("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw Go("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...L6(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return vr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return vr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(vr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,Xye(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,nke(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o)).items.map(yg)}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return yg(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(gk)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return gk(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return gk(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source,path:o.path,disableModelInvocation:o.disable_model_invocation}))}async listTools(t){return((await this.http.get("/tools",{session_id:t})).tools??[]).map(o=>({name:o.name,description:o.description,inputSchema:o.input_schema,source:o.source,mcpServerId:o.mcp_server_id}))}async listConnectors(){return((await this.http.get("/mcp/servers")).servers??[]).map(n=>({id:n.id,name:n.name,transport:n.transport,status:n.status,toolCount:n.tool_count,lastError:n.last_error,editable:n.editable,definition:n.definition===void 0?void 0:Vke(n.definition)}))}async createConnector(t){return this.http.post("/mcp/servers",{mcp_server_id:t.name,config:F6(t)})}async updateConnector(t,n){return this.http.put(`/mcp/servers/${encodeURIComponent(t)}`,{config:F6(n)})}async removeConnector(t){return this.http.delete(`/mcp/servers/${encodeURIComponent(t)}`)}async restartConnector(t){return this.http.post(`/mcp/servers/${encodeURIComponent(t)}:restart`,{})}async listPlugins(){return((await this.http.get("/plugins")).plugins??[]).map(n=>({id:n.id,displayName:n.display_name,version:n.version,enabled:n.enabled,state:n.state,skillCount:n.skill_count,mcpServerCount:n.mcp_server_count,hasErrors:n.has_errors,source:n.source}))}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:set-enabled`,{enabled:n})}async listSubagents(t){return((await this.http.get("/agent-profiles",{work_dir:t})).profiles??[]).map(o=>({name:o.name,description:o.description,source:o.source,tools:o.tools,model:o.model,effort:o.effort,whenToUse:o.when_to_use}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(S6)])):void 0;return{items:s.items.map(S6),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Zc(this.config.serverHttpUrl,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(bp)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return bp(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return bp(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async generateSessionTitle(t,n){const o={};return n?.force===!0&&(o.force=!0),n?.source!==void 0&&(o.source=n.source),this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,o)}async listModels(){return(await this.http.get("/models")).items.map(ske)}async listProviders(){return(await this.http.get("/providers")).items.map(Mf)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=Mf(n);return n.api_key===void 0?o:{...o,apiKey:n.api_key}}async addProvider(t){const n=await this.http.post("/providers",O6(t));return Mf(n)}async updateProvider(t,n){const o=await this.http.put(`/providers/${encodeURIComponent(t)}`,O6(n));return{provider:Mf(o.provider)}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map(Mf),modelsImported:o.models_imported}}async deleteProvider(t){return this.http.delete(`/providers/${encodeURIComponent(t)}`)}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return vk(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return vk(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return vk(t)}async startCodexLogin(){const t=await this.http.post("/auth/codex:start");return{loginId:t.login_id,authorizeUrl:t.authorize_url,loopback:t.loopback,expiresAt:t.expires_at}}async getCodexLoginStatus(t){const n=await this.http.get(`/auth/codex/${encodeURIComponent(t)}`);return pk(n)}async submitCodexLoginRedirect(t,n){const o=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:submit_code`,{redirect_url:n});return pk(o)}async cancelCodexLogin(t){const n=await this.http.post(`/auth/codex/${encodeURIComponent(t)}:cancel`);return pk(n)}async getConfig(){const t=await this.http.get("/config");return o2(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultThinking:"default_thinking",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",disabledSkills:"disabled_skills",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry",raw:"raw"};for(const[i,r]of Object.entries(t)){const l=o[i];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return o2(s)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model,managedProvider:t.managed_provider?{status:t.managed_provider.status}:null}}async startOAuthLogin(){const t=await this.http.post("/oauth/login",{});return t.status==="authenticated"?{flowId:t.flow_id,provider:t.provider,status:"authenticated"}:{flowId:t.flow_id,provider:t.provider,status:"pending",verificationUri:t.verification_uri,verificationUriComplete:t.verification_uri_complete,userCode:t.user_code,expiresIn:t.expires_in,interval:t.interval,expiresAt:t.expires_at}}async pollOAuthLogin(){const t=await this.http.get("/oauth/login");return t?{flowId:t.flow_id,status:t.status,resolvedAt:t.resolved_at}:null}async cancelOAuthLogin(){const t=await this.http.delete("/oauth/login");return{cancelled:t.cancelled,status:t.status}}async logout(){return{loggedOut:(await this.http.post("/oauth/logout",{})).logged_out}}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return Zc(this.config.serverHttpUrl,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}connectEvents(t){const n=jhe(this.config.serverHttpUrl,this.config.clientId),o=xke(),s=new jke(n,this.config.clientId,{onWireEvent:i=>{const r=rke(i),l=lke(i),a=oke(i);a.type==="historyCompacted"&&!R6(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:i=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=i,d=o.project(r,u,a,{offset:c});for(const f of d){const p=u?.turnId,h=f.type==="assistantDelta"&&typeof p=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:p,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!R6(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:h})}},onResync:(i,r,l)=>{o.reset(i),t.onResync(i,r,l)},onConnectionState:i=>{t.onConnectionChange(i)},onError:(i,r,l)=>{t.onError(i,r,l)},onTranscriptReset:(i,r,l,a)=>{t.onTranscriptReset?.(i,r,l,a)},onTranscriptOps:(i,r,l,a)=>t.onTranscriptOps?.(i,r,l,a),onTerminalOutput:(i,r,l,a)=>{t.onTerminalOutput?.(i,r,l,a)},onTerminalExit:(i,r,l)=>{t.onTerminalExit?.(i,r,l)}});return s.connect(),{subscribe(i,r){s.subscribe(i,r??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,r,l){s.subscribeTranscript(i,r,l)},unsubscribeTranscript(i,r){s.unsubscribeTranscript(i,r)},seedSnapshot(i,r){if(r.inFlightTurn===null){o.reset(i);return}const l=o.seedInFlight(i,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:i,seq:r.asOfSeq})},bindNextPromptId(i,r){o.bindNextPromptId(i,r)},abort(i,r){s.abort(i,r)},terminalAttach(i,r,l){s.terminalAttach(i,r,l)},terminalInput(i,r,l){s.terminalInput(i,r,l)},terminalResize(i,r,l,a){s.terminalResize(i,r,l,a)},terminalDetach(i,r){s.terminalDetach(i,r)},terminalClose(i,r){s.terminalClose(i,r)},markSideChannelAgent(i){o.markSideChannelAgent(i)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function vk(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function Kke(e){const t=new A7(e.serverHttpUrl,{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode});return{async listCatalogProviders(){return(await t.get("/catalog/providers")).items.map(w7)},async importCatalogProvider(n){const o={catalog_id:n.catalogId};n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.id!==void 0&&(o.id=n.id);const s=await t.post("/providers:import_catalog",o);return ike(s)}}}let yk;function St(){if(yk===void 0){const e=_$();yk=Object.assign(new qke(e),Kke(e))}return yk}const Gke=["src","controls","muted"],Zke=["aria-label"],Yke=["src","alt"],Jke=["aria-label"],Ix=Ze({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=V(t.fileId?"":t.url),o=V(null),s=V(!t.fileId);let i=null,r=0,l=!1,a=null;function u(){i!==null&&(URL.revokeObjectURL(i),i=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await St().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(p);return}i=p,n.value=i}catch{if(l||d!==r)return;n.value=t.url}}return Ye(()=>[t.fileId,t.url,s.value],c,{immediate:!0}),Sn(()=>{typeof IntersectionObserver=="function"&&o.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(o.value)):s.value=!0}),po(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(g(),C(Te,{key:0},[n.value?(g(),C("video",{key:0,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),src:n.value,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,Gke)):(g(),C("span",{key:1,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),role:"status","aria-label":e.alt||""},null,10,Zke))],64)):n.value?(g(),C("img",{key:1,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),src:n.value,alt:e.alt||"",loading:"lazy"},null,10,Yke)):(g(),C("span",{key:2,ref_key:"mediaEl",ref:o,class:ze(e.mediaClass),role:"img","aria-label":e.alt||""},null,10,Jke))}}),Xke=["title","aria-label"],Qke={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},ebe={key:2,class:"media-thumb-badge"},tbe={key:3,class:"media-thumb-badge is-error"},nbe={key:4,class:"media-thumb-badge"},obe=["aria-label"],sbe=Ze({__name:"MediaThumb",props:{kind:{},name:{},url:{},fileId:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>n.name?n.name:n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentImage"));function r(l){const a=l.currentTarget;o("activate",a?.querySelector("img")??null)}return(l,a)=>(g(),C("span",{class:ze(["media-thumb",{"is-error":n.error,uploading:n.uploading}])},[_("button",{type:"button",class:"media-thumb-btn",title:i.value,"aria-label":i.value,onClick:r},[n.url?(g(),pe(Ix,{key:0,url:n.url,kind:n.kind,alt:n.name,"file-id":n.fileId,"media-class":"media-thumb-media",controls:!1,muted:""},null,8,["url","kind","alt","file-id"])):(g(),C("span",Qke)),n.uploading?(g(),C("span",ebe,[K(ns,{size:"sm",label:x(s)("composer.uploading")},null,8,["label"])])):n.error?(g(),C("span",tbe,[K(Fe,{name:"info",size:"sm"})])):n.kind==="video"?(g(),C("span",nbe,[K(Fe,{name:"play",size:"sm"})])):oe("",!0)],8,Xke),n.removable?(g(),pe(Mn,{key:0,text:n.removeLabel??x(s)("composer.remove")},{default:ve(()=>[_("button",{type:"button",class:"media-thumb-rm","aria-label":n.removeLabel??x(s)("composer.remove"),onClick:a[0]||(a[0]=u=>o("remove"))},[K(Fe,{name:"close",size:"sm"})],8,obe)]),_:1},8,["text"])):oe("",!0)],2))}}),ibe=ht(sbe,[["__scopeId","data-v-b4904b11"]]),rbe=["title","data-kind"],lbe=["aria-label"],abe={class:"att-tile"},ube={class:"att-name"},cbe={key:1,class:"att-err"},dbe=["aria-label"],fbe=Ze({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>{const d=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return d?d.toUpperCase():void 0}),r=O(()=>{const c=i.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"file-text":"file"}),l=O(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function a(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=O(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>e.kind!=="file"&&e.removable?(g(),pe(ibe,{key:0,kind:e.kind,name:e.name,url:e.url,"file-id":e.fileId,uploading:e.uploading,error:e.error,removable:"","remove-label":e.removeLabel,onActivate:d[0]||(d[0]=f=>o("activate")),onRemove:d[1]||(d[1]=f=>o("remove"))},null,8,["kind","name","url","file-id","uploading","error","remove-label"])):(g(),C("span",{key:1,class:ze(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[_("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[2]||(d[2]=f=>o("activate"))},[_("span",abe,[e.kind==="image"&&e.url?(g(),pe(Ix,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(g(),pe(Fe,{key:1,name:"play",size:"sm"})):e.kind==="image"?(g(),pe(Fe,{key:2,name:"image",size:"sm"})):(g(),pe(Fe,{key:3,name:r.value,size:"sm"},null,8,["name"]))]),_("span",ube,N(l.value),1),e.uploading?(g(),pe(ns,{key:0,size:"sm",label:x(s)("composer.uploading")},null,8,["label"])):e.error?(g(),C("span",cbe,[K(Fe,{name:"info",size:"sm"})])):oe("",!0)],8,lbe),e.removable?(g(),pe(Mn,{key:0,text:e.removeLabel??x(s)("composer.remove")},{default:ve(()=>[_("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??x(s)("composer.remove"),onClick:d[3]||(d[3]=f=>o("remove"))},[K(Fe,{name:"close",size:"sm"})],8,dbe)]),_:1},8,["text"])):oe("",!0)],10,rbe))}}),a2=ht(fbe,[["__scopeId","data-v-fe5172dd"]]),pbe=["data-mention-kind","data-mention-name","data-mention-path","tabindex","role","onClick","onKeydown"],hbe=["innerHTML"],mbe={class:"mention-pill-name"},gbe=Ze({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{}},setup(e){const t=e,n=V(null),o=O(()=>ohe(t.text));function s(r,l){l.kind!=="file"||!t.interactive||!t.openFile||(r.preventDefault(),r.stopPropagation(),t.openFile({path:l.path}))}function i(r){const l=window.getSelection(),a=n.value;if(!l||l.rangeCount===0||!a||!r.clipboardData)return;const u=l.getRangeAt(0);if(!u.intersectsNode(a))return;const c=u.cloneContents();for(const d of c.querySelectorAll(".mention-pill")){const{mentionKind:f,mentionName:p,mentionPath:h}=d.dataset;f!=="file"&&f!=="folder"||p===void 0||h===void 0||d.replaceWith(document.createTextNode(b$({kind:f,name:p,path:h})))}r.clipboardData.setData("text/plain",c.textContent??""),r.preventDefault()}return(r,l)=>(g(),C("span",{ref_key:"root",ref:n,class:"composer-text",onCopy:i},[(g(!0),C(Te,null,st(o.value,(a,u)=>(g(),C(Te,{key:u},[a.type==="text"?(g(),C(Te,{key:0},[qe(N(a.value),1)],64)):(g(),C("span",{key:1,class:ze(["mention-pill",`mention-${a.attrs.kind}`]),"data-mention-kind":a.attrs.kind,"data-mention-name":a.attrs.name,"data-mention-path":a.attrs.path,tabindex:a.attrs.kind==="file"&&e.interactive&&e.openFile?0:void 0,role:a.attrs.kind==="file"&&e.interactive&&e.openFile?"button":void 0,onClick:c=>s(c,a.attrs),onKeydown:[Do(c=>s(c,a.attrs),["enter"]),Do(c=>s(c,a.attrs),["space"])]},[_("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:x(aw)(a.attrs.path,a.attrs.name)},null,8,hbe),_("span",mbe,N(x(w$)(a.attrs.name)),1)],42,pbe))],64))),128))],544))}}),vbe=["aria-expanded","title"],ybe={class:"tf-sum"},kbe=["inert"],bbe={class:"tf-body-inner"},wbe={key:1,class:"msg"},xbe=Ze({__name:"TurnFold",props:{items:{},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},streamingTailIndex:{default:null},durationMs:{default:void 0},toolDiffPanel:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openToolDiff","openAgent"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>n.streamingTailIndex!==null),r=O(()=>n.live?n.parked?"parked":"live":"settled"),l=V(!1),a=O(()=>i.value||l.value),u=V(a.value),c=V(a.value);let d=null;Ye(a,T=>{if(T){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=wn("pinScroll",()=>{}),p=V(null);function h(){l.value=!l.value,xt(()=>{const T=p.value;T&&f(T)})}const m=V(Date.now());let k=null;function w(){k!==null&&(clearInterval(k),k=null)}Ye(r,(T,$)=>{T!=="settled"?(m.value=Date.now(),k===null&&(k=setInterval(()=>{m.value=Date.now()},1e3))):w(),$==="live"&&T!=="live"&&(l.value=!1)},{immediate:!0}),En(()=>{w(),d!==null&&clearTimeout(d)});const v=O(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),y=O(()=>{if(r.value==="settled")return n.durationMs!==void 0?Math.max(0,n.durationMs):v.value===void 0||n.endedMs===void 0?void 0:Math.max(0,n.endedMs-v.value);if(v.value!==void 0)return Math.max(0,m.value-v.value)}),b=O(()=>{const T=y.value;if(T===void 0)return s("conversation.fold.workedUnknown");const $=Op(T);return $?s("conversation.fold.worked",{duration:$}):s("conversation.fold.workedUnknown")});function S(T){return n.streamingTailIndex!==null&&"sourceIndex"in T&&T.sourceIndex===n.streamingTailIndex}function I(T){if(n.streamingTailIndex===null)return!1;const $=T.items.at(-1);return $!==void 0&&$.sourceIndex===n.streamingTailIndex}return(T,$)=>e.items.length>0?(g(),C("div",{key:0,class:ze(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?oe("",!0):(g(),C("button",{key:0,ref_key:"headEl",ref:p,type:"button",class:"tf-head","aria-expanded":l.value,title:b.value,onClick:h},[_("span",ybe,N(b.value),1),K(Fe,{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,vbe)),u.value?(g(),C("div",{key:1,class:ze(["tf-body",{open:c.value}]),inert:!a.value},[_("div",bbe,[(g(!0),C(Te,null,st(e.items,(F,R)=>(g(),C(Te,{key:x(oT)(F,R)},[F.kind==="thinking"?(g(),pe(fw,{key:0,text:F.thinking,mobile:e.mobile,streaming:S(F),"started-at-ms":v.value,"duration-ms":y.value},null,8,["text","mobile","streaming","started-at-ms","duration-ms"])):F.kind==="text"&&F.text?(g(),C("div",wbe,[K(Bl,{text:F.text,streaming:S(F),"open-file":P=>o("openFile",P)},null,8,["text","streaming","open-file"])])):F.kind==="activity-run"?(g(),pe(sT,{key:2,items:F.items,mobile:e.mobile,streaming:I(F),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[0]||($[0]=P=>o("openMedia",P)),onOpenFile:$[1]||($[1]=P=>o("openFile",P)),onOpenToolDiff:$[2]||($[2]=P=>o("openToolDiff",P)),onOpenAgent:$[3]||($[3]=P=>o("openAgent",P))},null,8,["items","mobile","streaming","tool-diff-panel"])):F.kind==="tool"?(g(),pe(dw,{key:3,tool:F.tool,mobile:e.mobile,"tool-diff-panel":e.toolDiffPanel,onOpenMedia:$[4]||($[4]=P=>o("openMedia",P)),onOpenFile:$[5]||($[5]=P=>o("openFile",P)),onOpenToolDiff:$[6]||($[6]=P=>o("openToolDiff",P)),onOpenAgent:$[7]||($[7]=P=>o("openAgent",P))},null,8,["tool","mobile","tool-diff-panel"])):oe("",!0)],64))),128))])],10,kbe)):oe("",!0)],2)):oe("",!0)}}),_be=ht(xbe,[["__scopeId","data-v-2134c6e0"]]),Sbe={key:0,class:"ui-card__head"},Cbe={class:"ui-card__body"},Abe={key:1,class:"ui-card__foot"},Mbe=Ze({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(g(),C("div",Sbe,[An(t.$slots,"head",{},void 0,!0)])):oe("",!0),_("div",Cbe,[An(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(g(),C("div",Abe,[An(t.$slots,"foot",{},void 0,!0)])):oe("",!0)],2))}}),$x=ht(Mbe,[["__scopeId","data-v-d2cab471"]]),Ebe={class:"tf-ic"},Tbe={class:"tf-title"},Ibe={key:0,class:"tf-stats"},$be={key:0,class:"tf-add"},Nbe={key:1,class:"tf-del"},Lbe={class:"diffbar","aria-hidden":"true"},Fbe={class:"tf-list"},Obe={class:"tf-dir"},Rbe={class:"tf-base"},Pbe={key:0,class:"tf-stats"},Dbe={key:0,class:"tf-add"},Bbe={key:1,class:"tf-del"},zbe=Ze({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=Co(!1),i=O(()=>s.value?e.changes:e.changes.slice(0,3)),r=O(()=>Math.max(0,e.changes.length-3)),l=O(()=>e.changes.reduce((k,w)=>k+w.added,0)),a=O(()=>e.changes.reduce((k,w)=>k+w.removed,0)),u=O(()=>e.changes.every(k=>!k.statsIncomplete)),c=O(()=>l.value+a.value),d=O(()=>c.value===0?1:l.value),f=O(()=>c.value===0?1:a.value);function p(k){if(!e.cwd)return k;const w=e.cwd.replaceAll("\\","/").replace(/\/$/,""),v=k.replaceAll("\\","/");return v.startsWith(`${w}/`)?v.slice(w.length+1):k}function h(k){const w=p(k).replaceAll("\\","/"),v=w.lastIndexOf("/");return v<0?{dir:"",base:w}:{dir:w.slice(0,v+1),base:w.slice(v+1)}}function m(k){e.interactive&&(k.hasWrite?n("openFile",{path:k.path}):n("openDiff",k))}return(k,w)=>(g(),pe($x,{class:"turn-files"},Ap({head:ve(()=>[_("span",Ebe,[K(Fe,{name:"pencil",size:"sm"})]),_("span",Tbe,N(x(o)(e.changes.length===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:e.changes.length})),1),u.value&&c.value>0?(g(),C("span",Ibe,[l.value>0?(g(),C("span",$be,"+"+N(l.value),1)):oe("",!0),a.value>0?(g(),C("span",Nbe,"−"+N(a.value),1)):oe("",!0),_("span",Lbe,[_("span",{class:"seg-add",style:jt({flexGrow:d.value})},null,4),_("span",{class:"seg-del",style:jt({flexGrow:f.value})},null,4)])])):oe("",!0)]),default:ve(()=>[_("ul",Fbe,[(g(!0),C(Te,null,st(i.value,v=>(g(),C("li",{key:v.path,class:"tf-row"},[(g(),pe(Ko(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:"tf-file",onClick:y=>m(v)},{default:ve(()=>[_("span",Obe,N(h(v.path).dir),1),_("span",Rbe,N(h(v.path).base),1)]),_:2},1032,["type","onClick"])),!v.statsIncomplete&&(v.added>0||v.removed>0)?(g(),C("span",Pbe,[v.added>0?(g(),C("span",Dbe,"+"+N(v.added),1)):oe("",!0),v.removed>0?(g(),C("span",Bbe,"−"+N(v.removed),1)):oe("",!0)])):oe("",!0)]))),128))])]),_:2},[r.value>0?{name:"foot",fn:ve(()=>[K(nn,{class:"tf-more",variant:"ghost",size:"sm",onClick:w[0]||(w[0]=v=>s.value=!s.value)},{default:ve(()=>[K(Fe,{class:ze(["tf-more-car",{open:s.value}]),name:"chevron-down",size:"sm"},null,8,["class"]),qe(" "+N(s.value?x(o)("conversation.turnFiles.showLess"):x(o)(r.value===1?"conversation.turnFiles.moreOne":"conversation.turnFiles.more",{number:r.value})),1)]),_:1})]),key:"0"}:void 0]),1024))}}),Wbe=ht(zbe,[["__scopeId","data-v-dbd50ff6"]]),Hbe=["src"],jbe=6,Ube=300,Vbe=6,qbe=250,Kbe=Ze({__name:"MascotSprite",props:{state:{},size:{default:48}},setup(e){const t=jbe*Ube,n=Vbe*qbe,o=e,s=V("laptop");let i;const r=O(()=>{const d=o.size;return{width:`${d}px`,height:`${d*208/192}px`}}),l=O(()=>o.state==="failed"?"/brand/mascot-failed.png":`/brand/mascot-${s.value}.png`);function a(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function u(){i!==void 0&&(clearTimeout(i),i=void 0)}function c(){if(u(),o.state==="failed"||a())return;const d=s.value==="laptop"?t:n;i=setTimeout(()=>{i=void 0,s.value=s.value==="laptop"?"review":"laptop",c()},d)}return Sn(c),En(u),Ye(()=>o.state==="failed",d=>{if(d){u();return}s.value="laptop",c()}),(d,f)=>(g(),C("img",{"aria-hidden":"true",class:"mascot-apng",src:l.value,style:jt(r.value)},null,12,Hbe))}}),Gbe=ht(Kbe,[["__scopeId","data-v-c03cab60"]]),Zbe={class:"working-indicator",role:"status"},Ybe={class:"wi-mascot","aria-hidden":"true"},Jbe={class:"wi-label"},Xbe=Ze({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(g(),C("div",Zbe,[_("span",Ybe,[K(Gbe,{state:"running",size:40})]),_("span",Jbe,N(e.label),1)]))}}),Qbe=ht(Xbe,[["__scopeId","data-v-52881756"]]),Gr=V(null),vd=V(!1);function Nx(e){const t=Gr.value;!t||vd.value||(Gr.value=null,t.resolve(e))}async function e2e(){const e=Gr.value;if(!(!e||vd.value)){if(!e.action){Nx(!0);return}vd.value=!0;try{await e.action(),Gr.value===e&&(Gr.value=null),e.resolve(!0)}catch(t){Gr.value===e&&(Gr.value=null),e.reject(t)}finally{vd.value=!1}}}function t2e(e){return vd.value?Promise.resolve(!1):(Gr.value&&Nx(!1),new Promise((t,n)=>{Gr.value={...e,resolve:t,reject:n}}))}function Ka(){return{current:Gr,busy:vd,confirm:t2e,settle:Nx,runAction:e2e}}const n2e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,o2e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,s2e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,P6="text/plain;charset=utf-8";function i2e(e,t){const n=(t??"").toLowerCase();if(n2e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:P6;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:o2e.test(o)?P6:s2e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function M7(e,t,n){const o=i2e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await St().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const r=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=r;else{const l=document.createElement("a");l.href=r,l.download=t??e,l.click()}return setTimeout(()=>{URL.revokeObjectURL(r)},6e4),"previewed"}function r2e(e){const t=e.replaceAll("\\","/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const r=n!=="",l=[];for(const u of o.split("/"))!u||u==="."||(u===".."?l.length>0&&l.at(-1)!==".."?l.pop():r||l.push(u):l.push(u));const a=n+l.join("/");return s?a.toLowerCase():a}function l2e(e,t){let n=0,o=0;for(const s of e)s.oldNo!==void 0&&(n=Math.max(n,s.oldNo)),s.newNo!==void 0&&(o=Math.max(o,s.newNo));return t.map(s=>({...s,oldNo:s.oldNo===void 0?void 0:s.oldNo+n,newNo:s.newNo===void 0?void 0:s.newNo+o}))}function a2e(e){const t=new Map;for(const n of Fu(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=Hs(n.tool.name);if(o!=="edit"&&o!=="multi_edit"&&o!=="write")continue;const s=cw(n.tool.arg);if(!s)continue;const i=o==="write",r=i?null:uw(n.tool),l=r?QE(r):{added:0,removed:0},a=i||r===null,u=r2e(s),c=t.get(u);if(!c){t.set(u,{path:s,...l,hasWrite:i,statsIncomplete:a,diff:r});continue}c.added+=l.added,c.removed+=l.removed,c.hasWrite||=i,c.statsIncomplete||=a,c.diff!==null&&r!==null?c.diff=[...c.diff,{type:"hunk",text:"···"},...l2e(c.diff,r)]:c.diff=null}return[...t.values()]}const u2e={class:"chat"},c2e={key:0,class:"chat-loading"},d2e={class:"chat-loading-text"},f2e={key:1,class:"chat-empty"},p2e={key:1,class:"top-sentinel-text"},h2e={key:0,class:"u-turn"},m2e=["data-turn-id"],g2e={key:0,class:"u-atts"},v2e={key:1,class:"skill-act"},y2e={class:"skill-act-head"},k2e={key:0,class:"skill-act-args"},b2e={key:2,class:"skill-act"},w2e={class:"skill-act-head"},x2e={key:0,class:"skill-act-args"},_2e={class:"u-text"},S2e=["aria-expanded","onClick"],C2e={key:0,class:"u-meta"},A2e=["aria-label","onClick"],M2e=["aria-label","onClick"],E2e=["data-turn-id"],T2e=["onClick"],I2e={class:"cd-view"},$2e={key:1,class:"cd-label"},N2e=["data-turn-id"],L2e={key:1,class:"msg"},F2e={key:1,class:"a-msg-ft"},O2e={key:0,class:"a-duration"},R2e=["aria-label","onClick"],P2e={key:3,class:"turn-failed",role:"alert"},D2e={class:"tf-chip","aria-hidden":"true"},B2e={class:"tf-main"},z2e={class:"tf-title"},W2e=["title"],H2e={key:5,class:"sending-placeholder"},j2e={key:6,class:"q-stack"},U2e={class:"q-head"},V2e={class:"q-title"},q2e={class:"q-hint"},K2e=["onDragover","onDrop"],G2e={class:"u-bub q-bub"},Z2e=["title","onDragstart"],Y2e=["title","onClick"],J2e={key:0,class:"u-text q-text"},X2e={key:1,class:"q-text q-text-placeholder"},Q2e={key:0,class:"q-imgs"},ewe={key:0,class:"q-file"},twe={key:1,class:"q-tag q-tag-next"},nwe={key:2,class:"q-tag q-tag-idx"},owe=["aria-label","onClick"],swe={key:0,class:"open-unsupported",role:"status"},iwe=2500,rwe=Ze({__name:"ChatPane",props:{turns:{},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},fastMoon:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},toolDiffPanel:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},cwd:{},queued:{default:()=>[]}},emits:["openFile","openMedia","copyConversationCopied","openCompaction","openAgent","openToolDiff","openTurnDiff","editMessage","loadOlderMessages","unqueue","editQueued","reorderQueue","continueTurn"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),{confirm:s}=Ka();En(()=>{for(const ce of w.values())ce.disconnect();w.clear(),k.clear(),We!==null&&(clearTimeout(We),We=null),Y!==null&&(clearTimeout(Y),Y=null),W!==null&&(clearTimeout(W),W=null),Z!==null&&(clearTimeout(Z),Z=null)});const i=e,r=V(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(ce=>{ce[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&p("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}Sn(a),En(()=>{l?.disconnect(),l=null}),Ye(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{xt().then(a)});const u=O(()=>{if(!i.turnActive||i.turns.length===0)return null;const ce=i.turns.at(-1);return ce.role==="assistant"?ce.id:null}),c=O(()=>i.working),d=O(()=>{const ce=new Map;for(const Se of i.turns){if(Se.role!=="assistant")continue;const ie=tQ(Se),{folded:we,visible:Re}=nQ(ie);ce.set(Se.id,{all:ie,folded:we,visible:Re,changes:a2e(Se)})}return ce}),f=O(()=>{const ce=i.turns.at(-1);if(ce?.role!=="assistant")return o("conversation.requesting");const Se=d.value.get(ce.id)?.all.some(ie=>ie.kind==="text"?ie.text.trim().length>0:!0);return o(Se?"conversation.working":"conversation.requesting")}),p=n,h=V({}),m=V({}),k=new Map,w=new Map;function v(ce){const ie=k.get(ce)?.querySelector(".u-text");if(!ie)return;const we=Number.parseFloat(getComputedStyle(ie).lineHeight)||24;m.value[ce]=ie.scrollHeight>we*10+1}function y(ce,Se){const ie=Se instanceof HTMLElement?Se:null;if(!ie){w.get(ce)?.disconnect(),w.delete(ce),k.delete(ce);return}if(k.get(ce)!==ie){if(w.get(ce)?.disconnect(),k.set(ce,ie),typeof ResizeObserver<"u"){const we=new ResizeObserver(()=>v(ce));we.observe(ie.querySelector(".u-text")??ie),w.set(ce,we)}xt(()=>v(ce))}}function b(ce){h.value[ce]=!h.value[ce]}const S=V(null),I=V(null);function T(ce){return(ce.attachments?.length??0)>0}function $(ce){p("editQueued",ce)}function F(ce,Se){if(S.value=ce,!Se.dataTransfer)return;Se.dataTransfer.effectAllowed="move",Se.dataTransfer.setData("text/plain",String(ce));const ie=Se.currentTarget?.closest(".q-turn");ie&&Se.dataTransfer.setDragImage(ie,24,24)}function R(ce,Se){if(S.value===null)return;Se.preventDefault(),Se.dataTransfer&&(Se.dataTransfer.dropEffect="move");const ie=Se.currentTarget.getBoundingClientRect(),we=Se.clientY{for(let ce=i.turns.length-1;ce>=0;ce--)if(i.turns[ce].role==="user")return i.turns[ce].id;return null});function B(ce){return ce.role==="user"&&ce.id===D.value&&!i.working&&!ce.skillActivation&&!ce.pluginCommand}function z(ce){const Se=ce.compaction,ie=Se?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof Se?.tokensBefore=="number"&&typeof Se?.tokensAfter=="number"?ie+o("conversation.compactedTokens",{before:Pl(Se.tokensBefore),after:Pl(Se.tokensAfter)}):ie}const A=V(null),L=V(null);let W=null;async function j(ce){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&re(ce)}function re(ce){L.value===null&&(L.value=ce.id,p("editMessage",{text:ce.text,attachments:ce.attachments}),W=setTimeout(()=>{W=null,L.value=null},iwe))}Ye(()=>i.turns,ce=>{L.value!==null&&(ce.some(Se=>Se.id===L.value)||(L.value=null,W!==null&&(clearTimeout(W),W=null)))},{flush:"post"});const Q=V(!1);let Y=null;function G(){if(i.turns.length===0)return;const ce=[];for(const ie of i.turns){if(ie.role==="compaction"||ie.role==="cron")continue;const we=ie.role==="user"?"User":"Assistant",Re=sQ(ie);Re.trim()&&ce.push(`**${we}** - -${Re}`)}const Se=ce.join(` - ---- - -`);Jo(Se).then(ie=>{ie&&(Q.value=!0,p("copyConversationCopied"),Y!==null&&clearTimeout(Y),Y=setTimeout(()=>{Y=null,Q.value=!1},2e3))}).catch(()=>{})}function X(ce){const Se=[];for(let ie=ce;ie>=0;ie--){const we=i.turns[ie];if(!we||we.role!=="assistant")break;Se.unshift(we)}return Se}function te(ce){return X(ce).map(Se=>oQ(Se)).filter(Boolean).join(` - -`)}function q(){for(let ce=i.turns.length-1;ce>=0;ce-=1)if(i.turns[ce]?.role==="assistant")return te(ce);return""}function me(){const ce=q();ce.trim()&&Jo(ce).then(Se=>{Se&&(Q.value=!0,p("copyConversationCopied"),Y!==null&&clearTimeout(Y),Y=setTimeout(()=>{Y=null,Q.value=!1},2e3))}).catch(()=>{})}t({copyConversation:G,copyFinalSummary:me});function xe(ce){const Se=i.turns[ce];if(!Se||Se.role!=="assistant")return!1;const ie=i.turns[ce+1];return!ie||ie.role!=="assistant"}let We=null;function he(ce){const Se=i.turns[ce];if(!Se)return;const ie=te(ce);ie.trim()&&Jo(ie).then(we=>{we&&(A.value=Se.id,We!==null&&clearTimeout(We),We=setTimeout(()=>{We=null,A.value=null},1400))}).catch(()=>{})}function ee(ce){const Se=ce.text;Se.trim()&&Jo(Se).then(ie=>{ie&&(A.value=ce.id,We!==null&&clearTimeout(We),We=setTimeout(()=>{We=null,A.value=null},1400))}).catch(()=>{})}function ne(ce){return{kind:ce.kind==="video"?"video":"image",url:ce.url,path:ce.name,fileId:ce.fileId}}const H=V(null);let Z=null;function ye(ce){if(ce.kind==="image"||ce.kind==="video"){p("openMedia",ne(ce));return}ce.fileId!==void 0&&M7(ce.fileId,ce.name,ce.mediaType).then(Se=>{Se==="unsupported"&&(H.value=ce.name??ce.fileId??"",Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,H.value=null},2400))})}function fe(ce,Se){return ce.id!==u.value?!1:Se.sourceIndex===Fu(ce).length-1}function de(ce){if(ce.id!==u.value)return null;const Se=Fu(ce),ie=Se.at(-1);if(ie?.kind==="tool"&&ie.tool.status==="running"){const we=ie.tool.id;if(i.approvals.some(at=>at.toolCallId===we)||(i.questions??[]).some(at=>at.toolCallId===we))return null}return Se.length-1}function J(ce){if(!ce.createdAt)return;const Se=Date.parse(ce.createdAt);return Number.isFinite(Se)?Se:void 0}function ae(ce,Se){if(ce.id!==u.value)return!1;const ie=Se.items.at(-1);return ie!==void 0&&ie.sourceIndex===Fu(ce).length-1}function be(){for(let ce=i.turns.length-1;ce>=0;ce-=1){const Se=i.turns[ce];if(Se&&Se.role==="user"&&Se.text.trim().length>0)return Se.text}return""}function _e(){const ce=be();ce.length!==0&&p("continueTurn",ce)}return(ce,Se)=>(g(),C(Te,null,[_("div",u2e,[e.sessionLoading?(g(),C("div",c2e,[K(ns,{size:"sm"}),_("span",d2e,N(x(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(g(),C("div",f2e)):oe("",!0),e.hasMoreMessages||e.loadingMore?(g(),C("div",{key:2,ref_key:"topSentinelRef",ref:r,class:ze(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(g(),C("span",p2e,[K(ns,{size:"sm"}),qe(" "+N(x(o)("conversation.loadingOlder")),1)])):(g(),C("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:Se[0]||(Se[0]=ie=>p("loadOlderMessages"))},N(x(o)("conversation.loadOlder")),1))],2)):oe("",!0),(g(!0),C(Te,null,st(e.turns,(ie,we)=>(g(),C(Te,{key:ie.id},[ie.role==="user"?(g(),C("div",h2e,[_("div",{class:ze(["u-bub turn-anchor",{undoing:L.value===ie.id}]),"data-turn-id":ie.id},[ie.attachments&&ie.attachments.length>0?(g(),C("div",g2e,[(g(!0),C(Te,null,st(ie.attachments,(Re,at)=>(g(),pe(a2,{key:at,kind:Re.kind,name:Re.name,url:Re.url,"file-id":Re.fileId,"media-type":Re.mediaType,size:Re.size,onActivate:ft=>ye(Re)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):oe("",!0),ie.skillActivation?(g(),C("div",v2e,[_("div",y2e,[Se[14]||(Se[14]=_("span",{class:"skill-act-arrow"},"▶",-1)),_("span",null,N(x(o)("conversation.activatedSkill",{name:ie.skillActivation.name})),1)]),ie.skillActivation.args?(g(),C("div",k2e,N(ie.skillActivation.args),1)):oe("",!0)])):ie.pluginCommand?(g(),C("div",b2e,[_("div",w2e,[Se[15]||(Se[15]=_("span",{class:"skill-act-arrow"},"▶",-1)),_("span",null,"/"+N(ie.pluginCommand.pluginId)+":"+N(ie.pluginCommand.commandName),1)]),ie.pluginCommand.args?(g(),C("div",x2e,N(ie.pluginCommand.args),1)):oe("",!0)])):(g(),C("div",{key:3,ref_for:!0,ref:Re=>y(ie.id,Re),class:ze(["u-text-wrap",{"is-clamped":m.value[ie.id]&&!h.value[ie.id]}])},[_("div",_2e,[K(gbe,{text:ie.text,"open-file":Re=>p("openFile",Re)},null,8,["text","open-file"])]),m.value[ie.id]?(g(),C("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!!h.value[ie.id],onClick:Re=>b(ie.id)},[qe(N(x(o)(h.value[ie.id]?"conversation.userMessage.collapse":"conversation.userMessage.expand"))+" ",1),K(Fe,{class:"u-text-toggle-car",name:"chevron-down",size:"sm"})],8,S2e)):oe("",!0)],2))],10,m2e),ie.createdAt||B(ie)?(g(),C("div",C2e,[B(ie)?(g(),C("div",{key:0,class:ze(["u-edit-wrap",{undoing:L.value===ie.id}])},[_("button",{type:"button",class:"u-edit","aria-label":x(o)("conversation.undoTooltip"),onClick:Re=>j(ie)},[K(Fe,{name:"undo",size:"sm"})],8,A2e)],2)):oe("",!0),ie.text.trim().length>0?(g(),C("button",{key:1,type:"button",class:"u-copy","aria-label":x(o)("filePreview.copy"),onClick:Ct(Re=>ee(ie),["stop"])},[A.value!==ie.id?(g(),pe(Fe,{key:0,name:"copy",size:"sm"})):(g(),pe(Fe,{key:1,name:"check",size:"sm"}))],8,M2e)):oe("",!0),ie.createdAt?(g(),pe(x$,{key:2,time:ie.createdAt},null,8,["time"])):oe("",!0)])):oe("",!0)])):ie.role==="compaction"?(g(),C("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":ie.id,role:"separator"},[Se[16]||(Se[16]=_("span",{class:"cd-line","aria-hidden":"true"},null,-1)),ie.text?(g(),C("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Re=>p("openCompaction",{turnId:ie.id})},[_("span",null,N(z(ie)),1),_("span",I2e,N(x(o)("conversation.viewSummary")),1)],8,T2e)):(g(),C("span",$2e,N(z(ie)),1)),Se[17]||(Se[17]=_("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,E2e)):ie.role==="cron"?(g(),pe(Dhe,{key:2,text:ie.text,cron:ie.cron,"turn-id":ie.id,"created-at":ie.createdAt},null,8,["text","cron","turn-id","created-at"])):(g(),C("div",{key:3,class:"a-msg turn-anchor","data-turn-id":ie.id},[K(_be,{items:d.value.get(ie.id)?.folded??[],live:ie.id===u.value,parked:ie.id===u.value&&de(ie)===null,"streaming-tail-index":de(ie),"created-ms":J(ie),"duration-ms":ie.durationMs,"tool-diff-panel":e.toolDiffPanel,mobile:"",onOpenMedia:Se[1]||(Se[1]=Re=>p("openMedia",Re)),onOpenFile:Se[2]||(Se[2]=Re=>p("openFile",Re)),onOpenToolDiff:Se[3]||(Se[3]=Re=>p("openToolDiff",Re)),onOpenAgent:Se[4]||(Se[4]=Re=>p("openAgent",Re))},null,8,["items","live","parked","streaming-tail-index","created-ms","duration-ms","tool-diff-panel"]),(g(!0),C(Te,null,st(d.value.get(ie.id)?.visible??[],(Re,at)=>(g(),C(Te,{key:x(oT)(Re,at)},[Re.kind==="thinking"?(g(),pe(fw,{key:0,text:Re.thinking,mobile:"",streaming:fe(ie,Re),"started-at-ms":J(ie),"duration-ms":ie.durationMs},null,8,["text","streaming","started-at-ms","duration-ms"])):Re.kind==="text"&&Re.text?(g(),C("div",L2e,[K(Bl,{text:Re.text,streaming:fe(ie,Re),"open-file":ft=>p("openFile",ft)},null,8,["text","streaming","open-file"])])):Re.kind==="activity-run"?(g(),pe(sT,{key:2,items:Re.items,mobile:"",streaming:ae(ie,Re),"tool-diff-panel":e.toolDiffPanel,onOpenMedia:Se[5]||(Se[5]=ft=>p("openMedia",ft)),onOpenFile:Se[6]||(Se[6]=ft=>p("openFile",ft)),onOpenToolDiff:Se[7]||(Se[7]=ft=>p("openToolDiff",ft)),onOpenAgent:Se[8]||(Se[8]=ft=>p("openAgent",ft))},null,8,["items","streaming","tool-diff-panel"])):Re.kind==="tool"?(g(),pe(dw,{key:3,tool:Re.tool,mobile:"","tool-diff-panel":e.toolDiffPanel,onOpenMedia:Se[9]||(Se[9]=ft=>p("openMedia",ft)),onOpenFile:Se[10]||(Se[10]=ft=>p("openFile",ft)),onOpenToolDiff:Se[11]||(Se[11]=ft=>p("openToolDiff",ft)),onOpenAgent:Se[12]||(Se[12]=ft=>p("openAgent",ft))},null,8,["tool","tool-diff-panel"])):oe("",!0)],64))),128)),ie.id!==u.value&&(d.value.get(ie.id)?.changes.length??0)>0?(g(),pe(Wbe,{key:0,changes:d.value.get(ie.id)?.changes??[],cwd:e.cwd,onOpenDiff:Re=>p("openTurnDiff",{turnId:ie.id,changes:d.value.get(ie.id)?.changes??[]}),onOpenFile:Se[13]||(Se[13]=Re=>p("openFile",Re))},null,8,["changes","cwd","onOpenDiff"])):oe("",!0),ie.id!==u.value&&xe(we)&&(te(we).trim().length>0||ie.durationMs!==void 0)?(g(),C("div",F2e,[K(Mn,{text:`${ie.durationMs} ms`},{default:ve(()=>[ie.durationMs!==void 0?(g(),C("span",O2e,N(x(QX)(ie.durationMs)),1)):oe("",!0)]),_:2},1032,["text"]),te(we).trim().length>0?(g(),C("button",{key:0,class:"a-cpbtn","aria-label":x(o)("filePreview.copy"),onClick:Re=>he(we)},[A.value!==ie.id?(g(),pe(Fe,{key:0,name:"copy",size:"sm"})):(g(),pe(Fe,{key:1,name:"check",size:"sm"}))],8,R2e)):oe("",!0)])):oe("",!0)],8,N2e))],64))),128)),e.lastTurnReason==="failed"&&!e.working?(g(),C("div",P2e,[_("span",D2e,[K(Fe,{name:"alert-triangle",size:"sm"})]),_("div",B2e,[_("span",z2e,N(e.turnErrorKind==="max_steps"?x(o)("conversation.turnFailedMaxSteps"):x(o)("conversation.turnFailed")),1),e.turnErrorMessage?(g(),C("span",{key:0,class:"tf-sub",title:e.turnErrorMessage},N(e.turnErrorMessage),9,W2e)):oe("",!0)]),K(nn,{variant:"secondary",size:"sm",onClick:_e},{default:ve(()=>[qe(N(x(o)("conversation.turnFailedResume")),1)]),_:1})])):oe("",!0),e.compaction?(g(),pe(xhe,{key:4,label:x(o)("conversation.compacting")},null,8,["label"])):oe("",!0),c.value?(g(),C("div",H2e,[K(Qbe,{label:f.value},null,8,["label"])])):oe("",!0),e.queued.length>0?(g(),C("div",j2e,[_("div",U2e,[_("span",V2e,[K(Fe,{name:"mail",size:"sm"}),qe(" "+N(x(o)("composer.queueLabel"))+" · ",1),_("b",null,N(e.queued.length),1)]),_("span",q2e,N(x(o)("composer.queueAutoDrain")),1)]),(g(!0),C(Te,null,st(e.queued,(ie,we)=>(g(),C("div",{key:we,class:ze(["u-turn q-turn",{"q-dragging":S.value===we,"drop-before":I.value?.index===we&&I.value.position==="before","drop-after":I.value?.index===we&&I.value.position==="after"}]),onDragover:Re=>R(we,Re),onDrop:Re=>P(we,Re)},[_("div",G2e,[_("span",{class:"q-grip",title:x(o)("composer.queueDragTitle"),draggable:"true",onDragstart:Re=>F(we,Re),onDragend:M},[K(Fe,{name:"grip",size:"sm"})],40,Z2e),_("button",{type:"button",class:"q-body",title:x(o)("composer.editQueued"),onClick:Re=>$(we)},[ie.text?(g(),C("span",J2e,N(ie.text),1)):(g(),C("span",X2e,[K(Fe,{name:"file",size:"sm"}),qe(" "+N(x(o)("composer.queuedAttachments",{n:ie.attachments?.length??0})),1)]))],8,Y2e),T(ie)?(g(),C("div",Q2e,[(g(!0),C(Te,null,st(ie.attachments,(Re,at)=>(g(),C(Te,{key:at},[Re.kind==="file"?(g(),C("span",ewe,[K(Fe,{name:"file",size:"sm"}),qe(" "+N(Re.name??Re.fileId),1)])):(g(),pe(Ix,{key:1,url:Re.url,kind:Re.kind,"file-id":Re.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):oe("",!0),we===0?(g(),C("span",twe,N(x(o)("composer.queueNext")),1)):(g(),C("span",nwe,"#"+N(we+1),1)),_("button",{type:"button",class:"q-rm","aria-label":x(o)("composer.remove"),onClick:Ct(Re=>p("unqueue",we),["stop"])},[K(Fe,{name:"close",size:"sm"})],8,owe)])],42,K2e))),128))])):oe("",!0)]),H.value!==null?(g(),C("div",swe,N(x(o)("composer.attachmentOpenUnsupported",{name:H.value})),1)):oe("",!0)],64))}}),Lx=ht(rwe,[["__scopeId","data-v-0f67514f"]]),lwe={class:"ch-id"},awe={key:0,class:"ch-ws"},uwe={key:1,class:"ch-sep"},cwe=["onKeydown"],dwe={class:"ch-ses"},fwe={key:0,class:"ch-pill ch-sync-pill"},pwe={key:0,class:"ch-ahead"},hwe={key:1,class:"ch-behind"},mwe={key:1,class:"ch-pill ch-diff-pill"},gwe={key:0,class:"ch-add"},vwe={key:1,class:"ch-del"},ywe={class:"ch-pill ch-pr pr-merged ch-done-pill"},kwe=Ze({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},sessionDone:{type:Boolean},pinned:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","togglePin","archiveSession","restoreSession","exportSession"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=O(()=>o.ahead??0),r=O(()=>o.behind??0),l=O(()=>o.gitDiffStats?.totalAdditions??0),a=O(()=>o.gitDiffStats?.totalDeletions??0),u=O(()=>l.value>0||a.value>0),c={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(Q){return Q.trim().toLowerCase().replaceAll("_","-")}function f(Q){const Y=d(Q);return c[Y]?`pr-${Y}`:"pr-unknown"}function p(Q){return n(c[d(Q)]??"header.prStatusUnknown")}const h=V(!1),m=V(null),k=V(null),w=V({});function v(Q){const Y=Q.target;k.value?.el?.contains(Y)||m.value?.el?.contains(Y)||S()}function y(){S()}async function b(Q){if(Q.stopPropagation(),h.value){S();return}h.value=!0,document.addEventListener("mousedown",v),window.addEventListener("resize",y),await xt();const Y=m.value?.el,G=k.value?.el;if(!Y||!G)return;const X=Y.getBoundingClientRect(),te=4,q=8,me=G.offsetWidth,xe=G.offsetHeight;let We=X.bottom+te;We+xe>window.innerHeight-q&&(We=Math.max(q,X.top-xe-te));let he=X.left;he+me>window.innerWidth-q&&(he=Math.max(q,X.right-me)),w.value={top:`${Math.round(We)}px`,left:`${Math.round(he)}px`}}function S(){h.value=!1,document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)}En(()=>{document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)});function I(){s("copyAll"),S()}function T(){s("copyFinalSummary"),S()}const $=V(!1);function F(){o.sessionId&&Jo(o.sessionId).then(Q=>{Q&&($.value=!0,setTimeout(()=>{$.value=!1},1200))})}const R=V(!1),P=V(""),M=V(null);async function D(){if(S(),!!o.sessionId){R.value=!0,P.value=o.sessionTitle??"",await xt();try{M.value?.focus(),M.value?.select()}catch{}}}function B(){const Q=P.value.trim();Q&&o.sessionId&&Q!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,Q),R.value=!1}function z(){R.value=!1}function A(){o.sessionId&&(S(),s("forkSession",o.sessionId))}function L(){o.sessionId&&(S(),s("exportSession",o.sessionId))}function W(){o.sessionId&&(S(),s("togglePin",o.sessionId))}function j(){o.sessionId&&(S(),s("archiveSession",o.sessionId))}function re(){o.sessionId&&(S(),s("restoreSession",o.sessionId))}return(Q,Y)=>(g(),C("header",{class:ze(["chat-header",{"macos-desktop":x(ld)}])},[_("div",lwe,[e.workspaceName?(g(),C("span",awe,N(e.workspaceName),1)):oe("",!0),e.workspaceName&&e.sessionTitle?(g(),C("span",uwe,"/")):oe("",!0),R.value?Bn((g(),C("input",{key:2,ref_key:"renameInputRef",ref:M,"onUpdate:modelValue":Y[0]||(Y[0]=G=>P.value=G),class:"ch-rename",type:"text",onKeydown:[Do(Ct(B,["stop"]),["enter"]),Do(Ct(z,["stop"]),["esc"])],onBlur:B,onClick:Y[1]||(Y[1]=Ct(()=>{},["stop"]))},null,40,cwe)),[[vs,P.value]]):e.sessionTitle?(g(),pe(Mn,{key:3,text:e.sessionTitle},{default:ve(()=>[_("span",dwe,N(e.sessionTitle),1)]),_:1},8,["text"])):oe("",!0)]),K(Jt,{ref_key:"kebabRef",ref:m,class:ze(["ch-act-more",{open:h.value}]),label:x(n)("header.options"),"aria-expanded":h.value,"aria-haspopup":"menu",onClick:Y[2]||(Y[2]=Ct(G=>b(G),["stop"]))},{default:ve(()=>[K(Fe,{name:"dots-horizontal",size:"md"})]),_:1},8,["class","label","aria-expanded"]),h.value?(g(),pe(Ar,{key:0,ref_key:"menuRef",ref:k,class:"ch-menu",style:jt(w.value),onClick:Y[3]||(Y[3]=Ct(()=>{},["stop"]))},{default:ve(()=>[K(vn,{onClick:I},{default:ve(()=>[K(Fe,{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),qe(" "+N(e.copied?x(n)("header.copied"):x(n)("header.copyAll")),1)]),_:1}),K(vn,{onClick:T},{default:ve(()=>[K(Fe,{name:"file-text",size:"sm"}),qe(" "+N(x(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(g(),C(Te,{key:0},[K(vn,{separator:""}),K(vn,{onClick:F},{default:ve(()=>[K(Fe,{name:$.value?"check":"copy",size:"sm"},null,8,["name"]),qe(" "+N($.value?x(n)("header.copied"):x(n)("header.copySessionId")),1)]),_:1}),e.sessionDone?oe("",!0):(g(),pe(vn,{key:0,onClick:W},{default:ve(()=>[K(Fe,{name:e.pinned?"pushpin-fill":"pushpin-line",size:"sm"},null,8,["name"]),qe(" "+N(e.pinned?x(n)("header.unpinSession"):x(n)("header.pinSession")),1)]),_:1})),K(vn,{onClick:D},{default:ve(()=>[K(Fe,{name:"pencil",size:"sm"}),qe(" "+N(x(n)("header.renameSession")),1)]),_:1}),K(vn,{onClick:A},{default:ve(()=>[K(Fe,{name:"git-fork",size:"sm"}),qe(" "+N(x(n)("header.forkSession")),1)]),_:1}),K(vn,{onClick:L},{default:ve(()=>[K(Fe,{name:"download",size:"sm"}),qe(" "+N(x(n)("header.exportSession")),1)]),_:1}),e.sessionDone?(g(),pe(vn,{key:1,onClick:re},{default:ve(()=>[K(Fe,{name:"undo",size:"sm"}),qe(" "+N(x(n)("header.reopenSession")),1)]),_:1})):(g(),pe(vn,{key:2,onClick:j},{default:ve(()=>[K(Fe,{name:"archive",size:"sm"}),qe(" "+N(x(n)("header.markSessionDone")),1)]),_:1}))],64)):oe("",!0)]),_:1},8,["style"])):oe("",!0),Y[6]||(Y[6]=_("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(g(),C("button",{key:1,type:"button",class:"ch-git",onClick:Y[4]||(Y[4]=G=>s("openChanges"))},[_("span",{class:ze(["ch-branch",{"ch-detached":!e.branch}])},N(e.branch||x(n)("header.detached")),3),i.value>0||r.value>0?(g(),C("span",fwe,[i.value>0?(g(),C("span",pwe,"↑"+N(i.value),1)):oe("",!0),r.value>0?(g(),C("span",hwe,"↓"+N(r.value),1)):oe("",!0)])):oe("",!0),u.value?(g(),C("span",mwe,[l.value>0?(g(),C("span",gwe,"+"+N(l.value),1)):oe("",!0),a.value>0?(g(),C("span",vwe,"-"+N(a.value),1)):oe("",!0)])):oe("",!0)])):oe("",!0),e.pr?(g(),C("button",{key:2,type:"button",class:ze(["ch-pill ch-pr",f(e.pr.state)]),onClick:Y[5]||(Y[5]=G=>e.pr&&s("openPr",e.pr.url))},[K(Fe,{name:"git-pull-request",size:"sm"}),_("span",null,"PR #"+N(e.pr.number)+" · "+N(p(e.pr.state)),1)],2)):oe("",!0),e.sessionId&&e.sessionDone?(g(),C(Te,{key:3},[_("span",ywe,[K(Fe,{name:"circle-check",size:"sm"}),_("span",null,N(x(n)("header.sessionDone")),1)]),K(nn,{variant:"secondary",size:"sm",onClick:re},{default:ve(()=>[K(Fe,{name:"undo",size:"sm"}),qe(" "+N(x(n)("header.reopenSession")),1)]),_:1})],64)):oe("",!0)],2))}}),bwe=ht(kwe,[["__scopeId","data-v-a0c7719c"]]),wwe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],D6=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function xwe(e){if(e<=255)return wwe[e];let t=0,n=D6.length-1;for(;t<=n;){const o=t+n>>1,s=D6[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function _we(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let u=0;u=55296&&c<=56319&&u+1=56320&&h<=57343&&(d=(c-55296<<10)+(h-56320)+65536,f=2)}const p=xwe(d);(p==="R"||p==="AL"||p==="AN")&&(o=!0);for(let h=0;h=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c0?n[u-1]:l,f=c0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Twe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):e}let kk=null,Iwe;function $we(){return kk===null&&(kk=new Intl.Segmenter(Iwe,{granularity:"word"})),kk}const Nwe=/\p{Script=Arabic}/u,Ga=/\p{M}/u,Fx=/\p{Nd}/u;function B6(e){return Nwe.test(e)}function z6(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Qr(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(z6(s))return!0;t++;continue}}if(z6(n))return!0}}return!1}function Lwe(e){const t=yh(e);return t!==null&&(Ox.has(t)||Gu.has(t))}const Fwe=new Set([" "," ","⁠","\uFEFF"]),Owe=new Set(["-","‐","–","—"]);function Rwe(e){const t=yh(e);return t!==null&&Fwe.has(t)}function Pwe(e){const t=yh(e);return t!==null&&Owe.has(t)}function E7(e,t){return Rwe(e)?!1:t?!(Lwe(e)||Pwe(e)):!0}const Ox=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),O0=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Rx=new Set(["'","’"]),Gu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Dwe=new Set([":",".","،","؛"]),Bwe=new Set(["၏"]),zwe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Wwe(e){if(Px(e))return!0;let t=!1;for(const n of e){if(Gu.has(n)||P0(n)){t=!0;continue}if(!(t&&Ga.test(n)))return!1}return t}function Hwe(e){for(const t of e)if(!Ox.has(t)&&!Gu.has(t))return!1;return e.length>0}function jwe(e){if(Px(e))return!0;for(const t of e)if(!O0.has(t)&&!Rx.has(t)&&!Ga.test(t)&&!P0(t))return!1;return e.length>0}function Px(e){let t=!1;for(const n of e)if(!(n==="\\"||Ga.test(n))){if(O0.has(n)||Gu.has(n)||Rx.has(n)){t=!0;continue}return!1}return t}function R0(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function yh(e){if(e.length===0)return null;const t=R0(e,e.length);return e.slice(t)}function Uwe(e){for(const t of e)if(!Ga.test(t))return t;return null}function Vwe(e){for(let t=e.length;t>0;){const n=R0(e,t),o=e.slice(n,t);if(!Ga.test(o))return o;t=n}return null}const qwe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Kwe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function P0(e){const t=e.codePointAt(0);return t!==void 0&&Kwe(t,qwe)}function Gwe(e){const t=Vwe(e);return t!==null&&P0(t)}function Zwe(e){const t=Uwe(e);return t!==null&&Fx.test(t)}function Ywe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Ga.test(o)){n--;continue}if(O0.has(o)||Rx.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Jwe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function W6(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function H6(e,t){return e&&t!==null&&Dwe.has(t)}function Xwe(e){const t=yh(e);return t!==null&&Bwe.has(t)}function Qwe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function u2(e){let t=e.length;for(;t>0;){const n=R0(e,t),o=e.slice(n,t);if(zwe.has(o))return!0;if(!Gu.has(o))return!1;t=n}return!1}function exe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const txe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Mr(e){return e.length===1?e[0]:e.join("")}function nxe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Mr(n)}function oxe(e,t,n,o){if(!txe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=exe(c,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){r.push(c),u+=c.length;continue}i!==null&&s.push({text:Mr(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length}return i!==null&&s.push({text:Mr(r),isWordLike:a,kind:i,start:l}),s}function c2(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const sxe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function ixe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:sxe.test(n)&&t+1=e.len||c2(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c0&&(t.push(Mr(a)),n.push(!0),o.push("text"),s.push(u),i=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const uxe=new Set([":","-","/","×",",",".","+","–","—"]),cxe=/[\p{P}\p{S}\p{Co}]/u,dxe=/\p{Emoji_Presentation}/u,fxe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function pxe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function T7(e){const t=e.charCodeAt(0);return t<128?pxe(t):!fxe.has(e)&&!dxe.test(e)&&cxe.test(e)}function j6(e){let t=!1;for(const n of e)if(!Ga.test(n)){if(!T7(n))return!1;t=!0}return t}function hxe(e){for(let t=e.length;t>0;){const n=R0(e,t),o=e.slice(n,t);if(Ga.test(o)){t=n;continue}return T7(o)||P0(o)}return!1}function mxe(e,t,n,o){const s=!t&&j6(e),i=!o&&j6(n),r=Gwe(e),l=(t||r)&&hxe(e);return!s&&!i&&!l||Qr(e)||Qr(n)?!1:(t||s||r)&&(o||i)}function I7(e){for(const t of e)if(Fx.test(t))return!0;return!1}function I1(e){if(e.length===0)return!1;for(const t of e)if(!(Fx.test(t)||uxe.has(t)))return!1;return!0}function gxe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(Mr(u)),n.push(d),o.push("text"),s.push(e.starts[i]),i=c;continue}}t.push(r),n.push(a),o.push(l),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function yxe(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let u=0;u0&&a[z]==="text"&&R&&f[z]&&h[z]||$&&s>0&&a[z]==="text"&&Hwe(T.text)&&f[z]||$&&s>0&&a[z]==="text"&&m[z]?A():$&&s>0&&a[z]==="text"&&T.isWordLike&&P&&k[z]?(A(),l[z]=!0):F!==null&&s>0&&a[z]==="text"&&c[z]===F?d[z]=(d[z]??1)+1:$&&!T.isWordLike&&s>0&&a[z]==="text"&&!f[z]&&(Wwe(T.text)||T.text==="-"&&l[z])?A():(i[s]=T.text,r[s]=[T.text],l[s]=T.isWordLike,a[s]=T.kind,u[s]=T.start,c[s]=F,d[s]=F===null?0:1,f[s]=R,p[s]=P,h[s]=D,m[s]=B,k[s]=H6(P,M),s++)}for(let I=0;Inull);let v=-1;for(let I=s-1;I>=0;I--){const T=i[I];if(T.length!==0){if(a[I]==="text"&&!l[I]&&v>=0&&a[v]==="text"&&(jwe(T)||T==="-"&&Zwe(i[v]))){const $=w[v]??[];$.push(T),w[v]=$,u[v]=u[I],i[I]="";continue}v=I}}for(let I=0;I=0&&!E7(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Qr(p);continue}d(f),o.push(p),s.push(t.isWordLike[f]),i.push(h),r.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:r}}function Sxe(e,t,n="normal",o="normal"){const s=Mwe(n),i=s.mode==="pre-wrap"?Twe(e):Ewe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=wxe(i,t,s),l=o==="keep-all"?_xe(i,r,t.breakKeepAllAfterPunctuation):r;return{normalized:i,chunks:xxe(l,s),...l}}let $c=null;const U6=new Map;let Nc=null;const Cxe=96,Axe=/\p{Emoji_Presentation}/u,Mxe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let bk=null;const V6=new Map;function Dx(){if($c!==null)return $c;if(typeof OffscreenCanvas<"u")return $c=new OffscreenCanvas(1,1).getContext("2d"),$c;if(typeof document<"u")return $c=document.createElement("canvas").getContext("2d"),$c;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Exe(e){let t=U6.get(e);return t||(t=new Map,U6.set(e,t)),t}function ba(e,t){let n=t.get(e);return n===void 0&&(n={width:Dx().measureText(e).width,containsCJK:Qr(e)},t.set(e,n)),n}function D0(){if(Nc!==null)return Nc;if(typeof navigator>"u")return Nc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Nc;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Nc={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Nc}function Txe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function $7(){return bk===null&&(bk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),bk}function Ixe(e){return Axe.test(e)||e.includes("️")}function $xe(e){return Mxe.test(e)}function Nxe(e,t){let n=V6.get(e);if(n!==void 0)return n;const o=Dx();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const r=i.getBoundingClientRect().width;document.body.removeChild(i),s-r>.5&&(n=s-r)}return V6.set(e,n),n}function Lxe(e){let t=0;const n=$7();for(const o of n.segment(e))Ixe(o.segment)&&t++;return t}function Fxe(e,t){return t.emojiCount===void 0&&(t.emojiCount=Lxe(e)),t.emojiCount}function Tu(e,t,n){return n===0?t.width:t.width-Fxe(e,t)*n}function Oxe(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=$7(),r=[];for(const c of i.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=ba(d,n);c.push(Tu(d,f,o))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>Cxe){const c=[];let d=null,f=0;for(const p of r){const h=ba(p,n),m=Tu(p,h,o);if(d===null)c.push(m);else{const k=d+p,w=ba(k,n);c.push(Tu(k,w,o)-f)}d=p,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=ba(a,n),f=Tu(a,d,o);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function Rxe(e,t){const n=Dx();n.font=e;const o=Exe(e),s=Txe(e),i=t?Nxe(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function Pxe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function N7(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function L7(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function Bx(e,t){return t===0?0:e+t}function zxe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Wxe(e,t,n,o,s){const i=t==="tab"?s+zxe(e,n):e.lineEndFitAdvances[n];return Bx(o,i)}function q6(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return Bx(o,s)}function K6(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return Bx(o,i)}function Hxe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function jxe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function $1(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const r=e.kinds[i];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function Vxe(e,t,n,o,s,i){return t+Uxe(e,n,o,s,i)}function qxe(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r}=e;if(o.length===0)return 0;const a=D0().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,p=0,h=0,m=0,k=0,w=-1,v=0;function y(){w=-1,v=0}function b(R=m,P=k,M=d){c++,n?.(M,p,h,R,P),d=0,f=!1,y()}function S(R,P){f=!0,p=R,h=0,m=R+1,k=0,d=P}function I(R,P,M){f=!0,p=R,h=P,m=R,k=P+1,d=M}function T(R,P){if(!f){S(R,P);return}d+=P,m=R+1,k=0}function $(R,P){const M=i[R],D=r[R]??null;let B=D===null?-1:$1(D,0,P+1),z=-1,A=0,L=P;for(;Lu){if(D!==null&&z>P){b(R,z,A),L=z,B=$1(D,B,L+1),z=-1,A=0;continue}b(),I(R,L,W)}else d+=W,m=R,k=L+1;const j=L+1;D!==null&&D[B]===j&&(z=j,A=d,B++),L++}f&&m===R&&k===M.length&&(m=R+1,k=0)}let F=0;for(;F=o.length));){const R=o[F],P=s[F],M=N7(P);if(!f){R>u&&i[F]!==null?$(F,0):S(F,R),M&&(w=F+1,v=d-R),F++;continue}if(d+R>u){if(M){T(F,R),b(F+1,0,d-R),F++;continue}if(w>=0){if(m>w||m===w&&k>0){b();continue}b(w,0,v);continue}if(R>u&&i[F]!==null){b(),$(F,0),F++;continue}b();continue}T(F,R),M&&(w=F+1,v=d-R),F++}return f&&b(),c}function Kxe(e,t,n){if(e.simpleLineWalkFastPath)return qxe(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(o.length===0||a.length===0)return 0;const u=D0(),c=u.lineFitEpsilon,d=t+c;let f=0,p=0,h=!1,m=0,k=0,w=0,v=0,y=-1,b=0,S=0,I=null;function T(){y=-1,b=0,S=0,I=null}function $(){return I==="soft-hyphen"&&y===w&&v===0?S:p}function F(A=w,L=v,W){f++,n!==void 0&&n(Vxe(e,W??$(),m,k,A,L),m,k,A,L),p=0,h=!1,T()}function R(A,L){h=!0,m=A,k=0,w=A+1,v=0,p=L}function P(A,L,W){h=!0,m=A,k=L,w=A,v=L+1,p=W}function M(A,L){if(!h){R(A,L);return}p+=L,w=A+1,v=0}function D(A,L,W,j,re,Q){if(!L)return;const Y=q6(e,A,W,re),G=K6(e,A,W,re,j);y=W+1,b=p-Q+Y,S=p-Q+G,I=A}function B(A,L){const W=i[A],j=r[A]??null;let re=j===null?-1:$1(j,0,L+1),Q=-1,Y=0,G=L;for(;Gd){if(j!==null&&Q>L){F(A,Q,Y),G=Q,re=$1(j,re,G+1),Q=-1,Y=0;continue}F(),P(A,G,X)}else p=me,w=A,v=G+1}const te=G+1;j!==null&&j[re]===te&&(Q=te,Y=p,re++),G++}h&&w===A&&v===W.length&&(w=A+1,v=0)}function z(A){f++,n?.(0,A.startSegmentIndex,0,A.consumedEndSegmentIndex,0),T()}for(let A=0;A=L.endSegmentIndex));){const j=s[W],re=N7(j),Q=Bxe(e,h,W),Y=j==="tab"?Dxe(p+Q,e.tabStopAdvance):o[W],G=Q+Y,X=Wxe(e,j,W,Q,Y);if(j==="soft-hyphen"){h&&(w=W+1,v=0,y=W+1,b=p+l,S=p+l,I=j),W++;continue}if(!h){X>d&&i[W]!==null?B(W,0):R(W,Y),D(j,re,W,Y,Q,G),W++;continue}if(p+X>d){const q=p+q6(e,j,W,Q),me=p+K6(e,j,W,Q,Y);if(I==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&b<=d){F(y,0,S);continue}if(re&&q<=d){M(W,G),F(W+1,0,me),W++;continue}if(y>=0&&b<=d){if(w>y||w===y&&v>0){F();continue}const xe=y;F(xe,0,S),W=xe;continue}if(X>d&&i[W]!==null){F(),B(W,0),W++;continue}F();continue}M(W,G),D(j,re,W,Y,Q,G),W++}if(h){const j=y===L.consumedEndSegmentIndex?S:p;F(L.consumedEndSegmentIndex,0,j)}}return f}let wk=null;function zx(){return wk===null&&(wk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),wk}function Gxe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function Zxe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,p){o=[d],s=f,i=p,r=u2(d),l=O0.has(d)}function c(d,f){o.push(d),i=i||f;const p=u2(d);d.length===1&&Gu.has(d)?r=r||p:r=p,l=!1}for(const d of zx().segment(e)){const f=d.segment,p=Qr(f);if(o.length===0){u(f,d.index,p);continue}if(l||Ox.has(f)||Gu.has(f)||t.carryCJKAfterClosingQuote&&p&&r){c(f,p);continue}if(!i&&!p){c(f,p);continue}a(),u(f,d.index,p)}return a(),n}function Yxe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(a,u){const c=t[a].start,d=u=0&&!E7(t[a-1].text,n)&&l(a),s<0&&(s=a),i=i||Qr(u.text)}return l(t.length),o}function G6(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=zx();for(const s of o.segment(e))n++;return n}function Jxe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Xxe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of zx().segment(e))n++,Jxe(o.segment)&&t.push(n);return t.length===0?null:t}function Qxe(e,t,n){return t>1?e+(t-1)*n:e}function e_e(e,t,n,o,s){const i=D0(),{cache:r,emojiCorrection:l}=Rxe(t,$xe(e.normalized)),a=Tu("-",ba("-",r),l)+(s===0?0:s*2),c=Tu(" ",ba(" ",r),l)*8,d=s!==0;if(e.len===0)return Gxe();const f=[],p=[],h=[],m=[];let k=e.chunks.length<=1&&!d;const w=n?[]:null,v=[],y=[],b=[],S=n?[]:null,I=Array.from({length:e.len});function T(P,M,D,B,z,A,L,W,j){z!=="text"&&z!=="space"&&z!=="zero-width-break"&&(k=!1),f.push(M),p.push(D),h.push(B),m.push(z),w?.push(A),v.push(L),y.push(W),d&&b.push(j),S!==null&&S.push(P)}function $(P,M,D,B,z){const A=ba(P,r),L=d?G6(P,M):0,W=Qxe(Tu(P,A,l),L,s),j=M==="space"||M==="preserved-space"||M==="zero-width-break"?0:W,re=j===0?0:j+(L>0?s:0),Q=M==="space"||M==="zero-width-break"?0:W;if(z&&B&&P.length>1){let Y="sum-graphemes";s!==0?Y="segment-prefixes":I1(P)?Y="pair-context":i.preferPrefixWidthsForBreakableRuns&&(Y="segment-prefixes");const G=Oxe(P,A,r,l,Y),X=G===null||o==="keep-all"?null:Xxe(P);T(P,W,re,Q,M,D,G,X,L);return}T(P,W,re,Q,M,D,null,null,L)}for(let P=0;P{n>t&&(t=n)}),t}function i_e(e){const t=e.toLowerCase(),n=[];let o=0;for(const s of e){const i=s.toLowerCase().length;for(let r=0;r=0&&ao[0]-s[0]),n=[];for(const o of t){const s=n.at(-1);s&&o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):n.push([...o])}return n}function Y6(e,t){if(!t||t.length===0||e.length===0)return[{text:e,hit:!1}];const n=[];let o=0;for(const[s,i]of r_e(t)){const r=Math.max(0,Math.min(s,e.length)),l=Math.max(r,Math.min(i,e.length));l<=r||(r>o&&n.push({text:e.slice(o,r),hit:!1}),n.push({text:e.slice(r,l),hit:!0}),o=l)}return o0?n:[{text:e,hit:!1}]}function J6(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function l_e(e,t){const n=e.toLowerCase();let o=-1,s=-1,i=0;for(let r=0;r0,l.value=v.scrollTop+v.clientHeight{const v={},y="var(--menu-scroll-fade)";let b;return r.value&&l.value?b=`linear-gradient(to bottom, transparent 0, black ${y}, black calc(100% - ${y}), transparent 100%)`:r.value?b=`linear-gradient(to bottom, transparent, black ${y})`:l.value&&(b=`linear-gradient(to top, transparent, black ${y})`),b&&(v.maskImage=b,v.WebkitMaskImage=b),u.value&&(v.maxHeight=u.value),Object.keys(v).length>0?v:void 0}),f=O(()=>{const v=a.value;return v?{top:`${v.top}px`,height:`${v.height}px`}:void 0});function p(){const v=t.value,y=n.value,b=v?.offsetParent;if(!v||!y||!b)return;const S=getComputedStyle(v),I=If(v,"--space-2",8),T=(parseFloat(S.paddingTop)||0)+(parseFloat(S.paddingBottom)||0),$=If(y,o,Number.POSITIVE_INFINITY),F=window.visualViewport?.offsetTop??0,R=b.getBoundingClientRect().top-F-I-T;u.value=`${Math.max(Math.floor(Math.min($,R)),0)}px`,xt(c)}function h(){const v=n.value;if(!v)return;const y=v.querySelectorAll('[role="option"]')[s?.value??-1];if(!y)return;const b=v.getBoundingClientRect(),S=y.getBoundingClientRect(),I=S.top-b.top+v.scrollTop,T=I+S.height;Iv.scrollTop+v.clientHeight&&(v.scrollTop=T-v.clientHeight)}let m=null;function k(v){const y=n.value,b=a.value;if(!y||!b)return;v.preventDefault(),m?.();const S=v.pointerId;(v.target instanceof Element?v.target:null)?.setPointerCapture?.(S);const T=If(y,"--menu-scrollbar-track-inset",0),$=y.clientHeight-T*2-b.height,F=y.scrollHeight-y.clientHeight,R=v.clientY,P=y.scrollTop,M=z=>{z.pointerId!==S||$<=0||(y.scrollTop=P+(z.clientY-R)/$*F)},D=z=>{z.pointerId===S&&m?.()};m=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),m=null},window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)}let w=null;return Sn(()=>{if(typeof ResizeObserver=="function"&&n.value){w=new ResizeObserver(y=>{for(const b of y)b.target===n.value?c():p()}),w.observe(n.value);const v=t.value?.offsetParent;v&&w.observe(v)}window.addEventListener("resize",p),window.visualViewport?.addEventListener("resize",p),window.visualViewport?.addEventListener("scroll",p),p(),c()}),En(()=>{w?.disconnect(),w=null,m?.(),window.removeEventListener("resize",p),window.visualViewport?.removeEventListener("resize",p),window.visualViewport?.removeEventListener("scroll",p)}),Ye(()=>[s?.value,i?.value],()=>{xt(()=>{c(),h()})}),{atTop:r,atBottom:l,thumb:a,scrollStyle:d,thumbStyle:f,onScroll:c,onThumbPointerDown:k}}const u_e={key:0,class:"slash-empty",role:"status"},c_e=["id","aria-selected","onMouseenter","onMousedown"],d_e={class:"slash-name"},f_e={key:0,class:"slash-match"},p_e={class:"slash-desc"},h_e={key:0,class:"slash-desc-match"},m_e=Ze({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{default:()=>[]}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),r=V(null),l=O(()=>n.activeIndex),a=O(()=>n.items),{thumb:u,scrollStyle:c,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=F7({menuEl:i,scrollEl:r,maxHeightVar:"--p-slash-menu-h",activeIndex:l,refreshKey:a}),h=O(()=>n.items.map((m,k)=>{const w=m.isSkill?m.desc:s(m.desc),v=n.ranges[k]??a_e(n.query,m.name,w);return{item:m,namePieces:Y6(m.name,v.name),desc:w,descPieces:Y6(w,v.desc)}}));return(m,k)=>(g(),C("div",{ref_key:"menuEl",ref:i,class:"slash-menu","data-menu-frame":""},[n.items.length===0?(g(),C("div",u_e,N(x(s)("composer.noCommands")),1)):oe("",!0),_("div",{ref_key:"scrollEl",ref:r,class:"slash-scroll",role:"listbox",style:jt(x(c)),onScroll:k[0]||(k[0]=(...w)=>x(f)&&x(f)(...w))},[(g(!0),C(Te,null,st(h.value,(w,v)=>(g(),C("div",{id:`composer-slash-option-${v}`,key:`${w.item.name}-${v}`,class:ze(["slash-item",{active:v===n.activeIndex}]),role:"option","aria-selected":v===n.activeIndex,onMouseenter:y=>o("hover",v),onMousedown:Ct(y=>o("select",w.item),["prevent"])},[_("span",d_e,[(g(!0),C(Te,null,st(w.namePieces,(y,b)=>(g(),C(Te,{key:b},[y.hit?(g(),C("span",f_e,N(y.text),1)):(g(),C(Te,{key:1},[qe(N(y.text),1)],64))],64))),128))]),_("span",p_e,[(g(!0),C(Te,null,st(w.descPieces,(y,b)=>(g(),C(Te,{key:b},[y.hit?(g(),C("span",h_e,N(y.text),1)):(g(),C(Te,{key:1},[qe(N(y.text),1)],64))],64))),128))])],42,c_e))),128))],36),x(u)&&n.items.length>0?(g(),C("div",{key:1,class:"scroll-thumb",style:jt(x(d)),onPointerdown:k[1]||(k[1]=(...w)=>x(p)&&x(p)(...w))},null,36)):oe("",!0)],512))}}),g_e=ht(m_e,[["__scopeId","data-v-d671dff5"]]),v_e={key:0,class:"mention-state dim",role:"status"},y_e={key:1,class:"mention-state dim",role:"status"},k_e=["id","aria-selected","onMouseenter","onMousedown"],b_e=["innerHTML"],w_e={class:"mention-name"},x_e={key:0,class:"mention-hit"},__e={class:"mention-meta"},S_e=["innerHTML"],C_e={class:"mention-name"},A_e={key:0,class:"mention-hit"},M_e={key:0,class:"mention-meta"},E_e={key:0,class:"mention-hit"},T_e=Ze({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean,default:!1},stale:{type:Boolean,default:!1}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),r=V(null),l=O(()=>n.activeIndex),a=O(()=>n.items),{thumb:u,scrollStyle:c,thumbStyle:d,onScroll:f,onThumbPointerDown:p}=F7({menuEl:i,scrollEl:r,maxHeightVar:"--p-mention-menu-h",activeIndex:l,refreshKey:a});function h(y){const b=y.endsWith("/")?y.slice(0,-1):y,S=b.lastIndexOf("/");return S===-1?"":b.slice(0,S)}function m(y){const b=y.file.path.endsWith("/")?y.file.path.slice(0,-1):y.file.path;return xk(y.file.name,y.file.matchPositions,Math.max(0,b.length-y.file.name.length))}function k(y){return xk(h(y.file.path),y.file.matchPositions,0)}function w(y){return xk(y.skill.name,y.matchPositions,0)}function v(y){return y.kind==="skill"?`skill:${y.skill.name}`:y.file.path}return(y,b)=>(g(),C("div",{ref_key:"menuEl",ref:i,class:"mention-menu","data-menu-frame":""},[n.loading&&n.items.length===0?(g(),C("div",v_e,N(x(s)("mention.searching")),1)):n.items.length===0?(g(),C("div",y_e,N(x(s)("mention.noMatch")),1)):oe("",!0),n.loading&&n.items.length>0?(g(),pe(ns,{key:2,class:"mention-spin",size:"sm",label:x(s)("mention.searching")},null,8,["label"])):oe("",!0),_("div",{ref_key:"scrollEl",ref:r,class:"mention-scroll",role:"listbox",style:jt(x(c)),onScroll:b[0]||(b[0]=(...S)=>x(f)&&x(f)(...S))},[(g(!0),C(Te,null,st(n.items,(S,I)=>(g(),C("div",{id:`composer-mention-option-${I}`,key:v(S),class:ze(["mention-item",{active:I===n.activeIndex,stale:n.stale&&S.kind!=="skill"}]),role:"option","aria-selected":I===n.activeIndex,onMouseenter:T=>o("hover",I),onMousedown:Ct(T=>o("select",S),["prevent"])},[S.kind==="skill"?(g(),C(Te,{key:0},[_("span",{class:"mention-icon",innerHTML:x(ki)("sparkles","sm"),"aria-hidden":"true"},null,8,b_e),_("span",w_e,[(g(!0),C(Te,null,st(w(S),(T,$)=>(g(),C(Te,{key:$},[T.hit?(g(),C("span",x_e,N(T.text),1)):(g(),C(Te,{key:1},[qe(N(T.text),1)],64))],64))),128))]),_("span",__e,N(S.skill.description),1)],64)):(g(),C(Te,{key:1},[_("span",{class:"mention-icon",innerHTML:x(aw)(S.file.path,S.file.name),"aria-hidden":"true"},null,8,S_e),_("span",C_e,[(g(!0),C(Te,null,st(m(S),(T,$)=>(g(),C(Te,{key:$},[T.hit?(g(),C("span",A_e,N(T.text),1)):(g(),C(Te,{key:1},[qe(N(T.text),1)],64))],64))),128))]),h(S.file.path)?(g(),C("span",M_e,[(g(!0),C(Te,null,st(k(S),(T,$)=>(g(),C(Te,{key:$},[T.hit?(g(),C("span",E_e,N(T.text),1)):(g(),C(Te,{key:1},[qe(N(T.text),1)],64))],64))),128))])):oe("",!0)],64))],42,k_e))),128))],36),x(u)&&n.items.length>0?(g(),C("div",{key:3,class:"scroll-thumb",style:jt(x(d)),onPointerdown:b[1]||(b[1]=(...S)=>x(p)&&x(p)(...S))},null,36)):oe("",!0)],512))}}),I_e=ht(T_e,[["__scopeId","data-v-1db50d1d"]]),O7=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/workflow",desc:"commands.dynamicWorkflow.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/auto",desc:"commands.auto.desc"},{name:"/yolo",desc:"commands.yolo.desc"},{name:"/thinking",desc:"commands.thinking.desc"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function $_e(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const N1="skill:";function N_e(e){return e.startsWith(N1)?e.slice(N1.length):e}function R7(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${N1}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...O7,...t]}function L_e(e,t=O7){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let r=0;return i===n?r=3:i.startsWith(n)?r=2:i.includes(n)&&(r=1),{item:o,index:s,score:r}}).filter(({score:o})=>o>0).sort((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}function B0(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function P7(e){return e?.supportEfforts??[]}function F_e(e){return e[Math.floor(e.length/2)]}function Yp(e){if(B0(e)==="unsupported")return"off";const t=P7(e);return t.length>0?e?.defaultEffort??F_e(t):"on"}function kh(e){const t=P7(e),n=B0(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function Jp(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function O_e(e){return e!=="off"}function R_e(e,t){return kh(e).includes(t)}function Wx(e,t){return t==="off"?"off":t==="on"?Yp(e):t}function L1(e,t){return t??Yp(e)}function P_e(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function D_e(e,t,n){return!n||e===void 0?t:Yp(e)}const F1=100;function B_e(e){const t=Rd(rn.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>F1?n.slice(-F1):n,s={[e]:o};return Wa(rn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function z_e(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=V(B_e(s())),r=O(()=>i.value[s()??""]??[]);let l=-1,a="";function u(w){const v=s();if(l=-1,!v)return;const y=w.trim();if(!y)return;const b=i.value[v]??[];if(b.at(-1)===y)return;const S=[...b,y],I=S.length>F1?S.slice(-F1):S;i.value={...i.value,[v]:I},Wa(rn.inputHistory,i.value)}function c(){const w=n.value;return w?(w.selectionStart??0)===0:!1}function d(w){t.value=w,xt(()=>{const v=n.value;if(!v)return;o();const y=w.length;v.setSelectionRange(y,y)})}function f(){const w=r.value;if(w.length!==0){if(l===-1)a=t.value,l=w.length-1;else if(l>0)l-=1;else return;d(w[l])}}function p(){if(l===-1)return;const w=r.value;l0}return Ye(s,()=>{l=-1}),{push:u,caretAtTextStart:c,recallOlder:f,recallNewer:p,resetBrowsing:h,isBrowsing:m,hasHistory:k}}function W_e(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:r,clearDraft:l}=e,a=V(!1),u=V([]),c=V(0);function d(){const p=t.value;p.startsWith("/")&&!p.includes(" ")?(u.value=L_e(p,R7(s())),c.value=0,a.value=u.value.length>0):a.value=!1}function f(p){if(a.value=!1,p.acceptsInput){t.value=`${p.name} `,xt(()=>{const h=n.value;if(!h)return;const m=t.value.length;h.setSelectionRange(m,m),h.focus(),o()});return}t.value="",l?.(),r(p.name),i(p.name)}return{open:a,items:u,active:c,update:d,select:f}}function H_e(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s,searchSkills:i,insertSkill:r}=e,l=V(!1),a=V([]),u=V(0),c=V(!1),d=V(!1);let f=null,p=0;function h(){const w=t.value,v=n.value?.selectionStart??w.length;let y=v-1;for(;y>=0&&!/\s/.test(w[y]);)y--;y++;const b=w.slice(y,v);return b.startsWith("@")?{token:b.slice(1),start:y,end:v}:null}function m(){const w=h(),v=s(),y=i?.();if(!w||!v&&!y){l.value=!1,d.value=!1;return}const b=w.token;f!==null&&clearTimeout(f),f=setTimeout(async()=>{const S=++p;c.value=!0,l.value=!0,u.value=0,a.value.length>0&&(d.value=!0);try{const[I,T]=await Promise.all([v?v(b).catch(()=>[]):Promise.resolve([]),y?y(b).catch(()=>[]):Promise.resolve([])]);if(S!==p)return;a.value=[...I.map($=>({kind:$.path.endsWith("/")?"folder":"file",file:{...$,matchPositions:Z6(b,$.path)}})),...T.map($=>({kind:"skill",skill:$,matchPositions:Z6(b,$.name)}))]}catch{S===p&&(a.value=[])}finally{S===p&&(c.value=!1,d.value=!1)}},200)}function k(w){const v=h();if(!v)return;if(l.value=!1,w.kind==="skill"){r?.(w.skill.name);return}const y=t.value,b=w.file.name||w.file.path.split(/[\\/]/).findLast(Boolean)||w.file.path,S=b$({kind:w.kind,name:b,path:w.file.path});t.value=`${y.slice(0,v.start)}${S} ${y.slice(v.end)}`,xt(()=>{const I=n.value;if(!I)return;const T=v.start+S.length+1;I.setSelectionRange(T,T),I.focus(),o()})}return{open:l,items:a,active:u,loading:c,stale:d,update:m,select:k}}function j_e(e){const{sessionId:t}=e;function n(u){return zo(e4(u))??""}function o(u,c){const d=e4(u);c?ts(d,c):Hu(d)}const s=V(n(t())),i=V(null);function r(){const u=i.value;u&&(u.style.height="auto",u.style.height=`${u.scrollHeight}px`)}Ye(s,u=>{xt(r),o(t(),u)}),Ye(t,(u,c)=>{u!==c&&(o(c,s.value),s.value=n(u),xt(r))});function l(u){s.value=u,xt(()=>{const c=i.value;if(!c)return;c.focus();const d=u.length;c.setSelectionRange(d,d),r()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:r,loadForEdit:l,clearDraft:a}}function U_e(e){const{uploadImage:t,sessionId:n}=e,o=V({}),s=O(()=>o.value[n()??""]??[]),i=V(null),r=V(null),l=V(!1);let a=0;function u(){return`att_${++a}`}function c(L,W){o.value={...o.value,[L]:W}}function d(L){if(L.previewUrl!==void 0)try{URL.revokeObjectURL(L.previewUrl)}catch{}}function f(L){return L.startsWith("image/")?"image":L.startsWith("video/")?"video":"file"}async function p(L){const W=t();if(!W)return;const j=n()??"";if(L.length!==0)for(const re of L){const Q=f(re.type),Y=u(),G=Q==="file"?void 0:URL.createObjectURL(re),X={localId:Y,name:re.name,kind:Q,previewUrl:G,mediaType:re.type||"application/octet-stream",size:re.size,uploading:!0};c(j,[...o.value[j]??[],X]),W(re,re.name).then(te=>{const q=o.value[j]??[];c(j,q.map(me=>me.localId===Y?{...me,uploading:!1,fileId:te?.fileId,mediaType:te?.mediaType??me.mediaType,error:te===null}:me))}).catch(()=>{const te=o.value[j]??[];c(j,te.map(q=>q.localId===Y?{...q,uploading:!1,error:!0}:q))})}}function h(L){const W=n()??"",j=o.value[W]??[],re=j.find(Q=>Q.localId===L);i.value?.localId===L&&(i.value=null),re&&d(re),c(W,j.filter(Q=>Q.localId!==L))}function m(L){i.value=L}function k(){i.value=null}function w(){r.value?.click()}function v(L){const W=L.target,j=Array.from(W.files??[]);p(j),W.value=""}function y(L){if(!t())return;const W=L.clipboardData;if(!W)return;const j=[],re=new Set,Q=(Y,G)=>{const X=`${Y.size}:${Y.type}:${G}`;if(re.has(X))return;re.add(X);const te=Y.type.split("/")[1]??"png",q=G.includes(".")?G:`paste-${Date.now()}.${te}`;j.push(Y instanceof File?Y:new File([Y],q,{type:Y.type}))};for(const Y of Array.from(W.items))if(Y.kind==="file"){const G=Y.getAsFile();G&&Q(G,G.name||`paste-${Date.now()}.${Y.type.split("/")[1]??"png"}`)}for(const Y of Array.from(W.files))Q(Y,Y.name);j.length!==0&&(L.preventDefault(),p(j))}let b=0;function S(L){!t()||!Array.from(L.dataTransfer?.items??[]).some(j=>j.kind==="file")||(L.preventDefault(),L.stopPropagation(),l.value=!0)}function I(){l.value=!1}function T(L){if(b=0,l.value=!1,!t())return;L.preventDefault(),L.stopPropagation();const W=Array.from(L.dataTransfer?.files??[]);p(W)}function $(L){return Array.from(L.dataTransfer?.items??[]).some(W=>W.kind==="file")}function F(L){!t()||!$(L)||(L.preventDefault(),b+=1,l.value=!0)}function R(L){!t()||!$(L)||L.preventDefault()}function P(L){!t()||!$(L)||(b=Math.max(0,b-1),b===0&&(l.value=!1))}function M(L){if(b=0,l.value=!1,!t())return;L.preventDefault();const W=Array.from(L.dataTransfer?.files??[]);p(W)}function D(){const L=n()??"";for(const W of o.value[L]??[])d(W);c(L,[])}function B(L,W,j){const re=o.value[L]??[];re.some(Q=>Q.localId===W)&&c(L,re.map(Q=>Q.localId===W?{...Q,...j}:Q))}function z(L){return fetch(L).then(W=>{if(!W.ok)throw new Error(`fetch failed: ${W.status}`);return W.blob()})}function A(L){const W=n()??"";for(const j of o.value[W]??[])d(j);c(W,[]);for(const j of L){const re=u(),Q=/^data:/i.test(j.url),Y=/^blob:/i.test(j.url),G=j.name??j.kind;if(j.fileId){const X={localId:re,name:G,kind:j.kind,previewUrl:j.kind==="file"?void 0:j.url,uploading:!1,fileId:j.fileId};c(W,[...o.value[W]??[],X]),j.kind!=="file"&&!Q&&!Y&&St().getFileBlob(j.fileId).then(te=>{const q=URL.createObjectURL(te);if(!(o.value[W]??[]).some(xe=>xe.localId===re)){URL.revokeObjectURL(q);return}B(W,re,{previewUrl:q})}).catch(()=>{})}else{if(!j.url)continue;const X=t();if(!X)continue;const te={localId:re,name:G,kind:j.kind,previewUrl:j.url,uploading:!0};c(W,[...o.value[W]??[],te]),z(j.url).then(q=>{const me=G.includes(".")?G:`${G}.${q.type.split("/")[1]??"bin"}`;return X(q,me)}).then(q=>{if(q===null){const me=o.value[W]??[];c(W,me.filter(xe=>xe.localId!==re));return}B(W,re,{uploading:!1,fileId:q.fileId})}).catch(()=>{const q=o.value[W]??[];c(W,q.filter(me=>me.localId!==re))})}}}return Ye(n,()=>{i.value=null}),Sn(()=>{document.addEventListener("paste",y),document.addEventListener("dragenter",F),document.addEventListener("dragover",R),document.addEventListener("dragleave",P),document.addEventListener("drop",M)}),En(()=>{document.removeEventListener("paste",y),document.removeEventListener("dragenter",F),document.removeEventListener("dragover",R),document.removeEventListener("dragleave",P),document.removeEventListener("drop",M);for(const L of Object.values(o.value))for(const W of L)d(W);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:r,isDragOver:l,removeAttachment:h,openAttachmentPreview:m,closeAttachmentPreview:k,openFilePicker:w,handleFileInputChange:v,handleDragOver:S,handleDragLeave:I,handleDrop:T,clearAfterSubmit:D,loadAttachments:A}}const V_e={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},q_e=["stroke-dasharray","stroke-dashoffset"],_k=7,K_e=Ze({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*_k;return(o,s)=>(g(),C("svg",V_e,[_("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:_k,fill:"none","stroke-width":"2.5"}),_("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:_k,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,q_e)]))}}),G_e=ht(K_e,[["__scopeId","data-v-97f3cf66"]]),Z_e=["aria-selected","onClick"],Y_e=Ze({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),C("div",{class:ze(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[(g(!0),C(Te,null,st(e.options,i=>(g(),C("button",{key:i.value,class:ze(["ui-seg__item",{"is-on":i.value===e.modelValue}]),type:"button",role:"tab","aria-selected":i.value===e.modelValue,onClick:r=>n("update:modelValue",i.value)},N(i.label),11,Z_e))),128))],2))}}),zs=ht(Y_e,[["__scopeId","data-v-bffb3dae"]]),Sk=["pythinking","pyreasoning","pypondering","pyplanning","pyiterating","pyorchestrating","reasonating","pondercrafting","neuroning","logic-weaving","rubber-duckoning","token-wrangling","bug-whispering","stack-divining","gizmo-tinkering"],D7=6e4;function J_e(e=Date.now()){const t=Math.floor(e/D7)%Sk.length;return Sk[t]??Sk[0]}function X_e(e=Date.now()){return`${J_e(e)}…`}const Cl=["⣷","⣯","⣟","⡿","⢿","⣻","⣽","⣾"],Bu=80,Q_e=["aria-label"],eSe=Ze({__name:"ActivitySpinner",props:{fast:{type:Boolean},label:{}},setup(e){const t=Cl.length*Bu,n=Bu/2,o=e,s=V(Date.now());let i;Sn(()=>{o.label===void 0&&(i=setInterval(()=>{s.value=Date.now()},D7))}),En(()=>{i!==void 0&&clearInterval(i)});const r=O(()=>o.label??X_e(s.value));function l(a){return{"--spinner-frame-delay":`${a*Bu-t}ms`,"--spinner-frame-fast-delay":`${a*n-t/2}ms`}}return(a,u)=>(g(),C("span",{class:ze(["activity-spin",{"activity-spin--fast":e.fast}]),"aria-label":r.value,role:"img"},[(g(!0),C(Te,null,st(x(Cl),(c,d)=>(g(),C("span",{key:c,class:"activity-frame",style:jt(l(d)),"aria-hidden":"true"},N(c),5))),128))],10,Q_e))}}),Ck=ht(eSe,[["__scopeId","data-v-c12d8332"]]),tSe=["disabled"],nSe={key:0,class:"leading"},oSe={class:"label"},sSe={key:1,class:"count"},iSe={key:2,class:"trailing"},rSe=Ze({__name:"MenuRow",props:{count:{},active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(g(),C("button",{type:"button",class:ze(["menu-row",{active:e.active,selected:e.selected,disabled:e.disabled}]),disabled:e.disabled},[t.$slots.leading?(g(),C("span",nSe,[An(t.$slots,"leading",{},void 0,!0)])):oe("",!0),_("span",oSe,[An(t.$slots,"label",{},()=>[An(t.$slots,"default",{},void 0,!0)],!0)]),e.count!==void 0?(g(),C("span",sSe,N(e.count),1)):oe("",!0),t.$slots.trailing?(g(),C("span",iSe,[An(t.$slots,"trailing",{},void 0,!0)])):oe("",!0)],10,tSe))}}),Lc=ht(rSe,[["__scopeId","data-v-261bf74a"]]),lSe=["aria-checked","disabled"],aSe=Ze({__name:"SwitchToggle",props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function s(){n.disabled||o("update:modelValue",!n.modelValue)}function i(r){n.disabled||r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),s())}return(r,l)=>(g(),C("button",{type:"button",class:"switch-toggle",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,onClick:s,onKeydown:i},[...l[0]||(l[0]=[_("span",{class:"track","aria-hidden":"true"},null,-1),_("span",{class:"thumb","aria-hidden":"true"},null,-1)])],40,lSe))}}),X6=ht(aSe,[["__scopeId","data-v-169237c7"]]);function uSe(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const cSe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function _r(e){const t=e.replaceAll("\\","/"),n=cSe.test(t),o=t.replace(/\/+$/,"");return n?o.toLowerCase():o}function dSe(e,t){const n=_r(t.cwd);return e.find(o=>_r(o.root)===n)?.id??t.workspaceId??t.cwd}function fSe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:o,sessionsHasMoreByWorkspace:s}=e,i=new Set(o.map(_r)),r=new Map;for(const d of t){const f=_r(d.root);i.has(f)||r.has(f)||r.set(f,{...d})}for(const d of n){const f=d.cwd;if(!f)continue;const p=_r(f);i.has(p)||r.has(p)||r.set(p,{id:d.workspaceId??f,root:f,name:uSe(f),sessionCount:0})}const l=new Map;for(const d of n){const f=dSe(t,d);l.set(f,(l.get(f)??0)+1)}const a=[];for(const d of t){const f=_r(d.root);!i.has(f)&&!a.includes(f)&&a.push(f)}const u=[...r.keys()].filter(d=>!a.includes(d));u.sort((d,f)=>r.get(d).root.localeCompare(r.get(f).root));const c=[];for(const d of[...a,...u]){const f=r.get(d),p=l.get(f.id)??l.get(f.root)??0,h=s[f.id]===!1?p:Math.max(f.sessionCount,p);c.push({...f,sessionCount:h})}return c}function pSe(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const o=new Set(t.map(r=>r.id)),s=new Set(t.filter(r=>r.role==="user").map(r=>r.id)),i=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||o.has(r.id)||r.role==="user"&&r.promptId!==void 0&&s.has(r.promptId))});return i.length>0?[...i,...t]:t}function Q6(e,t){const n=new Set(e.map(a=>a.id)),o=t.filter(a=>a.kind==="subagent"&&!n.has(a.id));if(o.length===0)return e;const s=new Map(e.map(a=>[a.id,a])),i=new Set,r=o.map(a=>{const u=a.backgroundTaskId!==void 0?s.get(a.backgroundTaskId):void 0;if(u===void 0)return a;i.add(u.id);const c=a.status==="running"&&u.status!=="running";return{...a,status:a.status==="running"?u.status:a.status,subagentPhase:c?u.status==="completed"?"completed":u.status==="cancelled"?"cancelled":"failed":a.subagentPhase,agentId:a.agentId??u.agentId,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort,completedAt:a.completedAt??u.completedAt,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes}});return[...e.filter(a=>!i.has(a.id)),...r]}function hSe(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),o=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);return l?{...r,outputLines:l.outputLines,text:l.text}:r}),i=t.filter(r=>!o.has(r.id));return i.length===0?s:[...s,...i]}function mSe(e){const t=new Map,n=new Set;function o(i){const r=t.get(i);if(r!==void 0)return r;const l=(async()=>e(i))().finally(()=>{t.delete(i),n.delete(i)&&o(i)});return t.set(i,l),l}function s(i){if(t.has(i)){n.add(i);return}o(i)}return{run:o,request:s}}const gSe=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function vSe(e){return gSe.has(e.type)}const ySe=50,kSe=100,d2=32*1024,bSe={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,ySe)},cancelTask(e){clearTimeout(e)}};function wSe(e,t,n={}){const o=n.scheduler??bSe,s=Math.max(1,Math.floor(n.maxItemsPerSlice??kSe)),i=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>i.length-r,f=()=>{u+=1,l!==null&&(o.cancelFrame(l),l=null),a!==null&&(o.cancelTask(a),a=null)},p=()=>{r===i.length?(i.length=0,r=0):r>=1024&&(i.splice(0,r),r=0)};let h;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,v=()=>{w===u&&h()};l=o.requestFrame(v),a=o.requestTask(v)};h=()=>{f();let w=0;for(;!c&&w{if(!c){if(t(w)){const v=i.length>r?i.at(-1):void 0,y=v===void 0?void 0:n.coalesce?.(v,w);y===void 0?i.push(w):i[i.length-1]=y,m();return}if(d()===0){e(w);return}i.push(w),h()}});return k.flush=()=>{if(!c){for(f();!c&&r{if(c||d()===0)return;let v=r;for(let y=r;y{c||(c=!0,f(),i.length=0,r=0)},k}function f2(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function xSe(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,o=f2(t);if(n===void 0||o===void 0||n.kind!==o.kind||o.value.length<=d2)return[e];const s=[];let i=0;for(;ii&&/[\uD800-\uDBFF]/u.test(o.value[r-1])&&/[\uDC00-\uDFFF]/u.test(o.value[r])&&(r-=1);const l=o.value.slice(i,r);s.push({appEvent:{...t,delta:o.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+i}}}),i=r}return s}function _Se(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,o=t.meta.stream,s=f2(e.appEvent),i=f2(t.appEvent);if(n===void 0||o===void 0||s===void 0||i===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==o.turnId||n.kind!==o.kind||s.kind!==i.kind||n.kind!==s.kind||o.kind!==i.kind||o.offset!==n.offset+s.value.length||s.value.length+i.value.length>d2)return;const r=s.value+i.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}const B7=[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],z7=new Set(["blue","mono"]),W7=new Set(["light","dark","system"]),H7=14,SSe=12,CSe=20,ASe={small:12,medium:14,large:16,xlarge:18};function MSe(){const e=zo(rn.accent);return e&&z7.has(e)?e:"blue"}function ESe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.accent=e)}function TSe(){const e=zo(rn.colorScheme);return e&&W7.has(e)?e:"system"}function ISe(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?"#121212":e==="light"?"#ffffff":null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?"#121212":"#ffffff";o.setAttribute("content",n??i)})}function Hx(e){return Number.isFinite(e)?Math.min(CSe,Math.max(SSe,Math.round(e))):H7}function jx(e){const t=Hx(e);return t<=13?"small":t<=15?"medium":t<=17?"large":"xlarge"}function j7(e){return ASe[e]}function $Se(){const e=zo(rn.uiFontSize);return e===null?H7:Hx(Number(e))}function NSe(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=jx(e))}const Ux=V(TSe()),Vx=V(MSe()),qx=V($Se());Ye(Ux,ISe,{immediate:!0});Ye(Vx,ESe,{immediate:!0});Ye(qx,NSe,{immediate:!0});function LSe(e){W7.has(e)&&(Ux.value=e,ts(rn.colorScheme,e))}function FSe(e){z7.has(e)&&(Vx.value=e,ts(rn.accent,e))}function OSe(e){const t=Hx(e);qx.value=t,ts(rn.uiFontSize,String(t))}const RSe=600,PSe=250,z0=250,DSe=1e3,BSe=160,O1=V(!1);let Su=[],Iu=null,R1=-z0;function zSe(){Su=[],R1=-z0,O1.value=!1,Iu!==null&&(clearTimeout(Iu),Iu=null)}function WSe(){O1.value=!0,Iu!==null&&clearTimeout(Iu),Iu=setTimeout(()=>{Iu=null,Su=[],R1=-z0,O1.value=!1},DSe)}function HSe(e){if(e<=0)return;const t=Date.now();Su.push({time:t,chars:e});const n=t-RSe;if(Su=Su.filter(l=>l.time>=n),t-R1l+a.chars,0)/s*1e3>=BSe&&WSe()}function Kx(){return{colorScheme:Ux,accent:Vx,uiFontSize:qx,fastMoon:O1,setColorScheme:LSe,setAccent:FSe,setUiFontSize:OSe,resetFastMoon:zSe,recordMoonDelta:HSe}}function jSe(e,t,n){return e==="idle"&&!t&&!n}function Gx(e,t){const n=zo(e);return n===null?t:n==="1"}const Zx=V(Gx(rn.notifyOnComplete,!0)),Yx=V(Gx(rn.notifyOnQuestion,!1)),Jx=V(Gx(rn.notifyOnApproval,!1)),Xx=V(typeof Notification<"u"?Notification.permission:"denied"),USe="/favicon.ico";async function Qx(e,t,n){if(!n){e.value=!1,ts(t,"0");return}if(typeof Notification>"u")return;let o=Notification.permission;if(o==="default")try{o=await Notification.requestPermission()}catch{}Xx.value=o,o==="granted"&&(e.value=!0,ts(t,"1"))}function VSe(e){return Qx(Zx,rn.notifyOnComplete,e)}function qSe(e){return Qx(Yx,rn.notifyOnQuestion,e)}function KSe(e){return Qx(Jx,rn.notifyOnApproval,e)}function e_(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function GSe(e){return{title:fo.global.t("settings.notifyTitle"),body:e_(e,fo.global.t("settings.notifyFallback"))}}function ZSe(e,t){return{title:fo.global.t("settings.notifyQuestionTitle"),body:e_(t,e,fo.global.t("settings.notifyQuestionFallback"))}}function YSe(e,t){return{title:fo.global.t("settings.notifyApprovalTitle"),body:e_(t,e,fo.global.t("settings.notifyApprovalFallback"))}}function t_(e,t,n,o){if(!e||typeof Notification>"u")return;const s=Notification.permission;if(s!=="denied"){if(s==="default"){Notification.requestPermission().then(i=>{Xx.value=i,i==="granted"&&eM(t,n,o)});return}eM(t,n,o)}}function eM(e,t,n){if(!e.isUserWatching)try{const o=new Notification(t.title,{body:t.body,tag:n,icon:USe});o.onclick=()=>{try{window.focus()}catch{}e.onClick(),o.close()}}catch{}}function JSe(e,t){t_(Zx.value,t,GSe(t.sessionTitle),`pythinker-complete-${e}-${t.promptId??Date.now()}`)}function XSe(e){t_(Yx.value,e,ZSe(e.sessionTitle,e.questionPreview),`pythinker-question-${e.questionId}`)}function QSe(e){t_(Jx.value,e,YSe(e.sessionTitle,e.toolName),`pythinker-approval-${e.approvalId}`)}function eCe(){return{notifyOnComplete:Zx,notifyOnQuestion:Yx,notifyOnApproval:Jx,notifyPermission:Xx,setNotifyOnComplete:VSe,setNotifyOnQuestion:qSe,setNotifyOnApproval:KSe,maybeNotifyCompletion:JSe,maybeNotifyQuestion:XSe,maybeNotifyApproval:QSe}}function tCe(){return zo(rn.soundOnComplete)==="1"}const Hd=V(tCe());function nCe(){if(typeof window>"u")return;const e=window;return window.AudioContext??e.webkitAudioContext}let Ak=null;function U7(){const e=nCe();if(!e)return null;if(Ak===null)try{Ak=new e}catch{return null}return Ak}function V7(){if(!Hd.value)return;const e=U7();e!==null&&e.state==="suspended"&&e.resume().then(()=>{wl("sound: audio context resumed",{state:e.state})},t=>{wl("sound: audio context resume rejected",{error:String(t)})})}let tM=!1;function oCe(){if(tM||typeof window>"u")return;tM=!0;const e=()=>{V7()};window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("keydown",e,{capture:!0})}oCe();function sCe(e){Hd.value=e,ts(rn.soundOnComplete,e?"1":"0"),e&&V7()}function nM(e,t,n,o,s){const i=e.createOscillator(),r=e.createGain();i.type="sine",i.frequency.value=t,i.connect(r),r.connect(e.destination);const l=e.currentTime+n;r.gain.setValueAtTime(1e-4,l),r.gain.exponentialRampToValueAtTime(s,l+.01),r.gain.exponentialRampToValueAtTime(1e-4,l+o),i.start(l),i.stop(l+o+.02)}function n_(){const e=U7();if(e===null){wl("sound: skipped, AudioContext unavailable");return}if(e.state!=="running"){wl("sound: skipped, context not running",{state:e.state}),e.state==="suspended"&&e.resume().then(()=>{wl("sound: context resumed for next time",{state:e.state})},t=>{wl("sound: resume rejected",{error:String(t)})});return}try{nM(e,880,0,.16,.18),nM(e,1320,.1,.22,.16),wl("sound: chime scheduled",{state:e.state})}catch(t){wl("sound: failed to play",{error:String(t)})}}function iCe(){Hd.value&&n_()}function rCe(){Hd.value&&n_()}function lCe(){Hd.value&&n_()}function aCe(){return{soundOnComplete:Hd,setSoundOnComplete:sCe,maybePlayCompletionSound:iCe,maybePlayQuestionSound:rCe,maybePlayApprovalSound:lCe}}const uCe=1e3,cCe=4096,oM=32*1024;function dCe(e,t){let n=null,o;const s=new Set;async function i(f){try{const h=await St().listTasks(f);e.tasksBySession={...e.tasksBySession,[f]:Q6(h,e.tasksBySession[f]??[])},await r(f,h)}catch{}}async function r(f,p){if(e.activeSessionId!==f)return;const h=p??e.tasksBySession[f]??[],m=St(),k=new Map;if(await Promise.all(h.map(async v=>{if((v.status==="completed"||v.status==="failed"||v.status==="cancelled")&&!s.has(v.id)&&!((v.outputLines?.length??0)>0))try{const b=await m.getTask(f,v.id,{withOutput:!0,outputBytes:oM});b.outputPreview!==void 0&&k.set(v.id,{preview:b.outputPreview,bytes:b.outputBytes}),s.add(v.id)}catch{}})),k.size===0)return;const w=e.tasksBySession[f]??[];e.tasksBySession={...e.tasksBySession,[f]:w.map(v=>{const y=k.get(v.id)??(v.backgroundTaskId!==void 0?k.get(v.backgroundTaskId):void 0);return y?{...v,outputPreview:y.preview,outputBytes:y.bytes}:v})}}async function l(f){if(e.activeSessionId!==f)return;const p=St();let h;try{h=await p.listTasks(f)}catch{return}const m=new Map;await Promise.all(h.map(async y=>{const b=y.status==="running",S=y.status==="completed"||y.status==="failed"||y.status==="cancelled";if(!(!b&&!S)&&!(S&&(s.has(y.id)||(y.outputLines?.length??0)>0)))try{const I=await p.getTask(f,y.id,{withOutput:!0,outputBytes:b?cCe:oM});I.outputPreview!==void 0&&m.set(y.id,{preview:I.outputPreview,bytes:I.outputBytes}),S&&s.add(y.id)}catch{}}));const k=e.tasksBySession[f]??[],w=new Map(k.map(y=>[y.id,y])),v=h.map(y=>{const b=w.get(y.id),S=m.get(y.id);return{...y,outputLines:b?.outputLines,text:b?.text,outputPreview:S?.preview??b?.outputPreview,outputBytes:S?.bytes??b?.outputBytes}});e.tasksBySession={...e.tasksBySession,[f]:Q6(v,k)}}function a(f){n!==null&&o===f||(u(),o=f,l(f),n=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===f?l(f):u())},uCe))}function u(){n!==null&&(clearInterval(n),n=null),o=void 0,s.clear()}const c=V(0);let d=null;return Ye(()=>t.value.some(f=>f.status==="running"),f=>{f&&d===null?d=setInterval(()=>{c.value=(c.value+1)%Number.MAX_SAFE_INTEGER},1e3):!f&&d!==null&&(clearInterval(d),d=null)},{immediate:!0}),Ye(()=>{const f=e.activeSessionId;if(!f)return{sid:void 0,hasRunning:!1};const p=e.tasksBySession[f]??[];return{sid:f,hasRunning:p.some(h=>h.status==="running")}},({sid:f,hasRunning:p},h,m)=>{let k;p&&f!==void 0?a(f):f!==void 0?k=setTimeout(()=>{(e.tasksBySession[f]??[]).some(v=>v.status==="running")||u()},1500):u(),m(()=>{k!==void 0&&clearTimeout(k)})},{deep:!0,immediate:!0}),{taskClock:O(()=>c.value),loadTasksForSession:i}}function fCe(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function pCe(e){const t=[];if(!e)return t;let n=0,o=0,s=!1;for(const i of e.split(` -`)){if(i.startsWith("diff --git")){s=!1;continue}if(!s&&fCe(i))continue;if(i.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(i);a&&(n=Number.parseInt(a[1],10),o=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:i});continue}if(!s||i.startsWith("\\"))continue;const r=i.charAt(0),l=i.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:o}),o+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:o}),n+=1,o+=1)}return t}const p2="/sessions/";function sM(e){const{pathname:t}=e;if(!t.startsWith(p2))return;const n=t.slice(p2.length);if(!(!n||n.includes("/")))try{const o=decodeURIComponent(n);return o.length>0?o:void 0}catch{return}}function hCe(e){return e===void 0||e.length===0?"/":`${p2}${encodeURIComponent(e)}`}const mCe=50,h2=5,gCe=40402,vCe=40410,yCe=40902,kCe=2e3;function Mk(e){return nr(e)&&e.code===yCe}const bCe=40904;function wCe(e){return nr(e)&&e.code===bCe}const hu=Ms({}),Um=Ms({}),Ek=Ms({}),Hr=Ms(new Set),W0=new Map,Zu=new Map,P1=new Map;let xCe=0;const vu=new Map,_Ce=3;let iM=0;function SCe(){return iM+=1,`${Date.now().toString(36)}-${iM}`}function CCe(e){return{generation:W0.get(e)??0,pending:(Zu.get(e)?.size??0)>0}}function m2(e){const t=++xCe;W0.set(e,t);const n=Zu.get(e)??new Set;return n.add(t),Zu.set(e,n),t}function g2(e,t){const n=Zu.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Zu.delete(e);const o=P1.get(e);P1.delete(e),o?.()}function ACe(e){W0.delete(e),Zu.delete(e),P1.delete(e),vu.delete(e)}function MCe(e,t){return!t.pending&&t.generation===(W0.get(e)??0)}function ECe(e,t){if((Zu.get(e)?.size??0)===0){t();return}P1.set(e,t)}function TCe(e,t){const{t:n}=fo.global,{confirm:o}=Ka(),{taskPoller:s,sideChat:i,modelProvider:r,pushOperationFailure:l,activity:a,sessionsKnownEmpty:u,setSessions:c,updateSession:d,upsertSessionFront:f,appendSession:p,forgetSession:h,setActiveSessionId:m,updateSessionMessages:k,nextOptimisticMsgId:w,getEventConn:v,syncSessionFromSnapshot:y,reopenSession:b,hasLoadedMessages:S,refreshSessionStatus:I,refreshSessionGoal:T,persistSessionProfile:$,mergedWorkspaces:F,workspacesView:R,status:P,workspaceIdForSession:M,savePermissionToStorage:D,savePlanModeToStorage:B,saveDynamicWorkflowModeToStorage:z,saveGoalModeToStorage:A,draftModes:L,saveUnread:W,saveActiveWorkspaceToStorage:j,saveHiddenWorkspacesToStorage:re,goalErrorMessage:Q,resetFastMoon:Y,initialized:G,connectIssue:X,selectedDiffPath:te,fileDiffLines:q,fileDiffLoading:me}=t;let xe=!1;async function We(ue){if(e.messagesLoadingMoreBySession[ue])return;const Ce=e.messagesBySession[ue];if(!Ce||Ce.length===0)return;const Ne=Ce[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ue]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ue]:!1};try{const Ue=await St().listMessages(ue,{beforeId:Ne,pageSize:mCe}),dt=[...Ue.items].toReversed();k(ue,yt=>[...dt,...yt]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[ue]:Ue.hasMore}}catch(Ue){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[ue]:!0},l("loadOlderMessages",Ue,{sessionId:ue})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[ue]:!1}}}function he(ue){s.loadTasksForSession(ue),H(ue),I(ue),T(ue),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,ue)||r.loadSkillsForSession(ue)}async function ee(ue){const Ce=e.activeSessionId;if(Ce){te.value=ue,q.value=[],me.value=!0;try{const Ue=await St().getFileDiff(Ce,ue);if(te.value!==ue)return;q.value=pCe(Ue.diff)}catch(Ne){te.value===ue&&(q.value=[]),console.warn("[loadFileDiff] diff unavailable for",ue,Ne)}finally{te.value===ue&&(me.value=!1)}}}function ne(){te.value=null,q.value=[],me.value=!1}async function H(ue){try{const Ne=await St().getGitStatus(ue);e.gitStatusBySession={...e.gitStatusBySession,[ue]:Ne}}catch{}}async function Z(){try{const Ce=await St().getAuth();return e.authReady=Ce.ready,e.defaultModel=Ce.defaultModel,e.managedProviderStatus=Ce.managedProvider?.status??null,X.value=null,"proceed"}catch(ue){return nr(ue)&&(ue.code===401||ue.code===C7)?(X.value=null,"server-auth-required"):(X.value=(ue instanceof Error?ue.message:String(ue)).slice(0,140),"retry")}}async function ye(){let ue=!0;for(;;){const Ce=await Z();if(Ce!=="retry")return Ce;ue&&(X.value=null,ue=!1),await new Promise(Ne=>{setTimeout(Ne,kCe)})}}async function fe(){try{const ue=St();e.config=await ue.getConfig()}catch{}}async function de(ue){try{const Ne=await St().setConfig(ue);return e.config=Ne,e.defaultModel=Ne.defaultModel??null,!0}catch(Ce){return l("setConfig",Ce),!1}}const J=100,ae=30,be=720*60*1e3;async function _e(){const ue=St(),Ce=[];let Ne,Ue;for(;;){let dt;try{dt=await ue.listSessions({pageSize:J,beforeId:Ne,excludeEmpty:!0})}catch(yt){if(Ce.length===0)throw yt;Ue=yt;break}if(Ce.push(...dt.items),!dt.hasMore||dt.items.length===0)break;Ne=dt.items.at(-1).id}return{sessions:Ce,error:Ue}}function ce(ue){const Ce=new Map(e.sessions.map(Ne=>[Ne.id,Ne.usage]));c(ue.map(Ne=>{const Ue=Ce.get(Ne.id);return Ue!==void 0&&t2(Ne.usage)&&!t2(Ue)?{...Ne,usage:Ue}:Ne}))}function Se(ue){const Ce=[...ue],Ne=new Set(Ce.map(Ue=>Ue.id));for(const Ue of e.sessions)Ne.has(Ue.id)||(Ce.push(Ue),Ne.add(Ue.id));return Ce.sort((Ue,dt)=>new Date(dt.updatedAt).getTime()-new Date(Ue.updatedAt).getTime()),Ce}async function ie(ue){const Ce=St(),Ne=[],Ue=Date.now(),dt=kn=>Ue-new Date(kn.updatedAt).getTime();let yt,Yt=!1,sn=!0,Qn;for(;;){let kn;try{kn=await Ce.listSessions({workspaceId:ue,pageSize:h2,beforeId:yt,excludeEmpty:!0})}catch(Dt){if(sn)throw Dt;Qn=Dt,Yt=!0;break}if(Yt=kn.hasMore,kn.items.length===0)break;const Tn=kn.items.at(-1),No=dt(Tn)>=be;if(!sn&&No){const Dt=kn.items.findIndex(dn=>dt(dn)>=be),Vt=Dt>=0?Dt+1:kn.items.length;Ne.push(...kn.items.slice(0,Vt)),Yt=kn.hasMore||Vtie(Dt.id))),Ne=[],Ue=new Set,dt=new Map,yt=new Set;let Yt;for(let Dt=0;Dtyt.has(Dt.id)).map(Dt=>Dt.root)),Qn=new Set(ue.map(Dt=>Dt.id));for(const Dt of e.sessions)!(Dt.workspaceId!==void 0&&Qn.has(Dt.workspaceId)?yt.has(Dt.workspaceId):sn.has(Dt.cwd)||yt.has(M(Dt)))||Ue.has(Dt.id)||(Ne.push(Dt),Ue.add(Dt.id));const kn={},Tn={},No={};for(const{id:Dt}of ue){const Vt=dt.get(Dt);if(Vt===void 0){const dn=e.sessionsHasMoreByWorkspace[Dt],lo=e.sessionsCursorByWorkspace[Dt],Yn=e.sessionsInitialCountByWorkspace[Dt];dn!==void 0&&(kn[Dt]=dn),lo!==void 0&&(Tn[Dt]=lo),Yn!==void 0&&(No[Dt]=Yn);continue}kn[Dt]=Vt.hasMore,Tn[Dt]=Vt.items.length>0?Vt.items.at(-1).id:void 0,No[Dt]=Math.max(Vt.items.length,h2)}return e.sessionsHasMoreByWorkspace=kn,e.sessionsCursorByWorkspace=Tn,e.sessionsInitialCountByWorkspace=No,e.sessionsFullyLoaded=!1,Ne.sort((Dt,Vt)=>new Date(Vt.updatedAt).getTime()-new Date(Dt.updatedAt).getTime()),yt.size>0&&l("load",Yt),Ne}async function Re(ue){if(e.sessionsLoadingMoreByWorkspace[ue]||e.sessionsHasMoreByWorkspace[ue]===!1)return;const Ce=e.sessionsCursorByWorkspace[ue];if(Ce!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ue]:!0};try{const Ne=await St().listSessions({workspaceId:ue,pageSize:ae,beforeId:Ce,excludeEmpty:!0}),Ue=new Set(e.sessions.map(yt=>yt.id)),dt=Ne.items.filter(yt=>!Ue.has(yt.id));dt.length>0&&c([...e.sessions,...dt]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[ue]:Ne.items.length>0?Ne.items.at(-1).id:Ce},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[ue]:Ne.hasMore}}catch(Ne){l("loadMoreSessions",Ne)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[ue]:!1}}}}async function at(){if(e.sessionsFullyLoaded)return;const ue=await _e().catch(Ue=>(console.warn("[pythinker-web] loadAllSessions failed; search covers only loaded sessions",Ue),null));if(ue===null)return;const Ce=ue.error===void 0?ue.sessions:Se(ue.sessions);if(ce(Ce),e.sessionsFullyLoaded=ue.error===void 0,ue.error!==void 0)return;const Ne={};for(const Ue of e.workspaces)Ne[Ue.id]=!1;e.sessionsHasMoreByWorkspace=Ne}async function ft(){const ue=await St().getMeta().catch(()=>null);ue!==null&&(e.serverVersion=ue.serverVersion,e.availableOpenInApps=ue.openInApps,e.dangerousBypassAuth=ue.dangerousBypassAuth,e.backend=ue.backend)}async function Mt(){const ue=Date.now();let Ce="accepted";Go("app:load:start"),e.loading=!0;const Ne=!G.value;let Ue=!0;try{if(Ne&&await ye()==="server-auth-required"){Ue=!1,Ce="auth-required";return}const dt=St();await Promise.all([dt.getHealth().catch(()=>null),ft(),r.loadModels()]),Ne||await Z(),await fe(),await Tt();const yt=await we(),Yt=yt??e.sessions;yt!==void 0&&ce(yt);const sn=Yt[0],Qn=e.activeWorkspaceId;!(Qn!==null&&F.value.some(No=>No.id===Qn))&&sn&&Kt(M(sn)),Wo();const Tn=typeof window<"u"?sM(window.location):void 0;!e.activeSessionId&&Tn!==void 0&&(e.sessions.some(Dt=>Dt.id===Tn)||await jn(Tn))&&await vo(Tn,{urlMode:"replace"}),!e.activeSessionId&&Yt.length>0&&await vo(Yt[0].id,{urlMode:"replace"})}catch(dt){Ce="failed",l("load",dt)}finally{e.loading=!1,Ue&&(G.value=!0),Go("app:load:complete",{status:Ce,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-ue})}}async function Tt(){try{const ue=St(),[Ce,Ne]=await Promise.all([ue.listWorkspaces().catch(()=>[]),ue.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=tn(Ce),e.fsHome=Ne.home||null,e.recentRoots=Ne.recentRoots}catch{}}function tn(ue){const Ce=um();return Object.keys(Ce).length===0?ue:ue.map(Ne=>{const Ue=Ce[Ne.root];return Ue!==void 0?{...Ne,name:Ue}:Ne})}function Kt(ue){e.activeWorkspaceId=ue,j(ue)}function Qe(ue){Kt(ue);const Ce=e.sessions.filter(Ne=>M(Ne)===ue);if(Ce.length>0){const Ne=Ce[0];Ne&&Ne.id!==e.activeSessionId&&vo(Ne.id)}else m(void 0),Zt(void 0,"push")}function nt(ue){const Ce=um()[ue.root],Ne=Ce!==void 0?{...ue,name:Ce}:ue,Ue=_r(Ne.root);e.hiddenWorkspaceRoots.some(Yt=>_r(Yt)===Ue)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(Yt=>_r(Yt)!==Ue),re(e.hiddenWorkspaceRoots));const dt=e.workspaces.findIndex(Yt=>Yt.id===Ne.id||Yt.root===Ne.root);if(dt===-1){e.workspaces=[Ne,...e.workspaces];return}const yt=[...e.workspaces];yt[dt]=Ne,e.workspaces=yt}function ut(ue){if(ue.type==="workspaceCreated"||ue.type==="workspaceUpdated"){nt(ue.workspace);return}const Ce=e.workspaces.find(Ue=>Ue.id===ue.workspaceId)?.root??ue.root;if(Ce&&!e.hiddenWorkspaceRoots.includes(Ce)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ce],re(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Ue=>Ue.id!==ue.workspaceId&&Ue.root!==Ce),e.activeWorkspaceId===ue.workspaceId||e.activeWorkspaceId===Ce){const Ue=R.value[0]?.id??null;if(e.activeWorkspaceId=Ue,Ue)j(Ue);else try{Hu(rn.activeWorkspace)}catch{}m(void 0),e.sessionLoading=!1,ne(),Zt(void 0,"replace")}}function Pt(){m(void 0),Zt(void 0,"push")}function Oe(ue){Kt(ue),Pt(),ne()}async function Je(ue){const Ce=F.value.find(Tn=>Tn.id===ue);if(!Ce)return null;const Ne=e.thinking,Ue=St();let dt,yt=Ce.root;try{const Tn=await Ue.addWorkspace({root:Ce.root});dt=Tn.id,yt=Tn.root,nt(Tn)}catch{}const Yt=r.draftModel.value??void 0,sn=await Ue.createSession({workspaceId:dt,cwd:yt,model:Yt});r.draftModel.value=null;const Qn=Yt!==void 0&&(!sn.model||sn.model.length===0)?{...sn,model:Yt}:sn;f(Qn),Kt(sn.workspaceId??dt??ue),await vo(sn.id);const kn=sn.id;return Ne!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[kn]:Ne}),L.planMode&&(e.planModeBySession={...e.planModeBySession,[kn]:!0},B()),L.dynamicWorkflowMode&&(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[kn]:!0},z()),L.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[kn]:!0},A()),L.planMode=!1,L.dynamicWorkflowMode=!1,L.goalMode=!1,kn}async function it(ue,Ce,Ne){if(!Hr.has(ue)){Hr.add(ue);try{const Ue=await Je(ue);if(!Ue)return;await Un(Ue,Ce,Ne)}catch(Ue){l("startSessionAndSendPrompt",Ue)}finally{Hr.delete(ue)}}}async function rt(ue,Ce,Ne){if(!Hr.has(ue)){Hr.add(ue);try{const Ue=await Je(ue);if(!Ue)return;const dt=e.planModeBySession[Ue]??!1,yt=e.dynamicWorkflowModeBySession[Ue]??!1,Yt=e.sessions.find(kn=>kn.id===Ue),sn=(Yt?.model&&Yt.model.length>0?Yt.model:e.defaultModel)??void 0;if(!await $({model:sn,planMode:dt,dynamicWorkflowMode:yt,permissionMode:e.permission},Ue))return;await r.activateSkill(Ce,Ne,Ue)}catch(Ue){l("startSessionAndActivateSkill",Ue)}finally{Hr.delete(ue)}}}async function vt(ue,Ce){if(!Hr.has(ue)){Hr.add(ue);try{const Ne=await Je(ue);if(!Ne)return;await i.openSideChatOn(Ne,Ce)}catch(Ne){l("startSessionAndOpenSideChat",Ne)}finally{Hr.delete(ue)}}}async function Nt(ue){const Ce=ue.trim();if(!Ce)return!1;const Ne=St();try{const Ue=await Ne.addWorkspace({root:Ce});return nt(Ue),Oe(Ue.id),!0}catch(Ue){return console.warn("[pythinker-web] addWorkspaceByPath failed for",Ce,Ue),!1}}async function on(ue){try{return await St().browseFs(ue)}catch{return{path:"",parent:null,entries:[]}}}async function mn(){try{return await St().getFsHome()}catch{return{home:"",recentRoots:[]}}}function Zt(ue,Ce){if(Ce==="none"||typeof window>"u"||!window.history)return;const Ne=hCe(ue);if(window.location.pathname!==Ne)try{Ce==="push"?window.history.pushState(null,"",Ne):window.history.replaceState(null,"",Ne)}catch{}}async function jn(ue){try{const Ce=await St().getSession(ue);return e.sessions.some(Ne=>Ne.id===Ce.id)||p(Ce),!0}catch{return!1}}function Xt(){const ue=sM(window.location);if(ue===void 0){m(void 0);return}if(ue!==e.activeSessionId){if(e.sessions.some(Ce=>Ce.id===ue)){vo(ue,{urlMode:"none"});return}(async()=>{if(await jn(ue)){await vo(ue,{urlMode:"none"});return}const Ce=e.sessions[0];Ce?await vo(Ce.id,{urlMode:"replace"}):(m(void 0),Zt(void 0,"replace"))})()}}let xo=!1;function Wo(){xo||typeof window>"u"||(xo=!0,window.addEventListener("popstate",Xt))}async function vo(ue,Ce){const Ne=S(ue),Ue=!Ne&&u.has(ue);u.delete(ue);try{Zt(ue,Ce?.urlMode??"push"),e.sessionLoading=!Ne&&!Ue,m(ue),Y(),e.unreadBySession[ue]&&(e.unreadBySession={...e.unreadBySession,[ue]:!1},W({[ue]:!1})),ne();const dt=e.sessions.find(yt=>yt.id===ue);if(dt){const yt=M(dt);e.activeWorkspaceId!==yt&&Kt(yt)}if(Ne){if(await b(ue)==="not-found")return}else if(await y(ue)==="not-found")return;he(ue)}catch(dt){l("selectSession",dt,{sessionId:ue})}finally{e.activeSessionId===ue&&(e.sessionLoading=!1)}}async function Un(ue,Ce,Ne){const Ue=m2(ue);e.inFlightBySession={...e.inFlightBySession,[ue]:!0};const dt=w();try{const yt=St(),Yt=[];Ce&&Yt.push({type:"text",text:Ce});for(const dn of Ne??[])dn.kind==="video"?Yt.push({type:"video",source:{kind:"file",fileId:dn.fileId}}):dn.kind==="file"?Yt.push({type:"file",fileId:dn.fileId,name:dn.name??"",mediaType:dn.mediaType||"application/octet-stream",size:dn.size??0}):Yt.push({type:"image",source:{kind:"file",fileId:dn.fileId}});if(Yt.length===0)return e.inFlightBySession={...e.inFlightBySession,[ue]:!1},"rejected";const sn={id:dt,sessionId:ue,role:"user",content:Yt,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(ue,dn=>[...dn,sn]);const Qn=e.sessions.find(dn=>dn.id===ue),kn=(Qn?.model&&Qn.model.length>0?Qn.model:e.defaultModel)??void 0,Tn=e.planModeBySession[ue]??!1,No=e.dynamicWorkflowModeBySession[ue]??!1,Dt=e.goalModeBySession[ue]??!1;if(Dt&&Ce)try{await yt.updateSession(ue,{goalObjective:Ce.trim()})}catch(dn){return l("createGoal",dn,{sessionId:ue}),e.inFlightBySession={...e.inFlightBySession,[ue]:!1},k(ue,lo=>lo.some(Yn=>Yn.id===dt)?lo.filter(Yn=>Yn.id!==dt):lo),"rejected"}const Vt=await yt.submitPrompt(ue,{content:Yt,model:kn,thinking:await r.resolveThinkingForPrompt(ue,kn)??e.thinking,permissionMode:e.permission,planMode:Tn,dynamicWorkflowMode:No});return Dt&&(e.goalModeBySession={...e.goalModeBySession,[ue]:!1},A()),e.promptIdBySession={...e.promptIdBySession,[ue]:Vt.promptId},k(ue,dn=>{const lo=dn.findIndex(Xe=>Xe.id===dt);if(lo===-1)return dn;const Yn=[...dn];return Yn[lo]={...Yn[lo],promptId:Yn[lo].promptId??Vt.promptId},Yn}),v()?.bindNextPromptId(ue,Vt.promptId),"ok"}catch(yt){return e.inFlightBySession={...e.inFlightBySession,[ue]:!1},k(ue,Yt=>Yt.some(sn=>sn.id===dt)?Yt.filter(sn=>sn.id!==dt):Yt),l("sendPrompt",yt,{sessionId:ue}),nr(yt)?"rejected":"uncertain"}finally{g2(ue,Ue)}}async function $s(ue,Ce){const Ne=e.activeSessionId;if(Ne){if(a.value!=="idle"||e.inFlightBySession[Ne]){wt(ue,Ce);return}if((e.queuedBySession[Ne]?.length??0)>0){wt(ue,Ce),Lt(Ne);return}await Un(Ne,ue,Ce)}}async function ot(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return;const Ue=e.queuedBySession[Ne]??[],dt=[],yt=[];for(const Vt of Ue){const dn=Vt.text.trim();dn&&dt.push(dn),Vt.attachments?.length&&yt.push(...Vt.attachments)}const Yt=ue.trim();if(Yt&&dt.push(Yt),Ce?.length&&yt.push(...Ce),dt.length===0&&yt.length===0)return;Ue.length>0&&(e.queuedBySession={...e.queuedBySession,[Ne]:[]});const sn=dt.join(` - -`),Qn=()=>{if(Ue.length===0)return;const Vt=e.queuedBySession[Ne]??[];e.queuedBySession={...e.queuedBySession,[Ne]:[...Ue,...Vt]}};if(a.value==="idle"&&!e.inFlightBySession[Ne]){await Un(Ne,sn,yt)==="rejected"&&Qn();return}const kn=[];sn&&kn.push({type:"text",text:sn});for(const Vt of yt)Vt.kind==="video"?kn.push({type:"video",source:{kind:"file",fileId:Vt.fileId}}):Vt.kind==="file"?kn.push({type:"file",fileId:Vt.fileId,name:Vt.name??"",mediaType:Vt.mediaType||"application/octet-stream",size:Vt.size??0}):kn.push({type:"image",source:{kind:"file",fileId:Vt.fileId}});const Tn=w(),No={id:Tn,sessionId:Ne,role:"user",content:kn,createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};k(Ne,Vt=>[...Vt,No]);const Dt=m2(Ne);try{const Vt=St(),dn=e.sessions.find(Xe=>Xe.id===Ne),lo=(dn?.model&&dn.model.length>0?dn.model:e.defaultModel)??void 0,Yn=await Vt.submitPrompt(Ne,{content:kn,model:lo,thinking:await r.resolveThinkingForPrompt(Ne,lo)??e.thinking,permissionMode:e.permission,planMode:e.planModeBySession[Ne]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[Ne]??!1});if(k(Ne,Xe=>{const ge=Xe.findIndex(un=>un.id===Tn);if(ge===-1)return Xe;const Le=[...Xe];return Le[ge]={...Le[ge],promptId:Le[ge].promptId??Yn.promptId},Le}),Yn.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[Ne]:Yn.promptId},v()?.bindNextPromptId(Ne,Yn.promptId);return}try{await Vt.steerPrompts(Ne,[Yn.promptId])}catch{}}catch(Vt){k(Ne,dn=>dn.filter(lo=>lo.id!==Tn)),nr(Vt)&&Qn(),l("steer",Vt,{sessionId:Ne})}finally{g2(Ne,Dt)}}async function Ae(ue,Ce){try{const Ue=await St().uploadFile({file:ue,name:Ce});return{fileId:Ue.id,name:Ue.name,mediaType:Ue.mediaType}}catch(Ne){return l("uploadImage",Ne),null}}function wt(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return;const Ue=e.queuedBySession[Ne]??[],dt={text:ue,attachments:Ce,id:SCe()};e.queuedBySession={...e.queuedBySession,[Ne]:[...Ue,dt]}}function Lt(ue){const[Ce,...Ne]=e.queuedBySession[ue]??[];Ce!==void 0&&(e.queuedBySession={...e.queuedBySession,[ue]:Ne},Un(ue,Ce.text,Ce.attachments).then(Ue=>{if(Ue==="ok"){vu.delete(ue);return}if(Ue==="uncertain"){vu.delete(ue);return}if(!e.sessions.some(Qn=>Qn.id===ue)){vu.delete(ue);return}const dt=Ce.id??Ce.text,yt=vu.get(ue),Yt=yt!==void 0&&yt.key===dt?yt.count+1:1;if(Yt>=_Ce){vu.delete(ue),(e.queuedBySession[ue]?.length??0)>0&&Lt(ue);return}vu.set(ue,{key:dt,count:Yt});const sn=e.queuedBySession[ue]??[];e.queuedBySession={...e.queuedBySession,[ue]:[Ce,...sn]}}))}function Qt(ue,Ce){const Ne=e.inFlightBySession[ue]===!0;if(e.inFlightBySession={...e.inFlightBySession,[ue]:!1},e.promptIdBySession[ue]!==void 0){const dt={...e.promptIdBySession};delete dt[ue],e.promptIdBySession=dt}return ue===e.activeSessionId&&Y(),(Ne||Ce?.turnWasActive===!0||(e.turnActiveBySession[ue]??!1))&&Lt(ue),Ne}function _o(ue,Ce){Ce.inFlightTurn!==null&&Ce.busy||Qt(ue)}async function Zn(){const ue=e.activeSessionId;if(!ue)return;const Ce=e.sessions.find(dt=>dt.id===ue);let Ne=e.promptIdBySession[ue];if(Ne===void 0){const dt=Ce?.currentPromptId;dt!==void 0&&dt.length>0&&!dt.startsWith("pr_")&&(Ne=dt)}const Ue=St();if(Ne!==void 0)try{if((await Ue.abortPrompt(ue,Ne)).aborted)return;const yt={...e.promptIdBySession};delete yt[ue],e.promptIdBySession=yt}catch(dt){if(nr(dt)&&dt.code===gCe){const yt={...e.promptIdBySession};delete yt[ue],e.promptIdBySession=yt}else{l("abortCurrentPrompt",dt,{sessionId:ue});return}}try{await Ue.abortSession(ue)}catch(dt){l("abortCurrentPrompt",dt,{sessionId:ue})}}function Xn(ue,Ce){const Ne=e.approvalsBySession[ue]??[];e.approvalsBySession={...e.approvalsBySession,[ue]:Ne.filter(Ue=>Ue.approvalId!==Ce)}}function io(ue,Ce){const Ne=e.questionsBySession[ue]??[];e.questionsBySession={...e.questionsBySession,[ue]:Ne.filter(Ue=>Ue.questionId!==Ce)}}async function ro(ue,Ce){const Ne=e.activeSessionId;if(Ne&&!Um[ue]){Um[ue]=!0;try{const Ue=St(),dt={decision:Ce.decision,scope:Ce.scope,feedback:Ce.feedback,selectedLabel:Ce.selectedLabel};await Ue.respondApproval(Ne,ue,dt),Xn(Ne,ue)}catch(Ue){Mk(Ue)?Xn(Ne,ue):l("respondApproval",Ue,{sessionId:Ne})}finally{delete Um[ue]}}}async function ys(ue,Ce){const Ne=e.activeSessionId;if(Ne&&!hu[ue]){hu[ue]="answer";try{await St().respondQuestion(Ne,ue,Ce),io(Ne,ue)}catch(Ue){Mk(Ue)?io(Ne,ue):l("respondQuestion",Ue,{sessionId:Ne})}finally{delete hu[ue]}}}async function Ti(ue){const Ce=e.activeSessionId;if(Ce&&!hu[ue]){hu[ue]="dismiss";try{await St().dismissQuestion(Ce,ue),io(Ce,ue)}catch(Ne){Mk(Ne)?io(Ce,ue):l("dismissQuestion",Ne,{sessionId:Ce})}finally{delete hu[ue]}}}async function Ns(ue){const Ce=e.activeSessionId;if(Ce&&!Ek[ue]){Ek[ue]=!0;try{const Ne=St(),Ue=(e.tasksBySession[Ce]??[]).find(yt=>yt.id===ue)?.backgroundTaskId;await Ne.cancelTask(Ce,Ue??ue);const dt=e.tasksBySession[Ce]??[];e.tasksBySession={...e.tasksBySession,[Ce]:dt.map(yt=>yt.id===ue?{...yt,status:"cancelled"}:yt)}}catch(Ne){wCe(Ne)||l("cancelTask",Ne,{sessionId:Ce})}finally{delete Ek[ue]}}}function Us(ue){const Ce=e.activeSessionId;Ce?(e.planModeBySession={...e.planModeBySession,[Ce]:ue},B(),$({planMode:ue})):L.planMode=ue}function Vs(){const ue=e.activeSessionId,Ce=ue?e.planModeBySession[ue]??!1:L.planMode;Us(!Ce)}function li(ue){const Ce=e.activeSessionId;Ce?(e.dynamicWorkflowModeBySession={...e.dynamicWorkflowModeBySession,[Ce]:ue},z(),$({dynamicWorkflowMode:ue})):L.dynamicWorkflowMode=ue}async function ss(){const ue=e.activeSessionId,Ne=!(ue?e.dynamicWorkflowModeBySession[ue]??!1:L.dynamicWorkflowMode);Ne&&e.permission==="manual"&&!await o({title:n("workspace.dynamicWorkflowEnableTitle"),message:n("workspace.dynamicWorkflowEnableConfirm"),variant:"primary"})||li(Ne)}function ai(ue){const Ce=e.activeSessionId;Ce?(e.goalModeBySession={...e.goalModeBySession,[Ce]:ue},A()):L.goalMode=ue}function ui(){const ue=e.activeSessionId,Ce=ue?e.goalModeBySession[ue]??!1:L.goalMode;ai(!Ce)}async function Cn(ue){const Ce=ue.trim();if(!Ce||e.permission==="manual"&&!await o({title:n("workspace.goalStartConfirm",{objective:Ce}),variant:"primary"}))return;let Ne=e.activeSessionId;if(!Ne){const Ue=e.activeWorkspaceId,dt=Ue&&R.value.some(yt=>yt.id===Ue)?Ue:R.value[0]?.id??null;if(!dt)return;try{Ne=await Je(dt)??void 0}catch(yt){l("createGoal",yt);return}if(!Ne)return}try{await St().updateSession(Ne,{goalObjective:Ce})}catch(Ue){l("createGoal",Ue,{sessionId:Ne,message:Q(Ue)});return}e.goalModeBySession[Ne]&&(e.goalModeBySession={...e.goalModeBySession,[Ne]:!1},A()),e.activeSessionId===Ne?await $s(Ce):await Un(Ne,Ce)}function Ls(ue){const Ce=e.activeSessionId;Ce&&Promise.resolve(St().updateSession(Ce,{goalControl:ue})).catch(Ne=>{l("controlGoal",Ne,{sessionId:Ce,message:Q(Ne)})})}function Fn(ue){e.permission=ue,D(ue),$({permissionMode:ue})}function Io(ue){const Ce=[...e.warnings];Ce.splice(ue,1),e.warnings=Ce}async function Ho(ue,Ce){try{await St().updateSession(ue,{title:Ce}),d(ue,Ue=>({...Ue,title:Ce}))}catch(Ne){l("renameSession",Ne,{sessionId:ue})}}async function Fs(ue){try{const Ne=await St().generateSessionTitle(ue,{force:!0,source:"digest"});return Ne.title.length>0?Ne.title:null}catch(Ce){return console.warn("[pythinker-web] generateSessionTitle failed for",ue,Ce),null}}async function qs(ue,Ce){const Ne=e.workspaces.find(dt=>dt.id===ue)?.root,Ue=()=>{e.workspaces=e.workspaces.map(dt=>dt.id===ue?{...dt,name:Ce}:dt)};try{if(await St().updateWorkspace(ue,{name:Ce}),Ne!==void 0){const dt=um();Ne in dt&&(delete dt[Ne],t4(dt))}Ue()}catch(dt){if(Ne!==void 0&&nr(dt)&&dt.code===vCe){t4({...um(),[Ne]:Ce}),Ue();return}l("renameWorkspace",dt)}}async function Ii(ue){const Ce=e.workspaces.find(yt=>yt.id===ue)?.root??F.value.find(yt=>yt.id===ue)?.root??ue,Ne=e.activeSessionId?e.sessions.find(yt=>yt.id===e.activeSessionId):void 0,Ue=e.activeWorkspaceId===ue||e.activeWorkspaceId===Ce,dt=!!(Ne&&(Ne.cwd===Ce||Ne.workspaceId===ue||M(Ne)===ue));Ce&&!e.hiddenWorkspaceRoots.includes(Ce)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ce],re(e.hiddenWorkspaceRoots));try{await St().deleteWorkspace(ue)}catch(yt){console.warn("[pythinker-web] deleteWorkspace registry cleanup failed for",ue,yt)}if(e.workspaces=e.workspaces.filter(yt=>yt.id!==ue&&yt.root!==Ce),Ue||dt){const yt=R.value[0]?.id??null;if(e.activeWorkspaceId=yt,yt)j(yt);else try{Hu(rn.activeWorkspace)}catch{}}(Ue||dt)&&(m(void 0),e.sessionLoading=!1,ne(),Zt(void 0,"replace"))}async function cs(ue){try{await St().archiveSession(ue),h(ue),i.clearSideChatForSession(ue);const{[ue]:Ne,...Ue}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=Ue,e.activeSessionId===ue){const dt=e.sessions[0];dt?await vo(dt.id,{urlMode:"replace"}):(m(void 0),Zt(void 0,"replace"))}}catch(Ce){l("archiveSession",Ce,{sessionId:ue})}}async function Po(ue){if(xe)return!1;const Ce=ue??e.activeSessionId;if(!Ce){const Ue=n("commands.export.noSession");return Go("export:failed",{status:"no-session"}),l("exportSession",new Error(Ue),{message:Ue}),!1}xe=!0;const Ne=Date.now();Go("export:start",{sessionId:Ce});try{const Ue=Zye(),{blob:dt,fileName:yt}=await St().exportSession(Ce,Ue);if(typeof document>"u")throw new Error("Document is unavailable");const Yt=URL.createObjectURL(dt);let sn;try{sn=document.createElement("a"),sn.href=Yt,sn.download=yt,document.body.append(sn),sn.click()}finally{sn?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(Yt)}catch{}},0)}return Go("export:accepted",{sessionId:Ce,status:"accepted",zipBytes:dt.size,durationMs:Date.now()-Ne}),!0}catch(Ue){const dt=typeof Ue=="object"&&Ue!==null?Ue:void 0;return Go("export:failed",{sessionId:Ce,status:"failed",durationMs:Date.now()-Ne,errorName:typeof dt?.name=="string"?dt.name:typeof Ue,errorCode:typeof dt?.code=="number"?dt.code:void 0,requestId:typeof dt?.requestId=="string"?dt.requestId:void 0,phase:typeof dt?.phase=="string"?dt.phase:void 0,httpStatus:typeof dt?.status=="number"?dt.status:void 0}),l("exportSession",Ue,{sessionId:Ce}),!1}finally{xe=!1}}async function ln(ue){try{const Ce=await St().restoreSession(ue);return f(Ce),!0}catch(Ce){return l("restoreSession",Ce,{sessionId:ue}),!1}}function Os(ue){return St().listSessions({archivedOnly:!0,beforeId:ue?.beforeId,pageSize:ue?.pageSize??50})}async function ds(){try{await St().logout(),await Z(),await Mt()}catch(ue){l("logout",ue)}}function jo(ue){const Ce=e.activeSessionId;Ce&&St().compactSession(Ce,ue).catch(Ne=>{l("compact",Ne,{sessionId:Ce})})}async function Ks(ue){const Ce=ue??e.activeSessionId;if(Ce)try{const Ne=await St().forkSession(Ce);f(Ne),await vo(Ne.id)}catch(Ne){l("fork",Ne,{sessionId:Ce})}}async function $i(ue=1){const Ce=e.activeSessionId;if(!Ce)return null;const Ne=(()=>{const Ue=e.messagesBySession[Ce]??[];for(let dt=Ue.length-1;dt>=0;dt--){const yt=Ue[dt];if(yt.role==="user"&&!(yt.metadata?.origin&&yt.metadata.origin.kind!=="user"))return yt.content.filter(Yt=>Yt.type==="text").map(Yt=>Yt.text).join(` -`)}return null})();try{return await St().undoSession(Ce,ue),await y(Ce),Ne}catch(Ue){return l("undo",Ue,{sessionId:Ce}),null}}function ks(ue){const Ce=e.activeSessionId;if(!Ce)return;const Ne=e.queuedBySession[Ce]??[];if(ue<0||ue>=Ne.length)return;const Ue=[...Ne];Ue.splice(ue,1),e.queuedBySession={...e.queuedBySession,[Ce]:Ue}}function Nn(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return;const Ue=e.queuedBySession[Ne]??[];if(ue===Ce||ue<0||ue>=Ue.length||Ce<0||Ce>=Ue.length)return;const dt=[...Ue],[yt]=dt.splice(ue,1);yt!==void 0&&(dt.splice(Ce,0,yt),e.queuedBySession={...e.queuedBySession,[Ne]:dt})}async function $o(ue){const Ce=e.activeSessionId;if(!Ce)return[];try{return(await St().listDirectory(Ce,{path:ue,includeGitStatus:!0})).items}catch{return[]}}async function Lr(ue){const Ce=e.activeSessionId;if(!Ce)return null;try{const Ue=await St().readFile(Ce,{path:ue});return{path:Ue.path,content:Ue.content,encoding:Ue.encoding,mime:Ue.mime,languageId:Ue.languageId,isBinary:Ue.isBinary,size:Ue.size,lineCount:Ue.lineCount}}catch(Ne){return console.warn("[pythinker-web] readFileContent failed for",ue,Ne),null}}const Me=10485760;function Ie(ue){const Ce=e.activeSessionId;return Ce?St().getFileDownloadUrl(Ce,ue):null}async function Ve(ue,Ce){const Ne=e.activeSessionId;if(!Ne)return!1;try{return await St().openFile(Ne,{path:ue,line:Ce}),!0}catch(Ue){return l("openFile",Ue,{sessionId:Ne}),!1}}async function an(ue){const Ce=e.activeSessionId;if(!Ce)return;const Ne=P.value.cwd||".";try{await St().openInApp(Ce,ue,Ne)}catch(Ue){l("openInApp",Ue,{sessionId:Ce})}}async function gn(ue){const Ce=e.activeSessionId;if(!Ce)return!1;try{return await St().revealFile(Ce,{path:ue}),!0}catch(Ne){return l("revealFile",Ne,{sessionId:Ce}),!1}}async function Ln(ue){if(/^(https?:|data:|blob:)/i.test(ue))return ue;const Ce=e.activeSessionId;if(!Ce)return ue;let Ne=ue;if(Ne.startsWith("/")){const Ue=e.sessions.find(dt=>dt.id===Ce)?.cwd;if(Ue&&(Ne===Ue||Ne.startsWith(Ue.endsWith("/")?Ue:`${Ue}/`))){if(Ne=Ne.slice(Ue.length).replace(/^\//,""),!Ne)return ue}else return ue}try{const dt=await St().readFile(Ce,{path:Ne,length:Me});return!dt.isBinary||dt.encoding!=="base64"||dt.truncated?ue:`data:${dt.mime};base64,${dt.content}`}catch{return ue}}async function xn(ue){const Ce=e.sessions.find(Ue=>Ue.id===e.activeSessionId),Ne=Ce===void 0?e.activeWorkspaceId:M(Ce);if(!Ne)return[];try{return(await St().searchFiles(Ne,{query:ue,limit:20})).items.map(yt=>({path:yt.path,name:yt.name}))}catch{return[]}}return{loadFileDiff:ee,clearFileDiff:ne,loadGitStatus:H,checkAuth:Z,loadConfig:fe,updateConfig:de,listAllSessionsGlobal:_e,load:Mt,refreshServerMeta:ft,loadWorkspaces:Tt,loadMoreSessions:Re,loadAllSessions:at,selectWorkspace:Kt,openWorkspace:Qe,upsertWorkspacePreserveOrder:nt,applyWorkspaceEvent:ut,clearActiveSession:Pt,openWorkspaceDraft:Oe,startSessionAndSendPrompt:it,startSessionAndActivateSkill:rt,startSessionAndOpenSideChat:vt,addWorkspaceByPath:Nt,browseFs:on,getFsHome:mn,writeSessionUrl:Zt,fetchSessionIntoList:jn,onSessionRoutePopState:Xt,bindSessionRoute:Wo,selectSession:vo,submitPromptInternal:Un,finishPromptLocal:Qt,localTurnStartState:CCe,isLocalTurnSnapshotCurrent:MCe,afterLocalTurnStartsSettle:ECe,handleSessionSnapshot:_o,sendPrompt:$s,steerPrompt:ot,uploadImage:Ae,enqueue:wt,unqueue:ks,reorderQueue:Nn,abortCurrentPrompt:Zn,respondApproval:ro,respondQuestion:ys,dismissQuestion:Ti,pendingQuestionActions:hu,pendingApprovalActions:Um,cancelTask:Ns,setPlanMode:Us,togglePlanMode:Vs,setDynamicWorkflowMode:li,toggleDynamicWorkflowMode:ss,setGoalMode:ai,toggleGoalMode:ui,createGoal:Cn,controlGoal:Ls,setPermission:Fn,dismissWarning:Io,renameSession:Ho,generateSessionTitle:Fs,renameWorkspace:qs,deleteWorkspace:Ii,archiveSession:cs,exportSession:Po,restoreSession:ln,loadArchivedSessions:Os,logout:ds,compact:jo,forkSession:Ks,undo:$i,listDir:$o,readFileContent:Lr,getFileDownloadUrl:Ie,openWorkspaceFile:Ve,openInApp:an,revealWorkspaceFile:gn,resolveImageUrl:Ln,searchFiles:xn,loadOlderMessages:We,refreshSessionSidecars:he,isStartingFirstPrompt:()=>Hr.size>0}}const q7=rn.starredModels,rM=new Error("profile persist failed");function ICe(){try{const e=zo(q7);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function $Ce(e){try{ts(q7,JSON.stringify(e))}catch{}}function NCe(e,t){const{pushOperationFailure:n,refreshSessionStatus:o,persistSessionProfile:s,activity:i,updateSession:r,updateSessionMessages:l}=t,a=V([]),u=V(ICe()),c=V({}),d=V({}),f=V([]),p=V([]),h=V(null);function m(G){if(!(G==null||G.length===0))return a.value.find(X=>X.id===G)??a.value.find(X=>X.model===G)}function k(){const G=e.activeSessionId?e.sessions.find(te=>te.id===e.activeSessionId):void 0,X=G===void 0?h.value??e.defaultModel:G.model||e.defaultModel;return m(X)?.id??X??void 0}function w(G){if(G===void 0)return;const X=m(G);return X===void 0?void 0:Yp(X)}function v(G,X){const te=G==null?void 0:e.thinkingBySession[G];return te!==void 0&&R_e(X,te)?te:Yp(X)}function y(G,X){if(X===void 0)return;const te=m(X);return te===void 0?void 0:v(G,te)}async function b(G,X){return G!=null&&e.thinkingBySession[G]===void 0&&await o(G),y(G,X)}function S(G){e.thinking=G;const X=e.activeSessionId;return G!==void 0&&X!==null&&X!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[X]:G}),G}Ye([()=>e.activeSessionId,()=>k(),()=>{const G=e.activeSessionId;return G==null?void 0:e.thinkingBySession[G]}],()=>{const G=m(k());G!==void 0&&(e.thinking=v(e.activeSessionId,G))});function I(G){St().setConfig({thinking:P_e(G,m(k())?.supportEfforts)}).catch(X=>n("setConfig",X))}async function T(G){try{const te=await St().listSkills(G);c.value={...c.value,[G]:te}}catch{}}async function $(G){try{const te=await St().listSkillsForWorkspace(G);d.value={...d.value,[G]:te}}catch{}}async function F(){try{const G=St();a.value=await G.listModels();const X=m(k());X!==void 0&&(e.thinking=v(e.activeSessionId,X))}catch(G){n("loadModels",G)}}async function R(){try{const G=St();f.value=await G.listProviders()}catch(G){n("loadProviders",G)}}async function P(){try{const G=St();p.value=await G.listCatalogProviders()}catch(G){n("loadCatalogProviders",G)}}async function M(G){const X=e.activeSessionId,te=m(G),q=e.thinking,me=X?e.sessions.find(he=>he.id===X)?.model:void 0,xe=k()!==(te?.id??G),We=D_e(te,q,xe);if(!X)return h.value=G,e.thinking=We,We!==q&&We!==void 0&&I(We),!0;r(X,he=>({...he,model:G})),We!==q&&(e.thinking=We,We!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[X]:We}));try{await St().updateSession(X,{model:G,thinking:We!==q?We:void 0})}catch(he){return r(X,ee=>({...ee,model:me??ee.model})),We!==q&&(e.thinking=q,q!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[X]:q})),n("setModel",he,{sessionId:X}),!1}return We!==q&&We!==void 0&&I(We),await o(X),!0}function D(G){const X=new Set(u.value);X.has(G)?X.delete(G):X.add(G),u.value=Array.from(X),$Ce(u.value)}async function B(G,X,te){const q=te??e.activeSessionId;if(!q)return;const me=i.value==="idle"&&!e.inFlightBySession[q],xe=`msg_skill_opt_${Date.now().toString(36)}`,We=me?m2(q):void 0;if(me){e.inFlightBySession={...e.inFlightBySession,[q]:!0};const he={id:xe,sessionId:q,role:"user",content:[{type:"text",text:`/${G}${X?` ${X}`:""}`}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:G,skillArgs:X}}};l(q,ee=>[...ee,he])}try{const he=e.sessions.find(H=>H.id===q)?.model,ee=(he&&he.length>0?he:e.defaultModel)??void 0;if(!await s({thinking:await b(q,ee)??e.thinking},q))throw rM;await St().activateSkill(q,G,X)}catch(he){me&&(e.inFlightBySession={...e.inFlightBySession,[q]:!1},l(q,ee=>ee.filter(ne=>ne.id!==xe))),he!==rM&&n("activateSkill",he,{sessionId:q})}finally{We!==void 0&&g2(q,We)}}async function z(G){try{await St().importCatalogProvider(G),await Promise.all([R(),F()])}catch(X){n("importCatalogProvider",X)}}async function A(G){try{await St().deleteProvider(G),await Promise.all([R(),F()])}catch(X){n("deleteProvider",X)}}async function L(G){try{const X=await St().refreshProvider(G);for(const te of X.failed)n("refreshProvider",new Error(te.reason),{message:te.provider});await Promise.all([R(),F()])}catch(X){n("refreshProvider",X)}}async function W(){try{const G=await St().refreshAllProviders();for(const X of G.failed)n("refreshAllProviders",new Error(X.reason),{message:X.provider});await Promise.all([R(),F()])}catch(G){n("refreshAllProviders",G)}}async function j(){try{return await St().startOAuthLogin()}catch{return null}}async function re(){try{return await St().pollOAuthLogin()}catch(G){return console.warn("[pythinker-web] pollOAuthLogin failed",G),null}}async function Q(){try{await St().cancelOAuthLogin()}catch{}}function Y(G){const X=S(G);s({thinking:X}),X!==void 0&&I(X)}return{models:a,starredModelIds:u,providers:f,catalogProviders:p,draftModel:h,skillsBySession:c,skillsByWorkspace:d,loadSkillsForSession:T,loadSkillsForWorkspace:$,loadModels:F,loadProviders:R,loadCatalogProviders:P,setModel:M,thinkingLevelForModelId:w,thinkingLevelForSessionId:y,resolveThinkingForPrompt:b,toggleStarModel:D,activateSkill:B,importCatalogProvider:z,addProvider:G=>z({catalogId:G.type,apiKey:G.apiKey,baseUrl:G.baseUrl}),deleteProvider:A,refreshProvider:L,refreshAllProviders:W,startOAuthLogin:j,pollOAuthLogin:re,cancelOAuthLogin:Q,setThinking:Y}}const K7="pythinkerWeb.compaction",LCe=/^read[_-]?media(?:file)?$/i,FCe=/^data:([^;]+);base64,(.*)$/s,OCe=/^<(image|video|audio)\s+path="([^"]+)">$/,RCe=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,PCe=/Mime type:\s*([^.\s]+)/i,DCe=/Size:\s*(\d+)\s*bytes/i,BCe=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,zCe="Image compressed to fit model limits:",WCe=/Image compressed to fit model limits:[\s\S]*?<\/system>/g;function HCe(e){return e.includes(zCe)?e.replace(WCe,""):e}function jCe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function UCe(e){const t=RCe.exec(e.trim());return t?{kind:t[1],path:jCe(t[2])}:null}const G7=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,VCe=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function qCe(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),o=n>0?t.slice(0,n):t;return G7.test(o)?o:void 0}const KCe=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function GCe(e){const t=KCe.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",o=VCe.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:o!==void 0&&G7.test(o)?o:void 0}}function ZCe(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function YCe(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function JCe(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const i=s.url;return typeof i=="string"?{kind:n,url:i}:null}function XCe(e,t){if(!LCe.test(e))return;const n=YCe(t);if(n===null)return;let o,s,i,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,h=OCe.exec(p);h&&(s=h[1],o=h[2]);const m=PCe.exec(p);m?.[1]&&(i=m[1]);const k=DCe.exec(p);k?.[1]&&(r=Number(k[1]));const w=BCe.exec(p);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=JCe(d);f&&(a=f)}if(a===null)return;const u=FCe.exec(a.url);return u?.[1]&&(i=u[1]),u?.[2]&&(r=ZCe(u[2])),{kind:a.kind??s??"image",url:a.url,path:o,mimeType:i,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function QCe(e){if(e!=null){if(typeof e=="string")return e.split(` -`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` -`));else if(n&&typeof n=="object"){const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` -`)):o.type==="think"&&typeof o.think=="string"?t.push(...o.think.split(` -`)):o.type==="image_url"||o.type==="image"?t.push("[image]"):typeof o.type=="string"?t.push(`[${o.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function e4e(e){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.subagentPhase??(e.status==="completed"?"completed":e.status==="failed"?"failed":"working"),status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,dynamicWorkflowIndex:e.dynamicWorkflowIndex}}function t4e(e,t){const n=e.split(` -`),o=t.split(` -`),s=[];return n.forEach((i,r)=>{s.push({kind:"rem",gutter:String(r+1),text:`- ${i}`})}),o.forEach((i,r)=>{s.push({kind:"add",gutter:String(r+1),text:`+ ${i}`})}),s}function n4e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:t4e(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command")return{kind:"shell",command:typeof t.command=="string"?t.command:e.action,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:void 0};if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const r=i??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:o,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function o4e(e){const t=` -`,n=` -`,o=e.indexOf(t),s=e.lastIndexOf(n);return o>=0&&s>=o+t.length?e.slice(o+t.length,s):s4e(e)}function s4e(e){const t=e.split(` -`);return t.length>=2&&t[0]?.startsWith(""?t.slice(1,-1).join(` -`):e}function i4e(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function r4e(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` -`);return o4e(t)}function l4e(e,t){const n=e.metadata?.origin??{},o=r4e(e);return t==="cron_missed"?{text:o,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:o,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function a4e(e,t,n){const{text:o,cron:s}=l4e(e,n);return{id:e.id,role:"cron",no:t,text:o,createdAt:e.createdAt,cron:s}}function u4e(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function c4e(e){return e.metadata?.origin?.kind==="compaction_summary"}function d4e(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function f4e(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function p4e(e){let t="",n="";const o=[],s=[];for(const i of e)i.type==="text"?t+=i.text:i.type==="thinking"?n+=i.thinking:i.type==="toolUse"?o.push(i.toolCallId):s.push(JSON.stringify(i));return o.sort(),s.sort(),{text:t,thinking:n,toolIds:o,rest:s}}function h4e(e,t){return t.text!==""&&t.text!==e.text||t.thinking!==""&&t.thinking!==e.thinking?!1:t.toolIds.every(n=>e.toolIds.includes(n))&&t.rest.every(n=>e.rest.includes(n))}function o_(e,t,n,o=!0,s={}){const i=[];let r=1;const l=new Map;for(const p of t)l.set(p.toolCallId,p);let a=null;function u(p=!1){if(!a)return;const h=a;if(a=null,!p||!o)for(let m=0;my.kind==="tool"&&y.tool.id===w.id);v&&v.kind==="tool"&&(v.tool=w)}i.push({id:h.id,role:"assistant",no:r++,text:h.textParts.join(` -`),thinking:h.thinkingParts.length>0?h.thinkingParts.join(` -`):void 0,tools:h.tools.length>0?h.tools:void 0,blocks:h.blocks.length>0?h.blocks:void 0,approval:h.approval,approvalId:h.approvalId,durationMs:h.durationMs})}function c(p,h){for(const m of h)if(m.type==="text"){if(m.text){p.textParts.push(m.text);const k=p.blocks.at(-1);k&&k.kind==="text"?k.text+=` -`+m.text:p.blocks.push({kind:"text",text:m.text})}}else if(m.type==="thinking"){if(m.thinking){p.thinkingParts.push(m.thinking);const k=p.blocks.at(-1);k&&k.kind==="thinking"?k.thinking+=` -`+m.thinking:p.blocks.push({kind:"thinking",thinking:m.thinking})}}else if(m.type==="toolUse"){const k=l.get(m.toolCallId),w={id:m.toolCallId,name:m.toolName,arg:typeof m.input=="string"?m.input:JSON.stringify(m.input),status:"running",output:m.outputLines,planPath:m.toolName==="ExitPlanMode"?s[m.toolCallId]?.path:void 0};p.tools.push(w),p.blocks.push({kind:"tool",tool:w}),k&&(p.approval=n4e(k),p.approvalId=k.approvalId)}else if(m.type==="toolResult"){const k=p.tools.findIndex(w=>w.id===m.toolCallId);if(k!==-1){const w=p.tools[k],v={...w,status:m.isError?"error":"ok",output:QCe(m.output),media:m.isError?void 0:XCe(w.name,m.output)};v.name==="ExitPlanMode"&&!v.planPath&&(v.planPath=f4e(v.output)),p.tools[k]=v;const y=p.blocks.find(b=>b.kind==="tool"&&b.tool.id===m.toolCallId);y&&y.kind==="tool"&&(y.tool=v)}}}function d(p,h){for(const m of h){if(m.type!=="toolUse"||!m.outputLines?.length)continue;const k=p.tools.findIndex(b=>b.id===m.toolCallId);if(k===-1)continue;const w=p.tools[k];if(w.output!==void 0)continue;const v={...w,output:m.outputLines};p.tools[k]=v;const y=p.blocks.find(b=>b.kind==="tool"&&b.tool.id===m.toolCallId);y&&y.kind==="tool"&&(y.tool=v)}}function f(p){if(p.type==="image"||p.type==="video"){const h=p.type,m=p.source;if(m.kind==="url")return{url:m.url,kind:h};if(m.kind==="base64")return{url:`data:${m.mediaType};base64,${m.data}`,kind:h};if(m.kind==="file"&&n)return{url:n(m.fileId),kind:h,fileId:m.fileId}}if(p.type==="file"&&n){if(p.mediaType.startsWith("image/"))return{url:n(p.fileId),kind:"image",fileId:p.fileId};if(p.mediaType.startsWith("video/"))return{url:n(p.fileId),kind:"video",fileId:p.fileId}}}for(const p of e){if(p.role==="system")continue;if(c4e(p)){u();const v=p.metadata?.[K7];i.push({id:p.id,role:"compaction",no:r,text:p.content.filter(y=>y.type==="text").map(y=>y.text).join(` -`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}});continue}if(p.role==="user"){const v=i4e(p);if(u(),v!==void 0){i.push(a4e(p,r++,v));continue}if(!u4e(p))continue;const y=p.metadata?.origin,b=y?.kind==="skill_activation"&&y?.trigger==="user-slash",S=y?.kind==="plugin_command"&&y?.trigger==="user-slash",I=[],T=[];for(const $ of p.content){if($.type==="text")if(b)I.push(y.skillArgs??"");else if(S)I.push(y.commandArgs??"");else{const R=UCe($.text);if(R&&(R.kind==="video"||R.kind==="image")&&n){const D=qCe(R.path);if(D){T.push({url:n(D),kind:R.kind,fileId:D});continue}}const P=GCe($.text);if(P){T.push({kind:"file",url:P.fileId&&n?n(P.fileId):"",fileId:P.fileId,name:P.name,mediaType:P.mediaType,size:P.size});continue}const M=HCe($.text);if(M!==$.text&&M.trim().length===0)continue;I.push(M)}const F=f($);if(F){T.push({url:F.url,kind:F.kind,name:$.type==="file"?$.name:void 0,fileId:F.fileId});continue}$.type==="file"&&n&&T.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}i.push({id:p.id,role:"user",no:r++,text:I.join(` -`),attachments:T.length>0?T:void 0,skillActivation:b?{name:y.skillName,args:y.skillArgs}:void 0,pluginCommand:S?{pluginId:y.pluginId,commandName:y.commandName,args:y.commandArgs}:void 0,createdAt:p.createdAt});continue}if(p.role==="tool"){a&&c(a,p.content);continue}const h=p.promptId;d4e(a,h)?a!==null&&a.promptId===void 0&&h!==void 0&&(a.promptId=h):(u(),a={id:p.id,promptId:h,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,foldedSigs:[],durationMs:p.durationMs});const k=a;if(k===null)continue;const w=p4e(p.content);if(k.promptId!==void 0&&k.foldedSigs.some(v=>h4e(v,w))){d(k,p.content);continue}k.foldedSigs.push(w),c(k,p.content)}return u(!0),i}function m4e(e,t){const{pushOperationFailure:n,nextOptimisticMsgId:o,connectEventsIfNeeded:s,getEventConn:i,resolveThinkingForPrompt:r}=t,l=V({}),a=O(()=>{const R=e.activeSessionId;if(!R)return null;const P=l.value[R];return P?{parentId:R,agentId:P.agentId}:null}),u=O(()=>a.value?.parentId??null),c=O(()=>a.value!==null),d=O(()=>{const R=a.value;return R?!!e.sideChatSendingByAgent[R.agentId]:!1}),f=O(()=>{const R=a.value;return R?e.sideChatSendingByAgent[R.agentId]?!0:(e.tasksBySession[R.parentId]??[]).some(P=>P.id===R.agentId&&P.status==="running"):!1}),p=O(()=>{const R=a.value;if(!R)return[];const P=e.sideChatMessagesByAgent[R.agentId]??[];return o_(P,[],M=>St().getFileUrl(M),f.value)});function h(R,P){e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[R]:P(e.sideChatMessagesByAgent[R]??[])}}function m(R,P){h(R,M=>[...M,P])}function k(R){h(R,P=>{const M=[...P].reverse().findIndex(B=>B.role==="user");if(M===-1)return P;const D=P.length-1-M;return P.filter((B,z)=>z!==D)})}function w(R,P){h(R,M=>{const D=[...M];for(let B=D.length-1;B>=0;B-=1){const z=D[B];if(z.role==="user")return D[B]={...z,promptId:z.promptId??P},D}return M})}function v(R,P,M){M&&h(R,D=>{const B=D.at(-1);if(B?.role==="assistant"){const z=B.content[0],A=z?.type==="text"?z.text:"";return[...D.slice(0,-1),{...B,content:[{type:"text",text:`${A}${M}`}]}]}return[...D,{id:o(),sessionId:P,role:"assistant",content:[{type:"text",text:M}],createdAt:new Date().toISOString()}]})}function y(R,P,M){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[R]:!1},!M)return;const B=(e.sideChatMessagesByAgent[R]??[]).at(-1);(B?.role==="assistant"&&B.content[0]?.type==="text"?B.content[0].text:"").trim().length>0||v(R,P,M)}async function b(R){const P=e.activeSessionId;P&&await S(P,R)}async function S(R,P){if(!l.value[R]){let M;try{({agentId:M}=await St().startBtw(R))}catch(D){n("openSideChat",D,{sessionId:R});return}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[M]:e.sideChatMessagesByAgent[M]??[]},l.value={...l.value,[R]:{agentId:M}},s(),i()?.markSideChannelAgent(M)}P&&P.trim()&&await I(R,P.trim())}async function I(R,P){const M=l.value[R],D=P.trim();if(!M||!D)return;const B=R,z=M.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[z]:!0};const A={id:o(),sessionId:B,role:"user",content:[{type:"text",text:D}],createdAt:new Date().toISOString(),metadata:{"pythinkerWeb.optimisticUserMessage":!0}};m(z,A);try{const L=e.sessions.find(re=>re.id===B),W=(L?.model&&L.model.length>0?L.model:e.defaultModel)??void 0,j=await St().submitPrompt(B,{content:[{type:"text",text:D}],agentId:z,model:W,thinking:await r(B,W)??e.thinking,permissionMode:e.permission,planMode:e.planModeBySession[B]??!1,dynamicWorkflowMode:e.dynamicWorkflowModeBySession[B]??!1});w(z,j.promptId),e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[B]:[...e.sideChatUserMessageIdsBySession[B]??[],j.userMessageId]}}catch(L){n("sendSideChatPrompt",L,{sessionId:B}),k(z),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[z]:!1}}}function T(){const R=e.activeSessionId;if(!R)return;const{[R]:P,...M}=l.value;l.value=M}async function $(R){const P=a.value;P&&await I(P.parentId,R)}function F(R){if(!l.value[R])return;const{[R]:P,...M}=l.value;l.value=M}return{sideChatTargetBySession:l,sideChatSessionId:u,sideChatVisible:c,sideChatSending:d,sideChatRunning:f,sideChatTurns:p,appendSideChatAssistantText:v,finishSideChatAgent:y,openSideChat:b,openSideChatOn:S,closeSideChat:T,sendSideChatPrompt:$,clearSideChatForSession:F}}const lM=20;class g4e{constructor(t,n,o,s,i){this.sessionId=t,this.agentId=n,this.fetchPage=o,this.onChange=s,this.onGap=i,this.transcript=new yme(n)}transcript;refreshPromise=null;buffered=[];agentsValue=[];seqValue;loadingOlderValue=!1;loadOlderErrorValue=!1;refreshErrorValue=!1;get snapshot(){return this.transcript.snapshot()}get agents(){return this.agentsValue}get seq(){return this.seqValue}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlderValue}get loadOlderError(){return this.loadOlderErrorValue}get refreshError(){return this.refreshErrorValue}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshErrorValue=!1;const t=this.fetchPage({pageSize:lM}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshErrorValue=!0,n}).finally(()=>{this.refreshPromise=null,this.flushBuffered(),this.onChange()});return this.refreshPromise=t,this.onChange(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seqValue=n),this.refreshErrorValue=!1,this.onChange()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlderValue)return this.buffered.push({ops:t,seq:n}),!1;if(n!==void 0&&this.seqValue!==void 0){if(n<=this.seqValue)return!0;if(n!==this.seqValue+1)return this.onGap(),!1}const o=this.transcript.apply(t);return n!==void 0&&(this.seqValue=n),o.gap!==void 0&&this.onGap(),o.accepted.length>0&&this.onChange(),o.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlderValue)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlderValue=!0,this.loadOlderErrorValue=!1,this.onChange();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:lM});this.applyPage(n,!1)}catch(n){throw this.loadOlderErrorValue=!0,n}finally{this.loadingOlderValue=!1,this.flushBuffered(),this.onChange()}}}applyPage(t,n){this.agentsValue=t.agents;const o=this.snapshot,s=n?t.snapshot:{...t.snapshot,items:v4e(t.snapshot.items,o.items),hasMoreOlder:t.snapshot.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}flushBuffered(){const t=this.buffered;this.buffered=[];for(const n of t)this.applyOps(n.ops,n.seq)}}function v4e(e,t){const n=new Set,o=[];for(const s of[...e,...t]){const i=Khe(s);n.has(i)||(n.add(i),o.push(s))}return o}function aM(e,t){return`${e}\0${t}`}function y4e(e){const t=new Map,n=new Map,o=new Map;function s(c){c.version.value+=1}function i(c,d,f){const p=e.getEventConnection();p!==null&&(p.subscribeTranscript(c,d,f),o.set(c,d))}function r(c,d){const f=aM(c,d),p=t.get(f);if(p!==void 0)return p;let h;return h={channel:new g4e(c,d,k=>e.api.getSessionTranscript(c,{...k,agentId:d}),()=>s(h),()=>void l(h)),version:Co(0)},t.set(f,h),h}async function l(c){try{await c.channel.refresh(),n.get(c.channel.sessionId)===c.channel.agentId&&i(c.channel.sessionId,c.channel.agentId,c.channel.seq)}catch{n.get(c.channel.sessionId)===c.channel.agentId&&i(c.channel.sessionId,c.channel.agentId)}}function a(c,d){e.connectEventsIfNeeded(),n.set(c,d);const f=r(c,d);return f.channel.snapshot.items.length>0||f.channel.seq!==void 0?i(c,d,f.channel.seq):l(f),f}function u(c,d){if(n.get(c)!==d)return;n.delete(c);const f=o.get(c);f!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(c,[f]),o.delete(c))}return{getEntry(c,d){return t.get(aM(c,d))},activate:a,deactivate:u,receiveReset(c,d,f,p){if(n.get(c)!==d)return;r(c,d).channel.receiveReset(f,p)},applyOps(c,d,f,p){return n.get(c)!==d?!0:r(c,d).channel.applyOps(f,p)},forgetSession(c){const d=n.get(c);d!==void 0&&u(c,d);for(const f of t.keys())f.startsWith(`${c}\0`)&&t.delete(f)}}}const k4e="pythinkerWeb.optimisticUserMessage",uM="Sub Agent";function b4e(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},compactionBySession:{},warnings:[]}}function w4e(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function x4e(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Tk(e){return e.role==="user"&&e.metadata?.[k4e]===!0}function _4e(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function S4e(e,t){return JSON.stringify(e.content)===JSON.stringify(t.content)}function C4e(e,t){if(e.role!=="assistant"||t.role!=="assistant"||e.promptId===void 0||e.promptId!==t.promptId)return!1;const n=o=>JSON.stringify(o.content.map(s=>s.type==="thinking"?{type:s.type,thinking:s.thinking}:s.type==="toolUse"?{type:s.type,toolCallId:s.toolCallId,toolName:s.toolName,input:s.input}:s));return n(e)===n(t)}const A4e=/^<(image|video|audio)\s+path="[^"]+"><\/\1>$/;function cM(e){let t="",n=0;for(const o of e.content)o.type==="text"?A4e.test(o.text.trim())?n+=1:t+=o.text:(o.type==="image"||o.type==="video"||o.type==="file")&&(n+=1);return{text:t,media:n}}function M4e(e,t){const n=cM(e),o=cM(t);return n.text===o.text&&n.media===o.media}function E4e(e,t){const n=t.promptId;if(n!==void 0)for(let o=e.length-1;o>=0;o--){const s=e[o];if(Tk(s)&&s.promptId===n)return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Tk(s)&&S4e(s,t))return o}for(let o=e.length-1;o>=0;o--){const s=e[o];if(Tk(s)&&M4e(s,t))return o}return-1}function T4e(e,t,n){let o=!1;const s=e.map(i=>{let r=!1;const l=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(o=!0,{...i,content:l}):i});return o?s:e}const I4e={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function $4e(e){const t=fo.global.t,n=[],o=(r,l)=>{typeof l=="number"||typeof l=="boolean"?n.push({label:r,value:String(l)}):typeof l=="string"&&l.length>0&&n.push({label:r,value:l})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||o(r,l);const i=(e.code!==void 0?I4e[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function N4e(e,t,n){const o=w4e(e);switch(x4e(o,n.sessionId,n.seq),t.type){case"sessionCreated":{o.sessions.some(i=>i.id===t.session.id)||(o.sessions=[t.session,...o.sessions]);break}case"sessionUpdated":{o.sessions=o.sessions.map(s=>s.id===t.session.id?t.session:s);break}case"sessionDeleted":{const s=t.sessionId;o.sessions=o.sessions.filter(i=>i.id!==s),delete o.messagesBySession[s],delete o.tasksBySession[s],delete o.goalBySession[s],delete o.approvalsBySession[s],delete o.questionsBySession[s],delete o.lastSeqBySession[s],delete o.turnActiveBySession[s],o.activeSessionId===s&&(o.activeSessionId=void 0);break}case"sessionWorkChanged":{o.sessions=o.sessions.map(s=>s.id!==t.sessionId?s:{...s,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?s.mainTurnActive:!1),pendingInteraction:t.pendingInteraction??s.pendingInteraction,lastTurnReason:t.lastTurnReason}),t.mainTurnActive===!0?o.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&delete o.turnActiveBySession[t.sessionId];break}case"sessionMetaUpdated":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,title:t.title??s.title,lastPrompt:t.lastPrompt??s.lastPrompt}:s);break}case"sessionUsageUpdated":{o.sessions=o.sessions.map(s=>{if(s.id!==t.sessionId)return s;const i=t.model&&t.model.length>0?t.model:s.model;return{...s,usage:t.usage,model:i}});break}case"historyCompacted":break;case"compactionStarted":{o.compactionBySession={...o.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const s=t.sessionId,i=o.compactionBySession[s],{[s]:r,...l}=o.compactionBySession;if(o.compactionBySession=l,Object.prototype.hasOwnProperty.call(o.messagesBySession,s)){const a=o.messagesBySession[s]??[],u=`compaction_${s}_${n.seq}`;if(!a.some(c=>c.id===u)){const c={trigger:i?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};o.messagesBySession[s]=[...a,{id:u,sessionId:s,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[K7]:c}}]}}break}case"compactionCancelled":{const{[t.sessionId]:s,...i}=o.compactionBySession;o.compactionBySession=i;break}case"messageCreated":{const s=t.message.sessionId,i=t.message.createdAt;o.sessions=o.sessions.map(a=>a.id===s&&i>a.updatedAt?{...a,updatedAt:i}:a);const r=o.messagesBySession[s]??[];if(!r.some(a=>a.id===t.message.id||C4e(a,t.message))){if(t.message.role==="user"&&!_4e(t.message)){const a=E4e(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,metadata:{...t.message.metadata,...c.metadata}},o.messagesBySession[s]=u;break}}o.messagesBySession[s]=[...r,t.message]}break}case"messageUpdated":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(r=>r.id!==t.messageId?r:{...r,content:t.content,durationMs:t.durationMs??r.durationMs});break}case"assistantDelta":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=i.map(r=>{if(r.id!==t.messageId)return r;const l=[...r.content],a=t.contentIndex;for(;l.length<=a;)l.push({type:"text",text:""});const u=l[a];let c;return t.delta.text!==void 0?u.type==="text"?c={type:"text",text:u.text+t.delta.text}:c={type:"text",text:t.delta.text}:t.delta.thinking!==void 0?u.type==="thinking"?c={type:"thinking",thinking:u.thinking+t.delta.thinking,signature:u.signature}:c={type:"thinking",thinking:t.delta.thinking}:c=u,l[a]=c,{...r,content:l}});break}case"toolOutput":{const s=t.sessionId,i=o.messagesBySession[s]??[];o.messagesBySession[s]=T4e(i,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const s=t.sessionId,i=o.approvalsBySession[s]??[];i.some(a=>a.approvalId===t.approval.approvalId)||(o.approvalsBySession[s]=[...i,t.approval]);const l=t.approval.display;l?.kind==="plan_review"&&typeof l.plan=="string"&&l.plan.length>0&&(o.planReviewByToolCallId={...o.planReviewByToolCallId,[t.approval.toolCallId]:{plan:l.plan,path:typeof l.path=="string"?l.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const s=t.sessionId,i=t.approvalId,r=o.approvalsBySession[s]??[];o.approvalsBySession[s]=r.filter(l=>l.approvalId!==i);break}case"questionRequested":{const s=t.sessionId,i=o.questionsBySession[s]??[];i.some(l=>l.questionId===t.question.questionId)||(o.questionsBySession[s]=[...i,t.question]);break}case"questionAnswered":case"questionDismissed":{const s=t.sessionId,i=t.questionId,r=o.questionsBySession[s]??[];o.questionsBySession[s]=r.filter(l=>l.questionId!==i);break}case"taskCreated":{const s=t.sessionId,i=o.tasksBySession[s]??[],r=i.findIndex(l=>l.id===t.task.id);if(r===-1)o.tasksBySession[s]=[...i,t.task];else{const l=[...i],a=i[r],u=a.kind==="subagent"&&(a.status==="completed"||a.status==="failed"||a.status==="cancelled")&&t.task.kind==="subagent"&&t.task.status==="running"&&t.task.subagentPhase==="queued";l[r]={...t.task,outputLines:u?t.task.outputLines:a.outputLines,text:u?t.task.text:a.text,description:t.task.description===uM&&a.description!==uM?a.description:t.task.description,dynamicWorkflowIndex:t.task.dynamicWorkflowIndex??a.dynamicWorkflowIndex,parentToolCallId:t.task.parentToolCallId??a.parentToolCallId,subagentType:t.task.subagentType??a.subagentType,runInBackground:t.task.runInBackground??a.runInBackground,backgroundTaskId:t.task.backgroundTaskId??a.backgroundTaskId},o.tasksBySession[s]=l}break}case"taskProgress":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(r=>{if(r.id!==t.taskId)return r;if(r.kind==="subagent"&&t.kind==="text")return{...r,text:(r.text??"")+t.outputChunk};const l=r.outputLines??[];if(l.at(-1)===t.outputChunk)return r;const a=[...l,t.outputChunk];return{...r,outputLines:r.kind==="subagent"?a:a.slice(-40)}});break}case"taskCompleted":{const s=t.sessionId,i=o.tasksBySession[s]??[];o.tasksBySession[s]=i.map(r=>r.id!==t.taskId?r:{...r,status:t.status,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const s=t.sessionId;o.goalVersionBySession[s]=(o.goalVersionBySession[s]??0)+1,t.goal===null||t.goal.status==="complete"?delete o.goalBySession[s]:o.goalBySession[s]=t.goal;break}case"configChanged":{o.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":case"promptAborted":break;case"turnActiveChanged":{o.sessions=o.sessions.map(s=>s.id===t.sessionId?{...s,mainTurnActive:t.active}:s),t.active?o.turnActiveBySession[t.sessionId]=!0:delete o.turnActiveBySession[t.sessionId];break}case"unknown":{const s=t.raw;if(!(s&&s._noop===!0))if(s&&s._agentError)o.warnings=[...o.warnings,$4e(s)];else if(s&&s._agentWarning){const i=s.message??s.code??"agent warning";o.warnings=[...o.warnings,`${fo.global.t("warnings.noteLabel")}: ${i}`]}else{const i=s?.type??"(unknown)";o.warnings=[...o.warnings,`Unhandled event: ${i}`]}break}}return o}function L4e(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function F4e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let o=n.content.length-1;o>=0;o--){const s=n.content[o];if(s.type!=="toolUse"||Hs(s.toolName)!=="todo")continue;let i=s.input;if(typeof i=="string")try{i=JSON.parse(i)}catch{continue}const r=i?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:L4e(a.status)}]:[]})}}return[]}const O4e=["queued","working","suspended","completed","failed","cancelled"];function Z7(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function R4e(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function P4e(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.dynamicWorkflowIndex===void 0)continue;const o=n.parentToolCallId??"dynamic-workflow",s=t.get(o)??[];s.push({id:n.id,name:n.description,subagentType:n.subagentType,phase:Z7(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex}),t.set(o,s)}return[...t.entries()].map(([n,o])=>{const s=o.toSorted((r,l)=>r.dynamicWorkflowIndex-l.dynamicWorkflowIndex||r.id.localeCompare(l.id)),i=R4e();for(const r of s)i[r.phase]++;return{id:n,members:s,counts:i}}).filter(n=>n.members.length>1).toSorted((n,o)=>{const s=n.members.at(0)?.dynamicWorkflowIndex??0,i=o.members.at(0)?.dynamicWorkflowIndex??0;return s!==i?s-i:n.id.localeCompare(o.id)})}function D4e(e){let t=0,n=0;for(const o of e){n+=o.members.length;for(const s of O4e)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=o.counts[s])}return{done:t,total:n}}function B4e(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const o=t.get(n.parentToolCallId)??[];o.push({id:n.id,name:n.description,subagentType:n.subagentType,phase:Z7(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,dynamicWorkflowIndex:n.dynamicWorkflowIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,o)}for(const[n,o]of t)t.set(n,o.toSorted((s,i)=>s.dynamicWorkflowIndex-i.dynamicWorkflowIndex||s.id.localeCompare(i.id)));return t}const yl=Kx(),qr=eCe(),Xp=aCe(),Y7=rn.permission,J7=rn.activeWorkspace,X7=rn.planMode,Q7=rn.planArmed,eN=rn.dynamicWorkflowMode,tN=rn.goalMode,dM=40401,nN=rn.onboarded;Hu(rn.codeFont);Hu(rn.theme);Hu(rn.thinking);function z4e(){try{const e=zo(Y7);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function W4e(e){try{ts(Y7,e)}catch{}}function Vm(e){const t=zo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const o={};for(const[s,i]of Object.entries(n))i===!0&&(o[s]=!0);return o}catch{return{}}}function H0(e,t){try{const n={};for(const[o,s]of Object.entries(t))s&&(n[o]=!0);ts(e,JSON.stringify(n))}catch{}}function oN(){H0(X7,Ee.planModeBySession)}function H4e(){H0(Q7,Ee.planArmedBySession)}function sN(){H0(eN,Ee.dynamicWorkflowModeBySession)}function iN(){H0(tN,Ee.goalModeBySession)}function j4e(){try{return zo(J7)}catch{return null}}const rN=rn.hiddenWorkspaces;function U4e(){try{const e=zo(rN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function V4e(e){try{ts(rN,JSON.stringify(e))}catch{}}function q4e(e){try{ts(J7,e)}catch{}}function K4e(e,t){if(t&&e.startsWith(t)){const o=e.slice(t.length);return o?`~${o}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const Ee=Ms({...b4e(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",workspaceName:"pythinker-web",connection:"disconnected",permission:z4e(),thinking:void 0,thinkingBySession:{},planModeBySession:Vm(X7),planArmedBySession:Vm(Q7),dynamicWorkflowModeBySession:Vm(eN),goalModeBySession:Vm(tN),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:iw(),authReady:!1,defaultModel:null,managedProviderStatus:null,workspaces:[],activeWorkspaceId:j4e(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:U4e(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1}),bh=Ms({planMode:!1,dynamicWorkflowMode:!1,goalMode:!1});function lN(e){Ee.sessions=e}function j0(e,t){Ee.sessions=Ee.sessions.map(n=>n.id===e?t(n):n)}function G4e(e){Ee.sessions=[e,...Ee.sessions.filter(t=>t.id!==e.id)]}function Z4e(e){Ee.sessions=[...Ee.sessions,e]}function Y4e(e){Ee.sessions=Ee.sessions.filter(t=>t.id!==e)}function aN(){const e=Ee.activeSessionId;e&&Ee.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Ee.unreadBySession={...Ee.unreadBySession,[e]:!1},rw({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===rn.unread&&(Ee.unreadBySession=iw(),aN())});function v2(){if(Hi===null||!Hi.health().stale)return;Go("ws:stale-reconnect",{sessionId:Ee.activeSessionId,status:"stale"}),wl("ws: stale socket on focus, reconnecting",{activeSessionId:Ee.activeSessionId}),Hi.reconnect();const e=Ee.activeSessionId;e&&z1.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(aN(),v2())});typeof window<"u"&&(window.addEventListener("focus",v2),window.addEventListener("online",v2));function s_(e){Ee.activeSessionId=e}function J4e(e){Ee.messagesBySession=e}function X4e(e,t){Ee.messagesBySession={...Ee.messagesBySession,[e]:t}}function uN(e,t){Ee.messagesBySession={...Ee.messagesBySession,[e]:t(Ee.messagesBySession[e]??[])}}function Q4e(e){const{[e]:t,...n}=Ee.messagesBySession;Ee.messagesBySession=n}function cN(e){Hi?.unsubscribe(e),_3e(e),D1.discard(({meta:t})=>t.sessionId===e),Y4e(e),Q4e(e),delete Ee.approvalsBySession[e],delete Ee.questionsBySession[e],delete Ee.tasksBySession[e],delete Ee.goalBySession[e],delete Ee.gitStatusBySession[e],delete Ee.lastSeqBySession[e],delete Ee.compactionBySession[e],delete Ee.messagesLoadingMoreBySession[e],delete Ee.messagesHasMoreBySession[e],delete Ee.messagesLoadMoreErrorBySession[e],delete k2[e],B1.delete(e),kg.delete(e),wN.delete(e),ACe(e),delete Ee.queuedBySession[e],delete Ee.promptIdBySession[e],delete Ee.inFlightBySession[e],delete Ee.turnActiveBySession[e],delete Ee.planModeBySession[e],delete Ee.planArmedBySession[e],delete Ee.dynamicWorkflowModeBySession[e],delete Ee.goalModeBySession[e],delete Ee.thinkingBySession[e],oN(),H4e(),sN(),iN()}const dN=V(null),fN=V([]),pN=V(!1),hN=V(!1),mN=V(null);async function wh(e){let t;try{t=await St().getSessionStatus(e)}catch{return}j0(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),Ee.dynamicWorkflowModeBySession={...Ee.dynamicWorkflowModeBySession,[e]:t.dynamicWorkflowMode},Ee.planModeBySession={...Ee.planModeBySession,[e]:t.planMode},t.thinkingEffort.length>0&&(Ee.thinkingBySession={...Ee.thinkingBySession,[e]:t.thinkingEffort})}async function e3e(e){const t=Ee.goalVersionBySession[e]??0;let n;try{n=await St().getSessionGoal(e)}catch{return}if((Ee.goalVersionBySession[e]??0)!==t)return;const o={...Ee.goalBySession};n===null||n.status==="complete"?delete o[e]:o[e]=n,Ee.goalBySession=o}function gN(e,t){const n=t??Ee.activeSessionId;return n?Promise.resolve(St().updateSession(n,e)).then(()=>wh(n)).then(()=>!0).catch(o=>(ec("persistSessionProfile",o,{sessionId:n}),!1)):Promise.resolve(!1)}const vN=rn.conversationToc;function t3e(){try{const e=zo(vN);return e===null?!0:e==="true"}catch{return!0}}function n3e(e){try{ts(vN,e?"true":"false")}catch{}}const yN=V(t3e());function o3e(e){yN.value=e,n3e(e)}function s3e(e){try{return zo(e)??""}catch{return""}}const kN=V(s3e(nN)==="1");function i3e(e){kN.value=e;try{ts(nN,e?"1":"0")}catch{}}let Hi=null;const y2=y4e({api:St(),connectEventsIfNeeded:i_,getEventConnection:()=>Hi});let fM=0;function bN(){return fM+=1,`msg_opt_${Date.now().toString(36)}_${fM}`}function r3e(e,t,n){const o={sessions:Ee.sessions,activeSessionId:Ee.activeSessionId,messagesBySession:Ee.messagesBySession,approvalsBySession:Ee.approvalsBySession,planReviewByToolCallId:Ee.planReviewByToolCallId,questionsBySession:Ee.questionsBySession,tasksBySession:Ee.tasksBySession,goalBySession:Ee.goalBySession,goalVersionBySession:Ee.goalVersionBySession,lastSeqBySession:Ee.lastSeqBySession,turnActiveBySession:Ee.turnActiveBySession,compactionBySession:Ee.compactionBySession,config:Ee.config,warnings:Ee.warnings},s=N4e(o,e,{sessionId:t,seq:n});lN(s.sessions),s_(s.activeSessionId),J4e(s.messagesBySession),Ee.approvalsBySession=s.approvalsBySession,Ee.planReviewByToolCallId=s.planReviewByToolCallId,Ee.questionsBySession=s.questionsBySession,Ee.tasksBySession=s.tasksBySession,Ee.goalBySession=s.goalBySession,Ee.goalVersionBySession=s.goalVersionBySession,Ee.lastSeqBySession=s.lastSeqBySession,Ee.turnActiveBySession=s.turnActiveBySession,Ee.compactionBySession=s.compactionBySession,Ee.config=s.config??null,Ee.warnings=s.warnings,e.type==="configChanged"&&(Ee.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(ao.loadModels(),ao.loadProviders()),e.type==="sessionUsageUpdated"&&(e.dynamicWorkflowMode!==void 0&&(Ee.dynamicWorkflowModeBySession={...Ee.dynamicWorkflowModeBySession,[e.sessionId]:e.dynamicWorkflowMode}),e.planMode!==void 0&&(Ee.planModeBySession={...Ee.planModeBySession,[e.sessionId]:e.planMode}),e.thinking!==void 0&&(Ee.thinkingBySession={...Ee.thinkingBySession,[e.sessionId]:e.thinking}))}function l3e(e,t){const n=Ee.lastSeqBySession[t.sessionId]??0,o=Ee.turnActiveBySession[t.sessionId]??!1;r3e(e,t.sessionId,t.seq);const s=Xs.sideChatTargetBySession.value[t.sessionId];if(s){const{agentId:i}=s,r=t.sessionId;e.type==="agentDelta"&&e.agentId===i?e.delta.text&&Xs.appendSideChatAssistantText(i,r,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===i?Xs.finishSideChatAgent(i,r):e.type==="taskProgress"&&e.taskId===i?Xs.appendSideChatAssistantText(i,r,e.outputChunk):e.type==="taskCompleted"&&e.taskId===i&&Xs.finishSideChatAgent(i,r,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const i=e.message.sessionId;Ee.promptIdBySession[i]!==e.message.promptId&&(Ee.promptIdBySession={...Ee.promptIdBySession,[i]:e.message.promptId})}if(e.type==="assistantDelta"&&t.sessionId===Ee.activeSessionId&&yl.recordMoonDelta((e.delta.text?.length??0)+(e.delta.thinking?.length??0)),e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const i=e.reason;HAe(e.sessionId,i==="cancelled"||i==="failed"||i==="blocked"?"aborted":"idle",o)}e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&o||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&WAe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Ee.promptIdBySession[e.sessionId]===e.promptId&&Ot.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&jAe(e.sessionId,e.question),e.type==="approvalRequested"&&UAe(e.sessionId,e.approval)}const D1=wSe(({appEvent:e,meta:t})=>l3e(e,t),({appEvent:e})=>vSe(e),{coalesce:_Se});function i_(){if(Hi!==null||typeof WebSocket>"u")return;Go("ws:connection",{status:"connecting"}),Ee.connection="connecting",Hi=St().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Ot.applyWorkspaceEvent(t);return}for(const o of xSe({appEvent:t,meta:n}))D1(o)},onResync(t,n,o){Go("ws:resync",{sessionId:t,status:"required",seq:n}),D1.flush(),B1.add(t),z1.request(t)},onError(t,n,o){Go("ws:error",{status:"failed",errorCode:t,fatal:o}),r_({severity:"error",title:fo.global.t("warnings.wsTitle"),message:n,details:[So("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){Go("ws:connection",{status:t?"connected":"disconnected"}),Ee.connected=t,Ee.connection=t?"connected":"disconnected",t&&(m3e(),Ot.refreshServerMeta())},onTranscriptReset(t,n,o,s){y2.receiveReset(t,n,o,s)},onTranscriptOps(t,n,o,s){return y2.applyOps(t,n,o,s)}})}const k2={},B1=new Set,kg=new Set,wN=new Set;function a3e(e){return nr(e)&&e.code===dM?!0:typeof e=="object"&&e!==null&&e.code===dM}function So(e,t){if(!(t==null||t===""))return{label:fo.global.t(`warnings.details.${e}`),value:xN(t)}}function xN(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function u3e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function c3e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function d3e(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function f3e(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function pM(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function p3e(e,t,n){const o=Ex(t),s=nr(t),i=o||s?t.timestamp:void 0,r=o||s?t.durationMs:void 0,l=[So("operation",e),So("sessionId",n??Ee.activeSessionId),So("connection",Ee.connection),So("timestamp",f3e(i??Date.now()))];return o?l.push(So("duration",pM(r)),So("request",`${t.method} ${t.path}`),So("endpoint",t.url),So("requestId",t.requestId),So("phase",t.phase),So("timeout",`${t.timeoutMs}ms`),So("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),So("contentType",t.contentType),So("responsePreview",t.bodyPreview),So("cause",t.cause)):s?l.push(So("duration",pM(r)),So("code",t.code),So("requestId",t.requestId),So("message",t.message),So("details",t.details)):l.push(So("errorName",u3e(t)),So("message",c3e(t)??xN(t)),So("stack",d3e(t))),l.filter(a=>a!==void 0)}function h3e(e,t,n={}){const o=Ex(t),s=nr(t),i=n.title??(o?fo.global.t("warnings.daemonNetworkTitle"):s?fo.global.t("warnings.daemonApiTitle"):fo.global.t("warnings.operationFailedTitle")),r=n.message??(o?fo.global.t("warnings.daemonNetworkMessage"):s?t.message:fo.global.t("warnings.operationFailedMessage"));return{severity:"error",title:i,message:r,details:p3e(e,t,n.sessionId)}}function r_(e){Ee.warnings=[...Ee.warnings,e]}function m3e(){const e=fo.global.t("warnings.wsTitle"),t=Ee.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==Ee.warnings.length&&(Ee.warnings=t)}function ec(e,t,n){console.error(`[pythinker-web] operation failed: ${e}`,t);const o=nr(t),s=Ex(t);Go("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:o?t.code:void 0,requestId:o||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),r_(h3e(e,t,n))}const g3e={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function v3e(e){if(!nr(e))return;const t=g3e[e.code];return t?fo.global.t(t):void 0}async function y3e(e){if(cN(e),Ee.activeSessionId!==e)return;const t=Ee.sessions[0];t?await Ot.selectSession(t.id,{urlMode:"replace"}):(s_(void 0),Ee.sessionLoading=!1,Ot.writeSessionUrl(void 0,"replace"))}const hM=new Set;async function k3e(e){if(!hM.has(e)){hM.add(e);try{const t=await St().getSessionWarnings(e),n=fo.global.t("warnings.noteLabel");for(const o of t)r_(`${n}: ${o.message}`)}catch{}}}async function l_(e){const t=Ot.localTurnStartState(e);try{const o=await St().getSessionSnapshot(e);if(!Ee.sessions.some(a=>a.id===e))return"ok";D1.flush();const s=Ee.lastSeqBySession[e]??0,i=k2[e];if(!(B1.has(e)||W1.has(e))&&i!==void 0&&i===o.epoch&&s>o.asOfSeq)return kg.delete(e)||(kg.add(e),z1.request(e)),"ok";if(!Ot.isLocalTurnSnapshotCurrent(e,t))return Ot.afterLocalTurnStartsSettle(e,()=>{z1.request(e)}),"ok";const l=t2(o.session.usage);j0(e,a=>({...o.session,model:o.session.model&&o.session.model.length>0?o.session.model:a.model,usage:l?a.usage:o.session.usage})),X4e(e,pSe(Ee.messagesBySession[e]??[],o.messages)),Ee.tasksBySession={...Ee.tasksBySession,[e]:hSe(o.subagents,Ee.tasksBySession[e]??[])},Ee.messagesHasMoreBySession={...Ee.messagesHasMoreBySession,[e]:o.hasMoreMessages},Ee.approvalsBySession={...Ee.approvalsBySession,[e]:o.pendingApprovals};for(const a of o.pendingApprovals){const u=a.display;u?.kind==="plan_review"&&typeof u.plan=="string"&&u.plan.length>0&&(Ee.planReviewByToolCallId={...Ee.planReviewByToolCallId,[a.toolCallId]:{plan:u.plan,path:typeof u.path=="string"?u.path:void 0}})}Ee.questionsBySession={...Ee.questionsBySession,[e]:o.pendingQuestions},Ee.lastSeqBySession={...Ee.lastSeqBySession,[e]:o.asOfSeq},k2[e]=o.epoch,B1.delete(e),kg.delete(e),Ot.handleSessionSnapshot(e,{inFlightTurn:o.inFlightTurn,busy:o.session.busy});{const a={...Ee.turnActiveBySession};o.session.mainTurnActive??(o.inFlightTurn!==null&&o.session.busy)?a[e]=!0:delete a[e],Ee.turnActiveBySession=a}return i_(),Hi&&(Hi.seedSnapshot(e,o),Hi.subscribe(e,{seq:o.asOfSeq,epoch:o.epoch}),x3e(e)),W1.delete(e),l&&wh(e),k3e(e),"ok"}catch(n){return a3e(n)?(await y3e(e),"not-found"):(ec("getSessionSnapshot",n,{title:fo.global.t("warnings.sessionSnapshotTitle"),message:fo.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const z1=mSe(l_);function b3e(e){return Object.prototype.hasOwnProperty.call(Ee.messagesBySession,e)}const w3e=4,kl=[],W1=new Set;function x3e(e){const t=kl.indexOf(e);for(t!==-1&&kl.splice(t,1),kl.unshift(e);kl.length>w3e;){let n=-1;for(let s=kl.length-1;s>=0;s--)if(kl[s]!==Ee.activeSessionId){n=s;break}if(n===-1)break;const[o]=kl.splice(n,1);if(o===void 0)break;Hi?.unsubscribe(o),W1.add(o)}}function _3e(e){const t=kl.indexOf(e);t!==-1&&kl.splice(t,1),W1.delete(e)}async function S3e(e){return l_(e)}function a_(e,t){return(Ee.inFlightBySession[e]??!1)||(Ee.turnActiveBySession[e]??!1)||(t??Ee.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function u_(e){try{const t=new Date(e),o=Date.now()-t.getTime(),s=o/36e5;if(o<6e4)return fo.global.t("sessions.justNow");if(s<1)return`${Math.round(o/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const i=o/864e5;return i<7?`${Math.round(i)}d`:i<30?`${Math.round(i/7)}w`:i<365?`${Math.round(i/30)}mo`:`${Math.round(i/365)}y`}catch{return e}}const C3e=3e4,Qp=V(0);let Ik=null;function A3e(){Ik===null&&(Ik=setInterval(()=>{Qp.value=(Qp.value+1)%Number.MAX_SAFE_INTEGER},C3e),Ik.unref?.())}function M3e(e,t){const n=e.split(` -`),o=t.split(` -`),s=[];return n.forEach((i,r)=>{s.push({kind:"rem",gutter:String(r+1),text:`- ${i}`})}),o.forEach((i,r)=>{s.push({kind:"add",gutter:String(r+1),text:`+ ${i}`})}),s}function E3e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const o=typeof t.path=="string"?t.path:"";return Array.isArray(t.diff)?{kind:"diff",path:o,diff:t.diff}:typeof t.old_text=="string"&&typeof t.new_text=="string"?{kind:"diff",path:o,diff:M3e(t.old_text,t.new_text)}:{kind:"diff",path:o,diff:[]}}if(n==="shell"||n==="command"){const o=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,i=typeof t.danger=="string"?t.danger:void 0;return{kind:"shell",command:o,cwd:s,danger:i}}if(n==="file_content"||n==="file"){const o=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",i=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:o,content:s,language:i}}if(n==="file_op"||n==="fileop"){const o=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",i=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:o,path:s,detail:i}}if(n==="url_fetch"||n==="url"){const o=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:o}}if(n==="search"){const o=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:o,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const o=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,i=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:o,name:s,description:i}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(i=>{const r=i??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const o=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:o,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function T3e(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}function I3e(e){const t=Ee.messagesBySession[e.sessionId];if(!t||t.length===0)return;const n=new Map;for(const s of t)if(s.role==="assistant")for(const i of s.content){if(i.type!=="toolUse"||i.toolName!=="Bash"&&i.toolName!=="bash")continue;const r=i.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(i.toolCallId,l)}if(n.size===0)return;const o=`task_id: ${e.id}`;for(const s of t)if(s.role==="tool")for(const i of s.content){if(i.type!=="toolResult")continue;if((typeof i.output=="string"?i.output:i.output!==void 0?JSON.stringify(i.output):"").includes(o)){const l=n.get(i.toolCallId);if(l)return l}}}function $3e(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",o;if(e.status==="running"&&e.startedAt){o=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(o/1e3),a=Math.floor(l/60),u=l%60;n=fo.global.t("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else if(e.completedAt&&e.startedAt){o=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime();const l=Math.round(o/1e3);n=fo.global.t("tasks.timingDone",{sec:l})}else n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,i=e.command??I3e(e),r=e.kind==="bash"&&i?`$ ${i}`:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:o,meta:r,output:s,subagentType:e.subagentType,phase:e.subagentPhase,model:e.model,thinkingEffort:e.thinkingEffort,dynamicWorkflowIndex:e.dynamicWorkflowIndex,swarmIndex:e.swarmIndex,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,createdAt:e.createdAt,completedAt:e.completedAt}}const N3e=O(()=>{const e=Ee.sessions.find(n=>n.id===Ee.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:Ee.workspaceName,branch:t}}),L3e=O(()=>(Qp.value,Ee.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:u_(e.updatedAt),busy:a_(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})))),F3e=O(()=>Ee.activeSessionId??""),O3e=O(()=>{const e=Ee.activeSessionId;if(e)return ao.skillsBySession.value[e]??[];const t=V0.value;return t?ao.skillsByWorkspace.value[t]??[]:[]}),Jf=V({}),b2=V([]),w2=V(!1),va=V([]),x2=V(!1),zc=V({}),R3e=O(()=>{const e=Ee.activeSessionId;return e?zc.value[e]??{}:{}});async function P3e(e){Jf.value={...Jf.value,[e]:!0};try{await ao.loadSkillsForSession(e)}finally{Jf.value={...Jf.value,[e]:!1}}}async function D3e(){w2.value=!0;try{b2.value=await St().listConnectors()}catch{b2.value=[]}finally{w2.value=!1}}async function _N(){x2.value=!0;try{va.value=await St().listPlugins()}catch{va.value=[]}finally{x2.value=!1}}async function B3e(e,t){const n=va.value.find(o=>o.id===e)?.enabled;va.value=va.value.map(o=>o.id===e?{...o,enabled:t}:o);try{await St().setPluginEnabled(e,t)}catch(o){n!==void 0&&(va.value=va.value.map(s=>s.id===e?{...s,enabled:n}:s)),ec("setPluginEnabled",o);return}await _N()}async function z3e(e){await Promise.all([P3e(e),D3e(),_N()])}async function W3e(e){const t=Ee.activeSessionId;if(!t)return;const n=zc.value[t]??{};zc.value={...zc.value,[t]:{...n,...e}};try{await St().updateSession(t,e)}catch(o){throw zc.value={...zc.value,[t]:n},ec("updateCapabilities",o,{sessionId:t}),o}}const c_=O(()=>{const e=Ee.activeSessionId;return e?Ee.inFlightBySession[e]??!1:!1}),H3e=O(()=>Ot.isStartingFirstPrompt()),Xs=m4e(Ee,{pushOperationFailure:ec,nextOptimisticMsgId:bN,connectEventsIfNeeded:i_,getEventConn:()=>Hi,resolveThinkingForPrompt:(e,t)=>ao.resolveThinkingForPrompt(e,t)}),Td=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=Xs.sideChatTargetBySession.value[e]?.agentId;return(Ee.tasksBySession[e]??[]).filter(n=>n.id!==t)}),SN=dCe(Ee,Td),j3e=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=new Set(Ee.sideChatUserMessageIdsBySession[e]??[]),n=(Ee.messagesBySession[e]??[]).filter(s=>!t.has(s.id)),o=Ee.approvalsBySession[e]??[];return o_(n,o,s=>St().getFileUrl(s),U0.value,Ee.planReviewByToolCallId)}),U0=O(()=>{const e=Ee.activeSessionId;return e?(Ee.turnActiveBySession[e]??!1)||(Ee.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),U3e=O(()=>c_.value||U0.value),mM=new Map,V3e=O(()=>{SN.taskClock.value;const e=Td.value.filter(o=>o.kind==="subagent"&&o.runInBackground).toSorted((o,s)=>Date.parse(o.createdAt)-Date.parse(s.createdAt)),t=Ee.activeSessionId??"__draft__",n=mM.get(t)??{indexes:new Map,next:1};mM.set(t,n);for(const o of e){const i=n.indexes.get(o.id)??(o.backgroundTaskId?n.indexes.get(o.backgroundTaskId):void 0)??n.next++;n.indexes.set(o.id,i),o.backgroundTaskId&&n.indexes.set(o.backgroundTaskId,i)}return Td.value.map(o=>{const s=$3e(o);return o.kind==="subagent"&&o.runInBackground&&(s.dynamicWorkflowIndex=o.dynamicWorkflowIndex??n.indexes.get(o.id)),s})}),q3e=O(()=>{const e=Ee.activeSessionId;if(!e)return{};const t={};for(const n of Ee.messagesBySession[e]??[])for(const o of n.content){if(o.type!=="toolUse"||o.toolName!=="ExitPlanMode")continue;const s=o.input&&typeof o.input=="object"?o.input:{},i=Ee.planReviewByToolCallId[o.toolCallId],r=i?.plan??(typeof s.plan=="string"?s.plan:void 0),l=i?.path??(typeof s.path=="string"?s.path:void 0)??(typeof s.planPath=="string"?s.planPath:void 0);t[o.toolCallId]={agentId:"main",toolCallId:o.toolCallId,turnId:n.id,source:"interaction",plan:r,path:l}}return t}),CN=O(()=>P4e(Td.value)),K3e=O(()=>B4e(Td.value)),Wc=O(()=>{const e=Ee.activeSessionId;return e?Ee.goalBySession[e]??null:null}),G3e=O(()=>{const e=Ee.activeSessionId;return e?F4e(Ee.messagesBySession[e]??[]):[]}),Z3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.compactionBySession[e]??null:null}),Y3e=O(()=>Ee.connection),J3e=O(()=>Ee.loading),X3e=O(()=>Ee.sessionLoading),Q3e=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesLoadingMoreBySession[e]??!1:!1}),eAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesHasMoreBySession[e]??!1:!1}),tAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.messagesLoadMoreErrorBySession[e]??!1:!1}),nAe=O(()=>Ee.serverVersion),oAe=O(()=>Ee.backend),sAe=O(()=>Ee.dangerousBypassAuth);function iAe(){Ee.dangerousBypassAuth=!1}const rAe=O(()=>Ee.permission),lAe=O(()=>Ee.thinking),AN=O(()=>{const e=Ee.activeSessionId;return e?Ee.planModeBySession[e]??!1:bh.planMode}),aAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.planArmedBySession[e]??!1:bh.planMode}),uAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.dynamicWorkflowModeBySession[e]??!1:bh.dynamicWorkflowMode}),cAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.goalModeBySession[e]??!1:bh.goalMode}),dAe=O(()=>{const e=D4e(CN.value);return{plan:AN.value,goal:Wc.value&&Wc.value.status!=="complete"?{status:Wc.value.status,turnsUsed:Wc.value.turnsUsed,elapsedMs:Wc.value.wallClockMs}:null,dynamicWorkflow:e.total>0?e:null}}),fAe=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=St();return(Ee.queuedBySession[e]??[]).map(n=>({text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(o=>({fileId:o.fileId,kind:o.kind,url:t.getFileUrl(o.fileId),name:o.name}))}))}),pAe=O(()=>Ee.warnings),hAe=O(()=>{const e=Ee.activeSessionId;return e?(Ee.questionsBySession[e]??[]).map(T3e):[]}),mAe=O(()=>{const e=Ee.activeSessionId;return e?(Ee.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:E3e(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),d_=O(()=>{const e=Ee.activeSessionId;return e?(Ee.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Ee.questionsBySession[e]??[]).length>0?"awaiting-question":c_.value||U0.value?"running":"idle":"idle"}),ao=NCe(Ee,{pushOperationFailure:ec,refreshSessionStatus:wh,persistSessionProfile:gN,activity:d_,updateSession:j0,updateSessionMessages:uN}),_2=O(()=>{const e=Ee.activeSessionId;if(!e)return null;const t=Ee.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),gAe=O(()=>{const e=Ee.activeSessionId;return e?Ee.gitStatusBySession[e]?.pullRequest??null:null}),vAe=O(()=>{const e=Ee.activeSessionId;if(!e)return[];const t=Ee.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,o])=>({path:n,status:o})).toSorted((n,o)=>n.path.localeCompare(o.path)):[]}),yAe=O(()=>{const e=Ee.activeSessionId;if(!e)return null;const t=Ee.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),MN=O(()=>{const e=Ee.sessions.find(r=>r.id===Ee.activeSessionId),t=_2.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?ao.draftModel.value:null,o=(e?.model&&e.model.length>0?e.model:n??Ee.defaultModel)??"—",s=ao.models.value.find(r=>r.id===o)??ao.models.value.find(r=>r.model===o);return{model:s?.displayName||s?.model||(o.includes("/")?o.split("/").pop():o),modelId:s?.id??o,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:Ee.permission,branch:t,cwd:e?.cwd??"",isGitRepo:_2.value!==null}}),kAe=O(()=>fN.value),bAe=O(()=>Ee.sessions.find(t=>t.id===Ee.activeSessionId)?.usage.totalCostUsd??0),wAe=O(()=>Ee.authReady),xAe=O(()=>Ee.defaultModel),_Ae=O(()=>Ee.managedProviderStatus),SAe=O(()=>Ee.config),CAe=O(()=>{const e=Ee.activeSessionId;if(!e)return{};const t=Ee.gitStatusBySession[e];return t?{...t.entries}:{}});function Id(e){const t=_r(e.cwd);return Ee.workspaces.find(n=>_r(n.root)===t)?.id??e.workspaceId??e.cwd}const f_=O(()=>fSe({workspaces:Ee.workspaces,sessions:Ee.sessions,hiddenWorkspaceRoots:Ee.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Ee.sessionsHasMoreByWorkspace})),H1=V(iB()),$d=V(rB()==="manual"?"manual":"recent");function AAe(e){const t=Rd(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}const Zr=V(AAe(rn.pinnedSessions)),bg=V(zo(rn.pinnedCollapsed)==="true");function MAe(e){Zr.value=Zr.value.includes(e)?Zr.value.filter(t=>t!==e):[...Zr.value,e],Wa(rn.pinnedSessions,Zr.value)}function EAe(e){const t=new Set(Zr.value),n=e.filter(o=>t.has(o));Zr.value=[...n,...Zr.value.filter(o=>!n.includes(o))],Wa(rn.pinnedSessions,Zr.value)}function TAe(){bg.value=!bg.value,ts(rn.pinnedCollapsed,String(bg.value))}Ye(()=>[f_.value.map(e=>e.id).join("\0"),Ee.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],o=lB(n,H1.value);o!==null&&(H1.value=o,zE(o))});const Yu=O(()=>{const e=f_.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:K4e(t.root,Ee.fsHome),sessionCount:t.sessionCount}));if($d.value==="recent"){const t=new Map;for(const n of Ee.sessions){if(n.parentSessionId)continue;const o=Id(n),s=new Date(n.updatedAt).getTime();s>(t.get(o)??Number.NEGATIVE_INFINITY)&&t.set(o,s)}return cB(e,t)}return aB(e,H1.value)}),V0=O(()=>{const e=Ee.activeWorkspaceId,t=Yu.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ye(V0,e=>{e&&(Object.prototype.hasOwnProperty.call(ao.skillsByWorkspace.value,e)||ao.loadSkillsForWorkspace(e))},{immediate:!0});const IAe=O(()=>{const e=V0.value;return e?Yu.value.find(t=>t.id===e)??null:null}),$Ae=O(()=>{Qp.value;const e=new Set(Yu.value.map(n=>n.id)),t=new Map(Yu.value.map(n=>[n.id,n.name]));return Ee.sessions.filter(n=>!n.parentSessionId&&e.has(Id(n))).map(n=>{const o=Id(n);return{id:n.id,title:n.title,time:u_(n.updatedAt),busy:a_(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:o,workspaceName:t.get(o)}})}),NAe=O(()=>{Qp.value;const e=new Map;for(const t of Ee.sessions.toSorted((n,o)=>new Date(o.updatedAt).getTime()-new Date(n.updatedAt).getTime())){if(t.parentSessionId)continue;const n=Id(t),o={id:t.id,title:t.title,time:u_(t.updatedAt),busy:a_(t.id,t.mainTurnActive),pendingInteraction:t.pendingInteraction,lastTurnReason:t.lastTurnReason,updatedAt:t.updatedAt},s=e.get(n)??[];s.push(o),e.set(n,s)}return Yu.value.map(t=>({workspace:t,sessions:e.get(t.id)??[],hasMore:Ee.sessionsHasMoreByWorkspace[t.id]??!1,loadingMore:Ee.sessionsLoadingMoreByWorkspace[t.id]??!1,initialCount:Ee.sessionsInitialCountByWorkspace[t.id]??h2}))});function LAe(e){H1.value=e,zE(e),$d.value!=="manual"&&($d.value="manual",WE("manual"))}function FAe(e){$d.value!==e&&($d.value=e,WE(e))}const EN=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(Ee.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),OAe=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(Ee.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),RAe=O(()=>{const e={};for(const[t,n]of Object.entries(Ee.unreadBySession))n&&(e[t]=!0);return e}),PAe=O(()=>{const e={},t=EN.value;for(const n of Ee.sessions){const o=t[n.id]??0;if(o<=0)continue;const s=Id(n);e[s]=(e[s]??0)+o}return e}),DAe=O(()=>Ee.recentRoots),BAe=O(()=>Ee.availableOpenInApps),Ot=TCe(Ee,{taskPoller:SN,sideChat:Xs,modelProvider:ao,pushOperationFailure:ec,activity:d_,sessionsKnownEmpty:wN,setSessions:lN,updateSession:j0,upsertSessionFront:G4e,appendSession:Z4e,forgetSession:cN,setActiveSessionId:s_,updateSessionMessages:uN,nextOptimisticMsgId:bN,getEventConn:()=>Hi,syncSessionFromSnapshot:l_,reopenSession:S3e,hasLoadedMessages:b3e,refreshSessionStatus:wh,refreshSessionGoal:e3e,persistSessionProfile:gN,mergedWorkspaces:f_,workspacesView:Yu,status:MN,workspaceIdForSession:Id,savePermissionToStorage:W4e,savePlanModeToStorage:oN,saveDynamicWorkflowModeToStorage:sN,saveGoalModeToStorage:iN,draftModes:bh,saveUnread:rw,saveActiveWorkspaceToStorage:q4e,saveHiddenWorkspacesToStorage:V4e,goalErrorMessage:v3e,resetFastMoon:yl.resetFastMoon,initialized:hN,connectIssue:mN,selectedDiffPath:dN,fileDiffLines:fN,fileDiffLoading:pN});function zAe(e,t){const n=Ee.sessions.find(o=>o.id===e);return n?Ot.renameSession(e,KE(t,n.title)):Promise.resolve()}function p_(e){return e===Ee.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function WAe(e){if(Ee.turnActiveBySession[e]){const t={...Ee.turnActiveBySession};delete t[e],Ee.turnActiveBySession=t}Ee.inFlightBySession[e]&&(Ee.inFlightBySession={...Ee.inFlightBySession,[e]:!1})}function HAe(e,t,n){const o=Ee.promptIdBySession[e];Ot.finishPromptLocal(e,{turnWasActive:n}),e===Ee.activeSessionId?(Ot.loadGitStatus(e),wh(e)):t==="idle"&&(Ee.unreadBySession={...Ee.unreadBySession,[e]:!0},rw({[e]:!0}));const s=(Ee.approvalsBySession[e]??[]).length>0,i=(Ee.questionsBySession[e]??[]).length>0;jSe(t,s,i)&&qr.maybeNotifyCompletion(e,{isUserWatching:p_(e),sessionTitle:Ee.sessions.find(r=>r.id===e)?.title??"",promptId:o,onClick:()=>{Ot.selectSession(e)}}),t==="idle"&&Xp.maybePlayCompletionSound()}function jAe(e,t){const n=t.questions[0],o=n?.header?.trim()??"",s=n?.question?.trim()??"",i=o&&s?`${o}: ${s}`:s||o;qr.maybeNotifyQuestion({isUserWatching:p_(e),sessionTitle:Ee.sessions.find(r=>r.id===e)?.title??"",questionPreview:i,questionId:t.questionId,onClick:()=>{Ot.selectSession(e)}}),Xp.maybePlayQuestionSound()}function UAe(e,t){qr.maybeNotifyApproval({isUserWatching:p_(e),sessionTitle:Ee.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Ot.selectSession(e)}}),Xp.maybePlayApprovalSound()}function q0(){return A3e(),{workspace:N3e,sessions:L3e,activeSessionId:F3e,workspacesView:Yu,workspaceSortMode:$d,pinnedSessionIds:Zr,pinnedCollapsed:bg,visibleWorkspace:IAe,activeWorkspaceId:V0,sessionsForView:$Ae,workspaceGroups:NAe,attentionBySession:EN,pendingBySession:OAe,attentionByWorkspace:PAe,unreadBySession:RAe,recentRoots:DAe,turns:j3e,tasks:V3e,activeAppTasks:Td,auxiliaryTranscripts:y2,todos:G3e,goal:Wc,dynamicWorkflows:CN,dynamicWorkflowMembersByToolCallId:K3e,activationBadges:dAe,compaction:Z3e,status:MN,sessionCost:bAe,fileDiff:kAe,selectedDiffPath:dN,fileDiffLoading:pN,changes:vAe,gitInfo:_2,gitDiffStats:yAe,activePullRequest:gAe,changesByPath:CAe,pendingApprovals:mAe,availableOpenInApps:BAe,connection:Y3e,loading:J3e,sessionLoading:X3e,loadingMoreMessages:Q3e,hasMoreMessages:eAe,loadMoreMessagesError:tAe,serverVersion:nAe,backend:oAe,dangerousBypassAuth:sAe,clearDangerousBypassAuth:iAe,initialized:hN,connectIssue:mN,permission:rAe,thinking:lAe,planMode:AN,planArmed:aAe,sessionPlans:q3e,dynamicWorkflowMode:uAe,goalMode:cAe,queued:fAe,warnings:pAe,questions:hAe,activity:d_,turnActive:U0,inFlight:c_,working:U3e,isStartingFirstPrompt:H3e,fastMoon:yl.fastMoon,models:ao.models,starredModelIds:ao.starredModelIds,providers:ao.providers,uiFontSize:yl.uiFontSize,setUiFontSize:yl.setUiFontSize,conversationToc:yN,setConversationToc:o3e,colorScheme:yl.colorScheme,setColorScheme:yl.setColorScheme,accent:yl.accent,setAccent:yl.setAccent,notifyOnComplete:qr.notifyOnComplete,notifyOnQuestion:qr.notifyOnQuestion,notifyOnApproval:qr.notifyOnApproval,notifyPermission:qr.notifyPermission,setNotifyOnComplete:qr.setNotifyOnComplete,setNotifyOnQuestion:qr.setNotifyOnQuestion,setNotifyOnApproval:qr.setNotifyOnApproval,soundOnComplete:Xp.soundOnComplete,setSoundOnComplete:Xp.setSoundOnComplete,onboarded:kN,setOnboarded:i3e,load:Ot.load,selectSession:Ot.selectSession,clearActiveSession:Ot.clearActiveSession,loadOlderMessages:Ot.loadOlderMessages,loadWorkspaces:Ot.loadWorkspaces,loadMoreSessions:Ot.loadMoreSessions,loadAllSessions:Ot.loadAllSessions,selectWorkspace:Ot.selectWorkspace,openWorkspace:Ot.openWorkspace,openWorkspaceDraft:Ot.openWorkspaceDraft,startSessionAndSendPrompt:Ot.startSessionAndSendPrompt,startSessionAndActivateSkill:Ot.startSessionAndActivateSkill,startSessionAndOpenSideChat:Ot.startSessionAndOpenSideChat,addWorkspaceByPath:Ot.addWorkspaceByPath,browseFs:Ot.browseFs,getFsHome:Ot.getFsHome,sendPrompt:Ot.sendPrompt,steerPrompt:Ot.steerPrompt,sideChatVisible:Xs.sideChatVisible,sideChatSessionId:Xs.sideChatSessionId,sideChatTurns:Xs.sideChatTurns,sideChatRunning:Xs.sideChatRunning,sideChatSending:Xs.sideChatSending,openSideChat:Xs.openSideChat,closeSideChat:Xs.closeSideChat,sendSideChatPrompt:Xs.sendSideChatPrompt,uploadImage:Ot.uploadImage,abortCurrentPrompt:Ot.abortCurrentPrompt,respondApproval:Ot.respondApproval,respondQuestion:Ot.respondQuestion,dismissQuestion:Ot.dismissQuestion,pendingQuestionActions:Ot.pendingQuestionActions,pendingApprovalActions:Ot.pendingApprovalActions,cancelTask:Ot.cancelTask,setPermission:Ot.setPermission,setThinking:ao.setThinking,setPlanMode:Ot.setPlanMode,togglePlanMode:Ot.togglePlanMode,setDynamicWorkflowMode:Ot.setDynamicWorkflowMode,toggleDynamicWorkflowMode:Ot.toggleDynamicWorkflowMode,setGoalMode:Ot.setGoalMode,toggleGoalMode:Ot.toggleGoalMode,createGoal:Ot.createGoal,controlGoal:Ot.controlGoal,enqueue:Ot.enqueue,dismissWarning:Ot.dismissWarning,renameSession:Ot.renameSession,renameWorkspace:Ot.renameWorkspace,deleteWorkspace:Ot.deleteWorkspace,reorderWorkspaces:LAe,setWorkspaceSortMode:FAe,togglePinnedSession:MAe,reorderPinnedSessions:EAe,togglePinnedCollapsed:TAe,setSessionEmoji:zAe,archiveSession:Ot.archiveSession,exportSession:Ot.exportSession,restoreSession:Ot.restoreSession,loadArchivedSessions:Ot.loadArchivedSessions,compact:Ot.compact,forkSession:Ot.forkSession,generateSessionTitle:Ot.generateSessionTitle,undo:Ot.undo,unqueue:Ot.unqueue,reorderQueue:Ot.reorderQueue,searchFiles:Ot.searchFiles,loadGitStatus:Ot.loadGitStatus,loadFileDiff:Ot.loadFileDiff,clearFileDiff:Ot.clearFileDiff,listDir:Ot.listDir,readFileContent:Ot.readFileContent,getFileDownloadUrl:Ot.getFileDownloadUrl,openWorkspaceFile:Ot.openWorkspaceFile,openInApp:Ot.openInApp,revealWorkspaceFile:Ot.revealWorkspaceFile,resolveImageUrl:Ot.resolveImageUrl,getFileUrl:e=>St().getFileUrl(e),loadModels:ao.loadModels,loadProviders:ao.loadProviders,skills:O3e,skillsLoadingBySession:Jf,connectors:b2,connectorsLoading:w2,plugins:va,pluginsLoading:x2,activeSessionCapabilities:R3e,loadCapabilityData:z3e,updateCapabilities:W3e,setPluginEnabled:B3e,activateSkill:ao.activateSkill,setModel:ao.setModel,toggleStarModel:ao.toggleStarModel,addProvider:ao.addProvider,deleteProvider:ao.deleteProvider,refreshProvider:ao.refreshProvider,refreshAllProviders:ao.refreshAllProviders,authReady:wAe,defaultModel:xAe,managedProviderStatus:_Ae,config:SAe,updateConfig:Ot.updateConfig,checkAuth:Ot.checkAuth,startOAuthLogin:ao.startOAuthLogin,pollOAuthLogin:ao.pollOAuthLogin,cancelOAuthLogin:ao.cancelOAuthLogin,logout:Ot.logout}}const VAe=["aria-expanded","aria-label"],qAe={class:"capability-trigger-label"},KAe={class:"capability-panel"},GAe={class:"capability-viewport"},ZAe={class:"capability-view"},YAe={key:1,class:"capability-group"},JAe={class:"capability-group-title"},XAe={class:"capability-caption"},QAe={key:0,class:"capability-loading"},e8e={class:"capability-view capability-view-secondary"},t8e={class:"capability-caption"},n8e={key:0,class:"capability-loading"},o8e={class:"capability-caption"},s8e={key:0,class:"capability-loading"},i8e=Ze({__name:"CapabilityMenu",props:{sessionId:{},triggerless:{type:Boolean}},setup(e,{expose:t}){const n=e,{t:o}=$t(),s=q0(),i=V(null),r=V(null),l=V(!1),a=V("root"),u=V([]),c=O(()=>n.sessionId===s.activeSessionId.value?s.skills.value:[]),d=O(()=>{const B=n.sessionId;return B?s.skillsLoadingBySession.value[B]===!0:!1}),f=O(()=>s.connectors.value),p=O(()=>s.connectorsLoading.value),h=O(()=>s.plugins.value),m=O(()=>s.pluginsLoading.value),k=O(()=>n.sessionId===s.activeSessionId.value?s.activeSessionCapabilities.value:{}),w=O(()=>d.value||c.value.length>0),v=O(()=>p.value||f.value.length>0),y=O(()=>m.value||h.value.length>0),b=O(()=>{switch(a.value){case"skills":return o("capabilityMenu.skills.title");case"plugins":return o("capabilityMenu.plugins.title");case"root":return""}}),S=O(()=>{switch(a.value){case"skills":return c.value.length;case"plugins":return h.value.length;case"root":return 0}});function I(){u.value=k.value.mcpServers!==void 0?[...k.value.mcpServers]:f.value.map(B=>B.id)}Ye([()=>n.sessionId,f,k],I,{immediate:!0}),Ye([c,d,h,m],()=>{a.value==="skills"&&!d.value&&c.value.length===0&&(a.value="root"),a.value==="plugins"&&!m.value&&h.value.length===0&&(a.value="root")});function T(){if(l.value=!l.value,!l.value){a.value="root";return}n.sessionId&&s.loadCapabilityData(n.sessionId)}t({toggleOpen:T});function $(){l.value=!1,a.value="root"}const F={tools:Promise.resolve(),mcpServers:Promise.resolve()},R={tools:0,mcpServers:0};function P(B,z,A){const L=++R[B],W=n.sessionId,j=F[B].then(async()=>{if(n.sessionId===W)try{await s.updateCapabilities({[B]:[...z.value]})}catch{L===R[B]&&n.sessionId===W&&(z.value=A)}});return F[B]=j,j}function M(B,z){const A=[...u.value],L=new Set(A);return z?L.add(B):L.delete(B),u.value=[...L],P("mcpServers",u,A)}function D(B,z){s.setPluginEnabled(B,z)}return(B,z)=>(g(),C("div",{ref_key:"rootRef",ref:i,class:"capability-control"},[n.triggerless?oe("",!0):(g(),C("button",{key:0,ref_key:"triggerRef",ref:r,type:"button",class:ze(["capability-trigger",{open:l.value}]),"aria-expanded":l.value,"aria-haspopup":"dialog","aria-label":x(o)("capabilityMenu.triggerLabel"),onClick:Ct(T,["stop"])},[z[5]||(z[5]=K2('',1)),_("span",qAe,N(x(o)("capabilityMenu.trigger")),1)],10,VAe)),K(YE,{anchor:n.triggerless?i.value:r.value,open:l.value,label:x(o)("capabilityMenu.triggerLabel"),onClose:$},{default:ve(()=>[_("div",KAe,[_("div",GAe,[_("div",{class:ze(["capability-track",{"is-drilled":a.value!=="root"}])},[_("div",ZAe,[w.value?(g(),pe(Lc,{key:0,count:c.value.length,onClick:z[0]||(z[0]=A=>a.value="skills")},{label:ve(()=>[qe(N(x(o)("capabilityMenu.skills.title")),1)]),trailing:ve(()=>[...z[6]||(z[6]=[_("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):oe("",!0),v.value?(g(),C("div",YAe,[_("div",JAe,N(x(o)("capabilityMenu.mcp.title")),1),_("p",XAe,N(x(o)("capabilityMenu.mcp.caption")),1),p.value?(g(),C("div",QAe,[K(Ck,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Te,{key:1},st(f.value,A=>(g(),pe(Lc,{key:A.id,class:"mcp-row",selected:u.value.includes(A.id),title:A.name,onClick:L=>void M(A.id,!u.value.includes(A.id))},{label:ve(()=>[qe(N(A.name),1)]),trailing:ve(()=>[K(X6,{"model-value":u.value.includes(A.id),"aria-label":x(o)("capabilityMenu.mcp.toggle",{name:A.name}),onClick:z[1]||(z[1]=Ct(()=>{},["stop"])),"onUpdate:modelValue":L=>void M(A.id,L)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))])):oe("",!0),y.value?(g(),pe(Lc,{key:2,count:h.value.length,onClick:z[2]||(z[2]=A=>a.value="plugins")},{label:ve(()=>[qe(N(x(o)("capabilityMenu.plugins.title")),1)]),trailing:ve(()=>[...z[7]||(z[7]=[_("svg",{class:"chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m6 3 5 5-5 5"})],-1)])]),_:1},8,["count"])):oe("",!0)]),_("div",e8e,[a.value!=="root"?(g(),pe(Lc,{key:0,class:"capability-back",count:S.value,onClick:z[3]||(z[3]=A=>a.value="root")},{leading:ve(()=>[...z[8]||(z[8]=[_("svg",{class:"back-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"m10 3-5 5 5 5"})],-1)])]),label:ve(()=>[qe(N(b.value||x(o)("capabilityMenu.back")),1)]),_:1},8,["count"])):oe("",!0),a.value==="skills"?(g(),C(Te,{key:1},[_("p",t8e,N(x(o)("capabilityMenu.skills.caption")),1),d.value?(g(),C("div",n8e,[K(Ck,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Te,{key:1},st(c.value,A=>(g(),pe(Lc,{key:A.name,class:"skill-row",disabled:"",title:A.description},{label:ve(()=>[qe(N(A.name),1)]),_:2},1032,["title"]))),128))],64)):a.value==="plugins"?(g(),C(Te,{key:2},[_("p",o8e,N(x(o)("capabilityMenu.plugins.caption")),1),m.value?(g(),C("div",s8e,[K(Ck,{label:x(o)("capabilityMenu.loading")},null,8,["label"])])):(g(!0),C(Te,{key:1},st(h.value,A=>(g(),pe(Lc,{key:A.id,class:"plugin-row",selected:A.enabled,title:A.displayName,onClick:L=>D(A.id,!A.enabled)},{label:ve(()=>[qe(N(A.displayName),1)]),trailing:ve(()=>[K(X6,{"model-value":A.enabled,"aria-label":x(o)("capabilityMenu.plugins.toggle",{name:A.displayName}),onClick:z[4]||(z[4]=Ct(()=>{},["stop"])),"onUpdate:modelValue":L=>D(A.id,L)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),_:2},1032,["selected","title","onClick"]))),128))],64)):oe("",!0)])],2)])])]),_:1},8,["anchor","open","label"])],512))}}),r8e=ht(i8e,[["__scopeId","data-v-ff3a96c4"]]),l8e={class:"att-lightbox-card"},a8e=["src"],u8e=["src","alt"],c8e={class:"att-lightbox-name"},d8e={class:"composer-card"},f8e={key:0,class:"att-strip"},p8e={class:"att-scroll-content"},h8e={key:1,class:"att-row"},m8e={key:0,class:"att-more"},g8e={class:"cin-wrap"},v8e=["onClick"],y8e={class:"am-icon"},k8e={class:"am-name"},b8e={key:0,class:"am-desc"},w8e={class:"input-row"},x8e=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],_8e=["aria-label"],S8e={class:"toolbar-left"},C8e=["aria-label","onKeydown"],A8e={class:"perm-pill-label"},M8e=["onClick"],E8e={class:"pd-info"},T8e={class:"pd-desc"},I8e={class:"pd-check"},$8e={key:1,class:"workflow-chip"},N8e={class:"workflow-label"},L8e={class:"toolbar-right"},F8e=["aria-label"],O8e=["aria-expanded"],R8e={class:"mp-name"},P8e={key:0,class:"think-suffix"},D8e=["aria-label"],B8e=["aria-label","disabled"],z8e={class:"md-list"},W8e={key:0,class:"md-section"},H8e=["onClick"],j8e={class:"md-check"},U8e={class:"md-name"},V8e={class:"md-provider"},q8e={key:1,class:"md-divider"},K8e={key:2,class:"md-section"},G8e=["onClick"],Z8e={class:"md-check"},Y8e={class:"md-name"},J8e={key:0,class:"md-divider"},X8e={class:"md-thinking"},Q8e={class:"md-name"},e6e={key:0,class:"md-note"},t6e={key:2,class:"md-note"},n6e={class:"md-cache-note"},o6e={class:"md-check md-more-icon"},s6e={class:"md-name"},i6e={class:"drop-card"},gM=36,r6e=Ze({__name:"Composer",props:{running:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},working:{type:Boolean,default:!1},goalMode:{type:Boolean},workflowActive:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean,default:!1}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel"],setup(e,{expose:t,emit:n}){const o=e,s=O(()=>o.starting?r("composer.starting"):o.running?r("composer.placeholderRunning"):o.goalMode?r("status.goalPlaceholder"):o.planArmed||o.planMode?r("status.planPlaceholder"):r("composer.placeholder")),i=n,{t:r,locale:l}=$t(),{text:a,textareaRef:u,autosize:c,loadForEdit:d,clearDraft:f}=j_e({sessionId:()=>o.sessionId});function p(){o.planArmed||o.planMode||(o.goalMode&&i("toggleGoal"),i("togglePlan"))}function h(){if(Ls.value){i("focusGoal");return}o.goalMode||((o.planArmed||o.planMode)&&i("togglePlan"),i("toggleGoal"))}const m=V(!1);function k(){m.value=!m.value,xt(()=>{c(),b(),u.value?.focus()})}function w(){m.value&&(m.value=!1,xt(c))}function v(Pe){if(typeof getComputedStyle>"u")return gM;const ct=Number.parseFloat(getComputedStyle(Pe).minHeight);return Number.isFinite(ct)&&ct>0?ct:gM}const y=V(!1);function b(){const Pe=u.value;y.value=!!Pe&&Pe.scrollHeight>v(Pe)}Ye(a,()=>{xt(b)}),Ye(()=>o.sessionId,()=>{m.value=!1,I.value=!1,P.value=!1});const S=z_e({text:a,textareaRef:u,autosize:c,sessionId:()=>o.sessionId}),{open:I,items:T,active:$,update:F,select:R}=W_e({text:a,textareaRef:u,autosize:c,skills:()=>o.skills,emitCommand:Pe=>{if(Pe==="/plan"){p();return}if(Pe==="/goal"){h();return}i("command",Pe)},historyPush:Pe=>S.push(Pe),clearDraft:f}),{open:P,items:M,active:D,loading:B,update:z,select:A}=H_e({text:a,textareaRef:u,autosize:c,searchFiles:()=>o.searchFiles});function L(){S.resetBrowsing(),F(),z()}const{attachments:W,previewAttachment:j,fileInputRef:re,isDragOver:Q,removeAttachment:Y,openAttachmentPreview:G,closeAttachmentPreview:X,openFilePicker:te,handleFileInputChange:q,handleDragOver:me,handleDragLeave:xe,handleDrop:We,clearAfterSubmit:he,loadAttachments:ee}=U_e({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId});function ne(){const Pe=W.value.map(ct=>ct.localId);for(const ct of Pe)Y(ct)}const H=O(()=>W.value.filter(Pe=>Pe.kind!=="file")),Z=O(()=>W.value.filter(Pe=>Pe.kind==="file")),ye=V(null),fe=V(null),de=V(!1);let J=null;function ae(){const Pe=ye.value;de.value=Pe!==null&&Pe.scrollHeight>Pe.clientHeight+1}Ye(ye,Pe=>{J?.disconnect(),J=null,Pe&&typeof ResizeObserver=="function"&&(J=new ResizeObserver(ae),J.observe(Pe)),ae()},{immediate:!0}),Ye(W,()=>void xt(ae),{deep:!0}),Ye(()=>[H.value.length,Z.value.length],([Pe,ct],[bt,pn])=>{Pe<=bt&&ct<=pn||xt(()=>{const Ni=ye.value;Ni&&(Ni.scrollTop=Pe>bt&&fe.value?fe.value.offsetHeight-Ni.clientHeight:Ni.scrollHeight)})}),Sn(()=>{a.value&&xt(()=>{c(),b()})}),En(()=>{document.removeEventListener("click",ot,!0),J?.disconnect(),Ks?.disconnect(),qs?.disconnect(),Tt()});function be(){u.value?.focus({preventScroll:!0})}function _e(Pe){ee(Pe)}const ce=O(()=>I.value||P.value||rt.value||vt.value||ln.value),Se=O(()=>a.value.trim().length===0&&W.value.length===0);t({loadForEdit:d,loadAttachmentsForEdit:_e,focus:be,anyPopupOpen:ce,isEmpty:Se});function ie(Pe){return{fileId:Pe.fileId,kind:Pe.kind,name:Pe.name,mediaType:Pe.mediaType,size:Pe.size}}function we(Pe){if(Pe.kind==="file"){Pe.fileId!==void 0&&M7(Pe.fileId,Pe.name,Pe.mediaType);return}G(Pe)}function Re(){const Pe=a.value.trim();if(W.value.some(pn=>pn.uploading))return;const ct=W.value.filter(pn=>!pn.uploading&&!pn.error&&pn.fileId);if(!Pe&&ct.length===0)return;if(S.push(Pe),Pe==="/plan"){a.value="",f(),I.value=!1,w(),p();return}if(Pe==="/goal"){a.value="",f(),I.value=!1,w(),h();return}if(Pe){const pn=$_e(Pe),Ni=pn?R7(o.skills).some(dr=>dr.name===pn.cmd||dr.name===`/${N1}${pn.cmd.slice(1)}`):!1;if(pn&&Ni){a.value="",f(),I.value=!1,w(),i("command",pn.arg?`${pn.cmd} ${pn.arg}`:pn.cmd);return}}const bt={text:Pe,attachments:ct.map(pn=>ie(pn))};j.value=null,he(),a.value="",f(),I.value=!1,P.value=!1,w(),i("submit",bt)}function at(){if(!o.running||W.value.some(pn=>pn.uploading))return;const Pe=a.value.trim(),ct=W.value.filter(pn=>!pn.uploading&&!pn.error&&pn.fileId);if(!Pe&&ct.length===0&&o.queued.length===0)return;const bt={text:Pe,attachments:ct.map(pn=>ie(pn))};he(),S.push(Pe),a.value="",f(),I.value=!1,P.value=!1,w(),i("steer",bt)}let ft=!1,Mt=null;function Tt(){Mt!==null&&(clearTimeout(Mt),Mt=null)}function tn(){Tt(),ft=!0}function Kt(){Tt(),Mt=setTimeout(()=>{Mt=null,ft=!1},0)}function Qe(Pe){return ft||Pe.isComposing||Pe.keyCode===229}function nt(Pe){if(!Qe(Pe)){if(Fn.value&&Pe.key==="Backspace"&&!Pe.shiftKey&&!Pe.altKey&&!Pe.metaKey&&!Pe.ctrlKey){const ct=u.value;if(ct&&ct.selectionStart===0&&ct.selectionEnd===0){Pe.preventDefault(),Ii();return}}if(Pe.key==="Escape"){if(ln.value){Pe.preventDefault(),Nn();return}if(rt.value){Pe.preventDefault(),Wo();return}if(vt.value){Pe.preventDefault(),Un();return}}if(I.value){if(Pe.key==="Escape"){Pe.preventDefault(),I.value=!1;return}if(Pe.key==="Tab"&&T.value.length===0){I.value=!1;return}if(Pe.key==="ArrowDown"){Pe.preventDefault(),$.value=($.value+1)%T.value.length;return}if(Pe.key==="ArrowUp"){Pe.preventDefault(),$.value=($.value-1+T.value.length)%T.value.length;return}if(Pe.key==="Enter"||Pe.key==="Tab"){Pe.preventDefault();const ct=T.value[$.value];ct&&R(ct);return}}if(P.value&&!B.value){if(Pe.key==="ArrowDown"){Pe.preventDefault(),D.value=(D.value+1)%Math.max(1,M.value.length);return}if(Pe.key==="ArrowUp"){Pe.preventDefault(),D.value=(D.value-1+Math.max(1,M.value.length))%Math.max(1,M.value.length);return}if(Pe.key==="Enter"||Pe.key==="Tab"){Pe.preventDefault();const ct=M.value[D.value];ct&&A(ct);return}if(Pe.key==="Escape"){Pe.preventDefault(),P.value=!1;return}}if(Pe.key==="s"&&(Pe.ctrlKey||Pe.metaKey)&&!Pe.shiftKey&&!Pe.altKey){o.running&&(Pe.preventDefault(),at());return}if(!m.value&&!I.value&&!P.value&&!Pe.shiftKey&&!Pe.altKey&&!Pe.metaKey&&!Pe.ctrlKey){const ct=S.isBrowsing();if(Pe.key==="ArrowUp"&&S.hasHistory()&&(ct||S.caretAtTextStart())){Pe.preventDefault(),S.recallOlder(),I.value=!1;return}if(Pe.key==="ArrowDown"&&ct){Pe.preventDefault(),S.recallNewer(),I.value=!1;return}}if(Pe.key==="Enter"&&!Pe.shiftKey){if(m.value&&!(Pe.metaKey||Pe.ctrlKey))return;Pe.preventDefault(),Re()}}}const ut=O(()=>r("composer.send")),Pt=O(()=>!!o.uploadImage),Oe=O(()=>!W.value.some(Pe=>Pe.uploading)&&(a.value.trim()!==""||W.value.some(Pe=>!Pe.error&&Pe.fileId))),Je=O(()=>{if(I.value)return"composer-slash-menu";if(P.value)return"composer-mention-menu"}),it=O(()=>{if(I.value&&T.value.length>0)return`composer-slash-option-${$.value}`;if(P.value&&M.value.length>0)return`composer-mention-option-${D.value}`}),rt=V(!1),vt=V(!1),Nt=V(null),on=V(null),mn=V(null),Zt=V(null),jn=V(""),Xt=V("");function xo(){rt.value=!rt.value,rt.value&&(wt(),vt.value=!1,Nn(),I.value=!1,P.value=!1,document.addEventListener("click",ot,!0))}function Wo(){rt.value=!1,$s()}function vo(){vt.value=!vt.value,vt.value&&(Ae(),rt.value=!1,Nn(),I.value=!1,P.value=!1,document.addEventListener("click",ot,!0))}function Un(){vt.value=!1,$s()}function $s(){!rt.value&&!vt.value&&!ln.value&&document.removeEventListener("click",ot,!0)}function ot(Pe){const ct=Pe.target;Nt.value?.contains(ct)||Os.value?.contains(ct)||(Wo(),Un(),Nn())}function Ae(){const Pe=on.value,ct=Nt.value;jn.value=Pe&&ct?`${Math.round(Pe.getBoundingClientRect().left-ct.getBoundingClientRect().left)}px`:""}function wt(){const Pe=mn.value,ct=Nt.value;Xt.value=Pe&&ct?`${Math.round(ct.getBoundingClientRect().right-Pe.getBoundingClientRect().right)}px`:""}const Lt=O(()=>{const Pe=o.status?.ctxMax??0;return Pe<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Pe*100)))}),Qt=O(()=>{const Pe=Pl(o.status?.ctxUsed??0),ct=Pl(o.status?.ctxMax??0);return r("status.ctxTooltip",{used:Pe,max:ct,pct:Lt.value})}),_o=O(()=>Lt.value>=80),Zn=O(()=>o.models?.find(Pe=>Pe.id===o.status?.modelId)),Xn=O(()=>B0(Zn.value)),io=O(()=>kh(Zn.value)),ro=O(()=>L1(Zn.value,o.thinking)),ys=O(()=>io.value.includes(ro.value)?ro.value:""),Ti=O(()=>O_e(ro.value)),Ns=O(()=>Xn.value==="unsupported"||io.value.length<=1),Us=O(()=>{if(!Ti.value)return"";const Pe=(Zn.value?.supportEfforts?.length??0)>0,ct=ro.value;return Pe&&ct!=="on"?r("composer.thinkingSuffixEffort",{level:ct}):r("composer.thinkingSuffix")});function Vs(Pe){Ns.value||i("setThinking",Wx(Zn.value,Pe))}function li(Pe){return Pe==="on"?r("status.thinkingOn"):Pe==="off"?r("status.thinkingOff"):Jp(Pe)}const ss=O(()=>io.value.map(Pe=>({value:Pe,label:li(Pe)}))),ai=O(()=>o.planArmed===!0||o.planMode===!0),ui=O(()=>o.workflowActive===!0),Cn=O(()=>o.goal?.status??o.activationBadges?.goal?.status??null),Ls=O(()=>Cn.value!==null&&Cn.value!=="complete"),Fn=O(()=>o.goalMode?"goal":o.planArmed?"plan":null),Io=V(null),Ho=V(""),Fs=O(()=>Ho.value?{textIndent:Ho.value}:void 0);let qs=null;function Ii(){Fn.value==="goal"?i("toggleGoal"):Fn.value==="plan"&&i("togglePlan")}function cs(){const Pe=Io.value;Ho.value=Pe?`calc(${Pe.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ye(Fn,async Pe=>{if(qs?.disconnect(),qs=null,!Pe){Ho.value="";return}await xt(),cs(),typeof ResizeObserver=="function"&&Io.value&&(qs=new ResizeObserver(cs),qs.observe(Io.value))},{immediate:!0});const Po=V(null),ln=V(!1),Os=V(null),ds=V(null),jo=V(null);let Ks=null;const $i=O(()=>{const Pe=[];return Pt.value&&Pe.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Ie}),Pe.push({id:"capabilities",icon:"sliders",nameKey:"capabilityMenu.trigger",action:Ve},{id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:an},{id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:gn},{id:"workflow",icon:"sparkles",nameKey:"status.dynamicWorkflowLabel",descKey:"composer.addWorkflowDesc",action:Ln}),Pe});function ks(){const Pe=ds.value;if(!Pe||Pe.scrollHeight<=Pe.clientHeight+1){jo.value=null;return}const ct=getComputedStyle(Pe),bt=Number.parseFloat(ct.getPropertyValue("--menu-scrollbar-track-inset"))||0,pn=Number.parseFloat(ct.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Ni=Pe.clientHeight-bt*2,dr=Math.max(pn,Pe.clientHeight/Pe.scrollHeight*Ni),ci=Pe.scrollHeight-Pe.clientHeight;jo.value={top:Pe.offsetTop+bt+Pe.scrollTop/ci*(Ni-dr),height:dr}}Ye(ln,async Pe=>{Ks?.disconnect(),Ks=null,jo.value=null,Pe&&(await xt(),ks(),typeof ResizeObserver=="function"&&ds.value&&(Ks=new ResizeObserver(ks),Ks.observe(ds.value)))});function Nn(){ln.value=!1,$s()}function $o(){if(ln.value){Nn();return}Wo(),Un(),I.value=!1,P.value=!1,ln.value=!0,document.addEventListener("click",ot,!0),xt(()=>Os.value?.querySelector(".am-row")?.focus())}function Lr(Pe){Pe.action(),u.value?.focus()}function Me(Pe){if(Pe.key==="Escape"){Pe.preventDefault(),Nn(),u.value?.focus();return}if(Pe.key==="Tab"){Nn();return}if(Pe.key!=="ArrowDown"&&Pe.key!=="ArrowUp")return;Pe.preventDefault();const ct=Array.from(Os.value?.querySelectorAll(".am-row")??[]);if(ct.length===0)return;const bt=ct.indexOf(document.activeElement),pn=Pe.key==="ArrowDown"?(bt+1)%ct.length:(bt-1+ct.length)%ct.length;ct[pn]?.focus()}function Ie(){Nn(),te()}function Ve(){Nn(),Po.value?.toggleOpen()}function an(){Nn(),o.goalMode||h()}function gn(){Nn(),ai.value||p()}function Ln(){Nn(),ui.value||i("toggleWorkflow")}const xn=[{mode:"manual",icon:"fingerprint",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],ue=V(null),Ce=V("");function Ne(Pe){const ct={};return Pe&&(ct["--composer-menu-desc-width"]=Pe),ct}const Ue=O(()=>{const Pe=Ne(Ce.value);return jn.value&&(Pe.left=jn.value),Pe}),dt=O(()=>{const Pe={};return Xt.value&&(Pe.right=Xt.value),Pe});let yt=null;function Yt(Pe){const ct=Number.parseFloat(Pe);return Number.isFinite(ct)?ct:0}function sn(Pe){return`${Pe.fontStyle||"normal"} ${Pe.fontWeight||"400"} ${Pe.fontSize} ${Pe.fontFamily}`}function Qn(Pe){return Pe.letterSpacing==="normal"?0:Yt(Pe.letterSpacing)}function kn(Pe,ct){if(!Pe)return 0;const bt=o_e(Pe,sn(ct),{letterSpacing:Qn(ct)});return s_e(bt)}function Tn(){const Pe=ue.value?.querySelector(".pd-desc");if(!Pe)return;const ct=getComputedStyle(Pe),bt=Math.max(0,...xn.map(pn=>kn(r(pn.descKey),ct)));Ce.value=bt>0?`${Math.ceil(bt)}px`:""}function No(){typeof window>"u"||(yt!==null&&window.cancelAnimationFrame(yt),xt(()=>{yt=window.requestAnimationFrame(()=>{yt=null,Tn()})}))}Ye(l,No,{immediate:!0}),Sn(()=>{No(),document.fonts?.ready.then(No)}),En(()=>{yt!==null&&(window.cancelAnimationFrame(yt),yt=null)});function Dt(Pe){i("setPermission",Pe),Un()}const Vt=O(()=>xn.find(Pe=>Pe.mode===o.status?.permission)),dn=O(()=>Vt.value?r(Vt.value.labelKey):""),lo=O(()=>Vt.value?.icon??"fingerprint"),Yn=O(()=>Zn.value?.provider??""),Xe=O(()=>!Yn.value||!o.models?.length?[]:o.models.filter(Pe=>Pe.provider===Yn.value)),ge=O(()=>new Set(o.starredIds??[]));function Le(Pe){return ge.value.has(Pe)}const un=O(()=>o.models?.length?o.models.filter(Pe=>Le(Pe.id)&&Pe.provider!==Yn.value):[]);Ye(rt,async Pe=>{if(!Pe)return;await xt(),(Zt.value?.querySelector(".md-row.is-current")??Zt.value?.querySelector(".md-row"))?.focus()});function tl(Pe){if(Pe.key!=="ArrowDown"&&Pe.key!=="ArrowUp")return;const ct=Array.from(Zt.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(ct.length===0)return;Pe.preventDefault();const bt=ct.indexOf(document.activeElement),pn=Pe.key==="ArrowDown"?(bt+1)%ct.length:(bt-1+ct.length)%ct.length;ct[pn]?.focus()}function nl(Pe){i("selectModel",Pe),Wo()}return(Pe,ct)=>(g(),C("div",{class:ze(["composer",{"drag-over":x(Q),expanded:m.value}]),onDragover:ct[19]||(ct[19]=(...bt)=>x(me)&&x(me)(...bt)),onDragleave:ct[20]||(ct[20]=(...bt)=>x(xe)&&x(xe)(...bt)),onDrop:ct[21]||(ct[21]=(...bt)=>x(We)&&x(We)(...bt))},[x(j)?(g(),C("div",{key:0,class:"att-lightbox",onClick:ct[1]||(ct[1]=Ct((...bt)=>x(X)&&x(X)(...bt),["self"]))},[_("div",l8e,[K(Mn,{text:x(r)("model.close")},{default:ve(()=>[_("button",{type:"button",class:"att-lightbox-close",onClick:ct[0]||(ct[0]=(...bt)=>x(X)&&x(X)(...bt))},"✕")]),_:1},8,["text"]),x(j).kind==="video"?(g(),C("video",{key:0,class:"att-lightbox-media",src:x(j).previewUrl,controls:"",playsinline:""},null,8,a8e)):(g(),C("img",{key:1,class:"att-lightbox-media",src:x(j).previewUrl,alt:x(j).name},null,8,u8e)),_("div",c8e,N(x(j).name),1)])])):oe("",!0),_("div",d8e,[x(W).length>0?(g(),C("div",f8e,[_("div",{ref_key:"attachmentScrollRef",ref:ye,class:ze(["att-scroll",{"is-overflowing":de.value}])},[_("div",p8e,[H.value.length>0?(g(),C("div",{key:0,ref_key:"attachmentMediaRowRef",ref:fe,class:"att-row att-row-media"},[(g(!0),C(Te,null,st(H.value,bt=>(g(),pe(a2,{key:bt.localId,kind:bt.kind,name:bt.name,url:bt.previewUrl,"file-id":bt.fileId,"media-type":bt.mediaType,size:bt.size,uploading:bt.uploading,error:bt.error,removable:"","remove-label":x(r)("composer.removeNamed",{name:bt.name}),onActivate:pn=>we(bt),onRemove:pn=>x(Y)(bt.localId)},null,8,["kind","name","url","file-id","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):oe("",!0),Z.value.length>0?(g(),C("div",h8e,[(g(!0),C(Te,null,st(Z.value,bt=>(g(),pe(a2,{key:bt.localId,kind:"file",name:bt.name,"media-type":bt.mediaType,size:bt.size,uploading:bt.uploading,error:bt.error,removable:"","remove-label":x(r)("composer.removeNamed",{name:bt.name}),onActivate:pn=>we(bt),onRemove:pn=>x(Y)(bt.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):oe("",!0)])],2),de.value?(g(),C("span",m8e,N(x(r)("composer.attachmentCount",{n:x(W).length})),1)):oe("",!0),x(W).length>=2?(g(),pe(Mn,{key:1,text:x(r)("composer.clearAll")},{default:ve(()=>[K(Jt,{class:"att-clear",size:"sm",label:x(r)("composer.clearAll"),onClick:ne},{default:ve(()=>[K(Fe,{name:"trash"})]),_:1},8,["label"])]),_:1},8,["text"])):oe("",!0)])):oe("",!0),_("div",g8e,[x(I)?(g(),pe(g_e,{key:0,id:"composer-slash-menu",items:x(T),"active-index":x($),onSelect:x(R),onHover:ct[2]||(ct[2]=bt=>$.value=bt)},null,8,["items","active-index","onSelect"])):oe("",!0),x(P)?(g(),pe(I_e,{key:1,id:"composer-mention-menu",items:x(M),"active-index":x(D),loading:x(B),onSelect:x(A),onHover:ct[3]||(ct[3]=bt=>D.value=bt)},null,8,["items","active-index","loading","onSelect"])):oe("",!0),K(Cr,{name:"composer-menu-pop"},{default:ve(()=>[ln.value?(g(),C("div",{key:0,ref_key:"modesMenuRef",ref:Os,class:"add-menu",onClick:ct[5]||(ct[5]=Ct(()=>{},["stop"])),onKeydown:Me},[_("div",{ref_key:"addMenuScrollRef",ref:ds,class:"am-scroll",role:"menu",onScroll:ks},[(g(!0),C(Te,null,st($i.value,bt=>(g(),C("button",{key:bt.id,type:"button",class:"am-row",role:"menuitem",onMousedown:ct[4]||(ct[4]=Ct(()=>{},["prevent"])),onClick:pn=>Lr(bt)},[_("span",y8e,[K(Fe,{name:bt.icon,size:"sm"},null,8,["name"])]),_("span",k8e,N(x(r)(bt.nameKey)),1),bt.descKey?(g(),C("span",b8e,N(x(r)(bt.descKey)),1)):oe("",!0)],40,v8e))),128))],544),jo.value?(g(),C("div",{key:0,class:"scroll-thumb",style:jt({top:`${jo.value.top}px`,height:`${jo.value.height}px`})},null,4)):oe("",!0)],544)):oe("",!0)]),_:1}),_("div",w8e,[Fn.value?(g(),C("span",{key:0,ref_key:"workModePillRef",ref:Io,class:"wm-pill"},[K(Fe,{name:Fn.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),_("span",null,N(Fn.value==="goal"?x(r)("status.goalLabel"):x(r)("status.planLabel")),1),K(Jt,{class:"wm-x",size:"sm",label:x(r)("status.workModeDismiss"),onMousedown:ct[6]||(ct[6]=Ct(()=>{},["prevent"])),onClick:Ii},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])],512)):oe("",!0),Bn(_("textarea",{ref_key:"textareaRef",ref:u,"onUpdate:modelValue":ct[7]||(ct[7]=bt=>Bo(a)?a.value=bt:null),class:"ph",style:jt(Fs.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!Je.value,"aria-controls":Je.value,"aria-activedescendant":it.value,onKeydown:nt,onCompositionstart:tn,onCompositionend:Kt,onInput:L,onBlur:ct[8]||(ct[8]=bt=>{I.value=!1,P.value=!1})},null,44,x8e),[[vs,x(a)]]),K(Mn,{text:m.value?x(r)("composer.collapseTitle"):x(r)("composer.expandTitle")},{default:ve(()=>[m.value||y.value?(g(),C("button",{key:0,class:"expand-btn",type:"button","aria-label":m.value?x(r)("composer.collapseTitle"):x(r)("composer.expandTitle"),onClick:k},[m.value?(g(),pe(Fe,{key:0,name:"collapse",size:"sm"})):(g(),pe(Fe,{key:1,name:"expand",size:"sm"}))],8,_8e)):oe("",!0)]),_:1},8,["text"])])]),Pt.value?(g(),C("input",{key:1,ref_key:"fileInputRef",ref:re,type:"file",multiple:"",class:"file-input-hidden",onChange:ct[9]||(ct[9]=(...bt)=>x(q)&&x(q)(...bt))},null,544)):oe("",!0),_("div",{ref_key:"toolbarRef",ref:Nt,class:"toolbar"},[_("div",{ref_key:"menuMeasureRef",ref:ue,class:"menu-measure","aria-hidden":"true"},[...ct[22]||(ct[22]=[_("span",{class:"pd-desc"},null,-1)])],512),_("div",S8e,[K(Jt,{size:"md",class:"composer-attach",label:x(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":ln.value,onMousedown:ct[10]||(ct[10]=Ct(()=>{},["prevent"])),onClick:Ct($o,["stop"])},{default:ve(()=>[K(Fe,{name:"plus"})]),_:1},8,["label","aria-expanded"]),K(r8e,{ref_key:"capMenuRef",ref:Po,"session-id":e.sessionId,triggerless:""},null,8,["session-id"]),e.status?(g(),C("span",{key:0,ref_key:"permissionPillRef",ref:on,class:ze(["perm-pill",["perm-"+e.status.permission,{open:vt.value}]]),role:"button",tabindex:"0","aria-label":dn.value,onClick:Ct(vo,["stop"]),onKeydown:[Do(vo,["enter"]),Do(Ct(vo,["prevent"]),["space"])]},[K(Fe,{class:"perm-pill-icon",name:lo.value,size:"md"},null,8,["name"]),_("span",A8e,N(dn.value),1)],42,C8e)):oe("",!0),K(Cr,{name:"composer-menu-pop"},{default:ve(()=>[vt.value&&e.status?(g(),C("div",{key:0,class:"perm-dropdown",style:jt(Ue.value),role:"menu",onClick:ct[11]||(ct[11]=Ct(()=>{},["stop"]))},[(g(),C(Te,null,st(xn,bt=>_("button",{key:bt.mode,class:ze(["pd-row",{"is-current":bt.mode===e.status.permission}]),role:"menuitem",onClick:pn=>Dt(bt.mode)},[_("span",{class:"pd-icon",style:jt({color:bt.color})},[K(Fe,{name:bt.icon,size:"md"},null,8,["name"])],4),_("span",E8e,[_("span",{class:"pd-name",style:jt({color:bt.color})},N(x(r)(bt.labelKey)),5),_("span",T8e,N(x(r)(bt.descKey)),1)]),_("span",I8e,[bt.mode===e.status.permission?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)])],10,M8e)),64))],4)):oe("",!0)]),_:1}),ui.value?(g(),C("span",$8e,[K(Fe,{class:"workflow-ic",name:"sparkles",size:"md"}),_("span",N8e,N(x(r)("status.dynamicWorkflowLabel")),1),K(Jt,{class:"workflow-x",size:"sm",label:x(r)("status.dynamicWorkflowDismiss"),onMousedown:ct[12]||(ct[12]=Ct(()=>{},["prevent"])),onClick:ct[13]||(ct[13]=Ct(bt=>i("toggleWorkflow"),["stop"]))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])])):oe("",!0)]),_("div",L8e,[_o.value?(g(),C("button",{key:0,class:"compact-chip",onClick:ct[14]||(ct[14]=Ct(bt=>i("compact"),["stop"]))},"/compact")):oe("",!0),K(Mn,{text:Qt.value},{default:ve(()=>[e.status&&!e.hideContext?(g(),C("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Qt.value},[K(G_e,{pct:Lt.value},null,8,["pct"])],8,F8e)):oe("",!0)]),_:1},8,["text"]),e.status?(g(),C("button",{key:1,ref_key:"modelPillRef",ref:mn,type:"button",class:ze(["model-pill",{open:rt.value}]),"aria-haspopup":"menu","aria-expanded":rt.value,onClick:Ct(xo,["stop"])},[_("span",R8e,N(e.status.model),1),Us.value?(g(),C("span",P8e,N(Us.value),1)):oe("",!0),K(Fe,{class:"cv",name:"chevron-down",size:"sm"})],10,O8e)):oe("",!0),e.working?(g(),pe(Mn,{key:2,text:x(r)("composer.interruptTitle")},{default:ve(()=>[_("button",{class:"stop","aria-label":x(r)("composer.interrupt"),onClick:ct[15]||(ct[15]=bt=>i("interrupt"))},[K(Fe,{name:"stop",size:"sm"})],8,D8e)]),_:1},8,["text"])):oe("",!0),_("button",{class:ze(["send",{"is-starting":e.starting}]),"aria-label":ut.value,disabled:e.starting||!Oe.value,onClick:ct[16]||(ct[16]=bt=>Re())},[e.starting?(g(),pe(ns,{key:0,size:"sm"})):(g(),pe(Fe,{key:1,name:"send",size:"sm"}))],10,B8e)]),K(Cr,{name:"composer-menu-pop"},{default:ve(()=>[rt.value&&e.status?(g(),C("div",{key:0,ref_key:"modelDropdownRef",ref:Zt,class:"model-dropdown",style:jt(dt.value),role:"menu",onClick:ct[18]||(ct[18]=Ct(()=>{},["stop"])),onKeydown:tl},[_("div",z8e,[un.value.length>0?(g(),C("div",W8e,N(x(r)("status.starredModels")),1)):oe("",!0),(g(!0),C(Te,null,st(un.value,bt=>(g(),C("button",{key:bt.id,class:ze(["md-row",{"is-current":bt.id===e.status.modelId}]),role:"menuitem",onClick:pn=>nl(bt.id)},[_("span",j8e,[bt.id===e.status.modelId?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)]),_("span",U8e,N(bt.displayName??bt.model),1),_("span",V8e,N(bt.provider),1),K(Fe,{class:"md-star",name:"star",size:"sm"})],10,H8e))),128)),un.value.length>0?(g(),C("div",q8e)):oe("",!0),Xe.value.length>0?(g(),C("div",K8e,N(Yn.value),1)):oe("",!0),(g(!0),C(Te,null,st(Xe.value,bt=>(g(),C("button",{key:bt.id,class:ze(["md-row",{"is-current":bt.id===e.status.modelId}]),role:"menuitem",onClick:pn=>nl(bt.id)},[_("span",Z8e,[bt.id===e.status.modelId?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)]),_("span",Y8e,N(bt.displayName??bt.model),1),Le(bt.id)?(g(),pe(Fe,{key:0,class:"md-star",name:"star",size:"sm"})):oe("",!0)],10,G8e))),128))]),Xe.value.length>0?(g(),C("div",J8e)):oe("",!0),_("div",X8e,[_("span",Q8e,N(x(r)("status.thinkingLabel")),1),Xn.value==="unsupported"?(g(),C("span",e6e,N(x(r)("status.modeNotSupported")),1)):io.value.length>1?(g(),pe(zs,{key:1,"model-value":ys.value,options:ss.value,size:"xs","onUpdate:modelValue":Vs},null,8,["model-value","options"])):(g(),C("span",t6e,N(li(io.value[0]??ro.value)),1))]),ct[23]||(ct[23]=_("div",{class:"md-divider"},null,-1)),_("div",n6e,N(x(r)("status.cacheNote")),1),ct[24]||(ct[24]=_("div",{class:"md-divider"},null,-1)),_("button",{class:"md-row md-row-more",role:"menuitem",onClick:ct[17]||(ct[17]=bt=>{Wo(),i("pickModel")})},[_("span",o6e,[K(Fe,{name:"list",size:"sm"})]),_("span",s6e,N(x(r)("status.moreModels")),1),K(Fe,{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):oe("",!0)]),_:1})],512)]),_("div",{class:ze(["drop-overlay",{show:x(Q)}]),"aria-hidden":"true"},[_("div",i6e,[K(Fe,{name:"file-plus",size:"lg"}),_("span",null,N(x(r)("composer.dropToAttach")),1)])],2)],34))}}),TN=ht(r6e,[["__scopeId","data-v-e6685471"]]),l6e={class:"ah"},a6e={class:"akind"},u6e={class:"apath"},c6e={class:"ah-path"},d6e={class:"dg"},f6e={class:"dc"},p6e={key:2,class:"body-shell"},h6e={class:"shell-cmd"},m6e={key:0,class:"shell-cwd"},g6e={key:1,class:"shell-danger"},v6e={class:"file-bar"},y6e={class:"file-lang"},k6e={class:"file-ln"},b6e={class:"file-text"},w6e={key:4,class:"body-chip"},x6e={class:"chip-label"},_6e={class:"chip-value"},S6e={key:0,class:"chip-detail"},C6e={key:5,class:"body-chip"},A6e={key:0,class:"chip-label"},M6e={class:"chip-value"},E6e={key:6,class:"body-chip"},T6e={class:"chip-label"},I6e={class:"chip-value"},$6e={key:0,class:"chip-detail"},N6e={key:7,class:"body-chip"},L6e={class:"chip-label"},F6e={class:"chip-value"},O6e={key:0,class:"chip-detail"},R6e={key:8,class:"body-todo"},P6e={class:"todo-glyph"},D6e={key:10,class:"body-generic"},B6e={class:"gen-text"},z6e={key:11,class:"feedback-wrap"},W6e=["placeholder"],H6e={class:"feedback-hint"},j6e={key:0,class:"plan-actions"},U6e={key:1,class:"abtn"},V6e=.4,q6e=Ze({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>{const ne=n.block;return ne.kind!=="plan_review"?null:{plan:ne.plan,path:ne.path,options:ne.options??[]}}),r=V(!1),l=V(!1),a=O(()=>["plan_review","diff","file"].includes(n.block.kind)),u=V(null),c=V(null),d=V(null),f=V({top:!1,bottom:!1}),p=V({top:!1,bottom:!1}),h=V({top:!1,bottom:!1});function m(ne){return H=>{const Z=H.currentTarget;Z instanceof HTMLElement&&(ne.value={top:Z.scrollTop>0,bottom:Z.scrollTop+Z.clientHeight{const{top:H,bottom:Z}=ne.value;if(!H&&!Z)return;const ye="var(--menu-scroll-fade)",fe=H&&Z?`linear-gradient(to bottom, transparent 0, black ${ye}, black calc(100% - ${ye}), transparent 100%)`:H?`linear-gradient(to bottom, transparent, black ${ye})`:`linear-gradient(to top, transparent, black ${ye})`;return{maskImage:fe,WebkitMaskImage:fe}})}const b=y(f),S=y(p),I=y(h);function T(){const ne=[[u.value,f],[c.value,p],[d.value,h]];for(const[H,Z]of ne)H&&(Z.value={top:H.scrollTop>0,bottom:H.scrollTop+H.clientHeightvoid xt(T)),Ye(r,()=>void xt(T)),Ye(()=>n.block,()=>void xt(T));const $=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function F(){const ne=$.includes(n.block.kind)?n.block.kind:"generic";return s(`approval.title.${ne}`)}const R=V(!1),P=V(""),M=V(null);function D(){const ne=M.value;if(!ne)return;ne.style.height="auto";const Z=(window.visualViewport?.height??window.innerHeight)*V6e,ye=Math.min(ne.scrollHeight,Z);ne.style.height=`${ye}px`,ne.style.overflowY=ne.scrollHeight>Z?"auto":"hidden"}let B=null,z=0;function A(){if(B?.disconnect(),B=null,typeof ResizeObserver>"u")return;const ne=M.value;ne&&(B=new ResizeObserver(H=>{const Z=H[0]?.contentRect.width??0;Z!==z&&(z=Z,D())}),B.observe(ne))}Ye(P,()=>void xt(D)),Ye(R,ne=>{if(!ne){B?.disconnect(),B=null;return}xt(()=>{D(),A()})}),Ye(r,ne=>{ne||xt(D)});const{uiFontSize:L}=Kx();Ye(L,()=>void xt(D));function W(){n.busy||(R.value=!0,P.value="",setTimeout(()=>M.value?.focus(),0))}function j(){if(n.busy)return;const ne=P.value.trim();i.value?G("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:ne||void 0}):G("feedback",{decision:"rejected",feedback:ne||void 0}),R.value=!1,P.value=""}function re(){R.value=!1,P.value=""}function Q(ne){ne.key==="Enter"&&!ne.shiftKey?(ne.preventDefault(),j()):ne.key==="Escape"&&(ne.preventDefault(),re())}const Y=V(null);Ye(()=>n.busy,ne=>{ne||(Y.value=null)});function G(ne,H){n.busy||(Y.value=ne,o("decide",H))}function X(){G("approve",{decision:"approved"})}function te(){G("approveSession",{decision:"approved",scope:"session"})}function q(){G("reject",{decision:"rejected"})}function me(){G("approvePlan",{decision:"approved"})}function xe(ne){G(`option:${ne}`,{decision:"approved",selectedLabel:ne})}function We(){n.busy||W()}function he(){G("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function ee(ne){const H=(document.activeElement?.tagName??"").toLowerCase();if(H==="input"||H==="textarea"||n.busy||r.value)return;const Z=i.value;if(Z){if(Z.options.length===0){ne.key==="1"?(ne.preventDefault(),me()):ne.key==="2"?(ne.preventDefault(),We()):ne.key==="3"&&(ne.preventDefault(),he());return}ne.key==="1"&&Z.options[0]?(ne.preventDefault(),xe(Z.options[0].label)):ne.key==="2"&&Z.options[1]?(ne.preventDefault(),xe(Z.options[1].label)):ne.key==="3"&&Z.options[2]&&(ne.preventDefault(),xe(Z.options[2].label));return}ne.key==="1"?(ne.preventDefault(),X()):ne.key==="2"?(ne.preventDefault(),te()):ne.key==="3"?(ne.preventDefault(),q()):ne.key==="4"&&(ne.preventDefault(),W())}return Sn(()=>{document.addEventListener("keydown",ee),window.addEventListener("resize",D),window.visualViewport?.addEventListener("resize",D)}),En(()=>{document.removeEventListener("keydown",ee),window.removeEventListener("resize",D),window.visualViewport?.removeEventListener("resize",D),B?.disconnect(),B=null}),(ne,H)=>(g(),pe($x,{class:ze(["appr",{minimized:r.value}])},Ap({head:ve(()=>[_("div",l6e,[H[6]||(H[6]=_("span",{class:"ah-ic"},"!",-1)),_("span",a6e,N(F()),1),_("span",u6e,[e.block.kind==="diff"||e.block.kind==="file"||e.block.kind==="fileop"?(g(),C(Te,{key:0},[qe(N(e.block.path),1)],64)):e.block.kind==="shell"?(g(),C(Te,{key:1},[qe(N(e.block.command),1)],64)):e.block.kind==="url"?(g(),C(Te,{key:2},[qe(N(e.block.url),1)],64)):e.block.kind==="search"?(g(),C(Te,{key:3},[qe(N(e.block.query),1)],64)):e.block.kind==="invocation"?(g(),C(Te,{key:4},[qe(N(e.block.name),1)],64)):e.block.kind==="generic"?(g(),C(Te,{key:5},[qe(N(e.block.summary),1)],64)):oe("",!0)]),e.agentName&&!r.value?(g(),pe(wr,{key:0,variant:"neutral",size:"sm"},{default:ve(()=>[qe(N(x(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):oe("",!0),r.value?oe("",!0):(g(),pe(wr,{key:1,variant:"warning",size:"sm",class:"aw"},{default:ve(()=>[qe(N(x(s)("approval.required")),1)]),_:1})),a.value&&!r.value?(g(),pe(Jt,{key:2,class:"aexpand",size:"sm",label:l.value?x(s)("approval.collapsePlan"):x(s)("approval.expandPlan"),tooltip:l.value?x(s)("approval.collapsePlan"):x(s)("approval.expandPlan"),onClick:H[0]||(H[0]=Z=>l.value=!l.value)},{default:ve(()=>[K(Fe,{name:l.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):oe("",!0),K(Jt,{class:"amin",size:"sm",label:r.value?x(s)("question.expand"):x(s)("question.minimize"),onClick:H[1]||(H[1]=Z=>r.value=!r.value)},{default:ve(()=>[r.value?(g(),pe(Fe,{key:0,name:"chevron-up",size:"md"})):(g(),pe(Fe,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[r.value?void 0:{name:"default",fn:ve(()=>[e.block.kind==="plan_review"&&e.block.path?(g(),pe(Mn,{key:0,text:e.block.path},{default:ve(()=>[_("div",c6e,N(e.block.path),1)]),_:1},8,["text"])):oe("",!0),e.block.kind==="diff"?(g(),C("div",{key:1,ref_key:"diffBodyRef",ref:u,class:ze(["diff",{expanded:l.value}]),style:jt(x(b)),onScroll:H[2]||(H[2]=(...Z)=>x(k)&&x(k)(...Z))},[(g(!0),C(Te,null,st(e.block.diff,(Z,ye)=>(g(),C("div",{key:ye,class:ze(["dl",Z.kind==="add"?"add":Z.kind==="rem"?"del":""])},[_("span",d6e,N(Z.gutter),1),_("span",f6e,N(Z.text),1)],2))),128))],38)):e.block.kind==="shell"?(g(),C("div",p6e,[_("div",h6e,[H[7]||(H[7]=_("span",{class:"shell-dollar"},"$",-1)),qe(" "+N(e.block.command),1)]),e.block.cwd?(g(),C("div",m6e,"cwd: "+N(e.block.cwd),1)):oe("",!0),e.block.danger?(g(),C("div",g6e,N(x(s)("approval.danger",{detail:e.block.danger})),1)):oe("",!0)])):e.block.kind==="file"?(g(),C("div",{key:3,class:ze(["body-file",{expanded:l.value}])},[_("div",v6e,[_("span",y6e,N(e.block.language??""),1)]),_("div",{class:"file-content",ref_key:"fileBodyRef",ref:c,style:jt(x(S)),onScroll:H[3]||(H[3]=(...Z)=>x(w)&&x(w)(...Z))},[(g(!0),C(Te,null,st(e.block.content.split(` -`),(Z,ye)=>(g(),C("div",{key:ye,class:"file-line"},[_("span",k6e,N(ye+1),1),_("span",b6e,N(Z),1)]))),128))],36)],2)):e.block.kind==="fileop"?(g(),C("div",w6e,[_("span",x6e,N(e.block.op),1),_("span",_6e,N(e.block.path),1),e.block.detail?(g(),C("span",S6e,N(e.block.detail),1)):oe("",!0)])):e.block.kind==="url"?(g(),C("div",C6e,[e.block.method?(g(),C("span",A6e,N(e.block.method),1)):oe("",!0),_("span",M6e,N(e.block.url),1)])):e.block.kind==="search"?(g(),C("div",E6e,[_("span",T6e,N(x(s)("approval.searchQueryLabel")),1),_("span",I6e,N(e.block.query),1),e.block.scope?(g(),C("span",$6e,N(x(s)("approval.searchScope",{scope:e.block.scope})),1)):oe("",!0)])):e.block.kind==="invocation"?(g(),C("div",N6e,[_("span",L6e,N(e.block.kind2),1),_("span",F6e,N(e.block.name),1),e.block.description?(g(),C("span",O6e,N(e.block.description),1)):oe("",!0)])):e.block.kind==="todo"?(g(),C("div",R6e,[(g(!0),C(Te,null,st(e.block.items,(Z,ye)=>(g(),C("div",{key:ye,class:"todo-item"},[_("span",P6e,N(Z.status==="done"||Z.status==="completed"?"✓":"○"),1),_("span",{class:ze(["todo-title",{"todo-done":Z.status==="done"||Z.status==="completed"}])},N(Z.title),3)]))),128))])):e.block.kind==="plan_review"?(g(),C("div",{key:9,ref_key:"planBodyRef",ref:d,class:ze(["body-plan",{expanded:l.value}]),style:jt(x(I)),onScroll:H[4]||(H[4]=(...Z)=>x(v)&&x(v)(...Z))},[K(Bl,{text:e.block.plan},null,8,["text"])],38)):(g(),C("div",D6e,[_("span",B6e,N(e.block.summary),1)])),R.value?(g(),C("div",z6e,[Bn(_("textarea",{ref_key:"feedbackRef",ref:M,"onUpdate:modelValue":H[5]||(H[5]=Z=>P.value=Z),class:"feedback-ta",placeholder:x(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:Q},null,40,W6e),[[vs,P.value]]),_("div",H6e,N(x(s)("approval.feedbackHint")),1)])):oe("",!0)]),key:"0"},r.value?void 0:{name:"foot",fn:ve(()=>[i.value?(g(),C("div",j6e,[i.value.options.length>0?(g(!0),C(Te,{key:0},st(i.value.options,(Z,ye)=>(g(),pe(Mn,{key:ye,text:Z.description},{default:ve(()=>[K(nn,{class:"kbtn",size:"sm",variant:"primary",loading:Y.value===`option:${Z.label}`,disabled:e.busy,onClick:fe=>xe(Z.label)},{default:ve(()=>[qe(N(Z.label),1),K(fl,{class:"k",keys:[String(ye+1)]},null,8,["keys"])]),_:2},1032,["loading","disabled","onClick"])]),_:2},1032,["text"]))),128)):(g(),pe(nn,{key:1,class:"kbtn",size:"sm",variant:"primary",loading:Y.value==="approvePlan",disabled:e.busy,onClick:me},{default:ve(()=>[qe(N(x(s)("approval.approvePlan")),1),K(fl,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"])),K(nn,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:We},{default:ve(()=>[qe(N(x(s)("approval.revise")),1),i.value.options.length===0?(g(),pe(fl,{key:0,class:"k",keys:["2"]})):oe("",!0)]),_:1},8,["disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"danger-soft",loading:Y.value==="rejectAndExit",disabled:e.busy,onClick:he},{default:ve(()=>[qe(N(x(s)("approval.rejectAndExit")),1),i.value.options.length===0?(g(),pe(fl,{key:0,class:"k",keys:["3"]})):oe("",!0)]),_:1},8,["loading","disabled"])])):(g(),C("div",U6e,[K(nn,{class:"kbtn",size:"sm",variant:"primary",loading:Y.value==="approve",disabled:e.busy,onClick:X},{default:ve(()=>[qe(N(x(s)("approval.approve")),1),K(fl,{class:"k",keys:["1"]})]),_:1},8,["loading","disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"secondary",loading:Y.value==="approveSession",disabled:e.busy,onClick:te},{default:ve(()=>[qe(N(x(s)("approval.approveSession")),1),K(fl,{class:"k",keys:["2"]})]),_:1},8,["loading","disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"secondary",loading:Y.value==="reject",disabled:e.busy,onClick:q},{default:ve(()=>[qe(N(x(s)("approval.reject")),1),K(fl,{class:"k",keys:["3"]})]),_:1},8,["loading","disabled"]),K(nn,{class:"kbtn",size:"sm",variant:"secondary",disabled:e.busy,onClick:W},{default:ve(()=>[qe(N(x(s)("approval.feedback")),1),K(fl,{class:"k",keys:["4"]})]),_:1},8,["disabled"])]))]),key:"1"}]),1032,["class"]))}}),K6e=ht(q6e,[["__scopeId","data-v-1c39b16f"]]),G6e={class:"goal-panel"},Z6e={key:0,class:"goal-criterion"},Y6e={class:"goal-criterion-label"},J6e=Ze({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=$t();return(n,o)=>(g(),C("div",G6e,[K(Bl,{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(g(),C("div",Z6e,[_("div",Y6e,[K(Fe,{name:"check-list",size:"md"}),_("span",null,N(x(t)("status.goalDoneWhen")),1)]),K(Bl,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):oe("",!0)]))}}),X6e=ht(J6e,[["__scopeId","data-v-81a928ba"]]),Q6e={class:"plan-panel"},eMe={key:0,class:"plan-review-row"},tMe={class:"plan-review-label"},nMe={key:1,class:"plan-review-row plan-review-feedback"},oMe={class:"plan-review-label"},sMe={key:3,class:"plan-path-only"},iMe={class:"plan-path-hint"},rMe={key:4,class:"plan-empty"},lMe=Ze({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=$t();return(o,s)=>(g(),C("div",Q6e,[e.plan?.selectedOption?(g(),C("div",eMe,[_("span",tMe,N(x(n)("tools.plan.selectedOption")),1),_("span",null,N(e.plan.selectedOption),1)])):oe("",!0),e.plan?.feedback?(g(),C("div",nMe,[_("span",oMe,N(x(n)("tools.plan.feedback")),1),_("span",null,N(e.plan.feedback),1)])):oe("",!0),e.plan?.plan?(g(),pe(Bl,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):e.plan?.path?(g(),C("div",sMe,[_("span",iMe,N(x(n)("tools.plan.pathOnlyHint")),1),K(nn,{class:"plan-path",variant:"ghost",size:"sm",onClick:s[0]||(s[0]=i=>t.openFile?.({path:e.plan.path}))},{default:ve(()=>[qe(N(e.plan.path),1)]),_:1})])):(g(),C("div",rMe,[K(Fe,{class:"plan-empty-ico",name:"file-edit",size:"lg"}),_("span",null,N(x(n)(e.planModeOn?"status.planEmptyArmed":"status.planEmptyIdle")),1)]))]))}}),aMe=ht(lMe,[["__scopeId","data-v-bc8a415c"]]),uMe={class:"qh"},cMe={class:"qtitle"},dMe={key:0,class:"qstep"},fMe={key:1,class:"qmin-peek"},pMe={class:"qbody"},hMe=["aria-label"],mMe=["aria-selected","aria-label","onClick"],gMe={class:"qstep-num"},vMe={key:1,class:"qheader-chip"},yMe={class:"qtext"},kMe={class:"qopts"},bMe=["onClick"],wMe={class:"qopt-key"},xMe={class:"qopt-glyph"},_Me={key:0,class:"chk"},SMe={key:1,class:"rad"},CMe={class:"qopt-text"},AMe={class:"qopt-label"},MMe={key:0,class:"qopt-desc"},EMe={class:"qopt-glyph"},TMe={key:0,class:"chk"},IMe={key:1,class:"rad"},$Me={class:"qopt-label"},NMe=["placeholder"],LMe={class:"qfoot"},FMe=Ze({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=$t(),s=t,i=V(0),r=V(!1),l=O(()=>n.question.questions[i.value]),a=O(()=>n.question.questions.length);function u(){i.value>0&&i.value--}function c(){i.value=0&&A0:L.kind==="multiWithOther"?L.optionIds.length>0||L.otherText.trim().length>0:L.kind==="other"?L.text.trim().length>0:!0:!1}function p(){return f(l.value.id)}const h=V({});function m(A){return A.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${A.label} ${A.description??""}`.toLowerCase())}function k(){const A={...h.value};let L=!1;for(const W of n.question.questions){if(A[W.id])continue;const j=W.options.filter(m);j.length!==0&&(A[W.id]=W.multiSelect?{kind:"multi",optionIds:j.map(re=>re.id)}:{kind:"single",optionId:j[0].id},L=!0)}L&&(h.value=A)}Ye(()=>n.question.questionId,()=>{i.value=0,r.value=!1,h.value={},y.value={}}),Ye(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),k()},{immediate:!0,deep:!0});function w(A,L){const W=h.value[A];if(W&&W.kind==="single"&&W.optionId===L){const j={...h.value};delete j[A],h.value=j}else h.value={...h.value,[A]:{kind:"single",optionId:L}}}function v(A,L){const W=h.value[A],j=W&&(W.kind==="multi"||W.kind==="multiWithOther")?W.kind==="multi"?[...W.optionIds]:[...W.optionIds]:[],re=j.indexOf(L);re>=0?j.splice(re,1):j.push(L);const Q=h.value[A],Y=Q&&Q.kind==="multiWithOther"?Q.otherText:"";Y?h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:j,otherText:Y}}:h.value={...h.value,[A]:{kind:"multi",optionIds:j}}}const y=V({}),b=V(null);function S(A){const L=n.question.questions.find(j=>j.id===A),W=y.value[A]??"";if(L.multiSelect){const j=h.value[A],re=j&&(j.kind==="multi"||j.kind==="multiWithOther")?j.kind==="multi"?[...j.optionIds]:[...j.optionIds]:[];h.value={...h.value,[A]:{kind:"multiWithOther",optionIds:re,otherText:W}}}else h.value={...h.value,[A]:{kind:"other",text:W}}}function I(A){S(A),xt(()=>b.value?.focus())}function T(A,L){const W=h.value[A];return W?W.kind==="single"?W.optionId===L:W.kind==="multi"||W.kind==="multiWithOther"?W.optionIds.includes(L):!1:!1}function $(A){const L=h.value[A];return!!(L&&(L.kind==="other"||L.kind==="multiWithOther"))}function F(){return n.question.questions.every(A=>f(A.id))}const R=O(()=>n.busyKind==="answer"),P=O(()=>n.busyKind==="dismiss"),M=O(()=>!!n.busyKind);function D(){if(M.value||!F())return;const A={answers:h.value,method:"click"};s("answer",n.question.questionId,A)}function B(){M.value||s("dismiss",n.question.questionId)}function z(A){const L=(document.activeElement?.tagName??"").toLowerCase(),W=L==="input"||L==="textarea";if(M.value)return;if(A.key==="Enter"){if(A.preventDefault(),r.value)return;i.value=1&&j<=9){A.preventDefault();const re=l.value,Q=j-1,Y=re.options[Q];Y&&(re.multiSelect?v(re.id,Y.id):w(re.id,Y.id))}}return Sn(()=>document.addEventListener("keydown",z)),En(()=>document.removeEventListener("keydown",z)),(A,L)=>(g(),pe($x,{class:ze(["qcard",{minimized:r.value}])},Ap({head:ve(()=>[_("div",uMe,[L[5]||(L[5]=_("span",{class:"qh-ic"},"?",-1)),_("span",cMe,N(x(o)("question.title")),1),a.value>1&&!r.value?(g(),C("span",dMe,N(x(o)("question.step",{current:i.value+1,total:a.value})),1)):oe("",!0),r.value?(g(),C("span",fMe,N(l.value.question),1)):oe("",!0),K(Jt,{class:"qmin",size:"sm",label:r.value?x(o)("question.expand"):x(o)("question.minimize"),onClick:L[0]||(L[0]=W=>r.value=!r.value)},{default:ve(()=>[r.value?(g(),pe(Fe,{key:0,name:"chevron-up",size:"md"})):(g(),pe(Fe,{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])])]),_:2},[r.value?void 0:{name:"default",fn:ve(()=>[_("div",pMe,[a.value>1?(g(),C("div",{key:0,class:"qsteps",role:"tablist","aria-label":x(o)("question.step",{current:i.value+1,total:a.value})},[(g(!0),C(Te,null,st(n.question.questions,(W,j)=>(g(),C("button",{key:W.id,type:"button",class:ze(["qstep-dot",{active:j===i.value,answered:f(W.id)}]),"aria-selected":j===i.value,"aria-label":x(o)("question.step",{current:j+1,total:a.value}),onClick:re=>d(j)},[_("span",gMe,N(j+1),1)],10,mMe))),128))],8,hMe)):oe("",!0),l.value.header?(g(),C("div",vMe,[K(wr,{variant:"neutral",size:"sm"},{default:ve(()=>[qe(N(l.value.header),1)]),_:1})])):oe("",!0),_("div",yMe,N(l.value.question),1),l.value.body?(g(),pe(Bl,{key:2,text:l.value.body,class:"qmdbody"},null,8,["text"])):oe("",!0),_("div",kMe,[(g(!0),C(Te,null,st(l.value.options,(W,j)=>(g(),C("label",{key:W.id,class:ze(["qopt",{selected:T(l.value.id,W.id)}]),onClick:Ct(re=>l.value.multiSelect?v(l.value.id,W.id):w(l.value.id,W.id),["prevent"])},[_("span",wMe,N(j+1),1),_("span",xMe,[l.value.multiSelect?(g(),C("span",_Me,N(T(l.value.id,W.id)?"■":"□"),1)):(g(),C("span",SMe,N(T(l.value.id,W.id)?"●":"○"),1))]),_("span",CMe,[_("span",AMe,N(W.label),1),W.description?(g(),C("span",MMe,N(W.description),1)):oe("",!0)])],10,bMe))),128)),l.value.allowOther?(g(),C("label",{key:0,class:ze(["qopt",{selected:$(l.value.id)}]),onClick:L[4]||(L[4]=Ct(W=>I(l.value.id),["prevent"]))},[L[6]||(L[6]=_("span",{class:"qopt-key"},null,-1)),_("span",EMe,[l.value.multiSelect?(g(),C("span",TMe,N($(l.value.id)?"■":"□"),1)):(g(),C("span",IMe,N($(l.value.id)?"●":"○"),1))]),_("span",$Me,N(l.value.otherLabel??x(o)("question.otherDefault")),1),Bn(_("input",{ref_key:"otherInputEl",ref:b,"onUpdate:modelValue":L[1]||(L[1]=W=>y.value[l.value.id]=W),class:"other-input",type:"text",placeholder:l.value.otherLabel??x(o)("question.otherDefault"),onInput:L[2]||(L[2]=W=>S(l.value.id)),onFocus:L[3]||(L[3]=W=>S(l.value.id))},null,40,NMe),[[vs,y.value[l.value.id]]])],2)):oe("",!0)])])]),key:"0"},r.value?void 0:{name:"foot",fn:ve(()=>[_("div",LMe,[i.value[qe(N(x(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(g(),pe(nn,{key:1,class:"qfoot-btn qfoot-main",size:"sm",variant:"primary",disabled:!F(),loading:R.value,onClick:D},{default:ve(()=>[qe(N(x(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),a.value>1?(g(),pe(nn,{key:2,class:"qfoot-btn",size:"sm",variant:"secondary",disabled:i.value===0||M.value,onClick:u},{default:ve(()=>[qe(N(x(o)("question.back")),1)]),_:1},8,["disabled"])):oe("",!0),K(nn,{class:"qfoot-btn",size:"sm",variant:"ghost",loading:P.value,disabled:M.value,onClick:B},{default:ve(()=>[qe(N(x(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])])]),key:"1"}]),1032,["class"]))}}),OMe=ht(FMe,[["__scopeId","data-v-29d475ec"]]),RMe=Ze({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e,n={pending:"○",run:"●",done:"✓",fail:"✗"};return(o,s)=>(g(),C("span",{class:ze(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},N(n[t.status]),3))}}),j1=ht(RMe,[["__scopeId","data-v-f870866a"]]),PMe={key:0,class:"sg-empty"},DMe={key:1,class:"sg-grid"},BMe=["aria-label","onClick"],zMe={class:"sg-top"},WMe={class:"sg-num"},HMe={class:"sg-name"},jMe={key:1,class:"sg-desc"},UMe={class:"sg-foot"},VMe={key:0,class:"sg-model"},qMe={class:"sg-status"},KMe={class:"sg-state"},GMe={key:0,class:"sg-time"},ZMe=Ze({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(c){return c}function i(c){return c==="running"?"tasks.emptyRunning":c==="done"?"tasks.emptyDone":c==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function r(c){const{model:d,thinkingEffort:f}=c;return[d,f?Jp(f):void 0].filter(Boolean).join(" · ")||void 0}function l(c){const d=c.state;return o(d==="done"?"tasks.stateDone":d==="fail"?"tasks.stateFail":d==="cancelled"?"tasks.stateCancelled":"tasks.running")}function a(c,d){return String(c.dynamicWorkflowIndex??d+1).padStart(2,"0")}function u(c){return!!(c.agentId||c.output?.length)}return(c,d)=>e.tasks.length===0?(g(),C("div",PMe,N(x(o)(i(e.filter))),1)):(g(),C("div",DMe,[(g(!0),C(Te,null,st(e.tasks,(f,p)=>(g(),C("article",{key:f.id,class:ze(["sg-card",[`s-${f.state}`,{openable:u(f)}]])},[u(f)?(g(),C("button",{key:0,class:"sg-open",type:"button","aria-label":f.name,onClick:h=>n("open",f.agentId??f.id)},null,8,BMe)):oe("",!0),_("div",zMe,[_("span",WMe,N(a(f,p)),1),_("span",HMe,N(f.name),1)]),f.meta?(g(),C("div",jMe,N(f.meta),1)):oe("",!0),_("div",UMe,[r(f)?(g(),C("div",VMe,[_("span",null,N(r(f)),1)])):oe("",!0),_("div",qMe,[_("span",KMe,[f.state==="run"?(g(),pe(j1,{key:0,status:"run"})):f.state==="done"?(g(),pe(Fe,{key:1,class:"sg-ic-done",name:"check",size:"sm"})):(g(),pe(Fe,{key:2,name:"close",size:"sm"})),qe(" "+N(l(f)),1)]),f.timing?(g(),C("span",GMe,[K(Fe,{name:"clock",size:"sm"}),qe(" "+N(f.timing),1)])):oe("",!0)])]),f.state==="run"?(g(),pe(Jt,{key:2,class:"sg-cancel",size:"sm",label:x(o)("tasks.stop"),onClick:Ct(h=>n("cancel",f.id),["stop"])},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):oe("",!0)],2))),128))]))}}),YMe=ht(ZMe,[["__scopeId","data-v-b4cfb2fc"]]),JMe={class:"taskspane"},XMe={class:"tp-list"},QMe={key:0,class:"tp-empty"},e5e={class:"tp-main"},t5e=["aria-label","onClick"],n5e=["aria-label"],o5e={class:"tp-name"},s5e={key:1,class:"tp-meta"},i5e={key:2,class:"tp-model"},r5e={key:3,class:"tp-model"},l5e={key:4,class:"tp-time"},a5e=Ze({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t();function s(d){return d}function i(d){return d==="running"?"tasks.emptyRunning":d==="done"?"tasks.emptyDone":d==="active"?"tasks.emptyRecent":"tasks.emptyTasks"}function r(d){return d.kind==="subagent"||!!(d.output?.length||d.meta)}function l(d){r(d)&&n("open",d.agentId??d.id)}function a(d){const f=d.state;return o(f==="done"?"tasks.stateDone":f==="fail"?"tasks.stateFail":f==="cancelled"?"tasks.stateCancelled":"tasks.running")}function u(d){return d.kind==="subagent"?d.model:void 0}function c(d){const f=d.thinkingEffort;return d.kind==="subagent"&&f?Jp(f):void 0}return(d,f)=>(g(),C("div",JMe,[_("div",XMe,[e.tasks.length===0?(g(),C("div",QMe,N(x(o)(i(e.filter))),1)):(g(!0),C(Te,{key:1},st(e.tasks,p=>(g(),C("div",{key:p.id,class:ze(["tp-row",{fail:p.state==="fail",expandable:r(p)}])},[_("div",e5e,[r(p)?(g(),C("button",{key:0,class:"tp-open",type:"button","aria-label":p.name,onClick:h=>l(p)},null,8,t5e)):oe("",!0),_("span",{class:"tp-glyph",role:"img","aria-label":a(p)},[p.state==="run"?(g(),pe(j1,{key:0,status:"run"})):p.state==="done"?(g(),pe(Fe,{key:1,class:"tp-done",name:"check",size:"sm"})):p.state==="cancelled"?(g(),pe(Fe,{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(g(),pe(Fe,{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,n5e),_("span",o5e,N(p.name),1),p.meta?(g(),C("span",s5e,N(p.meta),1)):oe("",!0),u(p)?(g(),C("span",i5e,N(u(p)),1)):oe("",!0),c(p)?(g(),C("span",r5e,N(c(p)),1)):oe("",!0),p.timing?(g(),C("span",l5e,N(p.timing),1)):oe("",!0),p.state==="run"?(g(),pe(Jt,{key:5,class:"tp-stop",size:"sm",label:x(o)("tasks.stop"),onClick:Ct(h=>n("cancel",p.id),["stop"])},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label","onClick"])):oe("",!0),r(p)?(g(),pe(Fe,{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):oe("",!0)])],2))),128))])]))}}),u5e=ht(a5e,[["__scopeId","data-v-ac309aaa"]]),c5e={class:"todo-card"},d5e={key:0,class:"tc-empty"},f5e={class:"tc-name"},p5e=Ze({__name:"TodoCard",props:{todos:{}},setup(e){const{t}=$t();return(n,o)=>(g(),C("div",c5e,[e.todos.length===0?(g(),C("div",d5e,[K(Fe,{class:"tc-empty-ico",name:"list",size:"lg"}),_("span",null,N(x(t)("tasks.emptyTodo")),1)])):(g(!0),C(Te,{key:1},st(e.todos,(s,i)=>(g(),C("div",{key:i,class:ze(["tc-row",`s-${s.status}`])},[_("span",{class:ze(["tc-glyph",`g-${s.status}`])},[s.status==="done"?(g(),pe(Fe,{key:0,name:"check",size:"md"})):s.status==="in_progress"?(g(),pe(ns,{key:1,class:"tc-spin",size:"sm"})):oe("",!0)],2),_("span",f5e,N(s.title),1)],2))),128))]))}}),h5e=ht(p5e,[["__scopeId","data-v-4e4d0054"]]),m5e=["disabled","aria-pressed"],g5e=Ze({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(g(),C("button",{key:0,class:ze(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[An(t.$slots,"default",{},void 0,!0)],10,m5e)):(g(),C("span",{key:1,class:ze(["ui-pill",{"is-active":e.active}])},[An(t.$slots,"default",{},void 0,!0)],2))}}),IN=ht(g5e,[["__scopeId","data-v-0fb1a50d"]]),v5e={class:"fc-label"},y5e=Ze({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=O(()=>n.options.find(R=>R.value===n.modelValue)),i=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=V(null),l=V(!1);let a=0,u=null;async function c(){const R=r.value?.closest(".dock-work-head");if(!R)return;const P=R.querySelector(".wp-head-tab"),M=getComputedStyle(R),D=(Number.parseFloat(M.columnGap)||0)*2,B=R.clientWidth-Number.parseFloat(M.paddingLeft)-Number.parseFloat(M.paddingRight)-D,z=P?.scrollWidth??0;if(!l.value){const L=r.value?.querySelector(".ui-seg");L&&L.offsetWidth>0&&(a=L.offsetWidth)}const A=z+a>B;if(l.value=A,!A){await xt();const L=r.value?.querySelector(".ui-seg");L&&L.offsetWidth>0&&(a=L.offsetWidth),l.value=z+a>B}}const d=V(!1),f=V(null),p=V(null),h=V({left:"0px",top:"0px"});function m(){return f.value?.$el??null}async function k(){if(d.value){w();return}d.value=!0,await xt(),v(),y(),window.addEventListener("mousedown",I,!0),window.addEventListener("keydown",T,!0),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0)}function w(R){d.value=!1,window.removeEventListener("mousedown",I,!0),window.removeEventListener("keydown",T,!0),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0),R?.refocus&&m()?.focus()}function v(){const R=m();if(!R)return;const P=R.getBoundingClientRect(),M=p.value?.offsetHeight??0,D=getComputedStyle(document.documentElement),B=Number.parseFloat(D.getPropertyValue("--space-2"))||0,z=Number.parseFloat(D.getPropertyValue("--space-1"))||0,A=p.value?.offsetWidth??0,L=Math.min(P.left,Math.max(B,window.innerWidth-A-B));P.bottom+z+M<=window.innerHeight-B?h.value={left:`${L}px`,top:`${P.bottom+z}px`}:h.value={left:`${L}px`,bottom:`${window.innerHeight-P.top+z}px`}}function y(){const R=p.value;if(!R)return;(R.querySelector(".ui-menu-item.is-active")??R.querySelector(".ui-menu-item"))?.focus()}function b(){d.value||k()}function S(R){const P=R.relatedTarget;P&&(p.value?.contains(P)||m()?.contains(P))||w()}function I(R){const P=R.target;if(P){if(p.value?.contains(P)){R.stopImmediatePropagation();return}m()?.contains(P)||w()}}function T(R){R.key==="Escape"&&(R.preventDefault(),R.stopImmediatePropagation(),w({refocus:!0}))}function $(R){if(R.key!=="ArrowDown"&&R.key!=="ArrowUp")return;R.preventDefault();const P=Array.from(p.value?.querySelectorAll(".ui-menu-item")??[]);if(P.length===0)return;const M=P.indexOf(document.activeElement),D=R.key==="ArrowDown"?(M+1)%P.length:(M-1+P.length)%P.length;P[D]?.focus()}function F(R){o("update:modelValue",R),w({refocus:!0})}return Sn(()=>{const R=r.value?.closest(".dock-work-head");!R||typeof ResizeObserver!="function"||(u=new ResizeObserver(()=>void c()),u.observe(R),c())}),Ye(l,R=>{!R&&d.value&&w()}),Ye(()=>n.options,async()=>{a=0,await xt(),await c()},{flush:"post"}),po(()=>{u?.disconnect(),d.value&&w()}),(R,P)=>(g(),C("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(g(),C(Te,{key:0},[K(IN,{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:k,onKeydown:[Do(Ct(b,["prevent"]),["down"]),Do(Ct(b,["prevent"]),["up"])],onFocusout:S},{default:ve(()=>[s.value?.icon?(g(),pe(Fe,{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):oe("",!0),_("span",null,N(s.value?.label),1),K(Fe,{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(g(),pe(Hl,{to:"body"},[d.value?(g(),C("div",{key:0,ref_key:"menuBoxRef",ref:p,class:"fc-menu",style:jt(h.value),onKeydown:$,onFocusout:S},[K(Ar,null,{default:ve(()=>[(g(!0),C(Te,null,st(e.options,M=>(g(),pe(vn,{key:M.value,role:"menuitemradio",active:M.value===e.modelValue,"aria-checked":M.value===e.modelValue,size:x(i),onClick:D=>F(M.value)},{default:ve(()=>[M.icon?(g(),pe(Fe,{key:0,name:M.icon,size:"sm","data-icon":M.icon},null,8,["name","data-icon"])):oe("",!0),_("span",v5e,N(M.label),1),M.value===e.modelValue?(g(),pe(Fe,{key:1,class:"fc-check",name:"check",size:"sm"})):oe("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):oe("",!0)]))],64)):(g(),pe(zs,{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":P[0]||(P[0]=M=>o("update:modelValue",M))},null,8,["model-value","options"]))],512))}}),vM=ht(y5e,[["__scopeId","data-v-658870b5"]]),k5e={class:"wp-head-tab"},b5e={key:0,class:"wp-head-meta"},w5e={key:0,class:"wp-head-actions"},x5e=Ze({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(g(),C(Te,null,[_("span",k5e,[K(Fe,{name:e.icon,size:"md"},null,8,["name"]),_("span",null,N(e.title),1),e.meta?(g(),C("span",b5e,N(e.meta),1)):oe("",!0)]),t.$slots.actions?(g(),C("span",w5e,[An(t.$slots,"actions",{},void 0,!0)])):oe("",!0)],64))}}),$f=ht(x5e,[["__scopeId","data-v-408c4b07"]]),Nf=Ze({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e){return(t,n)=>(g(),pe(IN,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},{default:ve(()=>[K(Fe,{name:e.icon,size:"md"},null,8,["name"]),_("span",null,[An(t.$slots,"default")]),An(t.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),_5e={class:"dock-work-head"},S5e={key:0,class:"dock-workbar"},C5e={class:"dw-running"},A5e={class:"dw-running"},M5e={class:"dw-count"},E5e=Ze({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{confirm:r,current:l}=Ka(),a=V(null),u=V(null),c=V(null),d=V(null),f=V(!1),p=V(!1),h=V("50% 100%"),m=V("active"),k=V("active"),w=O(()=>Object.values(o.sessionPlans??{}).at(-1)),v=O(()=>a.value?.anyPopupOpen??!1),y=O(()=>[{value:"active",label:i("tasks.filterRecent"),icon:"clock"},{value:"running",label:i("tasks.filterRunning"),icon:"play"},{value:"done",label:i("tasks.filterDone"),icon:"circle-check"},{value:"all",label:i("tasks.filterAll"),icon:"list"}]),b=O(()=>(o.todos?.length??0)>0&&o.todoDoneCount===(o.todos?.length??0)),S=O(()=>o.goal?i(`status.goalStatus${o.goal.status[0].toUpperCase()}${o.goal.status.slice(1)}`):""),I=O(()=>{const Q=Math.max(0,Math.round((o.goal?.wallClockMs??0)/1e3)),Y=Math.floor(Q/3600),G=Math.floor(Q%3600/60);return Y?`${Y}${i("status.timeUnitHour")} ${G}${i("status.timeUnitMinute")}`:G?`${G}${i("status.timeUnitMinute")} ${Q%60}${i("status.timeUnitSecond")}`:`${Q}${i("status.timeUnitSecond")}`}),T=O(()=>o.bashTasks.some(Q=>Q.kind==="tool")?i("tasks.dockTasks"):i("tasks.dockBash"));function $(Q,Y){if(Y==="all")return Q;if(Y==="running")return Q.filter(te=>te.state==="run");if(Y==="done")return Q.filter(te=>te.state!=="run");const G=Q.filter(te=>te.state==="run"),X=Q.filter(te=>te.state!=="run").toSorted((te,q)=>Date.parse(q.completedAt??q.createdAt??"")-Date.parse(te.completedAt??te.createdAt??"")).slice(0,5);return[...G,...X]}const F=O(()=>$(o.bashTasks,m.value)),R=O(()=>$(o.subagentTasks,k.value));function P(Q,Y){const G=Y.currentTarget,X=u.value;if(G&&X){const te=G.getBoundingClientRect(),q=X.getBoundingClientRect();h.value=`${te.left+te.width/2-q.left}px 100%`}s("toggle-dock-panel",Q)}function M(){p.value=(d.value?.scrollTop??0)>0}function D(Q){if(!o.dockPanel)return;const Y=Q.target;!Y||c.value?.contains(Y)||Y.closest(".ui-pill")||s("close-dock-panel")}function B(Q){o.dockPanel&&(Q.key!=="Escape"||Q.repeat||Q.isComposing||Q.defaultPrevented||v.value||l.value||o.overlayOpen||(Q.preventDefault(),Q.stopImmediatePropagation(),s("close-dock-panel")))}async function z(){await r({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}function A(){const Q=u.value;if(!Q)return;document.documentElement.style.setProperty("--dock-h",`${Q.offsetHeight}px`);const Y=Number.parseFloat(getComputedStyle(Q).getPropertyValue("--p-bp-sm"))||640;f.value=Q.offsetWidth{document.addEventListener("mousedown",D,!0),document.addEventListener("keydown",B,!0),typeof ResizeObserver=="function"&&u.value&&(L=new ResizeObserver(()=>{A(),M()}),L.observe(u.value),A())}),En(()=>{document.removeEventListener("mousedown",D,!0),document.removeEventListener("keydown",B,!0),L?.disconnect()}),Ye(()=>o.dockPanel,()=>{p.value=!1,xt(M)});function W(Q){return a.value?.loadForEdit(Q)??!1}function j(Q){a.value?.loadAttachmentsForEdit(Q)}function re(){a.value?.focus()}return t({loadForEdit:W,loadAttachmentsForEdit:j,focus:re,anyPopupOpen:v,isEmpty:O(()=>a.value?.isEmpty??!0)}),(Q,Y)=>(g(),C("div",{ref_key:"dockRef",ref:u,class:ze(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":v.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":f.value}]]),onClick:Y[36]||(Y[36]=Ct(()=>{},["stop"]))},[K(Cr,{name:"dock-panel"},{default:ve(()=>[e.dockPanel?(g(),C("div",{key:e.dockPanel,ref_key:"workPanelRef",ref:c,class:ze(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":p.value}]]),style:jt({transformOrigin:h.value})},[_("div",_5e,[e.dockPanel==="bash"?(g(),pe($f,{key:0,icon:"terminal",title:T.value,meta:`${e.bashRunning} ${x(i)("tasks.running")}`},{actions:ve(()=>[K(vM,{modelValue:m.value,"onUpdate:modelValue":Y[0]||(Y[0]=G=>m.value=G),options:y.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(g(),pe($f,{key:1,icon:"sparkles",title:x(i)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${x(i)("tasks.running")}`},{actions:ve(()=>[K(vM,{modelValue:k.value,"onUpdate:modelValue":Y[1]||(Y[1]=G=>k.value=G),options:y.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(g(),pe($f,{key:2,icon:b.value?"check-list":"list",title:x(i)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(g(),pe($f,{key:3,icon:"target",title:x(i)("status.goalLabel"),meta:I.value},{actions:ve(()=>[e.goal?.status==="active"?(g(),pe(Jt,{key:0,size:"sm",label:x(i)("status.goalPause"),onClick:Y[2]||(Y[2]=G=>s("controlGoal","pause"))},{default:ve(()=>[K(Fe,{name:"pause",size:"sm"})]),_:1},8,["label"])):oe("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),pe(Jt,{key:1,size:"sm",label:x(i)("status.goalResume"),onClick:Y[3]||(Y[3]=G=>s("controlGoal","resume"))},{default:ve(()=>[K(Fe,{name:"play",size:"sm"})]),_:1},8,["label"])):oe("",!0),K(Jt,{size:"sm",label:x(i)("status.goalCancel"),onClick:z},{default:ve(()=>[K(Fe,{name:"power",size:"sm"})]),_:1},8,["label"]),K(Jt,{size:"sm",label:x(i)("tasks.closePanel"),onClick:Y[4]||(Y[4]=G=>s("close-dock-panel"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"])):(g(),pe($f,{key:4,icon:"file-edit",title:x(i)("status.planLabel"),meta:w.value?.reviewState?x(i)(`tools.plan.review.${w.value.reviewState}`):""},{actions:ve(()=>[w.value?.path?(g(),pe(Jt,{key:0,size:"sm",label:x(i)("tasks.openPanel"),onClick:Y[5]||(Y[5]=G=>e.openFile?.({path:w.value.path,content:w.value.plan}))},{default:ve(()=>[K(Fe,{name:"external-link",size:"sm"})]),_:1},8,["label"])):oe("",!0),e.planArmed||e.planMode?(g(),pe(Jt,{key:1,size:"sm",label:x(i)("status.workModeDismiss"),onClick:Y[6]||(Y[6]=G=>s("togglePlan"))},{default:ve(()=>[K(Fe,{name:"power",size:"sm"})]),_:1},8,["label"])):oe("",!0),K(Jt,{size:"sm",label:x(i)("tasks.closePanel"),onClick:Y[7]||(Y[7]=G=>s("close-dock-panel"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])]),_:1},8,["title","meta"]))]),_("div",{ref_key:"workBodyRef",ref:d,class:"dock-work-body",onScroll:M},[e.dockPanel==="bash"?(g(),pe(u5e,{key:0,tasks:F.value,filter:m.value,onCancel:Y[8]||(Y[8]=G=>s("cancelTask",G)),onOpen:Y[9]||(Y[9]=G=>s("openAgent",G))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(g(),pe(YMe,{key:1,tasks:R.value,filter:k.value,onCancel:Y[10]||(Y[10]=G=>s("cancelTask",G)),onOpen:Y[11]||(Y[11]=G=>s("openAgent",G))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(g(),pe(h5e,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(g(),pe(X6e,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):(g(),pe(aMe,{key:4,plan:w.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"]))],544)],6)):oe("",!0)]),_:1}),e.hasDockWork||e.planMode||w.value?(g(),C("div",S5e,[e.goal?(g(),pe(Nf,{key:0,icon:"target",active:e.dockPanel==="goal",label:`${x(i)("status.goalLabel")} ${S.value}`,onClick:Y[12]||(Y[12]=G=>P("goal",G))},{meta:ve(()=>[_("span",{class:ze(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},N(S.value),3)]),default:ve(()=>[qe(N(x(i)("status.goalLabel"))+" ",1)]),_:1},8,["active","label"])):oe("",!0),e.planMode||w.value?(g(),pe(Nf,{key:1,icon:"file-edit",active:e.dockPanel==="plan",label:x(i)("status.planLabel"),onClick:Y[13]||(Y[13]=G=>P("plan",G))},{default:ve(()=>[qe(N(x(i)("status.planLabel")),1)]),_:1},8,["active","label"])):oe("",!0),e.bashTasks.length?(g(),pe(Nf,{key:2,icon:"terminal",active:e.dockPanel==="bash",label:T.value,onClick:Y[14]||(Y[14]=G=>P("bash",G))},Ap({default:ve(()=>[qe(N(T.value)+" ",1)]),_:2},[e.bashRunning?{name:"meta",fn:ve(()=>[_("span",C5e,[K(j1,{status:"run"}),qe(N(e.bashRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):oe("",!0),e.subagentTasks.length?(g(),pe(Nf,{key:3,icon:"sparkles",active:e.dockPanel==="subagent",label:x(i)("tasks.dockSubagent"),onClick:Y[15]||(Y[15]=G=>P("subagent",G))},Ap({default:ve(()=>[qe(N(x(i)("tasks.dockSubagent"))+" ",1)]),_:2},[e.subagentRunning?{name:"meta",fn:ve(()=>[_("span",A5e,[K(j1,{status:"run"}),qe(N(e.subagentRunning),1)])]),key:"0"}:void 0]),1032,["active","label"])):oe("",!0),e.todos?.length?(g(),pe(Nf,{key:4,icon:b.value?"check-list":"list",active:e.dockPanel==="todos",label:x(i)("tasks.todoProgressTitle"),onClick:Y[16]||(Y[16]=G=>P("todos",G))},{meta:ve(()=>[_("span",M5e,N(e.todoDoneCount)+"/"+N(e.todos?.length),1)]),default:ve(()=>[qe(N(x(i)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","active","label"])):oe("",!0)])):oe("",!0),e.pendingQuestion?(g(),pe(OMe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:Y[17]||(Y[17]=(G,X)=>s("answer",G,X)),onDismiss:Y[18]||(Y[18]=G=>s("dismiss",G))},null,8,["question","busy-kind"])):e.pendingApproval?(g(),pe(K6e,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:Y[19]||(Y[19]=G=>s("approval",e.pendingApproval.approvalId,G))},null,8,["block","agent-name","busy"])):(g(),pe(TN,{key:3,ref_key:"composerRef",ref:a,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:Y[20]||(Y[20]=G=>s("submit",G)),onSteer:Y[21]||(Y[21]=G=>s("steer",G)),onCommand:Y[22]||(Y[22]=G=>s("command",G)),onInterrupt:Y[23]||(Y[23]=G=>s("interrupt")),onSetPermission:Y[24]||(Y[24]=G=>s("setPermission",G)),onSetThinking:Y[25]||(Y[25]=G=>s("setThinking",G)),onTogglePlan:Y[26]||(Y[26]=G=>s("togglePlan")),onToggleWorkflow:Y[27]||(Y[27]=G=>s("toggleWorkflow")),onToggleGoal:Y[28]||(Y[28]=G=>s("toggleGoal")),onOpenBtw:Y[29]||(Y[29]=G=>s("openBtw")),onCreateGoal:Y[30]||(Y[30]=G=>s("createGoal",G)),onControlGoal:Y[31]||(Y[31]=G=>s("controlGoal",G)),onFocusGoal:Y[32]||(Y[32]=G=>s("focusGoal")),onCompact:Y[33]||(Y[33]=G=>s("compact")),onPickModel:Y[34]||(Y[34]=G=>s("pickModel")),onSelectModel:Y[35]||(Y[35]=G=>s("selectModel",G))},null,8,["session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills"]))],2))}}),T5e=ht(E5e,[["__scopeId","data-v-6b44ef59"]]),I5e=["aria-label","aria-hidden"],$5e={class:"toc-scroll"},N5e=["onClick"],L5e={class:"toc-label"},F5e=240,O5e=Ze({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null),r=V(!0);let l=null;function a(){const c=i.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,p=d.getBoundingClientRect().right;r.value=p-f>=F5e}const u=O(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Ye(u,c=>{l?.disconnect(),l=null,c&&xt(()=>{const d=i.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),po(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(g(),C("nav",{key:0,ref_key:"navRef",ref:i,class:ze(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":x(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[_("div",$5e,[(g(!0),C(Te,null,st(e.items,f=>(g(),C("button",{key:f.id,type:"button",class:ze(["toc-row",{active:e.activeTurnId===f.id}]),onClick:p=>o("select",f.id)},[d[0]||(d[0]=_("span",{class:"toc-bar"},null,-1)),_("span",L5e,N(f.title),1)],10,N5e))),128))])],10,I5e)):oe("",!0)}}),R5e=ht(O5e,[["__scopeId","data-v-f846d889"]]),yM="script, style, noscript, template, [inert], .top-sentinel",$N="pythinker-transcript-search",S2="pythinker-transcript-search-current",P5e=1e3;function D5e(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function B5e(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,l)=>l)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let r=0;rkM(u.text)),o=[];let s="";for(let u=0;u0&&e[u].gapBefore&&(s+="\0"),o[u]=s.length,s+=n[u].folded;const i=W5e(kM(t).folded);if(i===null)return;const r=new RegExp(i,"g");function l(u){let c=0,d=o.length-1,f=0;for(;c<=d;){const p=c+d>>1;o[p]<=u?(f=p,c=p+1):d=p-1}return f}let a;for(;;){const u=r.exec(s);if(u===null)return;const c=u.index,d=c+u[0].length-1,f=l(c),p=l(d),h=n[f].map[c-o[f]],m=n[p].map[d-o[p]],k={startSegment:f,startOffset:h.start,endSegment:p,endOffset:m.start+m.length};(a?.startSegment!==k.startSegment||a.startOffset!==k.startOffset||a.endSegment!==k.endSegment||a.endOffset!==k.endOffset)&&(a=k,yield k)}}const j5e=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),U5e=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function V5e(e,t){const n=t.get(e);if(n!==void 0)return n;const o=j5e.has(e.tagName)||!U5e.has(getComputedStyle(e).display);return t.set(e,o),o}function q5e(e,t,n){let o=e.parentElement;for(;o!==null&&o!==t&&!V5e(o,n);)o=o.parentElement;return o??t}function K5e(e){const t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,o=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(a){if(a.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;const u=a;return u.matches(yM)?n.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(yM)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),s=new WeakMap,i=new WeakMap,r=[];let l=!1;for(let a=o.nextNode();a!==null;a=o.nextNode()){if(a.nodeType===Node.ELEMENT_NODE){l=!0;continue}const u=a.nodeValue??"";if(u.length===0)continue;const c=a.parentElement;if(c===null)continue;let d=i.get(c);d===void 0&&(d=D5e(getComputedStyle(c).whiteSpace),i.set(c,d));let{text:f,map:p}=B5e(u,d);if(f.length===0)continue;const h=q5e(a,e,s),m=r.at(-1),k=l||m===void 0||m.block!==h;!k&&m.text.endsWith(" ")&&f.startsWith(" ")&&(f=f.slice(1),p=p.slice(1),f.length===0)||(r.push({text:f,gapBefore:k,node:a,block:h,whitespaceMap:p}),l=!1)}return r}function G5e(e,t){if(t.length===0)return[];const n=K5e(e),o=[];for(const s of H5e(n,t)){const i=n[s.startSegment],r=n[s.endSegment],l=e.ownerDocument.createRange();l.setStart(i.node,i.whitespaceMap[s.startOffset]),l.setEnd(r.node,r.whitespaceMap[s.endOffset-1]+1),o.push(l)}return o}function Z5e(e,t,n=o=>o.getClientRects().length!==0){const o=[];for(const s of G5e(e,t))if(n(s)){if(o.length>=P5e)return{ranges:o,truncated:!0};o.push(s)}return{ranges:o,truncated:!1}}function NN(){return globalThis.CSS?.highlights??null}function bM(e,t){const n=NN(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){wg();return}const s=new o;for(const r of e)s.add(r);n.set($N,s);const i=e[t];if(i){const r=new o;r.add(i),n.set(S2,r)}else n.delete(S2)}function wg(){const e=NN();e?.delete($N),e?.delete(S2)}const Y5e={class:"tsearch-main"},J5e=["placeholder"],X5e=["inert"],Q5e={class:"tsearch-foot"},eEe={class:"tsearch-count","aria-live":"polite"},tEe={class:"tsearch-rings"},nEe=Ze({__name:"TranscriptSearch",props:{pane:{},mobile:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=Zm("input"),r=Co(""),l=Co(!1),a=Co([]),u=Co(0),c=Co(!1),d=Co(!1),f=Co([]),p=O(()=>a.value.length),h=O(()=>r.value.trim()!==""),m=O(()=>{if(l.value)return s("conversation.search.searching");if(!h.value)return"";if(p.value===0)return s("conversation.search.noResults");const W={current:u.value+1,total:p.value};return c.value?s("conversation.search.resultsCapped",W):s("conversation.search.results",W)});let k=null,w=null,v=null,y=null,b=null;function S(){return n.pane.querySelector(".chat")}function I(){const W=a.value[u.value];if(!W){f.value=[];return}const j=n.pane.getBoundingClientRect();f.value=Array.from(W.getClientRects(),re=>({top:`${re.top-j.top+n.pane.scrollTop}px`,left:`${re.left-j.left}px`,width:`${re.width}px`,height:`${re.height}px`}))}function T(){f.value.length!==0&&(v!==null&&clearTimeout(v),v=setTimeout(()=>{v=null,I()},120))}function $(W){const j=n.pane.getBoundingClientRect().top,re=W.findIndex(Q=>{const Y=Q.getClientRects(),G=Y[Y.length-1];return G!==void 0&&G.bottom>=j});return re===-1?0:re}function F(){const W=a.value[u.value];bM(a.value,u.value),(W?.startContainer instanceof Element?W.startContainer:W?.startContainer.parentElement)?.scrollIntoView({block:"center"}),I()}function R(W="first"){k!==null&&(clearTimeout(k),k=null),l.value=!1;const j=S(),re=r.value.trim();if(!j||re===""){a.value=[],c.value=!1,u.value=0,wg(),I();return}const Q=a.value[u.value],Y=Q?.startContainer,G=Q?.startOffset,X=Z5e(j,re);if(a.value=X.ranges,c.value=X.truncated,X.ranges.length===0){u.value=0,wg(),I();return}if(W!==!1){const q=$(X.ranges);u.value=W==="backward"?(q-1+X.ranges.length)%X.ranges.length:q,F();return}const te=X.ranges.findIndex(q=>q.startContainer===Y&&q.startOffset===G);u.value=te>=0?te:$(X.ranges),bM(X.ranges,u.value),I()}function P(){if(k!==null&&clearTimeout(k),r.value.trim()===""){l.value=!1,R();return}l.value=!0,k=setTimeout(()=>R(),150)}function M(W){p.value!==0&&(u.value=(u.value+W+p.value)%p.value,F())}function D(W){if(!(W.key!=="Enter"||d.value||W.isComposing)){if(W.preventDefault(),k!==null){R(W.shiftKey?"backward":"first");return}M(W.shiftKey?-1:1)}}function B(W){W.key!=="Escape"||d.value||W.isComposing||(W.preventDefault(),W.stopPropagation(),o("close"))}function z(W){return W instanceof Element&&(W.classList.contains("tsearch-rings")||W.closest(".tsearch-rings")!==null)}function A(W){if(W.type==="attributes"&&W.target===n.pane||z(W.target))return!0;if(W.type!=="childList")return!1;const j=[...W.addedNodes,...W.removedNodes];return j.length>0&&j.every(z)}function L(W){r.value.trim()===""||W.every(A)||k!==null||(w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,k===null&&R(!1)},150))}return Sn(()=>{if(xt(()=>i.value?.focus()),typeof MutationObserver=="function"&&(y=new MutationObserver(L),y.observe(n.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),n.pane.addEventListener("scroll",T,{passive:!0}),window.addEventListener("resize",T,{passive:!0}),typeof ResizeObserver=="function"){b=new ResizeObserver(I),b.observe(n.pane);const W=n.pane.querySelector(".content-wrap");W&&b.observe(W)}}),En(()=>{k!==null&&clearTimeout(k),w!==null&&clearTimeout(w),v!==null&&clearTimeout(v),y?.disconnect(),b?.disconnect(),n.pane.removeEventListener("scroll",T),window.removeEventListener("resize",T),wg()}),(W,j)=>(g(),C("div",{class:ze(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:B},[_("div",Y5e,[K(Fe,{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Bn(_("input",{ref:"input","onUpdate:modelValue":j[0]||(j[0]=re=>r.value=re),type:"text",class:"tsearch-input",placeholder:x(s)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:P,onKeydown:D,onCompositionstart:j[1]||(j[1]=re=>d.value=!0),onCompositionend:j[2]||(j[2]=re=>d.value=!1)},null,40,J5e),[[vs,r.value]]),l.value?(g(),pe(ns,{key:0,class:"tsearch-spin",size:"sm",label:x(s)("conversation.search.searching")},null,8,["label"])):oe("",!0),j[6]||(j[6]=_("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),K(Jt,{class:"tsearch-close",size:"sm",label:x(s)("conversation.search.close"),onClick:j[3]||(j[3]=re=>o("close"))},{default:ve(()=>[K(Fe,{name:"close"})]),_:1},8,["label"])]),_("div",{class:ze(["tsearch-foot-wrap",{open:h.value}]),inert:!h.value},[_("div",Q5e,[K(Jt,{size:"sm",label:x(s)("conversation.search.previous"),disabled:p.value===0,onClick:j[4]||(j[4]=re=>M(-1))},{default:ve(()=>[K(Fe,{name:"arrow-up"})]),_:1},8,["label","disabled"]),K(Jt,{size:"sm",label:x(s)("conversation.search.next"),disabled:p.value===0,onClick:j[5]||(j[5]=re=>M(1))},{default:ve(()=>[K(Fe,{name:"arrow-down"})]),_:1},8,["label","disabled"]),_("span",eEe,N(m.value),1)])],10,X5e),(g(),pe(Hl,{to:e.pane},[_("div",tEe,[(g(!0),C(Te,null,st(f.value,(re,Q)=>(g(),C("div",{key:Q,class:"tsearch-ring",style:jt(re)},null,4))),128))])],8,["to"]))],34))}}),oEe=ht(nEe,[["__scopeId","data-v-d7187e08"]]),sEe=5;function iEe(e,t,n,o=sEe){if(n||e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(r=>r.id===t);i&&(s[o-1]=i)}return s}const rEe={key:0,class:"recent"},lEe={class:"recent-caption"},aEe=["onClick"],uEe={class:"recent-title"},cEe={class:"recent-time"},dEe={class:"recent-foot"},fEe=Ze({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["select","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>e.sessions.length?(g(),C("section",rEe,[_("h2",lEe,N(x(o)("sessions.recentSessions")),1),(g(!0),C(Te,null,st(e.sessions,r=>(g(),C("button",{key:r.id,type:"button",class:"recent-row",onClick:l=>n("select",r.id)},[_("span",{class:ze(["recent-ico",r.archived?"recent-ico--done":"recent-ico--open"])},[K(Fe,{name:r.archived?"circle-check":"circle-dashed",size:"sm"},null,8,["name"])],2),_("span",uEe,N(r.title),1),_("span",cEe,N(r.time),1)],8,aEe))),128)),_("div",dEe,[K(Mn,{text:x(o)("conversation.sessionAdminTooltip")},{default:ve(()=>[_("button",{type:"button",class:"recent-more",onClick:i[0]||(i[0]=r=>n("openSessionAdmin"))},[qe(N(x(o)("conversation.viewMoreSessions"))+" ",1),K(Fe,{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])])):oe("",!0)}}),pEe=ht(fEe,[["__scopeId","data-v-cd5a729d"]]),hEe={class:"empty-hint"},mEe={key:0,class:"empty-hint-text"},gEe={key:1,class:"ws-pick"},vEe={class:"ws-pick-name"},yEe={key:1,class:"ws-pick-menu"},kEe=["onClick"],bEe={class:"ws-pick-item-name"},wEe={class:"ws-pick-item-path"},xEe=["aria-label"],_Ee={key:0,class:"abort-toast",role:"status","aria-live":"polite"},SEe={class:"abort-toast-text"},CEe=48,$k=80,wM=1e3,AEe=420,MEe=3e3,EEe=Ze({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","setPermission","setThinking","togglePlan","toggleWorkflow","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","openFile","openMedia","openCompaction","openAgent","openToolDiff","openTurnDiff","openChanges","refreshGitStatus","editMessage","continueTurn","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","restoreSession","selectSession","exportSession","togglePin","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),s=e,i=n,r=V(!1),l=V(!1),a=O(()=>s.workspaces?.find(Ie=>Ie.id===s.activeWorkspaceId)?.name??s.workspaceName??""),u=O(()=>(s.workspaces?.length??0)>0),c=O(()=>iEe(s.workspaces??[],s.activeWorkspaceId,l.value)),d=O(()=>(s.workspaces?.length??0)-c.value.length);Ye(r,Me=>{Me||(l.value=!1)});function f(Me){r.value=!1,Me!==s.activeWorkspaceId&&i("selectWorkspace",Me)}Hu(rn.contentAlign);const p=V(null),h=V(null),m=V(null),k=V(!1);let w=null;function v(Me,Ie){const Ve=m.value??h.value;return!Ve||Ve.loadForEdit(Me)===!1?!1:(Ve.loadAttachmentsForEdit(Ie??[]),!0)}function y(){k.value=!0,w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,k.value=!1},2e3)}function b(){s.goal&&(M.value="goal")}const S=O(()=>s.tasks.filter(Me=>Me.kind==="bash"||Me.kind==="tool"&&!Me.id.startsWith("question-"))),I=O(()=>s.tasks.filter(Me=>Me.kind==="subagent"&&Me.runInBackground)),T=O(()=>S.value.filter(Me=>Me.state==="run").length),$=O(()=>I.value.filter(Me=>Me.state==="run").length);function F(Me){const Ie=s.tasks,Ve=Ie.find(gn=>gn.id===Me)??Ie.find(gn=>gn.parentToolCallId===Me);if(Ve)return Ve.id;const an=Ie.filter(gn=>gn.kind==="subagent"&&!gn.parentToolCallId);if(an.length===1)return an[0].id}Vn("resolveAgentTaskId",F),Vn("resolvePlan",Me=>s.sessionPlans?.[Me]),Vn("pinScroll",Xt);const R=O(()=>(s.todos??[]).filter(Me=>Me.status==="done").length),P=O(()=>s.goal!==null&&s.goal!==void 0||S.value.length>0||I.value.length>0||(s.todos?.length??0)>0),M=V(null),D=O(()=>s.gitInfo?s.changes?.length??0:0);function B(Me){M.value=M.value===Me?null:Me}function z(){M.value=null}Ye([M,()=>s.goal,S,I,()=>s.todos,()=>s.planMode,()=>s.sessionPlans],()=>{(M.value==="goal"&&!s.goal||M.value==="bash"&&S.value.length===0||M.value==="subagent"&&I.value.length===0||M.value==="todos"&&(s.todos?.length??0)===0||M.value==="plan"&&!s.planMode&&Object.keys(s.sessionPlans??{}).length===0)&&z()});function A(Me){if(Me.role==="compaction")return o("conversation.compactedPlain");if(Me.role==="user"){if(Me.skillActivation)return`/${Me.skillActivation.name}`;if(Me.pluginCommand)return`/${Me.pluginCommand.pluginId}:${Me.pluginCommand.commandName}`;const Ve=Me.text.trim().replaceAll(/\s+/g," ");return Ve.length>0?Ve:"user"}const Ie=(Me.text||Me.thinking||"").trim().replaceAll(/\s+/g," ");return Ie.length>0?Ie:(Me.tools?.length??0)>0?`${Me.tools.length} tools`:"pythinker"}const L=O(()=>s.turns.filter(Me=>Me.role==="user").map((Me,Ie)=>({id:Me.id,role:Me.role,no:Ie+1,title:A(Me)}))),W=V(null);function j(){const Me=xe.value;if(!Me)return;const Ie=Me.querySelectorAll(".turn-anchor[data-turn-id]");if(Ie.length===0)return;const Ve=L.value;if(Ve.length===0)return;const an=new Set(Ve.map(ue=>ue.id));if(_e()<=$k){W.value=Ve[Ve.length-1].id;return}const gn=Me.getBoundingClientRect(),Ln=gn.height/2;let xn=null;Ie.forEach(ue=>{const Ce=ue.dataset.turnId;if(!Ce||!an.has(Ce))return;ue.getBoundingClientRect().top-gn.top<=Ln&&(xn=Ce)}),W.value=xn??Ve[0].id}const re=V(!1);let Q=0;function Y(){Q||(Q=rt(()=>{Q=0,G()}))}function G(){const Me=xe.value,Ie=!s.mobile&&s.conversationToc&&Me?Me.closest(".con")?.querySelector(".conversation-toc"):null,Ve=Ie?.querySelector(".toc-bar");let an=!1;if(Me&&Ie&&Ve){const gn=Ve.getBoundingClientRect(),Ln=Ie.getBoundingClientRect(),xn=gn.left+gn.width/2;an=Array.from(Me.querySelectorAll(".table-node-wrapper")).some(ue=>{const Ce=ue.getBoundingClientRect();return Ce.left<=xn&&xn<=Ce.right&&Ce.topLn.top})}re.value!==an&&(re.value=an)}const X=O(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),te=O(()=>{const Me=X.value;if(Me)return s.pendingQuestionActions?.[Me.questionId]}),q=O(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),me=O(()=>{const Me=q.value;return Me?!!s.pendingApprovalActions?.[Me.approvalId]:!1}),xe=V(null),We=V(!1),he=V(null),ee=V(0),ne=V(0),H=O(()=>({"--panes-scrollbar-width":`${ee.value}px`})),Z=O(()=>({"--chat-dock-height":`${ne.value+CEe}px`}));function ye(Me){return Me instanceof HTMLElement?Me:Me&&"$el"in Me&&Me.$el instanceof HTMLElement?Me.$el:null}function fe(){const Me=xe.value;ee.value=Me?Math.max(0,Me.offsetWidth-Me.clientWidth):0,ne.value=he.value?.offsetHeight??0}function de(Me){const Ie=ye(Me);xe.value=Ie,Ie&&Po()}function J(Me){const Ie=ye(Me);he.value=Ie??null,Me&&"loadForEdit"in Me&&typeof Me.loadForEdit=="function"&&"focus"in Me&&typeof Me.focus=="function"?m.value={loadForEdit:Me.loadForEdit.bind(Me),loadAttachmentsForEdit:"loadAttachmentsForEdit"in Me&&typeof Me.loadAttachmentsForEdit=="function"?Me.loadAttachmentsForEdit.bind(Me):()=>{},focus:Me.focus.bind(Me)}:m.value=null,cs()}const ae=V(!0),be=V(!1);function _e(){const Me=xe.value;return Me?Me.scrollHeight-Me.scrollTop-Me.clientHeight:0}let ce=0,Se=0,ie=0,we=0,Re=0,at=0;function ft(){return Date.now()1?(ae.value=!1,be.value=!0):Ve<=$k&&Ie>ce+1&&(ae.value=!0,be.value=!1),ce=Ie,j()}function Tt(Me=!1){const Ie=xe.value;ae.value=!0,be.value=!1,Ie&&(!Me&&performance.now()({node:Ln,top:tn(Me,Ln)})),an=Ve.findIndex(Ln=>Ln.top>=Ie),gn=an<0?Math.max(0,Ve.length-1):an;return Ve.slice(gn,gn+2).flatMap(Ln=>{const xn=Ln.node.dataset.scrollAnchorId,ue=xn??Ln.node.dataset.turnId;return ue?[{kind:xn?"tool":"turn",id:ue,top:Ln.top}]:[]})}const Qe=new Map;function nt(Me,Ie){for(const Ve of Ie.anchors){const an=Ve.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",gn=Me.querySelector(`[${an}="${Oe(Ve.id)}"]`);if(gn)return tn(Me,gn)-Ve.top}return Me.scrollHeight-Ie.oldHeight}function ut(Me,Ie,Ve=Me.scrollTop){return Me.scrollTop=Ve+nt(Me,Ie),ce=Me.scrollTop,Me.scrollTop}async function Pt(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Vs.value||!s.hasMoreMessages)return;const Me=s.sessionId,Ie=xe.value,Ve=Ie?.scrollTop??0,an={anchors:Ie?Kt(Ie,Ve):[],oldHeight:Ie?.scrollHeight??0};li(Me,!0),ai();try{if(await xt(),await s.loadOlderMessages(Me),await xt(),s.sessionId!==Me){Qe.set(Me,an);return}const gn=xe.value;if(!gn)return;ut(gn,an),Qe.delete(Me)}finally{li(Me,!1)}}function Oe(Me){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(Me):Me.replaceAll(/["\\]/g,"\\$&")}function Je(Me){const Ie=xe.value;if(!Ie)return;const Ve=Ie.querySelector(`.turn-anchor[data-turn-id="${Oe(Me)}"]`);Ve&&(ui(),ae.value=!1,be.value=_e()>$k,Ve.scrollIntoView({behavior:"smooth",block:"center"}))}function it(){const Me=xe.value;if(!Me)return"none";const Ie=Me.firstElementChild,Ve=Ie instanceof HTMLElement?Ie.offsetHeight:0,an=he.value?.offsetHeight??0;return`${Me.scrollHeight}:${Me.clientHeight}:${Ve}:${an}`}function rt(Me){return typeof requestAnimationFrame=="function"?requestAnimationFrame(Me):setTimeout(Me,16)}function vt(Me){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(Me):clearTimeout(Me)}let Nt=0,on=0,mn=null,Zt=0;function jn(){return performance.now(){if(on=0,performance.now()>=Nt||!mn){mn=null;return}const gn=mn.getBoundingClientRect().top-Zt;gn&&(Ve.scrollTop+=gn),on=rt(an)};on=rt(an)}function xo(Me=36){if(!ae.value&&!ft())return;const Ie=++at;let Ve="",an=0,gn=0;Re&&(vt(Re),Re=0);const Ln=()=>{if(Re=0,Ie!==at||!ae.value&&!ft())return;Tt(!1);const xn=it();an=xn===Ve?an+1:0,Ve=xn,gn++,an<3&&gn0&&Ie.length>=Me.length&&Me.firstId!==Ie.firstId&&Me.lastId===Ie.lastId&&Me.lastTextLen===Ie.lastTextLen&&Me.lastThinkingLen===Ie.lastThinkingLen&&Me.lastToolsLen===Ie.lastToolsLen&&Me.approvalIds===Ie.approvalIds}const vo=O(()=>{const Me=(s.approvals??[]).map(Ln=>Ln.approvalId).join(","),Ie=s.turns,Ve=Ie.at(-1),an=Ve?.thinking?.length??0,gn=Ve?.tools?.reduce((Ln,xn)=>Ln+xn.name.length+(xn.arg?.length??0)+(xn.output?.join("").length??0),0)??0;return{length:Ie.length,firstId:Ie[0]?.id??"",lastId:Ve?.id??"",lastTextLen:Ve?.text.length??0,lastThinkingLen:an,lastToolsLen:gn,approvalIds:Me}});Ye(vo,async(Me,Ie)=>{if(Vs.value&&Wo(Ie,Me)){j();return}await xt(),ae.value||ft()?Tt(Me.length{cs()}),Ye(()=>s.mobile,async()=>{await xt(),fe()});const Un=new Map;Ye(()=>s.fileReloadKey,async(Me,Ie)=>{const Ve=xe.value;Ie&&Ve&&Un.set(String(Ie),{top:Ve.scrollTop,following:ae.value}),ui(),await xt();const an=xe.value,gn=Me?Un.get(String(Me)):void 0;if(gn&&an){const Ln=Qe.get(String(Me)),xn=Ln?ut(an,Ln,gn.top):gn.top;Ln&&Qe.delete(String(Me)),ae.value=gn.following,an.scrollTop=xn,ce=an.scrollTop,be.value=!gn.following&&_e()>1,gn.following&&xo()}else ae.value=!0,ce=0,Tt(!1),xo();j()}),Ye(()=>s.sessionLoading,async(Me,Ie)=>{Me||!Ie||(ae.value=!0,await xt(),xo(),j())}),Ye(()=>s.turnActive,async(Me,Ie)=>{Me||!Ie||!ae.value&&!ft()||(await xt(),xo(48),j())});function $s(){ae.value=!0,be.value=!1,Se=Date.now()+wM,xt(()=>{Tt(!0),xo(16)})}function ot(Me){$s(),i("submit",Me)}function Ae(Me){ae.value=!0,be.value=!1,Se=Date.now()+wM,i("editMessage",Me)}function wt(Me){const Ie=s.queued?.[Me],Ve=Ie?.text??"";v(Ve,Ie?.attachments)&&i("editQueued",Me)}function Lt(Me){i("reorderQueue",Me)}function Qt(Me,Ie){$s(),i("answer",Me,Ie)}function _o(Me,Ie){!Me||!Ie||i("approval",Me,Ie)}let Zn=null,Xn=null,io=null,ro=null,ys=0,Ti=0,Ns=0;const Us=V(new Set),Vs=O(()=>!!s.sessionId&&Us.value.has(s.sessionId));function li(Me,Ie){const Ve=new Set(Us.value);Ie?Ve.add(Me):Ve.delete(Me),Us.value=Ve}function ss(){Vs.value||Ns||(Ns=rt(()=>{Ns=0,!Vs.value&&(jn()||(ae.value||ft())&&Tt(!1))}))}function ai(){at++,Re&&(vt(Re),Re=0),Ns&&(vt(Ns),Ns=0)}function ui(){const Me=xe.value;if(Se=0,ai(),Nt=0,mn=null,Me){const Ie=Me.scrollTop;typeof Me.scrollTo=="function"?Me.scrollTo({top:Ie,behavior:"auto"}):Me.scrollTop=Ie}we=0,ie=Number.NEGATIVE_INFINITY,Me&&(ce=Me.scrollTop)}function Cn(){const Me=xe.value;!Me||Me.scrollHeight-Me.clientHeight<=1&&!s.hasMoreMessages||(ae.value=!1,ui(),Me.scrollHeight-Me.clientHeight>1&&(be.value=!0))}function Ls(Me){const Ie=xe.value;if(!Ie)return!1;for(const Ve of Me.composedPath()){if(Ve===Ie)return!1;if(Ve instanceof HTMLElement&&Ve.scrollHeight>Ve.clientHeight+1&&Ve.scrollTop>1)return!0}return!1}function Fn(Me){Me.defaultPrevented||Me.ctrlKey||Me.shiftKey||Me.deltaY>=0||Ls(Me)||Cn()}function Io(Me){const Ie=xe.value;if(!Ie||Me.defaultPrevented||Me.button!==0||Me.pointerType==="touch")return;const Ve=Ie.getBoundingClientRect(),an=Ie.offsetWidth-Ie.clientWidth,gn=an>0?an:12;Me.target===Ie&&Me.clientX>=Ve.right-gn&&Cn()}let Ho=null;function Fs(Me){Ho=Me.touches.length===1?Me.touches[0].clientY:null}function qs(Me){const Ie=Me.touches.length===1?Me.touches[0].clientY:null;Ie!==null&&Ho!==null&&Ie>Ho+2&&!Ls(Me)&&Cn(),Ho=Ie}function Ii(){if(!Xn)return;const Me=xe.value?.firstElementChild??null;Me!==io&&(io&&Xn.unobserve(io),io=Me,Me&&Xn.observe(Me))}function cs(){if(!Xn)return;const Me=he.value;Me!==ro&&(ro&&Xn.unobserve(ro),ro=Me,Me&&Xn.observe(Me))}function Po(){const Me=xe.value;fe(),Zn&&(Zn.disconnect(),Me&&Zn.observe(Me,{childList:!0,subtree:!0,characterData:!0})),Xn&&(Xn.disconnect(),io=null,ro=null,Me&&Xn.observe(Me),Ii(),cs()),ys=Me?.scrollHeight??0,Ti=Me?.clientHeight??0,Y()}function ln(){Ii(),ss(),Y()}function Os(){typeof document>"u"||document.visibilityState==="visible"&&ae.value&&xo()}const ds=V(!1);let jo=null;function Ks(){ds.value=!0,jo!==null&&clearTimeout(jo),jo=setTimeout(()=>{ds.value=!1},MEe)}function $i(){Ks(),i("interrupt")}function ks(Me){if((Me.metaKey||Me.ctrlKey)&&Me.key.toLowerCase()==="f"){if(s.overlayOpen)return;Me.preventDefault(),We.value=!0,xt(()=>{xe.value?.closest(".con")?.querySelector(".tsearch-input")?.focus()});return}Me.key==="Escape"&&(s.running||s.working)&&(Me.preventDefault(),$i())}function Nn(){We.value=!1,xt(()=>xe.value?.focus({preventScroll:!0}))}function $o(){ae.value&&ss()}Sn(()=>{xt(()=>{typeof MutationObserver=="function"&&(Zn=new MutationObserver(ln)),typeof ResizeObserver=="function"&&(Xn=new ResizeObserver(()=>{Y(),fe();const Me=xe.value;if(!Me)return;const{scrollHeight:Ie,clientHeight:Ve}=Me,an=Ie>ys+1,gn=Ve{Zn&&Zn.disconnect(),Xn&&Xn.disconnect(),Ns&&vt(Ns),Re&&vt(Re),on&&vt(on),Q&&vt(Q),jo!==null&&clearTimeout(jo),w!==null&&(clearTimeout(w),w=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Os),document.removeEventListener("keydown",ks)),window.visualViewport?.removeEventListener("resize",$o)});function Lr(){(m.value??h.value)?.focus()}return t({loadComposerForEdit:v,focusComposer:Lr}),(Me,Ie)=>(g(),C("section",{class:ze(["con",{mobile:e.mobile}])},[We.value&&xe.value?(g(),pe(oEe,{key:0,pane:xe.value,mobile:e.mobile,onClose:Nn},null,8,["pane","mobile"])):oe("",!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(g(),pe(bwe,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":D.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,"session-done":e.sessionDone,pinned:e.pinned,onOpenChanges:Ie[0]||(Ie[0]=Ve=>i("openChanges")),onCopyAll:Ie[1]||(Ie[1]=Ve=>p.value?.copyConversation()),onCopyFinalSummary:Ie[2]||(Ie[2]=Ve=>p.value?.copyFinalSummary()),onOpenPr:Ie[3]||(Ie[3]=Ve=>e.pr&&i("openPr",e.pr.url)),onRenameSession:Ie[4]||(Ie[4]=(Ve,an)=>i("renameSession",Ve,an)),onForkSession:Ie[5]||(Ie[5]=Ve=>i("forkSession",Ve)),onTogglePin:Ie[6]||(Ie[6]=Ve=>i("togglePin",Ve)),onArchiveSession:Ie[7]||(Ie[7]=Ve=>i("archiveSession",Ve)),onRestoreSession:Ie[8]||(Ie[8]=Ve=>i("restoreSession",Ve)),onExportSession:Ie[9]||(Ie[9]=Ve=>i("exportSession",Ve))},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","session-done","pinned"])):oe("",!0),e.conversationToc?(g(),pe(R5e,{key:2,items:L.value,"active-turn-id":W.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:re.value,onSelect:Je},null,8,["items","active-turn-id","mobile","session-loading","occluded"])):oe("",!0),_("div",{class:"chat-layout",style:jt(Z.value)},[_("div",{ref:de,class:ze(["panes chat-scroll",{"is-following":ae.value,"history-prepending":Vs.value}]),tabindex:"-1",onScrollPassive:Mt,onWheelPassive:Fn,onPointerdownPassive:Io,onTouchstartPassive:Fs,onTouchmovePassive:qs},[_("div",{class:ze(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(g(),C(Te,{key:0},[Ie[60]||(Ie[60]=_("div",{class:"empty-spacer"},null,-1)),_("div",hEe,[_("span",{class:ze(["empty-hint-title",{"is-starting":e.starting}])},[e.starting?(g(),pe(ns,{key:0,size:"sm"})):(g(),pe(lw,{key:1,size:"md",label:"","aria-hidden":"true"})),_("span",null,N(e.starting?x(o)("conversation.starting"):x(o)("composer.emptyConversationTitle")),1)],2),e.starting?oe("",!0):(g(),C("span",mEe,N(x(o)("composer.emptyConversation")),1)),u.value&&!e.starting?(g(),C("div",gEe,[K(Mn,{text:x(o)("conversation.switchWorkspace")},{default:ve(()=>[_("button",{type:"button",class:"ws-pick-btn",onClick:Ie[10]||(Ie[10]=Ct(Ve=>r.value=!r.value,["stop"]))},[K(Fe,{name:"folder",size:"sm"}),_("span",vEe,N(a.value),1),K(Fe,{class:ze(["ws-pick-chev",{open:r.value}]),name:"chevron-down",size:"sm"},null,8,["class"])])]),_:1},8,["text"]),r.value?(g(),C("div",{key:0,class:"ws-pick-backdrop",onClick:Ie[11]||(Ie[11]=Ve=>r.value=!1)})):oe("",!0),r.value?(g(),C("div",yEe,[(g(!0),C(Te,null,st(c.value,Ve=>(g(),C("button",{key:Ve.id,type:"button",class:ze(["ws-pick-item",{on:Ve.id===e.activeWorkspaceId}]),onClick:Ct(an=>f(Ve.id),["stop"])},[_("span",bEe,N(Ve.name),1),_("span",wEe,N(Ve.shortPath),1)],10,kEe))),128)),d.value>0?(g(),C("button",{key:0,type:"button",class:"ws-pick-item ws-pick-more",onClick:Ie[12]||(Ie[12]=Ct(Ve=>l.value=!l.value,["stop"]))},[_("span",null,N(x(o)("conversation.moreWorkspaces",{count:d.value})),1)])):oe("",!0),Ie[59]||(Ie[59]=_("div",{class:"ws-pick-divider"},null,-1)),_("button",{type:"button",class:"ws-pick-action",onClick:Ie[13]||(Ie[13]=Ct(Ve=>{r.value=!1,i("addWorkspace")},["stop"]))},[K(Fe,{name:"plus",size:"sm"}),_("span",null,N(x(o)("conversation.addWorkspace")),1)])])):oe("",!0)])):e.starting?oe("",!0):(g(),C("button",{key:2,type:"button",class:"empty-add-workspace",onClick:Ie[14]||(Ie[14]=Ve=>i("addWorkspace"))},[K(Fe,{name:"folder-plus",size:"sm"}),_("span",null,N(x(o)("conversation.addWorkspace")),1)]))]),e.sessionId?oe("",!0):(g(),pe(pEe,{key:0,sessions:e.recentSessions??[],onSelect:Ie[15]||(Ie[15]=Ve=>i("selectSession",Ve)),onOpenSessionAdmin:Ie[16]||(Ie[16]=Ve=>i("openSessionAdmin"))},null,8,["sessions"])),K(TN,{ref_key:"emptyComposerRef",ref:h,class:"empty-composer","session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:ot,onSteer:Ie[17]||(Ie[17]=Ve=>i("steer",Ve)),onCommand:Ie[18]||(Ie[18]=Ve=>i("command",Ve)),onInterrupt:$i,onUnqueue:Ie[19]||(Ie[19]=Ve=>i("unqueue",Ve)),onEditQueued:Ie[20]||(Ie[20]=Ve=>i("editQueued",Ve)),onSetPermission:Ie[21]||(Ie[21]=Ve=>i("setPermission",Ve)),onSetThinking:Ie[22]||(Ie[22]=Ve=>i("setThinking",Ve)),onTogglePlan:Ie[23]||(Ie[23]=Ve=>i("togglePlan")),onToggleWorkflow:Ie[24]||(Ie[24]=Ve=>i("toggleWorkflow")),onToggleGoal:Ie[25]||(Ie[25]=Ve=>i("toggleGoal")),onOpenBtw:Ie[26]||(Ie[26]=Ve=>i("command","/btw")),onCreateGoal:Ie[27]||(Ie[27]=Ve=>i("createGoal",Ve)),onControlGoal:Ie[28]||(Ie[28]=Ve=>i("controlGoal",Ve)),onFocusGoal:b,onCompact:Ie[29]||(Ie[29]=Ve=>i("compact")),onPickModel:Ie[30]||(Ie[30]=Ve=>i("pickModel")),onSelectModel:Ie[31]||(Ie[31]=Ve=>i("selectModel",Ve))},null,8,["session-id","running","queued","search-files","upload-image","status","thinking","plan-mode","goal-mode","workflow-active","goal","activation-badges","models","starred-ids","skills","starting"]),Ie[61]||(Ie[61]=_("div",{class:"empty-spacer"},null,-1))],64)):(g(),pe(Lx,{ref_key:"chatPaneRef",ref:p,key:e.fileReloadKey??"no-session",turns:e.turns,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":ae.value,"tool-diff-panel":!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:Ie[32]||(Ie[32]=Ve=>i("openFile",Ve)),onOpenMedia:Ie[33]||(Ie[33]=Ve=>i("openMedia",Ve)),onCopyConversationCopied:y,onOpenCompaction:Ie[34]||(Ie[34]=Ve=>i("openCompaction",Ve)),onOpenAgent:Ie[35]||(Ie[35]=Ve=>i("openAgent",Ve)),onOpenToolDiff:Ie[36]||(Ie[36]=Ve=>i("openToolDiff",Ve)),onOpenTurnDiff:Ie[37]||(Ie[37]=Ve=>i("openTurnDiff",Ve)),onEditMessage:Ae,onLoadOlderMessages:Pt,onUnqueue:Ie[38]||(Ie[38]=Ve=>i("unqueue",Ve)),onEditQueued:wt,onReorderQueue:Lt,onContinueTurn:Ie[39]||(Ie[39]=Ve=>i("continueTurn",Ve))},null,8,["turns","approvals","questions","turn-active","working","fast-moon","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","last-turn-reason","turn-error-kind","turn-error-message","cwd","queued"]))],2)],34),e.turns.length===0&&!e.sessionLoading?oe("",!0):(g(),pe(T5e,{key:0,ref:J,style:jt(H.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":Ve=>i("openFile",Ve),"dock-panel":M.value,"bash-tasks":S.value,"subagent-tasks":I.value,"bash-running":T.value,"subagent-running":$.value,"todo-done-count":R.value,"has-dock-work":P.value,todos:e.todos,"pending-question":X.value,"question-busy-kind":te.value,"pending-approval":q.value,"approval-busy":me.value,mobile:e.mobile,onToggleDockPanel:Ie[40]||(Ie[40]=Ve=>B(Ve)),onCloseDockPanel:Ie[41]||(Ie[41]=Ve=>z()),onOpenAgent:Ie[42]||(Ie[42]=Ve=>i("openAgent",Ve)),onAnswer:Qt,onDismiss:Ie[43]||(Ie[43]=Ve=>i("dismiss",Ve)),onApproval:_o,onCancelTask:Ie[44]||(Ie[44]=Ve=>i("cancelTask",Ve)),onControlGoal:Ie[45]||(Ie[45]=Ve=>i("controlGoal",Ve)),onSubmit:ot,onSteer:Ie[46]||(Ie[46]=Ve=>i("steer",Ve)),onCommand:Ie[47]||(Ie[47]=Ve=>i("command",Ve)),onInterrupt:$i,onSetPermission:Ie[48]||(Ie[48]=Ve=>i("setPermission",Ve)),onSetThinking:Ie[49]||(Ie[49]=Ve=>i("setThinking",Ve)),onTogglePlan:Ie[50]||(Ie[50]=Ve=>i("togglePlan")),onToggleWorkflow:Ie[51]||(Ie[51]=Ve=>i("toggleWorkflow")),onToggleGoal:Ie[52]||(Ie[52]=Ve=>i("toggleGoal")),onOpenBtw:Ie[53]||(Ie[53]=Ve=>i("command","/btw")),onCreateGoal:Ie[54]||(Ie[54]=Ve=>i("createGoal",Ve)),onFocusGoal:b,onCompact:Ie[55]||(Ie[55]=Ve=>i("compact")),onPickModel:Ie[56]||(Ie[56]=Ve=>i("pickModel")),onSelectModel:Ie[57]||(Ie[57]=Ve=>i("selectModel",Ve))},null,8,["style","session-id","running","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","working","goal-mode","dynamic-workflow-mode","activation-badges","models","starred-ids","skills","goal","session-plans","overlay-open","open-file","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile"]))],4),K(Cr,{name:"pill"},{default:ve(()=>[be.value?(g(),C("button",{key:0,class:"newmsg-pill",style:jt({bottom:`${ne.value+12}px`}),"aria-label":x(o)("conversation.jumpToLatestAria"),onClick:Ie[58]||(Ie[58]=Ve=>Tt(!0))},[K(Fe,{class:"pill-chevron",name:"chevron-down",size:"md"}),qe(" "+N(x(o)("conversation.newMessages")),1)],12,xEe)):oe("",!0)]),_:1}),K(Cr,{name:"abort-toast"},{default:ve(()=>[ds.value?(g(),C("div",_Ee,[_("span",SEe,N(x(o)("conversation.manuallyAborted")),1)])):oe("",!0)]),_:1})],2))}}),TEe=ht(EEe,[["__scopeId","data-v-8e4bb730"]]);let Lf=0,Nk=null;function LN(){function e(){typeof document>"u"||(Lf+=1,Lf===1&&(Nk=document.body.style.overflow,document.body.style.overflow="hidden"))}function t(){Lf<=0||(Lf-=1,Lf===0&&typeof document<"u"&&(document.body.style.overflow=Nk??"",Nk=null))}return{lock:e,unlock:t}}const IEe=["aria-label"],$Ee={class:"media-lightbox-card"},NEe=["src","alt"],LEe=["src"],FEe={key:0,class:"media-preview-caption"},OEe=Ze({__name:"MediaLightbox",props:{media:{},src:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,s=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),i=Zm("overlay"),r=Zm("close"),l=Zm("image"),a=O(()=>n.media.kind==="image"),u=O(()=>n.media.path??(a.value?"Image preview":"Video preview")),c=Co(1),d=Co(0),f=Co(0),p=Co(!1),h=O(()=>({transform:`translate(${d.value}px, ${f.value}px) scale(${c.value})`,cursor:c.value>1?p.value?"grabbing":"grab":"zoom-in"}));let m=null,k=null,w=0,v=0,y=0,b=0;const{lock:S,unlock:I}=LN();function T(){c.value=1,d.value=0,f.value=0}function $(B){if(!a.value)return;B.preventDefault();const z=Math.min(8,Math.max(1,c.value*(B.deltaY<0?1.1:.9)));c.value=z,z===1&&(d.value=0,f.value=0)}function F(){if(c.value!==1){T();return}const B=l.value;B&&(c.value=Math.min(8,Math.max(1,B.naturalWidth/B.clientWidth)))}function R(B){c.value<=1||(k=B.pointerId,w=B.clientX,v=B.clientY,y=d.value,b=f.value,p.value=!0,l.value?.setPointerCapture(B.pointerId))}function P(B){k===B.pointerId&&(d.value=y+B.clientX-w,f.value=b+B.clientY-v)}function M(B){k===B.pointerId&&(l.value?.releasePointerCapture(B.pointerId),k=null,p.value=!1)}function D(B){if(B.key==="Escape"){B.preventDefault(),B.stopPropagation(),o("close");return}if(B.key!=="Tab"||!i.value)return;const z=i.value.querySelectorAll(s),A=z[0],L=z[z.length-1];!A||!L||(i.value.contains(document.activeElement)?B.shiftKey&&document.activeElement===A?(B.preventDefault(),L.focus()):!B.shiftKey&&document.activeElement===L&&(B.preventDefault(),A.focus()):(B.preventDefault(),(B.shiftKey?L:A).focus()))}return Sn(()=>{S(),m=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener("keydown",D),r.value?.focus()}),En(()=>{I(),window.removeEventListener("keydown",D),m?.focus()}),(B,z)=>(g(),pe(Hl,{to:"body"},[_("div",{ref:"overlay",class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":u.value,onMousedown:z[1]||(z[1]=Ct(A=>o("close"),["self"]))},[_("button",{ref:"close",type:"button",class:"media-lightbox-close","aria-label":"Close",onClick:z[0]||(z[0]=A=>o("close"))},[K(Fe,{name:"close",size:"sm"})],512),_("div",$Ee,[_("div",{class:"media-lightbox-frame",onWheel:$},[a.value?(g(),C("img",{key:0,ref:"image",class:"media-lightbox-media",src:e.src,alt:e.media.path??"",draggable:"false",style:jt(h.value),onDblclick:F,onPointerdown:R,onPointermove:P,onPointerup:M,onPointercancel:M},null,44,NEe)):(g(),C("video",{key:1,class:"media-lightbox-media",src:e.src,controls:"",autoplay:""},null,8,LEe))],32)]),e.media.path?(g(),C("div",FEe,N(e.media.path),1)):oe("",!0)],40,IEe)]))}}),REe=ht(OEe,[["__scopeId","data-v-a5036dce"]]),PEe={class:"ui-panel-header__title"},DEe={key:0,class:"ui-panel-header__sub"},BEe=Ze({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:"Close"},wrap:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-panel-header",{wrap:e.wrap}])},[_("span",PEe,N(e.title),1),K(Mn,{text:e.subtitle},{default:ve(()=>[e.subtitle?(g(),C("span",DEe,N(e.subtitle),1)):oe("",!0)]),_:1},8,["text"]),An(t.$slots,"default",{},void 0,!0),e.closable?(g(),pe(Jt,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel,onClick:n[0]||(n[0]=o=>t.$emit("close"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])):oe("",!0)],2))}}),Pa=ht(BEe,[["__scopeId","data-v-a01b4e04"]]),zEe={key:0,class:"fp-empty fp-error"},WEe={key:1,class:"fp-empty"},HEe={key:2,class:"fp-loading"},jEe={class:"fp-path"},UEe={class:"fp-meta"},VEe={key:0,class:"fp-lines"},qEe={class:"fp-size"},KEe={key:3,class:"fp-search"},GEe=["placeholder"],ZEe={key:0,class:"fp-search-count"},YEe=["href","aria-label"],JEe={key:1,class:"fp-code"},XEe={class:"fp-line-table"},QEe=["data-line"],eTe={class:"fp-gutter"},tTe=["innerHTML"],nTe={key:1,class:"fp-body fp-code"},oTe={class:"fp-line-table"},sTe=["data-line"],iTe={class:"fp-gutter"},rTe=["innerHTML"],lTe={key:2,class:"fp-body"},aTe=["srcdoc","title"],uTe={key:1,class:"fp-code"},cTe={class:"fp-line-table"},dTe=["data-line"],fTe={class:"fp-gutter"},pTe=["innerHTML"],hTe={key:3,class:"fp-body fp-pdf-wrap"},mTe=["src","title"],gTe={key:1,class:"fp-binary-card"},vTe={class:"fp-binary-label"},yTe={key:4,class:"fp-body fp-table-wrap"},kTe={class:"fp-table"},bTe=["data-line"],wTe={key:5,class:"fp-body fp-image-wrap"},xTe=["src","alt"],_Te={key:1,class:"fp-binary-card"},STe={class:"fp-binary-icon"},CTe={class:"fp-binary-label"},ATe={key:6,class:"fp-body fp-image-wrap"},MTe=["src"],ETe={key:1,class:"fp-binary-card"},TTe={class:"fp-binary-icon"},ITe={class:"fp-binary-label"},$Te={key:7,class:"fp-body fp-code"},NTe={class:"fp-line-table"},LTe=["data-line"],FTe={class:"fp-gutter"},OTe=["innerHTML"],RTe={key:8,class:"fp-body fp-binary-wrap"},PTe={class:"fp-binary-card"},DTe={class:"fp-binary-icon"},BTe={class:"fp-binary-label"},zTe=Ze({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal"],setup(e,{emit:t}){const{t:n}=$t();function o(he,ee){const ne=ee?ee.split("/").filter(Boolean):[];for(const H of he.split("/"))H===""||H==="."||(H===".."?ne.pop():ne.push(H));return ne.join("/")}const s=wn("resolveImage",async he=>he),i=O(()=>{const he=u.file?.path??"",ee=he.lastIndexOf("/");return ee>0?he.slice(0,ee):""});function r(he){if(/^(https?:|data:|blob:)/i.test(he)||he.startsWith("/"))return he;const ee=i.value;return ee?o(he,ee):he}async function l(he){const ee=r(he);return s?s(ee):ee}Vn("resolveImage",l);function a(he){let ee=he.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(ee)||ee.startsWith("/"))return he;for(const H of["#","?"]){const Z=ee.indexOf(H);Z!==-1&&(ee=ee.slice(0,Z))}const ne=i.value;return{...he,path:o(ee,ne)}}const u=e,c=t;function d(he){u.openFile?.(a(he))}const f=V(null),p=O(()=>{const he=u.file;if(!he)return"binary";const ee=he.mime??"",ne=he.languageId??"",H=he.path.toLowerCase();return ee==="text/markdown"||ne==="markdown"||ne==="md"||H.endsWith(".mdx")?"markdown":ee==="application/json"||ne==="json"?"json":ee==="text/html"||ne==="html"||H.endsWith(".html")||H.endsWith(".htm")?"html":ee==="application/pdf"||H.endsWith(".pdf")?"pdf":ee==="text/csv"||ne==="csv"||H.endsWith(".csv")?"csv":ee.startsWith("image/")?"image":ee.startsWith("video/")?"video":he.isBinary?"binary":ee.startsWith("text/")||ne!==""?"text":"binary"});function h(he){const ee=atob(he),ne=Uint8Array.from(ee,H=>H.charCodeAt(0));return new TextDecoder().decode(ne)}const m=O(()=>{const he=u.file;if(!he)return"";if(he.encoding==="base64")try{return h(he.content)}catch{return he.content}return he.content}),k=O(()=>{if(p.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),w=O(()=>u.file?(p.value==="json"?k.value:m.value).split(` -`):[]),v=O(()=>u.file?p.value==="json"?k.value:m.value:""),y=V(""),b=V(0),S=O(()=>{const he=y.value.trim().toLowerCase();if(!he)return[];const ee=[];return w.value.forEach((ne,H)=>{ne.toLowerCase().includes(he)&&ee.push(H+1)}),ee});Ye(y,()=>{b.value=0});function I(he,ee=!1){he&&xt(()=>{const ne=f.value?.querySelector(".fp-body"),H=ne?.querySelector(`[data-line="${he}"]`);if(!ne||!H)return;ee&&(ne.scrollTop=0);const Z=ne.getBoundingClientRect(),ye=H.getBoundingClientRect(),fe=ye.top-Z.top+ne.scrollTop;ne.scrollTop=fe-ne.clientHeight/2+ye.height/2})}Ye(()=>[u.file?.path,u.line],()=>I(u.line,!0),{immediate:!0});function T(he){const ee=S.value;ee.length!==0&&(b.value=(b.value+he+ee.length)%ee.length,I(ee[b.value]))}function $(he){const ee=S.value;return{target:u.line===he,hit:ee.includes(he),active:ee[b.value]===he}}function F(he){return he<1024?`${he} B`:he<1024*1024?`${(he/1024).toFixed(1)} KB`:`${(he/(1024*1024)).toFixed(1)} MB`}const R=V(!1),P=V(!1);function M(){u.file&&Jo(v.value).then(he=>{he&&(R.value=!0,setTimeout(()=>{R.value=!1},1400))})}function D(){u.file&&Jo(u.file.path).then(he=>{he&&(P.value=!0,setTimeout(()=>{P.value=!1},1400))})}const B=V("preview"),z=V("preview"),A=V("fit");function L(he){B.value=he}function W(he){z.value=he}function j(he){A.value=he}Ye(p,he=>{B.value=he==="html"?"preview":"source",z.value="preview",A.value="fit"});const re=O(()=>{const he=u.file;return!he||p.value!=="image"?null:he.sourceUrl?he.sourceUrl:he.encoding==="base64"?`data:${he.mime};base64,${he.content}`:he.mime==="image/svg+xml"?`data:${he.mime};charset=utf-8,${encodeURIComponent(he.content)}`:null}),Q=O(()=>{const he=u.file;return!he||p.value!=="video"?null:he.sourceUrl?he.sourceUrl:he.encoding==="base64"?`data:${he.mime};base64,${he.content}`:null}),Y=O(()=>{const he=u.file;return!he||p.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:he.encoding==="base64"?`data:${he.mime};base64,${he.content}`:null}),G=O(()=>u.file?["",'',``,m.value].join(""):"");function X(he){const ee=[];let ne="",H=!1;for(let Z=0;Zw.value.slice(0,200).map(X));function q(he){return he.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function me(){const he=u.file;if(!he)return"";const ee=he.languageId?.toLowerCase();return ee||(he.path.split(".").pop()?.toLowerCase()??"")}function xe(he){const ee=me();let ne=q(he);return p.value==="json"||ee==="json"||ee==="jsonc"?(ne=ne.replace(/("[^&]*?")(\s*:)/g,'$1$2'),ne=ne.replace(/(:\s*)("[^&]*?")/g,'$1$2'),ne=ne.replace(/\b(true|false|null)\b/g,'$1'),ne=ne.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,'$1$2'),ne):p.value==="html"||ee==="html"||ee==="xml"||ee==="svg"?(ne=ne.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,' $1$2'),ne=ne.replace(/(".*?")/g,'$1'),ne=ne.replace(/(<\/?)([A-Za-z][\w:-]*)/g,'$1$2'),ne):(ne=ne.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,'$1'),ne=ne.replace(/(".*?"|'.*?')/g,'$1'),ne=ne.replace(/(\/\/.*)$/g,'$1'),ne)}function We(he,ee=55){return!he||he.length<=ee?he:"…"+he.slice(he.length-ee+1)}return(he,ee)=>(g(),C("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(g(),C("div",zEe,[_("span",null,N(e.error),1),e.closable?(g(),pe(nn,{key:0,variant:"secondary",size:"sm",onClick:ee[0]||(ee[0]=ne=>c("close"))},{default:ve(()=>[qe(N(x(n)("filePreview.close")),1)]),_:1})):oe("",!0)])):!e.file&&!e.loading?(g(),C("div",WEe,N(x(n)("filePreview.empty")),1)):e.loading?(g(),C("div",HEe,[ee[7]||(ee[7]=_("span",{class:"spinner"},null,-1)),_("span",null,N(x(n)("filePreview.loading")),1)])):e.file?(g(),C(Te,{key:3},[K(Pa,{wrap:"",title:x(n)("common.preview"),closable:e.closable,"close-label":x(n)("filePreview.close"),onClose:ee[6]||(ee[6]=ne=>c("close"))},{default:ve(()=>[K(Mn,{text:e.file.path},{default:ve(()=>[_("span",jEe,N(We(e.file.path)),1)]),_:1},8,["text"]),_("span",UEe,[e.file.lineCount?(g(),C("span",VEe,N(x(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):oe("",!0),_("span",qEe,N(F(e.file.size)),1)]),p.value==="html"?(g(),pe(zs,{key:0,"model-value":B.value,size:"sm",options:[{value:"preview",label:x(n)("filePreview.preview")},{value:"source",label:x(n)("filePreview.source")}],"onUpdate:modelValue":L},null,8,["model-value","options"])):oe("",!0),p.value==="markdown"?(g(),pe(zs,{key:1,"model-value":z.value,size:"sm",options:[{value:"preview",label:x(n)("filePreview.preview")},{value:"source",label:x(n)("filePreview.source")}],"onUpdate:modelValue":W},null,8,["model-value","options"])):oe("",!0),p.value==="image"?(g(),pe(zs,{key:2,"model-value":A.value,size:"sm",options:[{value:"fit",label:x(n)("filePreview.fit")},{value:"actual",label:x(n)("filePreview.actual")}],"onUpdate:modelValue":j},null,8,["model-value","options"])):oe("",!0),p.value==="text"||p.value==="json"||p.value==="html"||p.value==="csv"?(g(),C("div",KEe,[Bn(_("input",{"onUpdate:modelValue":ee[1]||(ee[1]=ne=>y.value=ne),class:"fp-search-input",type:"search",placeholder:x(n)("filePreview.search")},null,8,GEe),[[vs,y.value]]),y.value.trim()?(g(),C("span",ZEe,N(S.value.length),1)):oe("",!0),K(Jt,{size:"sm",disabled:S.value.length===0,label:x(n)("filePreview.prevMatch"),onClick:ee[2]||(ee[2]=ne=>T(-1))},{default:ve(()=>[K(Fe,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),K(Jt,{size:"sm",disabled:S.value.length===0,label:x(n)("filePreview.nextMatch"),onClick:ee[3]||(ee[3]=ne=>T(1))},{default:ve(()=>[K(Fe,{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):oe("",!0),K(Jt,{size:"sm",class:ze({copied:P.value}),label:P.value?x(n)("filePreview.copied"):x(n)("filePreview.copyPath"),onClick:D},{default:ve(()=>[P.value?(g(),pe(Fe,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),pe(Fe,{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.externalActions?(g(),pe(Jt,{key:4,size:"sm",label:x(n)("filePreview.openInEditor"),onClick:ee[4]||(ee[4]=ne=>c("openExternal"))},{default:ve(()=>[K(Fe,{name:"external-link",size:"md"})]),_:1},8,["label"])):oe("",!0),e.externalActions?(g(),pe(Jt,{key:5,size:"sm",label:x(n)("filePreview.reveal"),onClick:ee[5]||(ee[5]=ne=>c("reveal"))},{default:ve(()=>[K(Fe,{name:"folder",size:"md"})]),_:1},8,["label"])):oe("",!0),e.downloadUrl?(g(),C("a",{key:6,class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":x(n)("filePreview.download")},[K(Fe,{name:"download",size:"md"})],8,YEe)):oe("",!0),!e.file.isBinary&&p.value!=="image"?(g(),pe(Jt,{key:7,size:"sm",class:ze({copied:R.value}),label:R.value?x(n)("filePreview.copied"):x(n)("filePreview.copy"),onClick:M},{default:ve(()=>[R.value?(g(),pe(Fe,{key:1,class:"fp-check",name:"check",size:"md"})):(g(),pe(Fe,{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):oe("",!0)]),_:1},8,["title","closable","close-label"]),p.value==="markdown"?(g(),C("div",{key:0,class:ze(["fp-body",{"fp-markdown":z.value==="preview"}])},[z.value==="preview"?(g(),pe(Bl,{key:0,text:m.value,"open-file":u.openFile?d:void 0},null,8,["text","open-file"])):(g(),C("div",JEe,[_("div",XEe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",eTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,tTe)],10,QEe))),128))])]))],2)):p.value==="json"?(g(),C("div",nTe,[_("div",oTe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",iTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,rTe)],10,sTe))),128))])])):p.value==="html"?(g(),C("div",lTe,[B.value==="preview"?(g(),C("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:G.value,title:e.file.path},null,8,aTe)):(g(),C("div",uTe,[_("div",cTe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",fTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,pTe)],10,dTe))),128))])]))])):p.value==="pdf"?(g(),C("div",hTe,[Y.value?(g(),C("iframe",{key:0,class:"fp-pdf-frame",src:Y.value,title:e.file.path},null,8,mTe)):(g(),C("div",gTe,[_("span",vTe,N(x(n)("filePreview.pdfNoPreview")),1)]))])):p.value==="csv"?(g(),C("div",yTe,[_("table",kTe,[_("tbody",null,[(g(!0),C(Te,null,st(te.value,(ne,H)=>(g(),C("tr",{key:H,class:ze($(H+1)),"data-line":H+1},[_("th",null,N(H+1),1),(g(!0),C(Te,null,st(ne,(Z,ye)=>(g(),C("td",{key:ye},N(Z),1))),128))],10,bTe))),128))])])])):p.value==="image"?(g(),C("div",wTe,[re.value?(g(),C("img",{key:0,src:re.value,alt:e.file.path,class:ze(["fp-image",{actual:A.value==="actual"}])},null,10,xTe)):(g(),C("div",_Te,[_("span",STe,[K(Fe,{name:"image-off",size:"lg"})]),_("span",CTe,N(x(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:F(e.file.size)})),1)]))])):p.value==="video"?(g(),C("div",ATe,[Q.value?(g(),C("video",{key:0,src:Q.value,class:"fp-image",controls:"",playsinline:"",preload:"metadata"},null,8,MTe)):(g(),C("div",ETe,[_("span",TTe,[K(Fe,{name:"image-off",size:"lg"})]),_("span",ITe,N(x(n)("filePreview.videoNoPreview",{mime:e.file.mime,size:F(e.file.size)})),1)]))])):p.value==="text"?(g(),C("div",$Te,[_("div",NTe,[(g(!0),C(Te,null,st(w.value,(ne,H)=>(g(),C("div",{key:H,class:ze(["fp-line-row",$(H+1)]),"data-line":H+1},[_("span",FTe,N(H+1),1),_("span",{class:"fp-line-text",innerHTML:xe(ne)},null,8,OTe)],10,LTe))),128))])])):(g(),C("div",RTe,[_("div",PTe,[_("span",DTe,[K(Fe,{name:"file-off",size:"lg"})]),_("span",BTe,N(x(n)("filePreview.binaryNoPreview",{mime:e.file.mime||x(n)("filePreview.unknownType"),size:F(e.file.size)})),1)])]))],64)):oe("",!0)],512))}}),WTe=ht(zTe,[["__scopeId","data-v-f6cbb2b4"]]),HTe={class:"tp"},jTe=Ze({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V(null);return Ye(()=>n.text,()=>{const r=i.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||xt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(r,l)=>(g(),C("div",HTe,[K(Pa,{title:x(s)("common.preview"),subtitle:e.subtitle??x(s)("thinking.panelTitle"),"close-label":x(s)("thinking.close"),onClose:l[0]||(l[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),_("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},N(e.text),513)]))}}),UTe=ht(jTe,[["__scopeId","data-v-e1ad626c"]]),VTe=640,qTe=`(max-width: ${VTe}px)`;function FN(){const e=V(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(qTe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),En(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),En(()=>t.removeListener(n))),e}const KTe={class:"agent-panel"},GTe={key:0,class:"agent-fallback"},ZTe={key:0,class:"agent-error"},YTe={key:1,class:"fallback-lines"},JTe=Ze({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=FN(),r=O(()=>i.value?"lg":"md"),l=O(()=>i.value?"lg":"sm"),a=V(null),u=V(!0),c=V(!1),d=V(null),f=V(null),p=V({}),h=V(null);let m=null,k=0;const w=O(()=>{const D=new Set,B=[],z=n.member.prompt?.trim(),A=z?`$ ${z}`:void 0;for(const L of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` -`),n.member.summary]){const W=L?.trim();!W||D.has(W)||W===A||(D.add(W),B.push(W))}return B}),v=O(()=>w.value.filter(D=>D!==n.member.prompt?.trim()).join(` -`)),y=O(()=>[n.member.subagentType,n.member.model,n.member.thinkingEffort].filter(Boolean).join(" · ")||void 0);function b(){const D=a.value;D&&(u.value=D.scrollHeight-D.scrollTop-D.clientHeight<24)}function S(){xt(()=>{const D=a.value;D&&(D.scrollTop=D.scrollHeight)})}Vn("pinScroll",D=>{const B=a.value;if(!B)return;const z=D.getBoundingClientRect().top;requestAnimationFrame(()=>{B.scrollTop+=D.getBoundingClientRect().top-z})}),Ye(()=>{const D=n.turns.at(-1);return`${n.member.id}:${n.turns.length}:${D?.text.length??0}:${D?.tools?.length??0}`},()=>{u.value&&S()},{immediate:!0});function I(D){const B=D[0].toUpperCase()+D.slice(1);return s(`tools.dynamic_workflow.phase${B}`)}function T(){const D=d.value?.el,B=f.value?.el;if(!D||!B)return;const z=D.getBoundingClientRect(),A=8,L=8,W=Math.max(L,Math.min(z.right-B.offsetWidth,window.innerWidth-B.offsetWidth-L));z.bottom+A+B.offsetHeight<=window.innerHeight-L?p.value={left:`${W}px`,top:`${z.bottom+A}px`}:p.value={left:`${W}px`,bottom:`${window.innerHeight-z.top+A}px`}}function $(D=!1){c.value=!1,window.removeEventListener("mousedown",R,!0),window.removeEventListener("keydown",P,!0),window.removeEventListener("resize",T),window.removeEventListener("scroll",T,!0),D&&d.value?.el?.focus()}async function F(){if(c.value){$(!0);return}c.value=!0,await xt(),T(),f.value?.el?.querySelector(".ui-menu-item:not(:disabled)")?.focus(),window.addEventListener("mousedown",R,!0),window.addEventListener("keydown",P,!0),window.addEventListener("resize",T),window.addEventListener("scroll",T,!0)}function R(D){const B=D.target;f.value?.el?.contains(B)||d.value?.el?.contains(B)||$()}function P(D){D.key==="Escape"&&(D.preventDefault(),D.stopImmediatePropagation(),$(!0))}async function M(D){const B=D==="command"?n.member.prompt:D==="output"?v.value:[n.member.prompt?.trim(),v.value].filter(Boolean).join(` - -`);if(!B)return;const z=++k;!await Jo(B)||z!==k||(m!==null&&clearTimeout(m),h.value=D,m=setTimeout(()=>{m=null,h.value=null},1400),$(!0))}return Ye(()=>n.member.id,()=>{k+=1,m!==null&&clearTimeout(m),m=null,h.value=null,$()}),En(()=>{m!==null&&clearTimeout(m),$()}),(D,B)=>(g(),C("div",KTe,[K(Pa,{title:e.member.name,subtitle:y.value,"close-label":x(s)("thinking.close"),onClose:B[0]||(B[0]=z=>o("close"))},{default:ve(()=>[K(wr,{variant:"neutral",size:"sm"},{default:ve(()=>[qe(N(I(e.member.phase)),1)]),_:1}),e.member.prompt||v.value?(g(),pe(Jt,{key:0,ref_key:"copyTriggerRef",ref:d,size:l.value,class:ze({"copy-menu-open":c.value}),label:x(s)("tasks.copy"),tooltip:x(s)("tasks.copy"),"aria-haspopup":"menu","aria-expanded":c.value,onClick:F},{default:ve(()=>[K(Fe,{name:h.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","class","label","tooltip","aria-expanded"])):oe("",!0)]),_:1},8,["title","subtitle","close-label"]),_("div",{ref_key:"bodyEl",ref:a,class:"agent-transcript",onScrollPassive:b},[e.turns.length===0&&!e.loading&&(e.loadError||w.value.length>0)?(g(),C("div",GTe,[e.loadError?(g(),C("div",ZTe,N(x(s)("tasks.transcriptLoadError")),1)):oe("",!0),w.value.length>0?(g(),C("pre",YTe,N(w.value.join(` -`)),1)):oe("",!0)])):(g(),pe(Lx,{key:1,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":u.value,"read-only":"",inspector:"",onLoadOlderMessages:B[1]||(B[1]=z=>o("loadOlderMessages")),onOpenAgent:B[2]||(B[2]=z=>o("openAgent",z)),onOpenFile:B[3]||(B[3]=z=>o("openFile",z)),onOpenMedia:B[4]||(B[4]=z=>o("openMedia",z)),onOpenTurnDiff:B[5]||(B[5]=z=>o("openTurnDiff",z))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],544),c.value?(g(),pe(Ar,{key:0,ref_key:"copyMenuRef",ref:f,class:"copy-menu",style:jt(p.value),onClick:B[9]||(B[9]=Ct(()=>{},["stop"]))},{default:ve(()=>[e.member.prompt?(g(),pe(vn,{key:0,size:r.value,onClick:B[6]||(B[6]=z=>M("command"))},{default:ve(()=>[K(Fe,{name:"terminal",size:"sm"}),_("span",null,N(x(s)("tasks.copyCommand")),1)]),_:1},8,["size"])):oe("",!0),K(vn,{size:r.value,disabled:!v.value,onClick:B[7]||(B[7]=z=>M("output"))},{default:ve(()=>[K(Fe,{name:"file-text",size:"sm"}),_("span",null,N(x(s)("tasks.copyOutput")),1)]),_:1},8,["size","disabled"]),K(vn,{separator:""}),K(vn,{size:r.value,onClick:B[8]||(B[8]=z=>M("all"))},{default:ve(()=>[K(Fe,{name:"copy",size:"sm"}),_("span",null,N(x(s)("tasks.copyAll")),1)]),_:1},8,["size"])]),_:1},8,["style"])):oe("",!0)]))}}),XTe=ht(JTe,[["__scopeId","data-v-b44fe40c"]]),QTe={class:"tdp"},e9e={class:"tdp-body"},t9e={key:1,class:"tdp-output"},n9e={key:2,class:"tdp-empty"},o9e=Ze({__name:"ToolDiffPanel",props:{target:{}},emits:["close"],setup(e,{emit:t}){const n=t,{t:o}=$t();return(s,i)=>(g(),C("div",QTe,[K(Pa,{title:e.target.title,subtitle:e.target.path,"close-label":x(o)("thinking.close"),onClose:i[0]||(i[0]=r=>n("close"))},null,8,["title","subtitle","close-label"]),_("div",e9e,[e.target.lines&&e.target.lines.length>0?(g(),pe(tT,{key:0,lines:e.target.lines},null,8,["lines"])):e.target.output&&e.target.output.length>0?(g(),C("div",t9e,[(g(!0),C(Te,null,st(e.target.output,(r,l)=>(g(),C("div",{key:l},N(r),1))),128))])):(g(),C("div",n9e,N(x(o)("diff.noDiff")),1))])]))}}),s9e=ht(o9e,[["__scopeId","data-v-8b9af3ab"]]),i9e={class:"hl-body"},r9e={key:0,class:"hl-gutter"},l9e={key:1,class:"hl-gutter new"},a9e={class:"hl-sign"},u9e={class:"hl-text"},c9e=["data-line"],d9e={key:0,class:"hl-gutter"},f9e={class:"hl-text"},p9e=200,h9e=Ze({__name:"HighlightedCode",props:{code:{},lines:{},path:{},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{}},setup(e){const t={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},n={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function o(B){const z=B?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!z)return;const A=n[z];if(A)return A;const L=z.lastIndexOf(".");if(!(L<=0))return t[z.slice(L+1)]}function s(B){return B.split(/\r?\n/)}function i(B){const z={};B.color&&(z.color=B.color);const A=B.fontStyle??0;return A&1&&(z.fontStyle="italic"),A&2&&(z.fontWeight="var(--weight-semibold)"),A&4&&(z.textDecoration="underline"),z}const r=e,l=m$(),a=O(()=>r.lines!==void 0),u=O(()=>(r.lines??[]).some(B=>B.oldNo!==void 0)),c=O(()=>(r.lines??[]).some(B=>B.newNo!==void 0)),d=O(()=>r.lineNumbers===!0&&a.value),f=O(()=>Array.isArray(r.lineNumbers)?r.lineNumbers:null),p=O(()=>Array.isArray(r.code)?r.code:s(r.code??"")),h=O(()=>{const B=r.lines;return B?r.fullTexts?r.fullTexts:{before:B.filter(z=>z.oldNo!==void 0).map(z=>z.text).join(` -`),after:B.filter(z=>z.newNo!==void 0).map(z=>z.text).join(` -`)}:null}),m=V(null),k=V(null),w=V(null);function v(){m.value=null,k.value=null,w.value=null}let y=0,b=0,S=null,I=null;async function T(){const B=++y;b=Date.now();const z=o(r.path);if(!z){B===y&&v();return}try{I??=Ts(()=>import("./index-Cm2yfvYH.js").then(j=>j.i),[]).then(j=>j.codeToTokens);const A=await I,L=l.value?"github-dark":"github-light",W=h.value;if(W){const[j,re]=await Promise.all([W.before?A(W.before,{lang:z,theme:L}):null,W.after?A(W.after,{lang:z,theme:L}):null]);if(B!==y)return;k.value=j?.tokens??null,w.value=re?.tokens??null}else{const j=p.value.length>0?await A(p.value.join(` -`),{lang:z,theme:L}):null;if(B!==y)return;m.value=j?.tokens??null}}catch{B===y&&v()}}function $(){if(S!==null)return;const B=Math.max(0,p9e-(Date.now()-b));S=setTimeout(()=>{S=null,T()},B)}Ye([()=>p.value.join(` -`),()=>h.value?.before??null,()=>h.value?.after??null],$),Ye([()=>r.path,l,()=>r.fullTexts],()=>{y++,v(),$()}),Sn(()=>void T()),po(()=>{y++,S!==null&&clearTimeout(S)});const F=O(()=>{const B=new Map;let z=0;for(const A of r.lines??[])A.oldNo!==void 0&&B.set(A.oldNo,z++);return B}),R=O(()=>{const B=new Map;let z=0;for(const A of r.lines??[])A.newNo!==void 0&&B.set(A.newNo,z++);return B});function P(B){if(B.type==="del"){if(B.oldNo===void 0)return null;const A=r.fullTexts?B.oldNo-1:F.value.get(B.oldNo);return A===void 0?null:k.value?.[A]??null}if(B.newNo===void 0)return null;const z=r.fullTexts?B.newNo-1:R.value.get(B.newNo);return z===void 0?null:w.value?.[z]??null}function M(B){return B.type==="add"?"+":B.type==="del"?"-":" "}const D=O(()=>{let B=0;if(f.value)for(const z of f.value)z>B&&(B=z);else for(const z of r.lines??[])z.oldNo!==void 0&&z.oldNo>B&&(B=z.oldNo),z.newNo!==void 0&&z.newNo>B&&(B=z.newNo);return Math.max(4,String(B).length)});return(B,z)=>(g(),C("div",{class:ze(["hl-code",{gutter:d.value,"plain-pad":!a.value&&f.value===null,framed:e.framed}]),style:jt({"--gutter-ch":`${D.value}ch`})},[_("div",i9e,[a.value?(g(!0),C(Te,{key:0},st(e.lines,(A,L)=>(g(),C("div",{key:L,class:ze(["hl-row",`row-${A.type}`])},[d.value?(g(),C(Te,{key:0},[u.value?(g(),C("span",r9e,N(A.oldNo??""),1)):oe("",!0),c.value?(g(),C("span",l9e,N(A.newNo??""),1)):oe("",!0)],64)):oe("",!0),_("span",a9e,N(M(A)),1),_("span",u9e,[P(A)?(g(!0),C(Te,{key:0},st(P(A),(W,j)=>(g(),C("span",{key:j,style:jt(i(W))},N(W.content),5))),128)):(g(),C(Te,{key:1},[qe(N(A.text),1)],64))])],2))),128)):(g(!0),C(Te,{key:1},st(p.value,(A,L)=>(g(),C("div",{key:L,class:ze(["hl-row",e.lineClass?e.lineClass(f.value?.[L]??-1):void 0]),"data-line":f.value?f.value[L]:void 0},[f.value?(g(),C("span",d9e,N(f.value[L]??""),1)):oe("",!0),_("span",f9e,[m.value&&m.value[L]?(g(!0),C(Te,{key:0},st(m.value[L],(W,j)=>(g(),C("span",{key:j,style:jt(i(W))},N(W.content),5))),128)):(g(),C(Te,{key:1},[qe(N(A),1)],64))])],10,c9e))),128))])],6))}}),ON=ht(h9e,[["__scopeId","data-v-4878c39c"]]),m9e={class:"turn-diff-panel"},g9e={class:"tdp-body"},v9e={class:"tdp-file-head"},y9e={class:"tdp-path"},k9e={key:0,class:"tdp-diff"},b9e={key:1,class:"tdp-unavailable"},w9e=Ze({__name:"TurnDiffPanel",props:{changes:{},cwd:{}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(a,u){if(!u)return null;const c=v=>v.replaceAll("\\","/"),d=c(a);let f=c(u);f.length>1&&(f=f.replace(/\/+$/,""));const p=/^[a-z]:\//i.test(f)||/^[a-z]:\//i.test(d)||f.startsWith("//")||d.startsWith("//"),h=p?f.toLowerCase():f,m=p?d.toLowerCase():d,k=h.endsWith("/")?h:`${h}/`;if(m!==h&&!m.startsWith(k))return null;const w=m===h?"":d.slice(k.length);return w.split("/").includes("..")?null:w||null}function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}function l(a){return i(a.path,n.cwd)??a.path}return(a,u)=>(g(),C("div",m9e,[K(Pa,{title:x(s)("conversation.turnFiles.diffTitle"),onClose:u[0]||(u[0]=c=>o("close"))},null,8,["title"]),_("div",g9e,[(g(!0),C(Te,null,st(e.changes,c=>(g(),C("section",{key:c.path,class:"tdp-file"},[_("div",v9e,[K(Mn,{text:c.path},{default:ve(()=>[_("span",y9e,N(r(l(c))),1)]),_:2},1032,["text"]),K(nn,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:c.path})},{default:ve(()=>[qe(N(x(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]),c.diff?(g(),C("div",k9e,[K(ON,{lines:c.diff,path:c.path,framed:!1},null,8,["lines","path"])])):(g(),C("div",b9e,[_("p",null,N(x(s)("conversation.turnFiles.diffUnavailable")),1),K(nn,{variant:"ghost",size:"sm",onClick:d=>o("openFile",{path:c.path})},{default:ve(()=>[qe(N(x(s)("conversation.turnFiles.openFile")),1)]),_:1},8,["onClick"])]))]))),128))])]))}}),x9e=ht(w9e,[["__scopeId","data-v-67a3cc7e"]]),_9e=["aria-label"],S9e=Ze({__name:"ThinkingIndicator",props:{size:{default:"md"},fast:{type:Boolean},label:{default:"Waiting for response…"}},setup(e){const t=Cl.length*Bu;function n(o){return{"--thinking-frame-delay":`${o*Bu-t}ms`,"--thinking-frame-fast-delay":`${o*(Bu/2)-t/2}ms`}}return(o,s)=>(g(),C("span",{class:ze(["ui-thinking-indicator",[`ui-thinking-indicator--${e.size}`,{"ui-thinking-indicator--fast":e.fast}]]),"aria-label":e.label,role:"status"},[(g(!0),C(Te,null,st(x(Cl),(i,r)=>(g(),C("span",{key:i,class:"ui-thinking-indicator__frame",style:jt(n(r)),"aria-hidden":"true"},N(i),5))),128))],10,_9e))}}),C9e=ht(S9e,[["__scopeId","data-v-ed8aef9e"]]),A9e={class:"sc"},M9e={key:0,class:"sc-empty"},E9e={key:2,class:"sc-loading","aria-hidden":"true"},T9e={class:"sc-composer"},I9e=["placeholder"],$9e=["disabled"],N9e=Ze({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=O(()=>n.turns.find(v=>v.role==="user")?.text?.trim()??""),r=O(()=>n.title?.trim()||s("sideChat.title")),l=O(()=>n.subtitle?.trim()?n.subtitle.trim():i.value||s("sideChat.subtitle")),a=V(""),u=V(null),c=V(null);function d(){const w=a.value.trim();w&&(o("send",w),a.value="",xt(()=>{u.value&&(u.value.style.height="auto"),f()}))}function f(){const w=c.value;w&&(w.scrollTop=w.scrollHeight)}const p=O(()=>{const w=n.turns;if(w.length===0)return"0";const v=w.at(-1),y=v.thinking?.length??0,b=v.tools?.reduce((S,I)=>S+I.name.length+(I.arg?.length??0)+(I.output?.join("").length??0),0)??0;return`${w.length}:${v.text.length}:${y}:${b}`});Ye(p,async()=>{!n.running&&!n.sending||(await xt(),f())});const h=O(()=>n.sending?n.turns.at(-1)?.role==="user":!1);function m(w){w.key==="Enter"&&!w.shiftKey&&!w.isComposing&&(w.preventDefault(),d())}function k(){const w=u.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}return(w,v)=>(g(),C("div",A9e,[K(Pa,{title:r.value,subtitle:l.value,"close-label":x(s)("thinking.close"),onClose:v[0]||(v[0]=y=>o("close"))},null,8,["title","subtitle","close-label"]),_("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(g(),C("div",M9e,N(x(s)("sideChat.empty")),1)):(g(),pe(Lx,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running},null,8,["turns","turn-active","working"])),h.value?(g(),C("div",E9e,[K(C9e)])):oe("",!0)],512),_("div",T9e,[Bn(_("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":v[1]||(v[1]=y=>a.value=y),class:"sc-input",rows:"1",placeholder:x(s)("sideChat.placeholder"),onInput:k,onKeydown:m},null,40,I9e),[[vs,a.value]]),K(Mn,{text:x(s)("sideChat.send")},{default:ve(()=>[_("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:d},[K(Fe,{name:"arrow-right",size:"sm"})],8,$9e)]),_:1},8,["text"])])]))}}),L9e=ht(N9e,[["__scopeId","data-v-4572766b"]]),F9e={class:"changes-pane"},O9e={class:"dv-path"},R9e={class:"diff-head"},P9e={class:"back-label"},D9e={key:"loading",class:"empty-state diff-loading"},B9e={key:"lines",class:"dv-lines-wrap"},z9e={key:"empty",class:"empty-state"},W9e={class:"dv-change-count"},H9e={class:"ch-head"},j9e={class:"br-label"},U9e={class:"br-name"},V9e={key:0,class:"sync-info"},q9e={key:0,class:"ahead"},K9e={key:0,class:"behind"},G9e={key:1,class:"empty-head"},Z9e={key:0,class:"ch-list"},Y9e=["onClick"],J9e={class:"fpath"},X9e={key:1,class:"ch-list ch-tree"},Q9e={class:"tree-list"},eIe=["onClick"],tIe={class:"tree-name"},nIe=["onClick"],oIe={class:"tree-name"},sIe={key:2,class:"empty-state"},iIe={key:3,class:"empty-state"},rIe=Ze({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{default:null},emptyFile:{type:Boolean,default:!1},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(P){const M=P.toLowerCase();return M==="modified"?"modified":M==="added"?"added":M==="deleted"?"deleted":M==="renamed"?"renamed":M==="untracked"?"untracked":M==="conflicted"?"conflicted":M==="ignored"?"ignored":M==="clean"?"clean":"unknown"}const r={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function l(P){return r[i(P)]??"?"}function a(P,M=60){return P.length<=M?P:"…"+P.slice(P.length-M+1)}const u=O(()=>o.gitInfo!==null),c=O(()=>o.changes.length>0),d=O(()=>(o.selectedDiffPath??null)!==null),f=O(()=>o.mode==="detail"||o.mode==="full"&&d.value),p=O(()=>o.fileDiff??[]),h=O(()=>o.fileDiffLoading===!0);function m(P){s("open",P)}function k(){s("back")}function w(){s("close")}const v=V("list");function y(P){v.value=P}function b(P){const M={children:[]},D=[...P].sort((B,z)=>B.path.localeCompare(z.path));for(const B of D){const z=B.path.split("/");let A=M;for(let L=0;LY.name===W&&Y.kind===(j?"file":"folder"));Q||(Q={name:W,path:re,kind:j?"file":"folder",status:j?B.status:void 0,children:[]},A.children.push(Q)),A=Q}}return M.children}const S=O(()=>b(o.changes)),I=V(new Set);function T(P){return!I.value.has(P)}const $=O(()=>{const P=[];function M(D,B){for(const z of D)P.push({node:z,depth:B}),z.kind==="folder"&&T(z.path)&&M(z.children,B+1)}return M(S.value,0),P});function F(P){const M=new Set(I.value);M.has(P.path)?M.delete(P.path):M.add(P.path),I.value=M}function R(P){return`${16+P*16}px`}return(P,M)=>(g(),C("div",F9e,[f.value?(g(),C(Te,{key:0},[K(Pa,{title:x(n)("diff.title"),closable:e.closable,"close-label":x(n)("diff.close"),onClose:w},{default:ve(()=>[K(Mn,{text:e.selectedDiffPath??""},{default:ve(()=>[_("span",O9e,N(a(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),_("div",R9e,[e.hideBack?oe("",!0):(g(),pe(nn,{key:0,variant:"ghost",size:"sm",onClick:k},{default:ve(()=>[M[0]||(M[0]=_("span",{"aria-hidden":"true"},"←",-1)),_("span",P9e,N(x(n)("diff.back")),1)]),_:1}))]),K(Cr,{name:"diff-content",mode:"out-in"},{default:ve(()=>[h.value?(g(),C("div",D9e,[K(ns,{size:"md"}),_("span",null,N(x(n)("diff.loading")),1)])):p.value.length>0?(g(),C("div",B9e,[K(ON,{lines:p.value,path:e.selectedDiffPath??void 0,"line-numbers":!0,framed:!1,"full-texts":e.fullTexts},null,8,["lines","path","full-texts"])])):(g(),C("div",z9e,N(e.emptyFile?x(n)("diff.emptyFile"):x(n)("diff.noDiff")),1))]),_:1})],64)):(g(),C(Te,{key:1},[K(Pa,{title:x(n)("diff.title"),closable:e.closable,"close-label":x(n)("diff.close"),onClose:w},{default:ve(()=>[_("span",W9e,N(x(n)(e.changes.length===1?"diff.fileCountOne":"diff.fileCountOther",{number:e.changes.length})),1),K(zs,{"model-value":v.value,size:"sm",options:[{value:"list",label:x(n)("diff.list")},{value:"tree",label:x(n)("diff.tree")}],"onUpdate:modelValue":y},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),_("div",H9e,[u.value?(g(),C(Te,{key:0},[_("span",j9e,N(x(n)("diff.branch")),1),_("span",U9e,N(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(g(),C("span",V9e,[K(Mn,{text:x(n)("diff.aheadTitle")},{default:ve(()=>[e.gitInfo.ahead>0?(g(),C("span",q9e,"↑"+N(e.gitInfo.ahead),1)):oe("",!0)]),_:1},8,["text"]),K(Mn,{text:x(n)("diff.behindTitle")},{default:ve(()=>[e.gitInfo.behind>0?(g(),C("span",K9e,"↓"+N(e.gitInfo.behind),1)):oe("",!0)]),_:1},8,["text"])])):oe("",!0)],64)):(g(),C("span",G9e,N(x(n)("diff.empty")),1))]),c.value&&v.value==="list"?(g(),C("div",Z9e,[(g(!0),C(Te,null,st(e.changes,D=>(g(),pe(Mn,{key:D.path,text:D.path},{default:ve(()=>[_("button",{type:"button",class:"ch-row",onClick:B=>m(D.path)},[_("span",{class:ze(["badge",i(D.status)])},N(l(D.status)),3),_("span",J9e,N(a(D.path)),1)],8,Y9e)]),_:2},1032,["text"]))),128))])):c.value&&v.value==="tree"?(g(),C("div",X9e,[_("ul",Q9e,[(g(!0),C(Te,null,st($.value,({node:D,depth:B})=>(g(),C("li",{key:D.path,class:"tree-node"},[D.kind==="folder"?(g(),C("button",{key:0,type:"button",class:"tree-row tree-folder",style:jt({paddingLeft:R(B)}),onClick:z=>F(D)},[K(Fe,{class:"tree-icon",name:"folder-solid",size:"sm"}),_("span",tIe,N(D.name),1)],12,eIe)):(g(),pe(Mn,{key:1,text:D.path},{default:ve(()=>[_("button",{type:"button",class:"tree-row tree-file",style:jt({paddingLeft:R(B)}),onClick:z=>m(D.path)},[_("span",{class:ze(["badge",i(D.status)])},N(l(D.status)),3),_("span",oIe,N(D.name),1)],12,nIe)]),_:2},1032,["text"]))]))),128))])])):u.value?(g(),C("div",sIe,N(x(n)("diff.clean")),1)):(g(),C("div",iIe,N(x(n)("diff.empty")),1))],64))]))}}),lIe=ht(rIe,[["__scopeId","data-v-67ba251c"]]);function RN(e,t){let n=null;Sn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,xt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),po(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const aIe={class:"search-wrap"},uIe={key:0,class:"tab-strip"},cIe={key:1,class:"state-row"},dIe={key:2,class:"state-row unavail"},fIe={key:3,class:"model-list"},pIe=["aria-selected","onClick","onMouseenter"],hIe={class:"check"},mIe={class:"model-main"},gIe={class:"model-name"},vIe={class:"model-id"},yIe={key:0,class:"caps"},kIe={class:"model-provider"},bIe={class:"model-ctx"},wIe={key:0,class:"empty"},xIe={class:"footer-hint"},_Ie=Ze({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=O(()=>new Set(o.starredIds??[]));function r(S){return i.value.has(S)}const l=V(""),a=V(null),u=V(null),c=V("all");RN(u,a);const d=O(()=>{const S=new Set,I=[{id:"all",label:n("model.allTab")}];for(const T of o.models)S.has(T.provider)||(S.add(T.provider),I.push({id:T.provider,label:T.provider}));return I}),f=O(()=>{const S=l.value.toLowerCase().trim(),I=o.models.filter(T=>{if(c.value!=="all"&&T.provider!==c.value)return!1;const $=(T.displayName??T.model).toLowerCase().includes(S),F=T.provider.toLowerCase().includes(S),R=T.id.toLowerCase().includes(S);return!S||$||F||R});return c.value!=="all"?I:I.sort((T,$)=>{const F=r(T.id)?1:0;return(r($.id)?1:0)-F})}),p=O(()=>f.value),h=V(0);Ye([l,c],()=>{h.value=0}),Ye(d,S=>{S.some(I=>I.id===c.value)||(c.value="all")}),Ye(p,S=>{h.value=Math.min(h.value,Math.max(S.length-1,0))});function m(S){if(S.key==="Escape"){s("close");return}if(S.key==="ArrowDown")S.preventDefault(),h.value=Math.min(h.value+1,p.value.length-1);else if(S.key==="ArrowUp")S.preventDefault(),h.value=Math.max(h.value-1,0);else if(S.key==="Enter"){const I=p.value[h.value];I&&s("select",I.id)}}Sn(()=>{document.addEventListener("keydown",m)}),En(()=>{document.removeEventListener("keydown",m)});function k(S){s("select",S)}function w(S){return p.value.indexOf(S)}function v(S){c.value=S}const y={image_in:"imageIn",imageIn:"imageIn",image_out:"imageOut",imageOut:"imageOut",vision:"vision",video_in:"videoIn",videoIn:"videoIn",audio_in:"audioIn",audioIn:"audioIn",audio_out:"audioOut",audioOut:"audioOut",thinking:"thinking",always_thinking:"alwaysThinking",alwaysThinking:"alwaysThinking",adaptive_thinking:"adaptiveThinking",adaptiveThinking:"adaptiveThinking",tool_use:"toolUse",toolUse:"toolUse",fast_mode:"fastMode",fastMode:"fastMode"};function b(S){const I=y[S];return I?n(`model.capabilities.${I}`):n("model.capabilities.unknown",{capability:S})}return(S,I)=>(g(),pe(Pd,{open:!0,"close-on-esc":!1,title:x(n)("model.title"),size:"xl",height:"fixed",onClose:I[1]||(I[1]=T=>s("close"))},{default:ve(()=>[_("div",{ref_key:"dialogRef",ref:u,class:"mp"},[_("div",aIe,[K(ms,{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=T=>l.value=T),placeholder:x(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:""},null,8,["modelValue","placeholder"])]),d.value.length>1?(g(),C("div",uIe,[(g(!0),C(Te,null,st(d.value,T=>(g(),pe(nn,{key:T.id,variant:T.id===c.value?"secondary":"ghost",size:"sm",onClick:$=>v(T.id)},{default:ve(()=>[qe(N(T.label),1)]),_:2},1032,["variant","onClick"]))),128))])):oe("",!0),e.loading?(g(),C("div",cIe,[K(ns,{size:"sm"}),_("span",null,N(x(n)("model.loading")),1)])):e.unavailable?(g(),C("div",dIe,[K(Fe,{name:"alert-triangle",size:"lg"}),_("span",null,N(x(n)("model.unavailable")),1)])):(g(),C("div",fIe,[(g(!0),C(Te,null,st(p.value,T=>(g(),C("div",{key:T.id,class:ze(["model-row",{"is-current":T.id===e.current,"is-selected":w(T)===h.value}]),role:"option","aria-selected":T.id===e.current,onClick:$=>k(T.id),onMouseenter:$=>h.value=w(T)},[_("span",hIe,[T.id===e.current?(g(),pe(Fe,{key:0,name:"check",size:"sm"})):oe("",!0)]),_("span",mIe,[_("span",gIe,N(T.displayName??T.model),1),_("span",vIe,N(T.id),1),T.capabilities&&T.capabilities.length>0?(g(),C("span",yIe,[(g(!0),C(Te,null,st(T.capabilities,$=>(g(),pe(wr,{key:$,variant:"info",size:"sm"},{default:ve(()=>[qe(N(b($)),1)]),_:2},1024))),128))])):oe("",!0)]),_("span",kIe,N(T.provider),1),_("span",bIe,N(x(n)("model.contextSuffix",{size:x(Pl)(T.maxContextSize)})),1),K(Jt,{size:"sm",label:r(T.id)?x(n)("model.unstarTitle"):x(n)("model.starTitle"),onClick:Ct($=>s("toggle-star",T.id),["stop"])},{default:ve(()=>[r(T.id)?(g(),pe(Fe,{key:0,name:"star",size:"md"})):(g(),pe(Fe,{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["label","onClick"])],42,pIe))),128)),p.value.length===0&&!e.loading&&!e.unavailable?(g(),C("div",wIe,N(o.models.length===0?x(n)("model.emptyNoModels"):x(n)("model.emptyNoMatch")),1)):oe("",!0)])),_("div",xIe,N(x(n)("model.footerHint")),1)],512)]),_:1},8,["title"]))}}),SIe=ht(_Ie,[["__scopeId","data-v-92ec064d"]]),CIe=["aria-checked","aria-label","disabled"],AIe=Ze({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(g(),C("button",{class:ze(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[_("span",{class:"ui-switch__thumb"},null,-1)])],10,CIe))}}),mr=ht(AIe,[["__scopeId","data-v-d7337ade"]]),MIe=["value","disabled"],EIe=Ze({__name:"Select",props:{modelValue:{},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(s){n("update:modelValue",s.target.value)}return(s,i)=>(g(),C("select",{class:ze(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error}]]),value:e.modelValue,disabled:e.disabled,onChange:o},[An(s.$slots,"default",{},void 0,!0)],42,MIe))}}),C2=ht(EIe,[["__scopeId","data-v-77d887db"]]),TIe={key:0,class:"ui-field__label"},IIe={key:1,class:"ui-field__error"},$Ie={key:2,class:"ui-field__hint"},NIe=Ze({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-field",{"has-error":!!e.error}])},[e.label?(g(),C("label",TIe,N(e.label),1)):oe("",!0),An(t.$slots,"default",{},void 0,!0),e.error?(g(),C("span",IIe,N(e.error),1)):e.hint?(g(),C("span",$Ie,N(e.hint),1)):oe("",!0)],2))}}),Al=ht(NIe,[["__scopeId","data-v-bd93f701"]]),LIe=["pythinker","openai","openai_responses","anthropic","google-genai","vertexai"],FIe=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function A2(){return{model:"",maxContextSize:"",displayName:""}}function xM(){return{id:"",type:"openai",apiKey:"",baseUrl:"",models:[A2()]}}function OIe(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:""})}return n}function RIe(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!FIe.test(n))return"idInvalid";if(t.apiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.baseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const o of e.models){if(o.model.trim()==="")return"modelRequired";const s=o.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function PN(e){return e.map(t=>({model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),displayName:t.displayName.trim()||void 0}))}function PIe(e){return{id:e.id.trim(),type:e.type,apiKey:e.apiKey.trim()||void 0,baseUrl:e.baseUrl.trim()||void 0,models:PN(e.models)}}function DIe(e,t,n,o){const s=PN(e.models),i=o?.includes("/")?o.slice(o.indexOf("/")+1):o;return{newId:e.id.trim()!==t.id?e.id.trim():void 0,type:e.type,apiKey:e.apiKey.trim()||(n?"":void 0),baseUrl:e.baseUrl.trim()||void 0,defaultModel:i&&s.some(r=>r.model===i)?i:void 0,models:s}}const BIe={key:0,class:"provider-form__managed"},zIe={class:"provider-form__fields"},WIe=["value"],HIe={class:"provider-form__key"},jIe={class:"provider-form__models-head"},UIe={class:"provider-form__models"},VIe={class:"provider-form__model provider-form__model--head"},qIe={key:1,class:"provider-form__error",role:"alert"},KIe={class:"provider-form__actions"},GIe=Ze({__name:"ProviderForm",props:{mode:{},provider:{},config:{}},emits:["dirtyChange","saved","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=xM(),r=Ms(i),l=V(""),a=V(!1),u=V(!1),c=V(!1),d=V(!1),f=O(()=>n.provider?.id.startsWith("managed:")===!0),p=O(()=>LIe.map(b=>({value:b,label:s(`providers.types.${b}`)})));function h(){const b=n.provider;if(n.mode==="edit"&&b!==void 0){r.id=b.id,r.type=b.type,r.apiKey="",r.baseUrl=b.baseUrl??"";const S=OIe(b,n.config?.models);r.models=S.length>0?S:[A2()]}else Object.assign(r,xM());l.value="",o("dirtyChange",!1)}async function m(){const b=n.provider;if(!(n.mode!=="edit"||b===void 0||f.value||!b.hasApiKey))try{const S=await St().getProvider(b.id);S.apiKey&&!d.value&&(r.apiKey=S.apiKey,c.value=!0)}catch{c.value=!1}}function k(){o("dirtyChange",!0)}function w(){r.models.push(A2()),k()}function v(b){r.models.length<=1||(r.models.splice(b,1),k())}async function y(){if(a.value||f.value)return;const b=RIe(r,{apiKey:n.mode==="add",baseUrl:n.mode==="add"});if(b!==null){l.value=s(`providers.error.${b}`);return}a.value=!0,l.value="";try{if(n.mode==="add"){const T=await St().addProvider(PIe(r));o("dirtyChange",!1),o("saved",T.id);return}const S=n.provider;if(S===void 0)return;const I=await St().updateProvider(S.id,DIe(r,S,c.value,n.config?.providers[S.id]?.defaultModel));o("dirtyChange",!1),o("saved",I.provider.id)}catch{l.value=s("providers.saveFailed")}finally{a.value=!1}}return Sn(()=>{h(),m()}),(b,S)=>(g(),C("form",{class:"provider-form",onSubmit:Ct(y,["prevent"]),onInput:k},[f.value?(g(),C("div",BIe,N(x(s)("providers.managedHint")),1)):oe("",!0),_("div",zIe,[K(Al,{label:x(s)("providers.fieldId")},{default:ve(()=>[K(ms,{modelValue:r.id,"onUpdate:modelValue":S[0]||(S[0]=I=>r.id=I),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldType")},{default:ve(()=>[K(C2,{modelValue:r.type,"onUpdate:modelValue":S[1]||(S[1]=I=>r.type=I),disabled:f.value},{default:ve(()=>[(g(!0),C(Te,null,st(p.value,I=>(g(),C("option",{key:I.value,value:I.value},N(I.label),9,WIe))),128))]),_:1},8,["modelValue","disabled"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",HIe,[K(ms,{modelValue:r.apiKey,"onUpdate:modelValue":[S[2]||(S[2]=I=>r.apiKey=I),S[3]||(S[3]=I=>d.value=!0)],type:u.value?"text":"password",disabled:f.value,placeholder:e.provider?.hasApiKey?x(s)("providers.apiKeySet"):"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","disabled","placeholder"]),K(Jt,{class:"provider-form__eye",size:"sm",disabled:f.value,label:u.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:S[4]||(S[4]=I=>u.value=!u.value)},{default:ve(()=>[K(Fe,{name:u.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["disabled","label"])])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldBaseUrl")},{default:ve(()=>[K(ms,{modelValue:r.baseUrl,"onUpdate:modelValue":S[5]||(S[5]=I=>r.baseUrl=I),disabled:f.value,placeholder:x(s)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_("div",jIe,[_("strong",null,N(x(s)("providers.fieldModels")),1),K(nn,{type:"button",size:"sm",variant:"secondary",disabled:f.value,onClick:w},{default:ve(()=>[K(Fe,{name:"plus",size:"sm"}),qe(N(x(s)("providers.addModel")),1)]),_:1},8,["disabled"])]),_("div",UIe,[_("div",VIe,[_("span",null,N(x(s)("providers.colModelId")),1),_("span",null,N(x(s)("providers.colContext")),1),_("span",null,N(x(s)("providers.colDisplayName")),1),S[7]||(S[7]=_("span",null,null,-1))]),(g(!0),C(Te,null,st(r.models,(I,T)=>(g(),C("div",{key:T,class:"provider-form__model"},[K(ms,{modelValue:I.model,"onUpdate:modelValue":$=>I.model=$,disabled:f.value,placeholder:x(s)("providers.modelIdPlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),K(ms,{modelValue:I.maxContextSize,"onUpdate:modelValue":$=>I.maxContextSize=$,disabled:f.value,inputmode:"numeric",placeholder:x(s)("providers.modelContextPlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),K(ms,{modelValue:I.displayName,"onUpdate:modelValue":$=>I.displayName=$,disabled:f.value,placeholder:x(s)("providers.modelNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"]),K(Jt,{size:"sm",disabled:f.value||r.models.length<=1,label:x(s)("providers.removeModel"),onClick:$=>v(T)},{default:ve(()=>[K(Fe,{name:"trash",size:"sm"})]),_:1},8,["disabled","label","onClick"])]))),128))]),l.value?(g(),C("div",qIe,N(l.value),1)):oe("",!0),_("div",KIe,[K(nn,{type:"button",variant:"secondary",onClick:S[6]||(S[6]=I=>o("cancel"))},{default:ve(()=>[qe(N(x(s)("common.cancel")),1)]),_:1}),f.value?oe("",!0):(g(),pe(nn,{key:0,type:"submit",variant:"primary",loading:a.value},{default:ve(()=>[qe(N(x(s)("providers.save")),1)]),_:1},8,["loading"]))])],32))}}),DN=ht(GIe,[["__scopeId","data-v-e7c6ed44"]]),ZIe={class:"add-provider-flow"},YIe={key:0,class:"add-provider-flow__section"},JIe={key:0,class:"add-provider-flow__state"},XIe={key:1,class:"add-provider-flow__state"},QIe={class:"add-provider-flow__catalog"},e$e=["disabled","onClick"],t$e={class:"add-provider-flow__name"},n$e={key:0,class:"add-provider-flow__empty"},o$e={class:"add-provider-flow__key"},s$e={key:1,class:"add-provider-flow__warning"},i$e={class:"add-provider-flow__note"},r$e={key:2,class:"add-provider-flow__error",role:"alert"},l$e={class:"add-provider-flow__actions"},a$e={class:"add-provider-flow__note"},u$e={class:"add-provider-flow__key"},c$e={key:0,class:"add-provider-flow__error",role:"alert"},d$e={class:"add-provider-flow__actions"},f$e={key:2,class:"add-provider-flow__section"},p$e=Ze({__name:"AddProviderFlow",props:{config:{}},emits:["dirtyChange","added","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=V("catalog"),r=O(()=>[{value:"catalog",label:s("providers.catalog.sourceCatalog")},{value:"registry",label:s("providers.catalog.sourceRegistry")},{value:"manual",label:s("providers.catalog.sourceManual")}]),l=V([]),a=V("loading"),u=V(""),c=V(null),d=Ms({id:"",apiKey:"",baseUrl:""}),f=V(""),p=V(!1),h=V(!1),m=Ms({url:"",apiKey:""}),k=V(""),w=V(!1),v=V(!1),y=O(()=>{const P=u.value.trim().toLowerCase();return P===""?l.value:l.value.filter(M=>M.name.toLowerCase().includes(P)||M.id.toLowerCase().includes(P))}),b=O(()=>Object.hasOwn(n.config?.providers??{},d.id.trim()));async function S(){a.value="loading";try{l.value=await St().listCatalogProviders(),a.value="ready";const P=l.value.filter(M=>!M.rejected);P.length===1&&c.value===null&&T(P[0])}catch{a.value="error"}}function I(P){const M=P.rejectReason===null?"":`providers.catalog.rejectReason.${P.rejectReason}`;return M!==""&&s(M)!==M?s(M):s("providers.catalog.rejected")}function T(P){P.rejected||(c.value=P,d.id=P.id,d.apiKey="",d.baseUrl="",f.value="")}function $(){o("dirtyChange",!0)}async function F(){const P=c.value;if(P===null||p.value)return;const M=d.id.trim();if(M===""){f.value=s("providers.error.idRequired");return}if(d.apiKey.trim()===""){f.value=s("providers.error.apiKeyRequired");return}if(P.needsBaseUrl&&d.baseUrl.trim()===""){f.value=s("providers.error.baseUrlRequired");return}p.value=!0,f.value="";try{await St().importCatalogProvider({catalogId:P.id,id:M===P.id?void 0:M,apiKey:d.apiKey.trim(),baseUrl:d.baseUrl.trim()||void 0}),o("dirtyChange",!1),o("added",M)}catch{f.value=s("providers.addFailed")}finally{p.value=!1}}async function R(){if(w.value)return;const P=m.url.trim();if(P===""){k.value=s("providers.error.registryUrlRequired");return}w.value=!0,k.value="";try{const M=await St().importCustomRegistry({url:P,apiKey:m.apiKey.trim()||void 0});o("dirtyChange",!1);const D=M.providers[0];D===void 0?o("cancel"):o("added",D.id)}catch{k.value=s("providers.addFailed")}finally{w.value=!1}}return Sn(S),(P,M)=>(g(),C("div",ZIe,[K(zs,{modelValue:i.value,"onUpdate:modelValue":M[0]||(M[0]=D=>i.value=D),size:"sm",options:r.value},null,8,["modelValue","options"]),i.value==="catalog"?(g(),C("section",YIe,[a.value==="loading"?(g(),C("div",JIe,[K(ns,{size:"sm"}),qe(N(x(s)("providers.catalog.loading")),1)])):a.value==="error"?(g(),C("div",XIe,[_("span",null,N(x(s)("providers.catalog.loadError")),1),K(nn,{size:"sm",variant:"secondary",onClick:S},{default:ve(()=>[qe(N(x(s)("providers.catalog.retry")),1)]),_:1})])):c.value===null?(g(),C(Te,{key:2},[K(ms,{modelValue:u.value,"onUpdate:modelValue":M[1]||(M[1]=D=>u.value=D),placeholder:x(s)("providers.catalog.searchPlaceholder"),autocomplete:"off"},null,8,["modelValue","placeholder"]),_("div",QIe,[(g(!0),C(Te,null,st(y.value,D=>(g(),C("button",{key:D.id,type:"button",class:"add-provider-flow__entry",disabled:D.rejected,onClick:B=>T(D)},[_("span",t$e,N(D.name),1),D.wireType?(g(),pe(wr,{key:0,size:"sm",variant:"neutral"},{default:ve(()=>[qe(N(D.wireType),1)]),_:2},1024)):oe("",!0),M[15]||(M[15]=_("span",{class:"add-provider-flow__grow"},null,-1)),_("span",null,N(D.rejected?I(D):x(s)("providers.modelCount",{count:D.models.length})),1)],8,e$e))),128)),y.value.length===0?(g(),C("div",n$e,N(x(s)("providers.catalog.empty")),1)):oe("",!0)])],64)):(g(),C("form",{key:3,class:"add-provider-flow__form",onSubmit:Ct(F,["prevent"]),onInput:$},[_("button",{type:"button",class:"add-provider-flow__back",onClick:M[2]||(M[2]=D=>c.value=null)},[K(Fe,{class:"add-provider-flow__back-icon",name:"chevron-right",size:"sm"}),qe(N(x(s)("providers.catalog.backToList")),1)]),K(Al,{label:x(s)("providers.fieldId")},{default:ve(()=>[K(ms,{modelValue:d.id,"onUpdate:modelValue":M[3]||(M[3]=D=>d.id=D),autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",o$e,[K(ms,{modelValue:d.apiKey,"onUpdate:modelValue":M[4]||(M[4]=D=>d.apiKey=D),type:h.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),K(Jt,{class:"add-provider-flow__eye",size:"sm",label:h.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:M[5]||(M[5]=D=>h.value=!h.value)},{default:ve(()=>[K(Fe,{name:h.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),c.value.needsBaseUrl?(g(),pe(Al,{key:0,label:x(s)("providers.fieldBaseUrl")},{default:ve(()=>[K(ms,{modelValue:d.baseUrl,"onUpdate:modelValue":M[6]||(M[6]=D=>d.baseUrl=D),placeholder:x(s)("providers.baseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):oe("",!0),b.value?(g(),C("div",s$e,N(x(s)("providers.catalog.overwriteWarning")),1)):oe("",!0),_("div",i$e,N(x(s)("providers.catalog.willImport",{count:c.value.models.length})),1),f.value?(g(),C("div",r$e,N(f.value),1)):oe("",!0),_("div",l$e,[K(nn,{type:"button",variant:"secondary",onClick:M[7]||(M[7]=D=>o("cancel"))},{default:ve(()=>[qe(N(x(s)("common.cancel")),1)]),_:1}),K(nn,{type:"submit",variant:"primary",loading:p.value},{default:ve(()=>[qe(N(x(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32))])):i.value==="registry"?(g(),C("form",{key:1,class:"add-provider-flow__section add-provider-flow__form",onSubmit:Ct(R,["prevent"]),onInput:$},[_("p",a$e,N(x(s)("providers.catalog.registryHint")),1),K(Al,{label:x(s)("providers.catalog.registryUrlLabel")},{default:ve(()=>[K(ms,{modelValue:m.url,"onUpdate:modelValue":M[8]||(M[8]=D=>m.url=D),placeholder:"https://example.com/api.json",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"]),K(Al,{label:x(s)("providers.fieldApiKey")},{default:ve(()=>[_("div",u$e,[K(ms,{modelValue:m.apiKey,"onUpdate:modelValue":M[9]||(M[9]=D=>m.apiKey=D),type:v.value?"text":"password",autocomplete:"off"},null,8,["modelValue","type"]),K(Jt,{class:"add-provider-flow__eye",size:"sm",label:v.value?x(s)("providers.hideApiKey"):x(s)("providers.showApiKey"),onClick:M[10]||(M[10]=D=>v.value=!v.value)},{default:ve(()=>[K(Fe,{name:v.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_:1},8,["label"]),k.value?(g(),C("div",c$e,N(k.value),1)):oe("",!0),_("div",d$e,[K(nn,{type:"button",variant:"secondary",onClick:M[11]||(M[11]=D=>o("cancel"))},{default:ve(()=>[qe(N(x(s)("common.cancel")),1)]),_:1}),K(nn,{type:"submit",variant:"primary",loading:w.value},{default:ve(()=>[qe(N(x(s)("providers.catalog.importAction")),1)]),_:1},8,["loading"])])],32)):(g(),C("div",f$e,[K(DN,{mode:"add",config:e.config,onDirtyChange:M[12]||(M[12]=D=>o("dirtyChange",D)),onSaved:M[13]||(M[13]=D=>o("added",D)),onCancel:M[14]||(M[14]=D=>o("cancel"))},null,8,["config"])]))]))}}),h$e=ht(p$e,[["__scopeId","data-v-f7a8fd45"]]),m$e={class:"providers-panel"},g$e={class:"providers-panel__heading"},v$e={key:0,class:"providers-panel__state"},y$e={key:1,class:"providers-panel__state providers-panel__state--warning"},k$e={class:"providers-panel__add-icon"},b$e={key:0,class:"providers-panel__details"},w$e={key:0,class:"providers-panel__state"},x$e=["data-testid","aria-expanded","onClick"],_$e={class:"providers-panel__identity"},S$e={class:"providers-panel__count"},C$e={key:0,class:"providers-panel__details"},A$e={key:0,class:"providers-panel__model-list"},M$e={class:"providers-panel__delete"},E$e=Ze({__name:"ProvidersPanel",props:{discardToken:{default:0}},emits:["dirtyChange"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{confirm:s}=Ka(),i=V([]),r=V(null),l=V(!1),a=V(!1),u=V(null),c=V(!1),d=O(()=>i.value.toSorted((w,v)=>w.id.localeCompare(v.id))),f=O(()=>u.value==="$add");Ye(c,w=>n("dirtyChange",w),{immediate:!0}),Ye(()=>e.discardToken,()=>{c.value=!1,u.value=null});async function p(){l.value=!0,a.value=!1;try{i.value=await St().listProviders()}catch{i.value=[],a.value=!0}try{r.value=await St().getConfig()}catch{r.value=null}finally{l.value=!1}}function h(w){c.value||(u.value=u.value===w?null:w)}async function m(w){c.value=!1,await p(),u.value=w}async function k(w){await s({title:o("providers.deleteProvider"),message:o("providers.deleteConfirm",{id:w.id,count:w.models?.length??0}),confirmLabel:o("providers.deleteConfirmYes"),cancelLabel:o("common.cancel"),variant:"danger",action:async()=>{await St().deleteProvider(w.id),u.value=null,c.value=!1,await p()}})}return Sn(p),(w,v)=>(g(),C("section",m$e,[_("div",g$e,[_("div",null,[_("h3",null,N(x(o)("providers.title")),1),_("p",null,N(x(o)("providers.description")),1)])]),l.value?(g(),C("div",v$e,[K(ns,{size:"sm"}),qe(N(x(o)("providers.loading")),1)])):a.value?(g(),C("div",y$e,[K(Fe,{name:"alert-triangle",size:"md"}),qe(N(x(o)("providers.unavailable")),1)])):(g(),C(Te,{key:2},[_("section",{class:ze(["providers-panel__card providers-panel__add",{"is-open":f.value}])},[_("button",{type:"button",class:"providers-panel__summary",onClick:v[0]||(v[0]=y=>h("$add"))},[_("span",k$e,[K(Fe,{name:"plus",size:"sm"})]),_("strong",null,N(x(o)("providers.addProvider")),1),v[5]||(v[5]=_("span",{class:"providers-panel__grow"},null,-1)),K(Fe,{name:"chevron-right",size:"sm",class:ze({"is-rotated":f.value})},null,8,["class"])]),f.value?(g(),C("div",b$e,[K(h$e,{config:r.value,onDirtyChange:v[1]||(v[1]=y=>c.value=y),onAdded:m,onCancel:v[2]||(v[2]=y=>{u.value=null,c.value=!1})},null,8,["config"])])):oe("",!0)],2),i.value.length===0?(g(),C("div",w$e,N(x(o)("providers.empty")),1)):oe("",!0),(g(!0),C(Te,null,st(d.value,y=>(g(),C("section",{key:y.id,class:"providers-panel__card"},[_("button",{type:"button",class:"providers-panel__summary","data-testid":`provider-${y.id}-toggle`,"aria-expanded":u.value===y.id,onClick:b=>h(y.id)},[K(Mn,{text:x(o)(`providers.status.${y.status}`)},{default:ve(()=>[_("span",{class:ze(["providers-panel__status",`is-${y.status}`])},null,2)]),_:2},1032,["text"]),_("span",_$e,[_("strong",null,N(y.id),1),_("span",null,[qe(N(y.type),1),y.baseUrl?(g(),C(Te,{key:0},[qe(" · "+N(y.baseUrl),1)],64)):oe("",!0)])]),v[6]||(v[6]=_("span",{class:"providers-panel__grow"},null,-1)),K(wr,{variant:y.hasApiKey?"success":"neutral",size:"sm"},{default:ve(()=>[qe(N(y.hasApiKey?x(o)("providers.keySet"):x(o)("providers.keyNotSet")),1)]),_:2},1032,["variant"]),_("span",S$e,N(x(o)("providers.modelCount",{count:y.models?.length??0})),1),K(Fe,{name:"chevron-right",size:"sm",class:ze({"is-rotated":u.value===y.id})},null,8,["class"])],8,x$e),u.value===y.id?(g(),C("div",C$e,[y.models?.length?(g(),C("div",A$e,[(g(!0),C(Te,null,st(y.models,b=>(g(),C("code",{key:b},N(b),1))),128))])):oe("",!0),K(DN,{mode:"edit",provider:y,config:r.value,onDirtyChange:v[3]||(v[3]=b=>c.value=b),onSaved:m,onCancel:v[4]||(v[4]=b=>{u.value=null,c.value=!1})},null,8,["provider","config"]),_("div",M$e,[K(nn,{variant:"danger-soft",size:"sm","data-testid":`provider-${y.id}-delete`,onClick:b=>k(y)},{default:ve(()=>[qe(N(x(o)("providers.deleteProvider")),1)]),_:1},8,["data-testid","onClick"])])])):oe("",!0)]))),128))],64))]))}}),T$e=ht(E$e,[["__scopeId","data-v-b143e58f"]]),I$e=["aria-expanded","aria-label","disabled"],$$e=["aria-label"],N$e=["aria-label"],L$e={class:"sm-picker__group"},F$e=["aria-selected","onMouseenter","onClick"],O$e={class:"sm-picker__option-label"},R$e=["aria-label"],P$e={class:"sm-picker__group"},D$e=["aria-selected","onMouseenter","onClick"],B$e={class:"sm-picker__option-label"},z$e=250,W$e=188,H$e=Ze({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{},disabled:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=`sm-picker-${Math.random().toString(36).slice(2,9)}`,r=V(null),l=V(null),a=V(null),u=V(!1),c=V(!1),d=V({}),f=V(null),p=V(""),h=V(0),m=V("models"),k=V(0),w=V(0),v=V("right"),y=new Map;let b=null;const S=O(()=>n.groups.flatMap(he=>he.options)),I=O(()=>n.modelValue?S.value.find(he=>he.id===n.modelValue)?.label??n.modelValue:""),T=O(()=>n.modelValue?n.effort?`${I.value} · ${n.effort}`:I.value:s("settings.noSecondaryModel")),$=O(()=>{const he=f.value;if(he===null)return[];const ee=kh(n.modelInfoById[he]),ne=n.effort===""?[null,...ee]:[...ee];return n.modelValue===he&&n.effort!==""&&!ee.includes(n.effort)&&ne.push(n.effort),ne});function F(he){return n.modelValue!==f.value?!1:he===null?n.effort==="":n.effort===he}function R(){const he=$.value.findIndex(F);return he>=0?he:0}function P(he,ee){he instanceof HTMLElement?y.set(ee,he):y.delete(ee)}function M(){b!==null&&(clearTimeout(b),b=null)}function D(){M(),b=setTimeout(()=>{f.value=null,m.value==="efforts"&&(m.value="models")},z$e)}function B(he){he!==p.value&&(p.value=he,h.value=Math.max(0,S.value.findIndex(ee=>ee.id===he)))}function z(){const he=r.value,ee=l.value;if(!he||!ee)return;const ne=he.getBoundingClientRect(),H=ee.offsetHeight,Z=window.innerHeight-ne.bottom;c.value=ZH;const ye=Math.max(8,window.innerWidth-ne.right);d.value=c.value?{right:`${ye}px`,bottom:`${window.innerHeight-ne.top+4}px`,top:"auto"}:{right:`${ye}px`,top:`${ne.bottom+4}px`,bottom:"auto"}}function A(){const he=l.value,ee=f.value===null?void 0:y.get(f.value);if(!he||!ee)return;const ne=he.getBoundingClientRect(),H=ee.getBoundingClientRect(),Z=a.value?.offsetHeight??0,ye=Math.max(0,window.innerHeight-8-Z-ne.top);w.value=Math.max(0,Math.min(H.top-ne.top-4,he.offsetHeight-40,ye));const fe=window.innerWidth-ne.right;v.value=fe>=W$e||fe>=ne.left?"right":"left"}function L(){u.value||n.disabled||(u.value=!0,p.value=n.modelValue||S.value[0]?.id||"",h.value=Math.max(0,S.value.findIndex(he=>he.id===p.value)),f.value=null,m.value="models",xt(z))}function W({restoreFocus:he=!1}={}){u.value&&(M(),u.value=!1,f.value=null,he&&xt(()=>r.value?.focus()))}function j(){u.value?W({restoreFocus:!0}):L()}function re(){f.value=null,m.value="models"}function Q(he,{moveFocus:ee=!1}={}){B(he),M(),f.value=he,xt(A),ee&&(m.value="efforts",k.value=R())}function Y(he){const ee=f.value;if(ee===null)return;const ne={model:ee,...he===null?{}:{effort:he}};(ne.model!==n.modelValue||(ne.effort??"")!==n.effort)&&o("select",ne),W({restoreFocus:!0})}function G(){xt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function X(he){const ee=S.value;if(ee.length===0)return;const ne=ee[(h.value+he+ee.length)%ee.length];B(ne.id),f.value!==null&&Q(ne.id),G()}function te(he){const ee=$.value;ee.length!==0&&(k.value=(k.value+he+ee.length)%ee.length,G())}function q(he){if(!u.value){(he.key==="Enter"||he.key===" "||he.key==="ArrowDown")&&(he.preventDefault(),L());return}if(he.key==="ArrowDown")he.preventDefault(),m.value==="models"?X(1):te(1);else if(he.key==="ArrowUp")he.preventDefault(),m.value==="models"?X(-1):te(-1);else if(he.key==="ArrowRight")he.preventDefault(),Q(p.value,{moveFocus:!0});else if(he.key==="ArrowLeft")he.preventDefault(),f.value!==null&&re();else if(he.key==="Enter"||he.key===" ")he.preventDefault(),m.value==="models"?Q(p.value,{moveFocus:!0}):Y($.value[k.value]??null);else if(he.key==="Home"||he.key==="End"){he.preventDefault();const ee=he.key==="Home";if(m.value==="models"){const ne=S.value;if(ne.length===0)return;const H=(ee?ne[0]:ne.at(-1)).id;B(H),f.value!==null&&Q(H)}else k.value=ee?0:$.value.length-1;G()}else he.key==="Escape"&&(he.preventDefault(),W({restoreFocus:!0}))}function me(he){const ee=he.target;ee instanceof Node&&(r.value?.contains(ee)||l.value?.contains(ee)||W())}function xe(he){if(u.value){if(l.value?.contains(he.target instanceof Node?he.target:null)){A();return}W(),z()}}function We(){u.value&&z()}return Sn(()=>{document.addEventListener("pointerdown",me),document.addEventListener("scroll",xe,!0),window.addEventListener("resize",We)}),En(()=>{document.removeEventListener("pointerdown",me),document.removeEventListener("scroll",xe,!0),window.removeEventListener("resize",We),M()}),(he,ee)=>(g(),C("div",{class:ze(["sm-picker",{"is-open":u.value}])},[_("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":i,"aria-expanded":u.value,"aria-haspopup":"dialog","aria-label":x(s)("settings.secondaryModel"),disabled:e.disabled,onClick:j,onKeydown:q},[_("span",{class:ze(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[_("span",null,N(T.value),1)],2),K(Fe,{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,I$e),(g(),pe(Hl,{to:"body"},[u.value?(g(),C("div",{key:0,id:i,ref_key:"menuRef",ref:l,class:ze(["sm-picker__menu",{"sm-picker__menu--up":c.value}]),style:jt(d.value),role:"dialog","aria-label":x(s)("settings.secondaryModel")},[_("div",{class:"sm-picker__models",role:"listbox","aria-label":x(s)("settings.secondaryModel")},[(g(!0),C(Te,null,st(e.groups,ne=>(g(),C(Te,{key:ne.provider},[_("div",L$e,N(ne.provider),1),(g(!0),C(Te,null,st(ne.options,H=>(g(),C("button",{key:H.id,ref_for:!0,ref:Z=>P(Z,H.id),type:"button",class:ze(["sm-picker__option",{"is-selected":H.id===e.modelValue,"is-active":H.id===p.value,"is-kb-active":m.value==="models"&&H.id===p.value}]),role:"option","aria-selected":H.id===e.modelValue,onMouseenter:Z=>Q(H.id),onMouseleave:D,onClick:Z=>Q(H.id,{moveFocus:!0})},[K(Fe,{class:"sm-picker__check",name:"check",size:"sm"}),_("span",O$e,N(H.label),1),K(Fe,{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,F$e))),128))],64))),128))],8,N$e),f.value!==null?(g(),C("div",{key:0,ref_key:"flyoutRef",ref:a,class:ze(["sm-picker__flyout",`sm-picker__flyout--${v.value}`]),style:jt({top:`${w.value}px`}),role:"listbox","aria-label":x(s)("settings.secondaryModelEffort"),onMouseenter:M,onMouseleave:D},[_("div",P$e,N(x(s)("settings.secondaryModelEffort")),1),(g(!0),C(Te,null,st($.value,(ne,H)=>(g(),C("button",{key:ne??"__default__",type:"button",class:ze(["sm-picker__option",{"is-selected":F(ne),"is-kb-active":m.value==="efforts"&&H===k.value,"is-muted":ne===null}]),role:"option","aria-selected":F(ne),onMouseenter:Z=>{m.value="efforts",k.value=H},onClick:Z=>Y(ne)},[K(Fe,{class:"sm-picker__check",name:"check",size:"sm"}),_("span",B$e,N(ne??x(s)("settings.secondaryModelEffortAuto")),1)],42,D$e))),128))],46,R$e)):oe("",!0)],14,$$e)):oe("",!0)]))],2))}}),j$e=ht(H$e,[["__scopeId","data-v-57066bcd"]]),U$e=["aria-label"],V$e=["aria-selected","onClick"],q$e={class:"body"},K$e={class:"panel"},G$e={class:"sec"},Z$e={class:"sec-title"},Y$e={class:"row"},J$e={class:"rlabel"},X$e={class:"row"},Q$e={class:"rlabel"},e7e={class:"row"},t7e={class:"rlabel"},n7e={class:"row"},o7e={class:"rlabel"},s7e={class:"hint"},i7e={class:"sec"},r7e={class:"sec-title"},l7e={class:"row"},a7e={class:"rlabel"},u7e={key:0,class:"hint"},c7e={class:"row"},d7e={class:"rlabel"},f7e={key:0,class:"hint"},p7e={class:"row"},h7e={class:"rlabel"},m7e={key:0,class:"hint"},g7e={class:"row"},v7e={class:"rlabel"},y7e={class:"panel"},k7e={class:"sec"},b7e={class:"sec-title"},w7e={class:"row"},x7e={class:"rlabel"},_7e={key:0,class:"rvalue"},S7e={class:"actions"},C7e={class:"panel"},A7e={class:"panel"},M7e={class:"sec"},E7e={class:"sec-head"},T7e={class:"sec-title"},I7e={key:0,class:"saving"},$7e={class:"row"},N7e={class:"rlabel"},L7e={class:"hint"},F7e={key:0,class:"select-wrap"},O7e={key:0,value:"",disabled:""},R7e=["label"],P7e=["value"],D7e={key:1,class:"rvalue mono"},B7e={class:"row"},z7e={class:"rlabel"},W7e={class:"hint"},H7e={class:"row"},j7e={class:"rlabel"},U7e={class:"hint"},V7e={class:"row"},q7e={class:"rlabel"},K7e={class:"hint"},G7e={class:"row"},Z7e={class:"rlabel"},Y7e={class:"hint"},J7e={key:0,class:"sec"},X7e={class:"sec-title"},Q7e={class:"row"},eNe={class:"rlabel"},tNe={class:"hint"},nNe={key:1,class:"rvalue"},oNe={key:1,class:"empty-config"},sNe={class:"panel"},iNe={class:"sec"},rNe={class:"sec-title"},lNe={class:"row"},aNe={class:"rlabel"},uNe={class:"hint"},cNe={class:"rvalue mono"},dNe={class:"row"},fNe={class:"rlabel"},pNe={class:"hint"},hNe={class:"value-wrap"},mNe={class:"rvalue mono"},gNe={class:"row"},vNe={class:"rlabel"},yNe={class:"hint"},kNe={class:"value-wrap"},bNe={class:"rvalue mono"},wNe={class:"row"},xNe={class:"rlabel"},_Ne={class:"rvalue mono"},SNe={key:0,class:"sec"},CNe={key:0,class:"row"},ANe={class:"rlabel"},MNe={class:"hint"},ENe={class:"hint"},TNe={class:"sec"},INe={class:"sec-title"},$Ne={class:"row"},NNe={class:"rlabel"},LNe={key:0,class:"hint"},FNe={class:"row"},ONe={class:"rlabel"},RNe={class:"panel"},PNe={class:"sec"},DNe={class:"sec-title"},BNe={class:"row"},zNe={class:"rlabel"},WNe={class:"hint"},HNe={class:"row"},jNe={class:"rlabel"},UNe={class:"hint"},VNe={key:1,class:"empty-config"},qNe={class:"panel"},KNe={class:"panel-head"},GNe={class:"panel-title"},ZNe={class:"panel-desc"},YNe={class:"archive-toolbar"},JNe={class:"archive-search"},XNe=["placeholder"],QNe={value:"all"},eLe=["value"],tLe={key:0,class:"archive-empty"},nLe={key:0,class:"archive-list"},oLe={class:"archive-workspace"},sLe={class:"path"},iLe={class:"count"},rLe={class:"setting-card"},lLe={class:"archive-meta"},aLe={class:"archive-name"},uLe={class:"archive-time"},cLe={key:1,class:"archive-empty"},dLe=100,fLe=Ze({__name:"SettingsDialog",props:{colorScheme:{},accent:{},uiFontSize:{},authReady:{type:Boolean},accountModel:{},notify:{type:Boolean},notifyQuestion:{type:Boolean},notifyApproval:{type:Boolean},notifyPermission:{},sound:{type:Boolean},conversationToc:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},backend:{},initialTab:{}},emits:["setColorScheme","setAccent","setUiFontSize","setNotify","setNotifyQuestion","setNotifyApproval","setSound","setConversationToc","logout","openOnboarding","updateConfig","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(o.initialTab??"general"),r=O(()=>jx(o.uiFontSize)),l=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"robot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"}],a=_$().serverHttpUrl,u="0.1.2".trim()?"0.1.2":"0.0.0-dev",c=V(null),d=O(()=>c.value?.serverVersion||o.serverVersion||"-"),f=O(()=>c.value?.backend??o.backend??"v1"),p=O(()=>f.value==="v2"?"agent-gateway":"server"),h=V(!1),m=V(!1),k=V(0),{confirm:w,current:v}=Ka(),y=["manual","yolo","auto"],b={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},S=V(null);RN(S);function I(Qe){Qe.key==="Escape"&&v.value===null&&G()}Sn(()=>{document.addEventListener("keydown",I),T()}),En(()=>{document.removeEventListener("keydown",I),xe!==null&&clearTimeout(xe)});async function T(){try{c.value=await St().getMeta()}catch{c.value=null}}function $(){g7()}const F=O(()=>{const Qe=new Map;for(const nt of o.models??[])Qe.set(nt.id,{id:nt.id,label:nt.displayName??nt.model??nt.id,provider:nt.provider});for(const[nt,ut]of Object.entries(o.config?.models??{})){if(Qe.has(nt))continue;const Pt=M(ut);Qe.set(nt,{id:nt,label:D(nt,ut,Pt),provider:Pt??nt})}return Array.from(Qe.values())}),R=O(()=>{const Qe=new Map;for(const nt of F.value){const ut=Qe.get(nt.provider)??[];ut.push(nt),Qe.set(nt.provider,ut)}for(const[nt,ut]of Qe)Qe.set(nt,ut.toSorted((Pt,Oe)=>Pt.label.localeCompare(Oe.label)));return Array.from(Qe.entries()).toSorted(([nt],[ut])=>nt.localeCompare(ut)).map(([nt,ut])=>({provider:nt,options:ut}))}),P=O(()=>{const Qe=o.config?.defaultPermissionMode;return Qe==="auto"||Qe==="yolo"||Qe==="manual"?Qe:"manual"});function M(Qe){if(!Qe||typeof Qe!="object")return;const nt=Qe;return typeof nt.provider=="string"?nt.provider:void 0}function D(Qe,nt,ut){if(!nt||typeof nt!="object")return Qe;const Pt=nt,Oe=typeof Pt.model=="string"?Pt.model:void 0,Je=ut??M(nt);return Oe&&Je?`${Qe} (${Je}/${Oe})`:Oe?`${Qe} (${Oe})`:Qe}function B(Qe){return Qe===!0}function z(Qe){!Qe||Qe===o.config?.defaultModel||s("updateConfig",{defaultModel:Qe})}function A(Qe){Qe!==P.value&&s("updateConfig",{defaultPermissionMode:Qe})}function L(Qe){const nt=o.config?.[Qe];s("updateConfig",{[Qe]:!B(nt)})}function W(){const Qe=o.config?.thinking;return!Qe||typeof Qe!="object"?!0:Qe.enabled!==!1}function j(){s("updateConfig",{thinking:{enabled:!W()}})}function re(){const Qe=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!Qe})}async function Q(Qe){Qe!==i.value&&await Y()&&(i.value=Qe)}async function Y(){if(!m.value)return!0;const Qe=await w({title:n("providers.unsavedTitle"),message:n("providers.unsavedBody"),confirmLabel:n("providers.unsavedDiscard"),cancelLabel:n("providers.unsavedStay"),variant:"danger"});return Qe&&(m.value=!1,k.value+=1),Qe}async function G(){await Y()&&s("close")}function X(){return[`App version: ${u}`,`Server version: ${d.value}`,`Backend: ${f.value}`,`Server address: ${a}`,`Server ID: ${c.value?.serverId||"-"}`,`User agent: ${typeof navigator>"u"?"-":navigator.userAgent}`].join(` -`)}async function te(){h.value=await Jo(X())}const q=V(!1),me=V(!1);let xe=null;function We(){xe!==null&&clearTimeout(xe),xe=setTimeout(()=>{q.value=!1,me.value=!1,xe=null},1500)}async function he(){await Jo(d.value)&&(q.value=!0,We())}async function ee(){await Jo(a)&&(me.value=!0,We())}const ne=O(()=>fe("secondary-model")),H=O(()=>o.config?.secondaryModel?.model??""),Z=O(()=>o.config?.secondaryModel?.defaultEffort??""),ye=O(()=>Object.fromEntries((o.models??[]).map(Qe=>[Qe.id,Qe])));function fe(Qe){return o.config?.experimental?.[Qe]===!0}function de(Qe,nt){const ut={...o.config?.experimental,[Qe]:nt};s("updateConfig",{experimental:ut})}function J(Qe){const nt=Qe.effort?{model:Qe.model,defaultEffort:Qe.effort}:{model:Qe.model};nt.model===H.value&&(Qe.effort??"")===Z.value||s("updateConfig",{secondaryModel:nt})}function ae(Qe){const nt=j7(Qe);nt!==void 0&&s("setUiFontSize",nt)}const be=q0(),_e=V([]),ce=V(!1),Se=V(!1),ie=V(""),we=V("all"),Re=V("archived-desc");async function at(){if(!(ce.value||Se.value)){ce.value=!0;try{const Qe=[];let nt;for(;;){const ut=await be.loadArchivedSessions({beforeId:nt,pageSize:dLe});if(Qe.push(...ut.items),!ut.hasMore||ut.items.length===0)break;const Pt=ut.items.at(-1)?.id;if(Pt===void 0)break;nt=Pt}_e.value=Qe,Se.value=!0}catch(Qe){console.warn("loadAllArchived failed",Qe)}finally{ce.value=!1}}}Ye(i,Qe=>{Qe==="archived"&&!Se.value&&at()});const ft=O(()=>{const Qe=new Set;for(const nt of _e.value)Qe.add(nt.cwd);return Array.from(Qe).toSorted((nt,ut)=>nt.localeCompare(ut))}),Mt=O(()=>{const Qe=ie.value.trim().toLowerCase();let nt=_e.value.filter(ut=>ut.archived===!0);return we.value!=="all"&&(nt=nt.filter(ut=>ut.cwd===we.value)),Qe&&(nt=nt.filter(ut=>ut.title.toLowerCase().includes(Qe))),Re.value==="archived-desc"?nt.toSorted((ut,Pt)=>Pt.updatedAt.localeCompare(ut.updatedAt)):Re.value==="created-desc"?nt.toSorted((ut,Pt)=>Pt.createdAt.localeCompare(ut.createdAt)):nt.toSorted((ut,Pt)=>ut.title.localeCompare(Pt.title,"en"))}),Tt=O(()=>{const Qe=new Map;for(const nt of Mt.value){const ut=Qe.get(nt.cwd)??[];ut.push(nt),Qe.set(nt.cwd,ut)}return Array.from(Qe.entries()).map(([nt,ut])=>({cwd:nt,items:ut}))});async function tn(Qe){await be.restoreSession(Qe)&&(_e.value=_e.value.filter(ut=>ut.id!==Qe))}function Kt(Qe){const nt=new Date(Qe);if(Number.isNaN(nt.getTime()))return Qe;const ut=Pt=>String(Pt).padStart(2,"0");return`${nt.getFullYear()}-${ut(nt.getMonth()+1)}-${ut(nt.getDate())} ${ut(nt.getHours())}:${ut(nt.getMinutes())}`}return(Qe,nt)=>(g(),pe(Pd,{open:!0,"close-on-esc":!1,title:x(n)("settings.title"),size:"xl",height:"fixed",padded:!1,onClose:G},{default:ve(()=>[_("div",{ref_key:"dialogRef",ref:S,class:"sd"},[_("nav",{class:"settings-tabs",role:"tablist","aria-label":x(n)("settings.title")},[(g(),C(Te,null,st(l,ut=>_("button",{key:ut.id,type:"button",class:ze(["tab",{on:i.value===ut.id}]),role:"tab","aria-selected":i.value===ut.id,onClick:Pt=>Q(ut.id)},[K(Fe,{name:ut.icon,size:"sm"},null,8,["name"]),qe(" "+N(x(n)(ut.labelKey)),1)],10,V$e)),64))],8,U$e),_("div",q$e,[Bn(_("section",K$e,[_("section",G$e,[_("h3",Z$e,N(x(n)("settings.appearance")),1),_("div",Y$e,[_("span",J$e,N(x(n)("theme.colorSchemeLabel")),1),K(zs,{"model-value":e.colorScheme,options:[{value:"light",label:x(n)("theme.light")},{value:"dark",label:x(n)("theme.dark")},{value:"system",label:x(n)("theme.system")}],"onUpdate:modelValue":nt[0]||(nt[0]=ut=>s("setColorScheme",ut))},null,8,["model-value","options"])]),_("div",X$e,[_("span",Q$e,N(x(n)("theme.accentLabel")),1),K(zs,{"model-value":e.accent,options:[{value:"blue",label:x(n)("theme.accentBlue")},{value:"mono",label:x(n)("theme.accentBlack")}],"onUpdate:modelValue":nt[1]||(nt[1]=ut=>s("setAccent",ut))},null,8,["model-value","options"])]),_("div",e7e,[_("span",t7e,N(x(n)("settings.uiFontSize")),1),K(zs,{"model-value":r.value,options:x(B7),"aria-label":x(n)("settings.uiFontSize"),"onUpdate:modelValue":ae},null,8,["model-value","options","aria-label"])]),_("div",n7e,[_("span",o7e,[qe(N(x(n)("settings.conversationToc"))+" ",1),_("span",s7e,N(x(n)("settings.conversationTocHint")),1)]),K(mr,{"model-value":e.conversationToc??!0,label:x(n)("settings.conversationToc"),"onUpdate:modelValue":nt[2]||(nt[2]=ut=>s("setConversationToc",ut))},null,8,["model-value","label"])])]),_("section",i7e,[_("h3",r7e,N(x(n)("settings.notifications")),1),_("div",l7e,[_("span",a7e,[qe(N(x(n)("settings.notifyOnComplete"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",u7e,N(x(n)("settings.notifyDenied")),1)):oe("",!0)]),K(mr,{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnComplete"),"onUpdate:modelValue":nt[3]||(nt[3]=ut=>s("setNotify",ut))},null,8,["model-value","disabled","label"])]),_("div",c7e,[_("span",d7e,[qe(N(x(n)("settings.notifyOnQuestion"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",f7e,N(x(n)("settings.notifyDenied")),1)):oe("",!0)]),K(mr,{"model-value":e.notifyQuestion,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnQuestion"),"onUpdate:modelValue":nt[4]||(nt[4]=ut=>s("setNotifyQuestion",ut))},null,8,["model-value","disabled","label"])]),_("div",p7e,[_("span",h7e,[qe(N(x(n)("settings.notifyOnApproval"))+" ",1),e.notifyPermission==="denied"?(g(),C("span",m7e,N(x(n)("settings.notifyDenied")),1)):oe("",!0)]),K(mr,{"model-value":e.notifyApproval,disabled:e.notifyPermission==="denied",label:x(n)("settings.notifyOnApproval"),"onUpdate:modelValue":nt[5]||(nt[5]=ut=>s("setNotifyApproval",ut))},null,8,["model-value","disabled","label"])]),_("div",g7e,[_("span",v7e,N(x(n)("settings.soundOnComplete")),1),K(mr,{"model-value":e.sound,label:x(n)("settings.soundOnComplete"),"onUpdate:modelValue":nt[6]||(nt[6]=ut=>s("setSound",ut))},null,8,["model-value","label"])])])],512),[[yi,i.value==="general"]]),Bn(_("section",y7e,[_("section",k7e,[_("h3",b7e,N(x(n)("settings.account")),1),_("div",w7e,[_("span",x7e,N(e.authReady?x(n)("settings.providers"):x(n)("sidebar.notSignedIn")),1),K(Mn,{text:e.accountModel},{default:ve(()=>[e.authReady&&e.accountModel?(g(),C("span",_7e,N(e.accountModel),1)):oe("",!0)]),_:1},8,["text"])]),_("div",S7e,[K(nn,{variant:"secondary",size:"sm",onClick:nt[7]||(nt[7]=ut=>{s("openOnboarding"),s("close")})},{default:ve(()=>[qe(N(x(n)("onboarding.reopen")),1)]),_:1}),K(nn,{variant:"primary",size:"sm",onClick:nt[8]||(nt[8]=ut=>Q("providers"))},{default:ve(()=>[qe(N(x(n)("settings.manageProviders")),1)]),_:1})])])],512),[[yi,i.value==="account"]]),Bn(_("section",C7e,[K(T$e,{"discard-token":k.value,onDirtyChange:nt[9]||(nt[9]=ut=>m.value=ut)},null,8,["discard-token"])],512),[[yi,i.value==="providers"]]),Bn(_("section",A7e,[_("section",M7e,[_("div",E7e,[_("h3",T7e,N(x(n)("settings.agentDefaults")),1),e.configSaving?(g(),C("span",I7e,N(x(n)("settings.saving")),1)):oe("",!0)]),e.config?(g(),C(Te,{key:0},[_("div",$7e,[_("span",N7e,[qe(N(x(n)("settings.defaultModel"))+" ",1),_("span",L7e,N(x(n)("settings.defaultModelHint")),1)]),R.value.length>0?(g(),C("div",F7e,[K(C2,{"model-value":e.config.defaultModel??"",disabled:e.configSaving,"aria-label":x(n)("settings.defaultModel"),"onUpdate:modelValue":z},{default:ve(()=>[e.config.defaultModel?oe("",!0):(g(),C("option",O7e,N(x(n)("settings.noDefaultModel")),1)),(g(!0),C(Te,null,st(R.value,ut=>(g(),C("optgroup",{key:ut.provider,label:ut.provider},[(g(!0),C(Te,null,st(ut.options,Pt=>(g(),C("option",{key:Pt.id,value:Pt.id},N(Pt.label),9,P7e))),128))],8,R7e))),128))]),_:1},8,["model-value","disabled","aria-label"])])):(g(),C("span",D7e,N(e.config.defaultModel??x(n)("settings.noDefaultModel")),1))]),_("div",B7e,[_("span",z7e,[qe(N(x(n)("settings.defaultPermission"))+" ",1),_("span",W7e,N(x(n)("settings.defaultPermissionHint")),1)]),K(zs,{"model-value":P.value,options:y.map(ut=>({value:ut,label:x(n)(b[ut])})),"onUpdate:modelValue":nt[10]||(nt[10]=ut=>A(ut))},null,8,["model-value","options"])]),_("div",H7e,[_("span",j7e,[qe(N(x(n)("settings.defaultThinking"))+" ",1),_("span",U7e,N(x(n)("settings.defaultThinkingHint")),1)]),K(mr,{"model-value":W(),disabled:e.configSaving,label:x(n)("settings.defaultThinking"),"onUpdate:modelValue":nt[11]||(nt[11]=ut=>j())},null,8,["model-value","disabled","label"])]),_("div",V7e,[_("span",q7e,[qe(N(x(n)("settings.defaultPlanMode"))+" ",1),_("span",K7e,N(x(n)("settings.defaultPlanModeHint")),1)]),K(mr,{"model-value":B(e.config.defaultPlanMode),disabled:e.configSaving,label:x(n)("settings.defaultPlanMode"),"onUpdate:modelValue":nt[12]||(nt[12]=ut=>L("defaultPlanMode"))},null,8,["model-value","disabled","label"])]),_("div",G7e,[_("span",Z7e,[qe(N(x(n)("settings.mergeSkills"))+" ",1),_("span",Y7e,N(x(n)("settings.mergeSkillsHint")),1)]),K(mr,{"model-value":B(e.config.mergeAllAvailableSkills),disabled:e.configSaving,label:x(n)("settings.mergeSkills"),"onUpdate:modelValue":nt[13]||(nt[13]=ut=>L("mergeAllAvailableSkills"))},null,8,["model-value","disabled","label"])]),ne.value?(g(),C("section",J7e,[_("h3",X7e,N(x(n)("settings.secondaryModelSection")),1),_("div",Q7e,[_("span",eNe,[qe(N(x(n)("settings.secondaryModel"))+" ",1),_("span",tNe,N(x(n)("settings.secondaryModelHint")),1)]),R.value.length>0?(g(),pe(j$e,{key:0,"model-value":H.value,effort:Z.value,groups:R.value,"model-info-by-id":ye.value,disabled:e.configSaving,onSelect:J},null,8,["model-value","effort","groups","model-info-by-id","disabled"])):(g(),C("span",nNe,N(x(n)("settings.noSecondaryModel")),1))])])):oe("",!0)],64)):(g(),C("div",oNe,N(x(n)("settings.configUnavailable")),1))])],512),[[yi,i.value==="agent"]]),Bn(_("section",sNe,[_("section",iNe,[_("h3",rNe,N(x(n)("settings.versionAndUpdates")),1),_("div",lNe,[_("span",aNe,[qe(N(x(n)("settings.appVersion"))+" ",1),_("span",uNe,N(x(n)("settings.appVersionHint")),1)]),_("span",cNe,N(x(u)),1)]),_("div",dNe,[_("span",fNe,[qe(N(x(n)("settings.serverVersion"))+" ",1),_("span",pNe,N(x(n)("settings.serverVersionHint")),1)]),_("span",hNe,[_("span",mNe,N(d.value),1),K(Jt,{size:"sm",label:q.value?x(n)("settings.copied"):x(n)("settings.copyServerVersion"),"data-testid":"copy-server-version",onClick:he},{default:ve(()=>[K(Fe,{name:q.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_("div",gNe,[_("span",vNe,[qe(N(x(n)("settings.serverAddress"))+" ",1),_("span",yNe,N(x(n)("settings.serverAddressHint")),1)]),_("span",kNe,[_("span",bNe,N(x(a)),1),K(Jt,{size:"sm",label:me.value?x(n)("settings.copied"):x(n)("settings.copyServerAddress"),"data-testid":"copy-server-address",onClick:ee},{default:ve(()=>[K(Fe,{name:me.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),_("div",wNe,[_("span",xNe,N(x(n)("settings.backend")),1),_("span",_Ne,N(p.value),1)])]),e.config?(g(),C("section",SNe,[e.config?(g(),C("div",CNe,[_("span",ANe,[qe(N(x(n)("settings.telemetry"))+" ",1),_("span",MNe,N(x(n)("settings.telemetryHint")),1),_("span",ENe,N(x(n)("settings.telemetryRestartHint")),1)]),K(mr,{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:x(n)("settings.telemetry"),"onUpdate:modelValue":nt[14]||(nt[14]=ut=>re())},null,8,["model-value","disabled","label"])])):oe("",!0)])):oe("",!0),_("section",TNe,[_("h3",INe,N(x(n)("settings.diagnostics")),1),_("div",$Ne,[_("span",NNe,[qe(N(x(n)("settings.exportLog"))+" ",1),x(Nr)()?oe("",!0):(g(),C("span",LNe,N(x(n)("settings.logHint")),1))]),K(nn,{variant:"secondary",size:"sm",onClick:$},{default:ve(()=>[qe(N(x(n)("settings.exportLogBtn")),1)]),_:1})]),_("div",FNe,[_("span",ONe,N(x(n)("settings.copyDetails")),1),K(nn,{"data-testid":"copy-diagnostics",variant:"secondary",size:"sm",onClick:te},{default:ve(()=>[qe(N(h.value?x(n)("settings.copied"):x(n)("settings.copyDetails")),1)]),_:1})])])],512),[[yi,i.value==="advanced"]]),Bn(_("section",RNe,[_("section",PNe,[_("h3",DNe,N(x(n)("settings.tabs.lab")),1),e.config?(g(),C(Te,{key:0},[_("div",BNe,[_("span",zNe,[qe(N(x(n)("settings.lab.sidebarTabs"))+" ",1),_("span",WNe,N(x(n)("settings.lab.sidebarTabsHint")),1)]),K(mr,{"model-value":fe("sidebarTabs"),disabled:e.configSaving,label:x(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":nt[15]||(nt[15]=ut=>de("sidebarTabs",ut))},null,8,["model-value","disabled","label"])]),_("div",HNe,[_("span",jNe,[qe(N(x(n)("settings.lab.secondaryModel"))+" ",1),_("span",UNe,N(x(n)("settings.lab.secondaryModelHint")),1)]),K(mr,{"model-value":fe("secondary-model"),disabled:e.configSaving,label:x(n)("settings.lab.secondaryModel"),"onUpdate:modelValue":nt[16]||(nt[16]=ut=>de("secondary-model",ut))},null,8,["model-value","disabled","label"])])],64)):(g(),C("div",VNe,N(x(n)("settings.configUnavailable")),1))])],512),[[yi,i.value==="lab"]]),Bn(_("section",qNe,[_("div",KNe,[nt[20]||(nt[20]=_("div",{class:"panel-kicker"},"Archived sessions",-1)),_("h4",GNe,N(x(n)("settings.archivedTitle")),1),_("p",ZNe,N(x(n)("settings.archivedDesc")),1)]),_("div",YNe,[_("label",JNe,[nt[21]||(nt[21]=_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("circle",{cx:"11",cy:"11",r:"7"}),_("path",{d:"m21 21-4.3-4.3"})],-1)),Bn(_("input",{"onUpdate:modelValue":nt[17]||(nt[17]=ut=>ie.value=ut),placeholder:x(n)("settings.archivedSearch")},null,8,XNe),[[vs,ie.value]])]),K(C2,{"model-value":we.value,size:"sm","aria-label":x(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":nt[18]||(nt[18]=ut=>we.value=ut)},{default:ve(()=>[_("option",QNe,N(x(n)("settings.archivedAllWorkspaces")),1),(g(!0),C(Te,null,st(ft.value,ut=>(g(),C("option",{key:ut,value:ut},N(ut),9,eLe))),128))]),_:1},8,["model-value","aria-label"]),K(zs,{size:"sm","model-value":Re.value,options:[{value:"archived-desc",label:x(n)("settings.archivedSortArchived")},{value:"created-desc",label:x(n)("settings.archivedSortCreated")},{value:"name-asc",label:x(n)("settings.archivedSortName")}],"onUpdate:modelValue":nt[19]||(nt[19]=ut=>Re.value=ut)},null,8,["model-value","options"])]),ce.value?(g(),C("div",tLe,N(x(n)("settings.archivedLoadingAll")),1)):(g(),C(Te,{key:1},[Tt.value.length>0?(g(),C("div",nLe,[(g(!0),C(Te,null,st(Tt.value,ut=>(g(),C("section",{key:ut.cwd,class:"archive-card"},[_("div",oLe,[nt[22]||(nt[22]=_("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[_("path",{d:"M3 7h6l2 2h10v9H3z"}),_("path",{d:"M3 7V5h6l2 2"})],-1)),_("span",sLe,N(ut.cwd),1),_("span",iLe,N(x(n)("settings.archivedSessionsCount",{count:ut.items.length})),1)]),_("div",rLe,[(g(!0),C(Te,null,st(ut.items,Pt=>(g(),C("div",{key:Pt.id,class:"archive-row"},[_("div",lLe,[_("div",aLe,N(Pt.title),1),_("div",uLe,N(x(n)("settings.archivedAt",{time:Kt(Pt.updatedAt)})),1)]),K(nn,{variant:"secondary",size:"sm",onClick:Oe=>tn(Pt.id)},{default:ve(()=>[qe(N(x(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(g(),C("div",cLe,N(_e.value.length===0?x(n)("settings.archivedEmpty"):x(n)("settings.archivedNoMatch")),1))],64))],512),[[yi,i.value==="archived"]])])],512)]),_:1},8,["title"]))}}),pLe=ht(fLe,[["__scopeId","data-v-8ba6a8d4"]]),hLe=/^(?:\/|~(?:\/|$)|[A-Za-z]:[\\/]|\\\\)/,BN=/^[A-Za-z]:[\\/]/,mLe=/^\/\/(?!\/)/;function Lk(e){return hLe.test(e.trim())}function gLe(e,t){return e==="~"?t||e:e.startsWith("~/")?(t||"~")+e.slice(1):e}function vLe(e){return mLe.test(e)?`//${e.slice(2).replaceAll(/\/{2,}/g,"/")}`:e.replaceAll(/\/{2,}/g,"/")}function yLe(e){return BN.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function kLe(e){return BN.test(e)?3:e.startsWith("\\\\")||e.startsWith("//")?2:e.startsWith("/")?1:0}function M2(e,t){let n=vLe(gLe(e.trim(),t));const o=yLe(n),s=n==="/"||n==="//"||n==="\\\\"||/^[A-Za-z]:[\\/]$/.test(n),i=o?/[\\/]$/.test(n):n.endsWith("/");!s&&i&&(n=n.slice(0,-1));const r=n.lastIndexOf("/"),l=o?n.lastIndexOf("\\"):-1,a=Math.max(r,l),u=l>r?"\\":"/",c=kLe(n),d=ad.value.trim().length>0);let m=0,k=null;const w=O(()=>Lk(d.value)),v=V("idle"),y=V(""),b=V("/"),S=V([]),I=V(""),T=V(null),$=V(null),F=O(()=>v.value!=="valid"?null:wLe(d.value,I.value,$.value));let R=0,P=null;function M(te,q){const me=te.toLowerCase(),xe=q.toLowerCase();let We=0;for(let he=0;he0&&ee=_M))break;ne.depth+1{k&&clearTimeout(k),P&&clearTimeout(P),R++,v.value="idle",S.value=[],$.value=null;const q=te.trim();if(q===""){m++,p.value=[],f.value=!1;return}if(Lk(q)){if(m++,p.value=[],f.value=!1,l.value)return;v.value="checking",P=setTimeout(()=>void B(q),150);return}k=setTimeout(()=>void D(te),220)});async function B(te){const q=++R;v.value="checking",$.value=null;const me=M2(te,I.value),{target:xe}=me;try{const he=await o.browseFs(xe);if(q!==R)return;if(he.path){v.value="valid",S.value=[],$.value=xe,a.value=he.path,u.value=he.parent,c.value=he.entries,l.value=!1;return}}catch{}if(q!==R)return;const We=me.base.toLowerCase();y.value=me.parent,b.value=me.separator;try{const he=await o.browseFs(me.parent);if(q!==R)return;if(he.path){S.value=he.entries.filter(ee=>ee.isDir&&ee.name.toLowerCase().startsWith(We)),v.value="not-found";return}}catch{}q===R&&(S.value=[],v.value="bad-parent")}function z(te){d.value=bLe(y.value,te,b.value),T.value?.focus()}const A=O(()=>l.value?n("workspace.degradedPlaceholder"):n("workspace.searchPlaceholder")),L=O(()=>l.value?n("workspace.degradedHint"):w.value&&v.value==="valid"?n("workspace.pathFollowHint"):n("workspace.browseHint"));function W(te){if(te.key==="Escape"){d.value?d.value="":s("close");return}if(te.key!=="Enter")return;const q=d.value.trim();if(Lk(q)){if(te.preventDefault(),l.value){const{target:me}=M2(q,I.value);me&&s("add",me);return}v.value==="valid"?X():v.value==="not-found"&&S.value[0]&&z(S.value[0].name)}}const j=O(()=>{const te=a.value;if(!te)return[];const q=te.split("/").filter(Boolean),me=[{label:"/",path:"/"}];let xe="";for(const We of q)xe+=`/${We}`,me.push({label:We,path:xe});return me}),re=O(()=>!(a.value.length===0||w.value&&F.value===null));async function Q(te){r.value=!0;try{const q=await o.browseFs(te);if(!q.path){l.value=!0;return}a.value=q.path,u.value=q.parent,c.value=q.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function Y(te){te.isDir&&Q(te.path)}function G(){u.value&&Q(u.value)}function X(){re.value&&s("add",F.value??a.value)}return Sn(async()=>{r.value=!0;try{const te=await o.getFsHome().catch(()=>({home:"",recentRoots:[]}));if(te.home&&(I.value=te.home),o.defaultPath&&(await Q(o.defaultPath),!l.value))return;I.value?await Q(I.value):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),En(()=>{k&&clearTimeout(k),P&&clearTimeout(P)}),(te,q)=>(g(),pe(Pd,{open:i.value,"onUpdate:open":q[2]||(q[2]=me=>i.value=me),title:x(n)("workspace.addTitle"),size:"lg",height:"fixed",onClose:q[3]||(q[3]=me=>s("close"))},{default:ve(()=>[_("div",xLe,[l.value?oe("",!0):(g(),C("div",_Le,[K(Jt,{size:"sm",disabled:!u.value,label:x(n)("workspace.up"),onClick:G},{default:ve(()=>[K(Fe,{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),_("div",SLe,[(g(!0),C(Te,null,st(j.value,(me,xe)=>(g(),C(Te,{key:me.path},[xe>1?(g(),C("span",CLe,"/")):oe("",!0),_("button",{class:ze(["crumb",{last:xe===j.value.length-1}]),onClick:We=>Q(me.path)},N(me.label),11,ALe)],64))),128))])])),!r.value||l.value?(g(),C("div",{key:1,class:ze(["filterbar",{"has-error":v.value==="not-found"||v.value==="bad-parent"}])},[K(Fe,{class:"filter-icon",name:"search",size:"md"}),Bn(_("input",{ref_key:"filterEl",ref:T,"onUpdate:modelValue":q[0]||(q[0]=me=>d.value=me),class:"filter-input",type:"text",placeholder:A.value,autocomplete:"off",spellcheck:"false",onKeydown:Ct(W,["stop"])},null,40,MLe),[[vs,d.value]]),f.value||v.value==="checking"?(g(),pe(ns,{key:0,size:"sm"})):oe("",!0)],2)):oe("",!0),l.value?(g(),C("div",jLe,N(x(n)("workspace.degradedHint")),1)):(g(),C("div",ELe,[r.value?(g(),C("div",TLe,N(x(n)("workspace.browsing")),1)):w.value&&v.value!=="valid"?(g(),C(Te,{key:1},[v.value==="checking"?(g(),C("div",ILe,N(x(n)("workspace.checkingPath")),1)):v.value==="not-found"?(g(),C(Te,{key:1},[S.value.length>0?(g(),C("div",$Le,N(x(n)("workspace.pathPickHint")),1)):oe("",!0),(g(!0),C(Te,null,st(S.value,me=>(g(),C("button",{key:me.path,class:"folder-row",onClick:xe=>z(me.name)},[K(Fe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",LLe,N(me.name),1)],8,NLe))),128)),S.value.length===0?(g(),C("div",FLe,N(x(n)("workspace.noPathMatch",{parent:y.value})),1)):oe("",!0)],64)):v.value==="bad-parent"?(g(),C("div",OLe,N(x(n)("workspace.badParent",{parent:y.value})),1)):oe("",!0)],64)):h.value&&!w.value?(g(),C(Te,{key:2},[(g(!0),C(Te,null,st(p.value,me=>(g(),C("button",{key:me.path,class:"folder-row",onClick:xe=>Q(me.path)},[K(Fe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",PLe,N(me.rel),1)],8,RLe))),128)),!f.value&&p.value.length===0?(g(),C("div",DLe,N(x(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(g(),C("div",BLe,N(x(n)("workspace.searching")),1)):oe("",!0)],64)):(g(),C(Te,{key:3},[(g(!0),C(Te,null,st(c.value,me=>(g(),C("button",{key:me.path,class:"folder-row",onClick:xe=>Y(me)},[K(Fe,{class:"dir-icon",name:"folder-closed",size:"sm"}),_("span",WLe,N(me.name),1)],8,zLe))),128)),c.value.length===0?(g(),C("div",HLe,N(x(n)("workspace.noSubfolders")),1)):oe("",!0)],64))])),e.error?(g(),C("div",ULe,N(e.error),1)):oe("",!0),_("div",VLe,[K(Mn,{text:a.value},{default:ve(()=>[l.value?oe("",!0):(g(),pe(nn,{key:0,variant:"primary",disabled:!re.value,onClick:X},{default:ve(()=>[qe(N(x(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),K(nn,{variant:"secondary",onClick:q[1]||(q[1]=me=>s("close"))},{default:ve(()=>[qe(N(x(n)("workspace.cancel")),1)]),_:1})]),_("div",qLe,N(L.value),1)])]),_:1},8,["open","title"]))}}),YLe=ht(ZLe,[["__scopeId","data-v-09b74e91"]]),JLe={key:0,class:"confirm-dialog__message"},XLe=Ze({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(){n.loading||(o("update:open",!1),o("cancel"))}function r(l){if(l.key!=="Enter"||!n.open||n.loading)return;const a=l.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(l.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),po(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(g(),pe(Pd,{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=u=>o("update:open",u)),onClose:i},{foot:ve(()=>[K(nn,{variant:"secondary",disabled:e.loading,onClick:i},{default:ve(()=>[qe(N(e.cancelLabel??x(s)("common.cancel")),1)]),_:1},8,["disabled"]),K(nn,{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>o("confirm"))},{default:ve(()=>[qe(N(e.confirmLabel??x(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:ve(()=>[e.message?(g(),C("p",JLe,N(e.message),1)):oe("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),QLe=ht(XLe,[["__scopeId","data-v-074405fe"]]),eFe=Ze({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=Ka();function i(){s()}return(r,l)=>(g(),pe(QLe,{open:x(t)!==null,title:x(t)?.title??"",message:x(t)?.message,"confirm-label":x(t)?.confirmLabel,"cancel-label":x(t)?.cancelLabel,variant:x(t)?.variant,loading:x(n),onConfirm:i,onCancel:l[0]||(l[0]=a=>x(o)(!1))},null,8,["open","title","message","confirm-label","cancel-label","variant","loading"]))}}),tFe={class:"rows"},nFe={class:"row"},oFe={class:"row"},sFe={class:"row"},iFe={class:"row"},rFe={class:"row"},lFe={class:"row"},aFe={class:"ctx-text"},uFe={key:0,class:"bar"},cFe={class:"row"},dFe=Ze({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},dynamicWorkflowMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=V(!0),r=O(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),l=O(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:Pl(o.status.ctxUsed),max:Pl(o.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(h){return n(h==="yolo"?"status.permissionYolo":h==="auto"?"status.permissionAuto":"status.permissionManual")}const u=O(()=>{const h=o.status.permission;return h==="yolo"?"var(--color-warning)":h==="auto"?"var(--color-danger)":"var(--color-text)"}),c=O(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=O(()=>o.dynamicWorkflowMode?n("status.dynamicWorkflowOn"):n("status.dynamicWorkflowOff")),f=O(()=>typeof o.costUsd=="number"&&o.costUsd>0),p=O(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(h,m)=>(g(),pe(Pd,{open:i.value,"onUpdate:open":m[0]||(m[0]=k=>i.value=k),title:x(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=k=>s("close"))},{default:ve(()=>[_("dl",tFe,[_("div",nFe,[_("dt",null,N(x(n)("status.statusModel")),1),_("dd",null,N(e.status.model),1)]),_("div",oFe,[_("dt",null,N(x(n)("status.statusThinking")),1),_("dd",null,N(e.thinking),1)]),_("div",sFe,[_("dt",null,N(x(n)("status.statusPermission")),1),_("dd",{style:jt({color:u.value})},N(a(e.status.permission)),5)]),_("div",iFe,[_("dt",null,N(x(n)("status.statusPlanMode")),1),_("dd",{class:ze({"plan-on":e.planMode})},N(c.value),3)]),_("div",rFe,[_("dt",null,N(x(n)("status.statusDynamicWorkflowMode")),1),_("dd",{class:ze({"workflow-on":e.dynamicWorkflowMode})},N(d.value),3)]),_("div",lFe,[_("dt",null,N(x(n)("status.statusContext")),1),_("dd",null,[_("span",aFe,N(l.value),1),e.status.ctxMax>0?(g(),C("span",uFe,[_("i",{style:jt({width:r.value+"%"})},null,4)])):oe("",!0)])]),_("div",cFe,[_("dt",null,N(x(n)("status.statusCost")),1),_("dd",null,N(p.value),1)])])]),_:1},8,["open","title"]))}}),fFe=ht(dFe,[["__scopeId","data-v-7992546c"]]),pFe={class:"ui-toast__icon","aria-hidden":"true"},hFe={class:"ui-toast__body"},mFe={class:"ui-toast__title"},gFe={key:0,class:"ui-toast__msg"},vFe=Ze({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e){return(t,n)=>(g(),C("div",{class:ze(["ui-toast",`ui-toast--${e.variant}`])},[_("span",pFe,[An(t.$slots,"icon",{},()=>[e.variant==="success"?(g(),pe(Fe,{key:0,name:"check"})):e.variant==="danger"?(g(),pe(Fe,{key:1,name:"close"})):e.variant==="warning"?(g(),pe(Fe,{key:2,name:"alert-triangle"})):(g(),pe(Fe,{key:3,name:"info"}))],!0)]),_("div",hFe,[_("div",mFe,N(e.title),1),e.message?(g(),C("div",gFe,N(e.message),1)):oe("",!0),An(t.$slots,"default",{},void 0,!0)]),K(Jt,{class:"ui-toast__close",size:"sm",label:e.dismissLabel,onClick:n[0]||(n[0]=o=>t.$emit("dismiss"))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),yFe=ht(vFe,[["__scopeId","data-v-44bc260b"]]),kFe={key:0,class:"actions"},bFe=["onClick"],wFe=["onClick"],xFe={key:1,class:"details"},_Fe=Ze({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(F){return typeof F=="object"&&F!==null}function r(F){return i(F)?F.title:F}function l(F){return i(F)?F.message??"":""}function a(F){return i(F)?F.details:void 0}function u(F){return i(F)?F.severity==="error":F.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|failed/i.test(F)}function c(F){if(!i(F))return u(F)?"danger":"warning";switch(F.severity){case"error":case"danger":return"danger";case"success":return"success";case"info":return"info";default:return"warning"}}function d(F){return i(F)?`notice:${F.severity}:${F.title}:${F.message??""}:${JSON.stringify(F.details??[])}`:`text:${F}`}function f(F){if(!i(F))return F;const R=[F.title];F.message&&R.push(F.message);const P=F.details??[];if(P.length>0){R.push("",`${s("warnings.diagnostics")}:`);for(const M of P)R.push(`${M.label}: ${M.value}`)}return R.join(` -`)}let p=1;const h=V([]),m=new Map,k=new Map;function w(F){const R=u(F)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?R+5e3:R}function v(F,R){const P=m.get(F)??{handle:null,deadline:0,remaining:0};P.handle=setTimeout(()=>$(F),R),P.deadline=Date.now()+R,m.set(F,P)}function y(F){const R=m.get(F);R&&R.handle!==null&&clearTimeout(R.handle),m.delete(F)}function b(F){const R=m.get(F);!R||R.handle===null||(clearTimeout(R.handle),R.handle=null,R.remaining=Math.max(0,R.deadline-Date.now()))}function S(F){if(h.value.find(M=>M.id===F)?.detailsOpen)return;const P=m.get(F);!P||P.handle!==null||v(F,P.remaining)}function I(F){F.detailsOpen=!F.detailsOpen,F.detailsOpen?b(F.id):S(F.id)}async function T(F){if(!await Jo(f(F.warning)))return;F.copied=!0;const P=k.get(F.id);P&&clearTimeout(P),k.set(F.id,setTimeout(()=>{F.copied=!1,k.delete(F.id)},1400))}function $(F){y(F);const R=k.get(F);R&&clearTimeout(R),k.delete(F);const P=h.value.findIndex(M=>M.id===F);P!==-1&&(h.value=h.value.filter(M=>M.id!==F),o("dismiss",P))}return Ye(()=>n.warnings,F=>{const R=[...h.value];h.value=F.map(P=>{const M=d(P),D=R.findIndex(A=>A.key===M),B=D===-1?void 0:R.splice(D,1)[0];if(B)return B.warning=P,B;const z={id:p++,key:M,warning:P,detailsOpen:!1,copied:!1};return v(z.id,w(P)),z});for(const P of R){y(P.id);const M=k.get(P.id);M&&clearTimeout(M),k.delete(P.id)}},{immediate:!0,flush:"post"}),En(()=>{m.forEach(F=>{F.handle!==null&&clearTimeout(F.handle)}),m.clear(),k.forEach(F=>clearTimeout(F)),k.clear()}),(F,R)=>(g(),pe(IR,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:ve(()=>[(g(!0),C(Te,null,st(h.value,P=>(g(),pe(yFe,{key:P.id,variant:c(P.warning),title:r(P.warning),message:l(P.warning),"dismiss-label":x(s)("warnings.dismiss"),onDismiss:M=>$(P.id),onPointerenter:M=>b(P.id),onPointerleave:M=>S(P.id)},{default:ve(()=>[a(P.warning)?.length?(g(),C("div",kFe,[_("button",{class:"link",type:"button",onClick:M=>I(P)},N(P.detailsOpen?x(s)("warnings.hideDetails"):x(s)("warnings.showDetails")),9,bFe),_("button",{class:"link",type:"button",onClick:M=>T(P)},N(P.copied?x(s)("warnings.copied"):x(s)("warnings.copyDetails")),9,wFe)])):oe("",!0),P.detailsOpen&&a(P.warning)?.length?(g(),C("dl",xFe,[(g(!0),C(Te,null,st(a(P.warning),M=>(g(),C("div",{key:`${M.label}:${M.value}`,class:"detail-row"},[_("dt",null,N(M.label),1),_("dd",null,N(M.value),1)]))),128))])):oe("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),SFe=ht(_Fe,[["__scopeId","data-v-6d8f28b8"]]),CFe={key:0,class:"update-toast",role:"status","aria-live":"polite"},AFe={class:"body"},MFe={class:"title"},EFe={class:"msg"},TFe={class:"acts"},IFe=["disabled"],SM="pythinker.update.skipped",$Fe=Ze({__name:"UpdateToast",setup(e){const{t}=$t(),n=typeof window<"u"?window.pythinkerDesktop:void 0,o=V(),s=V(!1),i=V(l());let r;function l(){try{const f=JSON.parse(localStorage.getItem(SM)??"[]");return Array.isArray(f)?f.filter(p=>typeof p=="string"):[]}catch{return[]}}const a=O(()=>{const f=o.value;return f===void 0||f.status!=="downloaded"&&!(f.status==="available"&&!f.autoUpdate)?!1:!i.value.includes(f.version??"")}),u=O(()=>o.value?.version?t("update.availableVersion",{version:o.value.version}):t("update.available"));async function c(){if(!(n===void 0||s.value)){s.value=!0;try{o.value=await n.quitAndInstall()}finally{s.value=!1}}}function d(){const f=[...i.value,o.value?.version??""];i.value=f;try{localStorage.setItem(SM,JSON.stringify(f.filter(p=>p!=="")))}catch{}}return Sn(()=>{n!==void 0&&(r=n.onUpdateState(f=>{o.value=f}),n.getUpdateState().then(f=>{o.value=f},()=>{}))}),En(()=>{r?.()}),(f,p)=>a.value?(g(),C("div",CFe,[_("div",AFe,[_("div",MFe,N(u.value),1),_("div",EFe,N(x(t)("update.prompt")),1)]),_("div",TFe,[_("button",{type:"button",class:"skip",onClick:d},N(x(t)("update.skip")),1),_("button",{type:"button",class:"go",disabled:s.value,onClick:p[0]||(p[0]=h=>void c())},N(x(t)("update.install")),9,IFe)])])):oe("",!0)}}),NFe=ht($Fe,[["__scopeId","data-v-f7646e4e"]]),LFe={class:"ui-action-toast-host"},FFe={class:"ui-action-toast__body"},OFe=Ze({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=t,{t:o}=$t();let s=null,i=0,r=e.duration;function l(c){if(c<=0){n("dismiss",e.dismissToken);return}s=setTimeout(()=>n("dismiss",e.dismissToken),c),i=Date.now()+c}function a(){s!==null&&(clearTimeout(s),s=null,r=Math.max(0,i-Date.now()))}function u(){s===null&&l(r)}return l(e.duration),En(()=>{s!==null&&clearTimeout(s)}),(c,d)=>(g(),C("div",LFe,[_("div",{class:"ui-action-toast",role:"status",onPointerenter:a,onPointerleave:u},[_("span",FFe,[An(c.$slots,"default",{},void 0,!0)]),K(Jt,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??x(o)("common.dismiss"),onClick:d[0]||(d[0]=f=>n("dismiss",e.dismissToken))},{default:ve(()=>[K(Fe,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),Fk=ht(OFe,[["__scopeId","data-v-9efa207b"]]),RFe={key:0,class:"window-controls"},PFe=["aria-label"],DFe=["aria-label"],BFe=["aria-label"],zFe=Ze({__name:"WindowControls",setup(e){const{t}=$t(),n=O(()=>window.pythinkerDesktop?.platform==="win32");function o(){window.pythinkerDesktop?.minimizeWindow()}function s(){window.pythinkerDesktop?.toggleMaximizeWindow()}function i(){window.pythinkerDesktop?.closeWindow()}return(r,l)=>n.value?(g(),C("div",RFe,[_("button",{type:"button",class:"wc wc-min","aria-label":x(t)("app.minimizeWindow"),onClick:o},[...l[0]||(l[0]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[_("path",{d:"M2.5 5h5"})],-1)])],8,PFe),_("button",{type:"button",class:"wc wc-max","aria-label":x(t)("app.maximizeWindow"),onClick:s},[...l[1]||(l[1]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linejoin":"round","aria-hidden":"true"},[_("rect",{x:"2.4",y:"2.4",width:"5.2",height:"5.2",rx:"1"})],-1)])],8,DFe),_("button",{type:"button",class:"wc wc-close","aria-label":x(t)("app.closeWindow"),onClick:i},[...l[2]||(l[2]=[_("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round","aria-hidden":"true"},[_("path",{d:"M3 3l4 4M7 3l-4 4"})],-1)])],8,BFe)])):oe("",!0)}}),WFe=ht(zFe,[["__scopeId","data-v-041ca08b"]]),HFe={class:"topbar"},jFe={class:"wsq"},UFe=["aria-label"],VFe={class:"tb-path"},qFe={class:"ws"},KFe={class:"se"},GFe={class:"tb-sub"},ZFe=Ze({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=O(()=>{const a=o.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=O(()=>o.workspace?.name??n("workspace.noWorkspace")),l=O(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(g(),C("div",HFe,[_("span",jFe,N(i.value),1),_("button",{type:"button",class:"tb-mid","aria-label":x(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[_("span",VFe,[_("span",qFe,N(r.value),1),e.sessionTitle?(g(),C(Te,{key:0},[u[2]||(u[2]=_("span",{class:"sl"},"/",-1)),_("span",KFe,N(e.sessionTitle),1)],64)):oe("",!0),u[3]||(u[3]=_("span",{class:"cv"},"⌄",-1))]),_("span",GFe,[_("span",{class:ze(["rd",{on:e.running}])},null,2),_("span",null,N(l.value),1),e.branch?(g(),C(Te,{key:0},[qe(" · "+N(e.branch),1)],64)):oe("",!0),e.sessionCount>0?(g(),C(Te,{key:1},[qe(" · "+N(x(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):oe("",!0)])],8,UFe),K(Jt,{size:"lg",label:x(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:ve(()=>[K(Fe,{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),YFe=ht(ZFe,[["__scopeId","data-v-27a83eb2"]]),JFe={key:0,class:"sheet-root"},XFe=["aria-label"],QFe=["aria-label"],eOe={key:0,class:"sheet-head"},tOe={class:"sheet-title"},nOe={class:"sheet-body"},oOe=Ze({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{lock:i,unlock:r}=LN();function l(){s("update:modelValue",!1),s("close")}function a(u){u.key==="Escape"&&o.closeOnEsc&&l()}return Ye(()=>o.modelValue,u=>{typeof document>"u"||(u?(i(),document.addEventListener("keydown",a)):(r(),document.removeEventListener("keydown",a)))},{immediate:!0}),En(()=>{typeof document<"u"&&(r(),document.removeEventListener("keydown",a))}),(u,c)=>(g(),pe(Cr,{name:"sheet"},{default:ve(()=>[e.modelValue?(g(),C("div",JFe,[_("div",{class:"sheet-scrim",onClick:l}),_("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||x(n)("mobile.sheetLabel")},[_("button",{type:"button",class:"sheet-grab","aria-label":x(n)("mobile.closeSheet"),onClick:l},null,8,QFe),e.title?(g(),C("div",eOe,[_("span",tOe,N(e.title),1)])):oe("",!0),_("div",nOe,[An(u.$slots,"default",{},void 0,!0)])],8,XFe)])):oe("",!0)]),_:3}))}}),zN=ht(oOe,[["__scopeId","data-v-92ecd88c"]]),sOe={class:"mlist"},iOe={key:0,class:"mempty"},rOe=["onClick"],lOe={class:"mgh-main"},aOe={class:"mgh-name"},uOe={class:"mgh-path"},cOe={key:2,class:"att"},dOe={key:0,class:"mempty small"},fOe=["onClick"],pOe={class:"m"},hOe={class:"s"},mOe={key:0,class:"att"},gOe=["disabled","onClick"],vOe=["onClick"],yOe=Ze({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1)}function r(P){s("select",P),i()}function l(P){s("createInWorkspace",P),i()}function a(){s("create"),i()}function u(){s("addWorkspace"),i()}const c=V(new Set);function d(P){return c.value.has(P)}function f(P){const M=new Set(c.value);M.has(P)?M.delete(P):M.add(P),c.value=M,y.value=null,T.value=null}const p=V(new Set);function h(P){return p.value.has(P)}function m(P){const M=new Set(p.value);M.has(P)?M.delete(P):M.add(P),p.value=M}function k(P){if(h(P.workspace.id))return P.sessions;const M=P.sessions.slice(0,P.initialCount);if(o.activeId&&!M.some(D=>D.id===o.activeId)){const D=P.sessions.find(B=>B.id===o.activeId);if(D)return[...M,D]}return M}function w(P){if(!p.value.has(P)){const M=new Set(p.value);M.add(P),p.value=M}s("loadMore",P)}function v(P){return o.attentionByWorkspace[P]??0}const y=V(null);function b(P){y.value=y.value===P?null:P,T.value=null}function S(P){y.value=null;const D=(typeof window<"u"?window.prompt(n("sidebar.rename"),P.title):null)?.trim();D&&s("rename",P.id,D)}function I(P){y.value=null,s("archive",P)}const T=V(null);function $(P){T.value=T.value===P?null:P,y.value=null}function F(P){Jo(P.root),T.value=null}function R(P){T.value=null,s("deleteWorkspace",P.id)}return(P,M)=>(g(),pe(zN,{"model-value":e.modelValue,"onUpdate:modelValue":M[2]||(M[2]=D=>s("update:modelValue",D))},{default:ve(()=>[_("button",{type:"button",class:"newrow",onClick:a},[K(Fe,{name:"message",size:"sm"}),qe(" "+N(x(n)("sidebar.newChat")),1)]),_("button",{type:"button",class:"newrow secondary",onClick:u},[K(Fe,{name:"folder",size:"sm"}),qe(" "+N(x(n)("sidebar.newWorkspace")),1)]),_("div",sOe,[e.groups.length===0?(g(),C("div",iOe,N(x(n)("workspace.noWorkspace")),1)):oe("",!0),(g(!0),C(Te,null,st(e.groups,D=>(g(),C("div",{key:D.workspace.id,class:"mgroup"},[_("div",{class:ze(["mgh",{on:D.workspace.id===e.activeWorkspaceId}]),onClick:B=>f(D.workspace.id)},[d(D.workspace.id)?(g(),pe(Fe,{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(g(),pe(Fe,{key:1,class:"mgh-folder",name:"folder",size:"sm"})),_("div",lOe,[_("span",aOe,N(D.workspace.name),1),K(Mn,{text:D.workspace.root},{default:ve(()=>[_("span",uOe,N(D.workspace.shortPath),1)]),_:2},1032,["text"])]),d(D.workspace.id)&&v(D.workspace.id)>0?(g(),C("span",cOe,N(v(D.workspace.id)),1)):oe("",!0),K(Jt,{size:"lg",class:"mgh-more",label:x(n)("sidebar.options"),onClick:Ct(B=>$(D.workspace.id),["stop"])},{default:ve(()=>[K(Fe,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),K(Jt,{size:"lg",class:"mgh-add",label:x(n)("workspace.newInGroup"),onClick:Ct(B=>l(D.workspace.id),["stop"])},{default:ve(()=>[K(Fe,{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),T.value===D.workspace.id?(g(),pe(Ar,{key:3,class:"kmenu wsmenu",onClick:M[0]||(M[0]=Ct(()=>{},["stop"]))},{default:ve(()=>[K(vn,{size:"lg",onClick:B=>F(D.workspace)},{default:ve(()=>[qe(N(x(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),K(vn,{size:"lg",danger:"",onClick:B=>R(D.workspace)},{default:ve(()=>[qe(N(x(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):oe("",!0)],10,rOe),Bn(_("div",null,[D.sessions.length===0?(g(),C("div",dOe,N(x(n)("sidebar.noSessions")),1)):oe("",!0),(g(!0),C(Te,null,st(k(D),B=>(g(),C("div",{key:B.id,class:ze(["srow",{cur:B.id===e.activeId}]),onClick:z=>r(B.id)},[_("div",pOe,[_("div",{class:ze(["t",{run:B.busy,aborted:!B.busy&&(e.attentionBySession[B.id]??0)===0&&(B.lastTurnReason==="cancelled"||B.lastTurnReason==="failed")}])},N(B.title),3),_("div",hOe,N(B.time),1)]),(e.attentionBySession[B.id]??0)>0?(g(),C("span",mOe,N(e.attentionBySession[B.id]),1)):oe("",!0),K(Jt,{size:"lg",class:"kb",label:x(n)("sidebar.options"),onClick:Ct(z=>b(B.id),["stop"])},{default:ve(()=>[K(Fe,{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),y.value===B.id?(g(),pe(Ar,{key:1,class:"kmenu",onClick:M[1]||(M[1]=Ct(()=>{},["stop"]))},{default:ve(()=>[K(vn,{size:"lg",onClick:z=>S(B)},{default:ve(()=>[qe(N(x(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),K(vn,{size:"lg",danger:"",onClick:z=>I(B.id)},{default:ve(()=>[qe(N(x(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):oe("",!0)],10,fOe))),128)),D.hasMore||D.loadingMore?(g(),C("button",{key:1,type:"button",class:"mshow-more",disabled:D.loadingMore,onClick:Ct(B=>w(D.workspace.id),["stop"])},N(D.loadingMore?x(n)("sidebar.loadingMore"):x(n)("sidebar.showMore",{count:Math.max(0,D.workspace.sessionCount-D.sessions.length)})),9,gOe)):oe("",!0),D.sessions.length>D.initialCount?(g(),C("button",{key:2,type:"button",class:"mshow-more",onClick:Ct(B=>m(D.workspace.id),["stop"])},N(h(D.workspace.id)?x(n)("sidebar.showLess"):x(n)("sidebar.showAll",{count:D.sessions.length-D.initialCount})),9,vOe)):oe("",!0)],512),[[yi,!d(D.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),kOe=ht(yOe,[["__scopeId","data-v-4c7bceaf"]]),bOe={class:"group-title"},wOe={class:"srow-main"},xOe={class:"srow-label"},_Oe={class:"srow-sub"},SOe={class:"srow read-only"},COe={class:"srow-main"},AOe={class:"srow-label"},MOe={key:0,class:"srow-sub"},EOe={class:"cache-note"},TOe={class:"srow-main"},IOe={class:"srow-label"},$Oe={class:"srow-sub"},NOe=["aria-checked"],LOe={key:0,class:"srow read-only"},FOe={class:"srow-main"},OOe={class:"srow-label"},ROe={class:"srow-sub"},POe={class:"goal-actions"},DOe=["aria-checked"],BOe={class:"srow-main"},zOe={class:"srow-label"},WOe={class:"srow-sub"},HOe=["aria-checked"],jOe={class:"srow-main"},UOe={class:"srow-label"},VOe={class:"srow-sub"},qOe={class:"srow-main"},KOe={class:"srow-label"},GOe={class:"srow read-only"},ZOe={class:"srow-main"},YOe={class:"srow-label"},JOe={class:"srow-sub"},XOe=["aria-label"],QOe={class:"group-title"},eRe={class:"srow-main"},tRe={class:"srow-label"},nRe={class:"srow-sub"},oRe={class:"srow read-only pref"},sRe={class:"srow-main"},iRe={class:"srow-label"},rRe={class:"srow read-only pref"},lRe={class:"srow-main"},aRe={class:"srow-label"},uRe={class:"srow-main"},cRe={class:"srow-label"},dRe={class:"srow-sub"},fRe=["aria-checked"],pRe={class:"srow-main"},hRe={class:"srow-label"},mRe={key:2,class:"srow read-only"},gRe={class:"srow-main"},vRe={class:"srow-label"},yRe={class:"srow-val dim"},kRe={class:"arch-subhead"},bRe={class:"arch-count"},wRe={class:"arch-tools"},xRe={key:0,class:"arch-empty"},_Re={class:"arch-meta"},SRe={class:"arch-name"},CRe={class:"arch-time"},ARe={key:2,class:"arch-empty"},MRe=100,ERe=Ze({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goal:{default:null},dynamicWorkflowMode:{type:Boolean},colorScheme:{default:"system"},uiFontSize:{default:14},authReady:{type:Boolean,default:!1},conversationToc:{type:Boolean},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleWorkflow","toggleGoal","controlGoal","setPermission","setColorScheme","setUiFontSize","setConversationToc","login"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,{confirm:i}=Ka();function r(q){s("setColorScheme",q)}const l=["manual","yolo","auto"],a=O(()=>o.models?.find(q=>q.id===o.status?.modelId)),u=O(()=>B0(a.value)),c=O(()=>kh(a.value)),d=O(()=>L1(a.value,o.thinking)),f=O(()=>c.value.includes(d.value)?d.value:""),p=O(()=>c.value.map(q=>({value:q,label:Jp(q)}))),h=O(()=>o.planMode===!0),m=O(()=>o.goalMode===!0),k=O(()=>o.goal!==null&&["active","paused","blocked"].includes(o.goal?.status??"")),w=O(()=>{const q=o.goal?.status;return q?n(`status.goalStatus${q[0].toUpperCase()}${q.slice(1)}`):""});async function v(){await i({title:n("status.goalCancel"),message:n("status.goalCancelConfirm"),confirmLabel:n("status.goalCancelConfirmYes"),cancelLabel:n("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const y=O(()=>jx(o.uiFontSize));function b(q){const me=j7(q);me!==void 0&&s("setUiFontSize",me)}const S=O(()=>{const q=o.status.permission;return q==="yolo"?"var(--color-warning)":q==="auto"?"var(--color-danger)":"var(--color-text-muted)"}),I=O(()=>{const q=o.status.permission,me=n(q==="yolo"?"mobile.permYoloSub":q==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${q} · ${me}`}),T=O(()=>o.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100))):0),$=O(()=>o.status.ctxMax>0?`${Pl(o.status.ctxUsed)}/${Pl(o.status.ctxMax)}`:n("status.statusNone"));function F(q){s("setThinking",Wx(a.value,q))}function R(){const q=l.indexOf(o.status.permission),me=l[(q+1)%l.length];s("setPermission",me)}function P(){s("pickModel"),s("update:modelValue",!1)}function M(){s("login"),s("update:modelValue",!1)}const D=q0(),B=V("main"),z=V([]),A=V(!1),L=V(!1),W=V(""),j=V("archived-desc");async function re(){if(!A.value){A.value=!0,L.value=!1;try{const q=[];let me;for(;;){const xe=await D.loadArchivedSessions({beforeId:me,pageSize:MRe});if(q.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const We=xe.items.at(-1)?.id;if(We===void 0)break;me=We}z.value=q,L.value=!0}catch(q){console.warn("loadAllArchived failed",q)}finally{A.value=!1}}}function Q(){B.value="archived",W.value="",re()}function Y(){B.value="main"}const G=O(()=>{const q=W.value.trim().toLowerCase();let me=z.value.filter(xe=>xe.archived===!0);return q&&(me=me.filter(xe=>xe.title.toLowerCase().includes(q))),me=me.slice(),j.value==="archived-desc"?me.sort((xe,We)=>We.updatedAt.localeCompare(xe.updatedAt)):j.value==="created-desc"?me.sort((xe,We)=>We.createdAt.localeCompare(xe.createdAt)):me.sort((xe,We)=>xe.title.localeCompare(We.title,"en")),me});async function X(q){await D.restoreSession(q)&&(z.value=z.value.filter(xe=>xe.id!==q))}function te(q){const me=new Date(q);if(Number.isNaN(me.getTime()))return q;const xe=We=>String(We).padStart(2,"0");return`${me.getFullYear()}-${xe(me.getMonth()+1)}-${xe(me.getDate())} ${xe(me.getHours())}:${xe(me.getMinutes())}`}return Ye(()=>o.modelValue,q=>{q||(B.value="main")}),(q,me)=>(g(),pe(zN,{"model-value":e.modelValue,title:x(n)("mobile.settingsTitle"),"onUpdate:modelValue":me[8]||(me[8]=xe=>s("update:modelValue",xe))},{default:ve(()=>[B.value==="main"?(g(),C(Te,{key:0},[_("div",bOe,N(x(n)("mobile.groupSession")),1),_("button",{type:"button",class:"srow",onClick:P},[_("span",wOe,[_("span",xOe,N(x(n)("status.statusModel")),1),_("span",_Oe,N(e.status.model),1)]),me[9]||(me[9]=_("span",{class:"chev"},"›",-1))]),_("div",SOe,[_("span",COe,[_("span",AOe,N(x(n)("status.statusThinking")),1),u.value==="unsupported"?(g(),C("span",MOe,N(x(n)("status.modeNotSupported")),1)):oe("",!0)]),c.value.length>1?(g(),pe(zs,{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":F},null,8,["model-value","options"])):(g(),C("span",{key:1,class:ze(["srow-val",{dim:d.value==="off"}])},N(d.value==="off"?x(n)("status.planOff"):x(Jp)(d.value)),3))]),_("div",EOe,N(x(n)("status.cacheNote")),1),_("button",{type:"button",class:"srow",onClick:me[0]||(me[0]=xe=>s("togglePlan"))},[_("span",TOe,[_("span",IOe,N(x(n)("status.statusPlanMode")),1),_("span",$Oe,N(x(n)("mobile.planModeSub")),1)]),_("span",{class:ze(["toggle",{on:h.value}]),role:"switch","aria-checked":h.value},null,10,NOe)]),k.value?(g(),C("div",LOe,[_("span",FOe,[_("span",OOe,N(x(n)("status.goalLabel")),1),_("span",ROe,N(w.value),1)]),_("span",POe,[e.goal?.status==="active"?(g(),pe(nn,{key:0,variant:"secondary",size:"sm",onClick:me[1]||(me[1]=xe=>s("controlGoal","pause"))},{default:ve(()=>[qe(N(x(n)("status.goalPause")),1)]),_:1})):oe("",!0),e.goal?.status==="paused"||e.goal?.status==="blocked"?(g(),pe(nn,{key:1,variant:"secondary",size:"sm",onClick:me[2]||(me[2]=xe=>s("controlGoal","resume"))},{default:ve(()=>[qe(N(x(n)("status.goalResume")),1)]),_:1})):oe("",!0),K(nn,{variant:"ghost",size:"sm",onClick:v},{default:ve(()=>[qe(N(x(n)("status.goalCancel")),1)]),_:1})])])):(g(),C("button",{key:1,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:me[3]||(me[3]=xe=>s("toggleGoal"))},[_("span",BOe,[_("span",zOe,N(x(n)("status.goalLabel")),1),_("span",WOe,N(x(n)("mobile.goalModeSub")),1)]),_("span",{class:ze(["toggle",{on:m.value}])},null,2)],8,DOe)),_("button",{type:"button",class:"srow",role:"switch","aria-checked":e.dynamicWorkflowMode,onClick:me[4]||(me[4]=xe=>s("toggleWorkflow"))},[_("span",jOe,[_("span",UOe,N(x(n)("status.statusDynamicWorkflowMode")),1),_("span",VOe,N(x(n)("mobile.workflowModeSub")),1)]),_("span",{class:ze(["toggle",{on:e.dynamicWorkflowMode}])},null,2)],8,HOe),_("button",{type:"button",class:"srow",onClick:R},[_("span",qOe,[_("span",KOe,N(x(n)("status.statusPermission")),1),_("span",{class:"srow-sub",style:jt({color:S.value})},N(I.value),5)]),me[10]||(me[10]=_("span",{class:"chev"},"›",-1))]),_("div",GOe,[_("span",ZOe,[_("span",YOe,N(x(n)("status.statusContext")),1),_("span",JOe,N($.value),1)]),_("span",{class:"ctx-meter","aria-label":$.value},[_("i",{style:jt({width:T.value+"%"})},null,4)],8,XOe)]),_("div",QOe,N(x(n)("mobile.groupApp")),1),_("button",{type:"button",class:"srow",onClick:Q},[_("span",eRe,[_("span",tRe,N(x(n)("mobile.archivedSessions")),1),_("span",nRe,N(x(n)("mobile.archivedSessionsSub")),1)]),me[11]||(me[11]=_("span",{class:"chev"},"›",-1))]),_("div",oRe,[_("span",sRe,[_("span",iRe,N(x(n)("theme.colorSchemeLabel")),1)]),K(zs,{"model-value":e.colorScheme??"system",options:[{value:"light",label:x(n)("theme.light")},{value:"dark",label:x(n)("theme.dark")},{value:"system",label:x(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),_("div",rRe,[_("span",lRe,[_("span",aRe,N(x(n)("settings.uiFontSize")),1)]),K(zs,{"model-value":y.value,options:x(B7),"aria-label":x(n)("settings.uiFontSize"),"onUpdate:modelValue":b},null,8,["model-value","options","aria-label"])]),_("button",{type:"button",class:"srow",onClick:me[5]||(me[5]=xe=>s("setConversationToc",!e.conversationToc))},[_("span",uRe,[_("span",cRe,N(x(n)("settings.conversationToc")),1),_("span",dRe,N(x(n)("settings.conversationTocHint")),1)]),_("span",{class:ze(["toggle",{on:e.conversationToc}]),role:"switch","aria-checked":e.conversationToc},null,10,fRe)]),_("button",{type:"button",class:"srow acct in",onClick:M},[_("span",pRe,[_("span",hRe,N(x(n)("settings.manageProviders")),1)])]),e.serverVersion?(g(),C("div",mRe,[_("span",gRe,[_("span",vRe,N(x(n)("settings.serverVersion")),1)]),_("span",yRe,N(e.serverVersion),1)])):oe("",!0)],64)):(g(),C(Te,{key:1},[_("div",kRe,[_("button",{type:"button",class:"arch-back",onClick:Y},[me[12]||(me[12]=_("span",{class:"chev back"},"‹",-1)),qe(" "+N(x(n)("mobile.archivedBack")),1)]),_("span",bRe,N(x(n)("mobile.sessionCount",{n:G.value.length})),1)]),_("div",wRe,[K(ms,{class:"arch-search-input","model-value":W.value,size:"sm",placeholder:x(n)("settings.archivedSearch"),"onUpdate:modelValue":me[6]||(me[6]=xe=>W.value=xe)},null,8,["model-value","placeholder"]),K(zs,{size:"sm","model-value":j.value,options:[{value:"archived-desc",label:x(n)("settings.archivedSortArchived")},{value:"created-desc",label:x(n)("settings.archivedSortCreated")},{value:"name-asc",label:x(n)("settings.archivedSortName")}],"onUpdate:modelValue":me[7]||(me[7]=xe=>j.value=xe)},null,8,["model-value","options"])]),A.value?(g(),C("div",xRe,N(x(n)("settings.archivedLoadingAll")),1)):G.value.length>0?(g(!0),C(Te,{key:1},st(G.value,xe=>(g(),C("div",{key:xe.id,class:"arch-row"},[_("div",_Re,[_("div",SRe,N(xe.title),1),_("div",CRe,N(x(n)("settings.archivedAt",{time:te(xe.updatedAt)})),1)]),K(nn,{variant:"secondary",size:"sm",onClick:We=>X(xe.id)},{default:ve(()=>[qe(N(x(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(g(),C("div",ARe,N(z.value.length===0?x(n)("settings.archivedEmpty"):x(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title"]))}}),TRe=ht(ERe,[["__scopeId","data-v-da4b6716"]]),IRe=["aria-label"],$Re={class:"wiz-body"},NRe={class:"wiz-step"},LRe={class:"wiz-title"},FRe={class:"wiz-sub"},ORe={class:"wiz-step-fill"},RRe={class:"pref-group"},PRe={class:"pref-label"},DRe={class:"theme-cards"},BRe=["onClick"],zRe={class:"opt-label"},WRe={class:"pref-group"},HRe={class:"pref-label"},jRe={class:"accent-cards"},URe=["onClick"],VRe={class:"opt-label"},qRe={class:"wiz-foot"},KRe=Ze({__name:"Onboarding",emits:["complete","skip"],setup(e,{emit:t}){const n=t,{t:o}=$t(),{colorScheme:s,accent:i,setColorScheme:r,setAccent:l}=Kx(),a=[{value:"system",label:o("theme.system")},{value:"light",label:o("theme.light")},{value:"dark",label:o("theme.dark")}],u=[{value:"blue",label:o("theme.accentBlue")},{value:"mono",label:o("theme.accentBlack")}];return(c,d)=>(g(),C("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":x(o)("onboarding.title")},[_("div",$Re,[_("section",NRe,[K(lw,{size:"lg",animated:!1,label:"Pythinker Code"}),_("h1",LRe,N(x(o)("onboarding.title")),1),_("p",FRe,N(x(o)("onboarding.subtitle")),1),_("div",ORe,[_("div",RRe,[_("div",PRe,N(x(o)("theme.colorSchemeLabel")),1),_("div",DRe,[(g(),C(Te,null,st(a,f=>_("button",{key:f.value,type:"button",class:ze(["opt-card theme-card",{selected:x(s)===f.value}]),onClick:p=>x(r)(f.value)},[_("span",{class:ze(["theme-preview",`theme-preview--${f.value}`]),"aria-hidden":"true"},[f.value==="system"?(g(),C(Te,{key:0},[d[2]||(d[2]=K2('',2))],64)):(g(),C(Te,{key:1},[d[3]||(d[3]=_("span",{class:"theme-side"},null,-1)),d[4]||(d[4]=_("span",{class:"theme-lines"},[_("span"),_("span"),_("span")],-1))],64))],2),_("span",zRe,N(f.label),1)],10,BRe)),64))])]),_("div",WRe,[_("div",HRe,N(x(o)("theme.accentLabel")),1),_("div",jRe,[(g(),C(Te,null,st(u,f=>_("button",{key:f.value,type:"button",class:ze(["opt-card accent-card",{selected:x(i)===f.value}]),onClick:p=>x(l)(f.value)},[_("span",{class:ze(["opt-radio",{on:x(i)===f.value}])},null,2),_("span",{class:ze(["accent-swatch",`accent-swatch--${f.value}`]),"aria-hidden":"true"},null,2),_("span",VRe,N(f.label),1)],10,URe)),64))])])])]),_("div",qRe,[K(nn,{variant:"primary",size:"lg",class:"wiz-primary",onClick:d[0]||(d[0]=f=>n("complete"))},{default:ve(()=>[qe(N(x(o)("onboarding.start")),1)]),_:1}),K(nn,{variant:"ghost",onClick:d[1]||(d[1]=f=>n("skip"))},{default:ve(()=>[qe(N(x(o)("onboarding.skip")),1)]),_:1})])])],8,IRe))}}),GRe=ht(KRe,[["__scopeId","data-v-043d59e7"]]),ZRe="/logo.png",YRe=["aria-label"],JRe={class:"gload-box"},XRe={class:"gload-text"},QRe={key:0,class:"gload-issue"},ePe={class:"gload-issue-detail"},tPe=Ze({__name:"GlobalLoading",props:{issue:{}},setup(e){const{t}=$t();return(n,o)=>(g(),C("div",{class:"gload",role:"status","aria-label":x(t)("app.connecting")},[_("div",JRe,[o[0]||(o[0]=_("img",{class:"gload-logo",src:ZRe,alt:"Pythinker",width:"120",height:"120"},null,-1)),K(ns,{size:"md",label:x(t)("app.connecting")},null,8,["label"]),_("div",XRe,N(x(t)("app.connecting")),1),e.issue?(g(),C("div",QRe,[_("div",null,N(x(t)("app.connectRetrying")),1),_("div",ePe,N(e.issue),1)])):oe("",!0)])],8,YRe))}}),nPe=ht(tPe,[["__scopeId","data-v-2468172e"]]),oPe={class:"kap-root"},sPe={class:"kap-head"},iPe={class:"kap-count"},rPe={class:"kap-head-actions"},lPe={class:"kap-filters"},aPe=["value"],uPe={class:"kap-check"},cPe={class:"kap-check"},dPe={class:"kap-view-toggle",role:"group"},fPe={key:0,class:"kap-empty"},pPe=["onClick"],hPe={class:"kap-ts"},mPe={class:"kap-label"},gPe={key:0,class:"kap-detail"},vPe={class:"kap-detail-actions"},yPe=["onClick"],kPe={key:1,class:"kap-agg"},bPe={class:"mono"},wPe={class:"mono"},xPe={class:"num"},_Pe={class:"num"},SPe={key:0},CPe={class:"mono"},APe={class:"num"},MPe={class:"num"},EPe={key:0},TPe=Ze({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=V("all"),s=V(""),i=V(""),r=V(!1),l=V("timeline"),a=O(()=>(Ax.value,[...Bye()])),u=O(()=>{const F=new Set;for(const R of a.value)R.sessionId&&F.add(R.sessionId);return[...F].sort()});function c(F){return F.kind==="rest:error"||F.code!==void 0&&F.code!==0||F.eventType==="error"||F.eventType==="parse-error"}const d=O(()=>{const F=s.value.trim().toLowerCase();return a.value.filter(R=>!(o.value!=="all"&&R.source!==o.value||i.value&&R.sessionId!==i.value||r.value&&!c(R)||F&&!`${R.label} ${R.kind} ${R.eventType??""} ${R.sessionId??""} ${R.requestId??""}`.toLowerCase().includes(F)))}),f=O(()=>{const F=new Map;for(const R of d.value){if(R.kind!=="ws:in"&&R.kind!=="ws:out")continue;const P=R.kind==="ws:in"?"←":"→",M=`${P} ${R.eventType??"?"} @ ${R.sessionId??"-"}`,D=F.get(M)??{key:M,sessionId:R.sessionId??"-",eventType:R.eventType??"?",dir:P,count:0};D.count++,R.seq!==void 0&&(D.lastSeq=R.seq),F.set(M,D)}return[...F.values()].sort((R,P)=>P.count-R.count)}),p=O(()=>{const F=new Map;for(const R of d.value){if(R.source!=="rest"||R.kind==="rest:request")continue;const P=`${R.method??"?"} ${R.path??"?"}`,M=F.get(P)??{count:0,errors:0,totalMs:0,timed:0};M.count++,c(R)&&M.errors++,R.durationMs!==void 0&&(M.totalMs+=R.durationMs,M.timed++),F.set(P,M)}return[...F.entries()].map(([R,P])=>({key:R,count:P.count,errors:P.errors,avgMs:P.timed>0?Math.round(P.totalMs/P.timed):0})).sort((R,P)=>P.count-R.count)}),h=V(null),m=V(!0),k=V(null),w=V(null);Ye(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await xt();const F=k.value;F&&(F.scrollTop=F.scrollHeight)});function v(F){h.value=h.value===F?null:F}function y(F){const R=new Date(F),P=(M,D=2)=>String(M).padStart(D,"0");return`${P(R.getHours())}:${P(R.getMinutes())}:${P(R.getSeconds())}.${P(R.getMilliseconds(),3)}`}function b(F){return JSON.stringify(F,null,2)}async function S(F){await Jo(b(F))&&(w.value=F.id,setTimeout(()=>{w.value===F.id&&(w.value=null)},1500))}function I(){g7(d.value)}function T(F){return c(F)||F.source==="client"?"b-err":F.source==="rest"?"b-rest":F.kind==="ws:lifecycle"?"b-life":F.kind==="ws:out"?"b-out":"b-in"}function $(F){return F.source==="rest"?"REST":F.source==="client"?"APP":"WS"}return(F,R)=>(g(),C("section",oPe,[_("header",sPe,[R[11]||(R[11]=_("strong",null,"KAP debug",-1)),_("span",iPe,N(d.value.length)+"/"+N(a.value.length),1),_("div",rPe,[_("button",{type:"button",class:ze({on:x(Zf)}),onClick:R[0]||(R[0]=P=>Zf.value=!x(Zf))},N(x(Zf)?"resume":"pause"),3),_("button",{type:"button",onClick:R[1]||(R[1]=P=>x(zye)())},"clear"),_("button",{type:"button",onClick:R[2]||(R[2]=P=>I())},"export jsonl"),K(Mn,{text:"Close window"},{default:ve(()=>[_("button",{type:"button",onClick:R[3]||(R[3]=P=>n("close"))},"✕")]),_:1})])]),_("div",lPe,[Bn(_("select",{"onUpdate:modelValue":R[4]||(R[4]=P=>o.value=P),"aria-label":"Source filter"},[...R[12]||(R[12]=[_("option",{value:"all"},"rest + ws + app",-1),_("option",{value:"rest"},"rest",-1),_("option",{value:"ws"},"ws",-1),_("option",{value:"client"},"app errors",-1)])],512),[[eb,o.value]]),Bn(_("select",{"onUpdate:modelValue":R[5]||(R[5]=P=>i.value=P),"aria-label":"Session filter"},[R[13]||(R[13]=_("option",{value:""},"all sessions",-1)),(g(!0),C(Te,null,st(u.value,P=>(g(),C("option",{key:P,value:P},N(P),9,aPe))),128))],512),[[eb,i.value]]),Bn(_("input",{"onUpdate:modelValue":R[6]||(R[6]=P=>s.value=P),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[vs,s.value]]),_("label",uPe,[Bn(_("input",{"onUpdate:modelValue":R[7]||(R[7]=P=>r.value=P),type:"checkbox"},null,512),[[Bg,r.value]]),R[14]||(R[14]=qe(" errors",-1))]),_("label",cPe,[Bn(_("input",{"onUpdate:modelValue":R[8]||(R[8]=P=>m.value=P),type:"checkbox"},null,512),[[Bg,m.value]]),R[15]||(R[15]=qe(" follow",-1))]),_("div",dPe,[_("button",{type:"button",class:ze({on:l.value==="timeline"}),onClick:R[9]||(R[9]=P=>l.value="timeline")},"timeline",2),_("button",{type:"button",class:ze({on:l.value==="aggregate"}),onClick:R[10]||(R[10]=P=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(g(),C("div",{key:0,ref_key:"listRef",ref:k,class:"kap-list"},[d.value.length===0?(g(),C("div",fPe," No trace entries yet. REST calls and WS frames will appear here. ")):oe("",!0),(g(!0),C(Te,null,st(d.value,P=>(g(),C("div",{key:P.id,class:"kap-row-wrap"},[_("button",{type:"button",class:ze(["kap-row",{expanded:h.value===P.id}]),onClick:M=>v(P.id)},[_("span",hPe,N(y(P.ts)),1),_("span",{class:ze(["kap-badge",T(P)])},N($(P)),3),_("span",mPe,N(P.label),1)],10,pPe),h.value===P.id?(g(),C("div",gPe,[_("div",vPe,[_("button",{type:"button",onClick:M=>S(P)},N(w.value===P.id?"copied ✓":"copy json"),9,yPe)]),_("pre",null,N(b(P)),1)])):oe("",!0)]))),128))],512)):(g(),C("div",kPe,[R[20]||(R[20]=_("h4",null,"WS frames by session / type",-1)),_("table",null,[R[17]||(R[17]=_("thead",null,[_("tr",null,[_("th",null,"dir"),_("th",null,"type"),_("th",null,"session"),_("th",null,"count"),_("th",null,"last seq")])],-1)),_("tbody",null,[(g(!0),C(Te,null,st(f.value,P=>(g(),C("tr",{key:P.key},[_("td",null,N(P.dir),1),_("td",bPe,N(P.eventType),1),_("td",wPe,N(P.sessionId),1),_("td",xPe,N(P.count),1),_("td",_Pe,N(P.lastSeq??"—"),1)]))),128)),f.value.length===0?(g(),C("tr",SPe,[...R[16]||(R[16]=[_("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):oe("",!0)])]),R[21]||(R[21]=_("h4",null,"REST by endpoint",-1)),_("table",null,[R[19]||(R[19]=_("thead",null,[_("tr",null,[_("th",null,"endpoint"),_("th",null,"count"),_("th",null,"errors"),_("th",null,"avg ms")])],-1)),_("tbody",null,[(g(!0),C(Te,null,st(p.value,P=>(g(),C("tr",{key:P.key},[_("td",CPe,N(P.key),1),_("td",APe,N(P.count),1),_("td",{class:ze(["num",{err:P.errors>0}])},N(P.errors),3),_("td",MPe,N(P.avgMs),1)]))),128)),p.value.length===0?(g(),C("tr",EPe,[...R[18]||(R[18]=[_("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):oe("",!0)])])]))]))}}),IPe=ht(TPe,[["__scopeId","data-v-7bab00af"]]),$Pe=Ze({__name:"DebugPanel",setup(e){const t=V(!1);let n=null,o=null,s=null;const i=["data-color-scheme","data-accent"];function r(c){const d=document.documentElement,f=c.documentElement;for(const p of i){const h=d.getAttribute(p);h!==null?f.setAttribute(p,h):f.removeAttribute(p)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const h of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(h.cloneNode(!0));r(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=zg(IPe,{onClose:()=>c.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return Sn(()=>{u()}),po(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(g(),pe(Mn,{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:ve(()=>[_("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),NPe=ht($Pe,[["__scopeId","data-v-992ae84c"]]);function LPe({client:e,authLogoRef:t}){const n=O(()=>e.authReady.value),o=O(()=>e.initialized.value&&!n.value),s="/login",i=V(null);let r=null;function l(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function a(c){typeof window>"u"||window.history.replaceState(window.history.state,"",c)}Ye(o,c=>{if(!(typeof window>"u")){if(c){window.location.pathname!==s&&(i.value=l(),a(s));return}window.location.pathname===s&&(a(i.value??"/"),i.value=null)}},{immediate:!0});function u(){const c=t.value;c&&(c.classList.remove("blink-now"),c.getBoundingClientRect(),c.classList.add("blink-now"),r!==null&&clearTimeout(r),r=setTimeout(()=>{r=null,c.classList.remove("blink-now")},300))}return En(()=>{r!==null&&clearTimeout(r)}),{showAuthGate:o,blinkAuthLogo:u}}function FPe({running:e,showAuthGate:t}){const{t:n}=$t(),o=V(Cl[0]);let s=0,i;function r(){i!==void 0&&clearInterval(i),i=void 0}Ye(e,a=>{r(),s=0,o.value=Cl[0],a&&(i=setInterval(()=>{s=(s+1)%Cl.length,o.value=Cl[s]??Cl[0]},Bu))},{immediate:!0}),Ld(r);const l=O(()=>{const a=e.value?`${o.value} `:"";return t.value?`${a}${n("app.authPageTitle")} - Pythinker Code Web`:`${a}Pythinker Code Web`});s5(()=>{typeof document<"u"&&(document.title=l.value)})}function OPe(e,t,n){const o=new Map(e.attachments.map(a=>[a.attachmentId,a])),s=new Map(e.tasks.map(a=>[a.taskId,a])),i=e.items.find(a=>a.kind==="turn"),r=e.items.findLast(a=>a.kind==="turn"),l=e.items.flatMap(a=>a.kind==="turn"?RPe(a,o,s,{...n,startedAt:a.turnId===i?.turnId?t?.createdAt:void 0,endedAt:a.turnId===r?.turnId?t?.disposedAt:void 0}):[]);return o_(l,[],a=>n.getFileUrl(a),e.meta.activity==="turn")}function RPe(e,t,n,o){const s=[],i=BPe([e.startedAt,...e.steps.map(u=>u.startedAt),o.startedAt]),r=qm(e.endedAt)??qm(o.endedAt),l=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const u=[{type:"text",text:e.prompt}];for(const c of e.attachmentIds??[]){const d=PPe(t.get(c));d!==void 0&&u.push(d)}s.push({id:`${e.turnId}:input`,sessionId:o.sessionId,role:"user",content:u,createdAt:i,promptId:l,metadata:{origin:e.origin}})}for(const u of e.steps){const c=qm(u.startedAt)??i;for(const d of u.frames){if(d.kind==="text"){if(d.text.length===0||d.role==="user"&&d.taskId===void 0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:d.role,content:[{type:"text",text:d.text}],createdAt:c,promptId:l,metadata:d.taskId===void 0?void 0:{origin:{kind:"task",taskId:d.taskId},task:n.get(d.taskId)}});continue}if(d.kind==="thinking"){if(d.text.length===0)continue;s.push({id:d.frameId,sessionId:o.sessionId,role:"assistant",content:[{type:"thinking",thinking:d.text}],createdAt:c,promptId:l});continue}d.kind==="tool"&&(s.push({id:`${d.frameId}:call`,sessionId:o.sessionId,role:"assistant",content:[{type:"toolUse",toolCallId:d.toolCallId,toolName:d.name,input:d.input??d.display??{},outputLines:d.state==="running"?DPe(d.output):void 0}],createdAt:c,promptId:l}),d.state!=="running"&&s.push({id:`${d.frameId}:result`,sessionId:o.sessionId,role:"tool",content:[{type:"toolResult",toolCallId:d.toolCallId,output:d.output??d.error??"",isError:d.state==="error"}],createdAt:qm(u.endedAt)??c,promptId:l}))}}const a=e.durationMs??zPe(i,r);if(a!==void 0){const u=s.findLastIndex(c=>c.role==="assistant");u>=0&&(s[u]={...s[u],durationMs:a})}return s}function PPe(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function DPe(e){if(e==null)return;if(typeof e=="string")return e.split(` -`);if(!Array.isArray(e))return[JSON.stringify(e)];const t=[];for(const n of e){if(typeof n=="string"){t.push(...n.split(` -`));continue}if(n===null||typeof n!="object")continue;const o=n;o.type==="text"&&typeof o.text=="string"?t.push(...o.text.split(` -`)):o.type==="think"&&typeof o.think=="string"&&t.push(...o.think.split(` -`))}return t.length>0?t:void 0}function qm(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function BPe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const WN=V(typeof window>"u"?0:window.innerWidth);let Km=0,U1=!1;function E2(){WN.value=window.innerWidth}function WPe(){U1||typeof window>"u"||(window.addEventListener("resize",E2),U1=!0,E2())}function HPe(){!U1||typeof window>"u"||(window.removeEventListener("resize",E2),U1=!1)}function HN(e,t,n){return Math.max(t,e-n)}function T2(e,t,n){return Math.min(n,Math.max(t,e))}function jN(){return Sn(()=>{Km+=1,WPe()}),po(()=>{Km=Math.max(0,Km-1),Km===0&&HPe()}),{viewportWidth:WN}}const jPe="pythinker-web.file-preview-width",Hc=320;function UPe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=jN(),i=O(()=>Math.max(0,s.value-t.value)),r=O(()=>HN(i.value,Hc,Hc));function l(fe){return T2(Math.round(fe),Hc,r.value)}function a(){return l(i.value/2)}const u=O(()=>a()),c=V(u.value),d=O(()=>T2(c.value,Hc,r.value)),f=V(null),p=O(()=>{const fe=f.value;if(!fe)return null;const de=e.turns.value.find(J=>J.id===fe.turnId);return de?.role==="compaction"&&de.text?de.text:null}),h=O(()=>p.value!==null);function m(fe){if(f.value?.turnId===fe.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=fe}function k(){f.value=null,n.value==="compaction"&&(n.value=null)}const w=V(null),v=O(()=>{const fe=w.value;if(!fe)return{entry:void 0,version:0};const de=e.auxiliaryTranscripts.getEntry(fe.sessionId,fe.subagentId);return{entry:de,version:de?.version.value??0}});function y(fe){const de=e.activeAppTasks.value.find(J=>J.agentId===fe||J.id===fe||J.backgroundTaskId===fe||J.parentToolCallId===fe);return de?.agentId??de?.id??fe}const b=O(()=>{const fe=w.value;if(!fe)return null;const de=e.activeAppTasks.value.find(Re=>Re.agentId===fe.subagentId||Re.id===fe.subagentId||Re.backgroundTaskId===fe.subagentId);if(de)return e4e(de);const J=v.value.entry?.channel;if(!J)return null;const ae=J.agents.find(Re=>Re.agentId===fe.subagentId),be=J.snapshot.items.findLast(Re=>Re.kind==="turn"),_e=J.snapshot.meta.activity==="turn",ce=J.loading,Se=be?.kind==="turn"&&be.state==="failed",ie=be?.kind==="turn"&&be.state==="cancelled",we=J.refreshError&&be===void 0;return{id:fe.subagentId,name:ae?.label??fe.subagentId,subagentType:ae?.type==="sub"?"subagent":ae?.type,phase:_e?"working":ie?"cancelled":Se||we?"failed":ce?"queued":"completed",status:_e||ce?"running":ie?"cancelled":Se||we?"failed":"completed"}}),S=O(()=>{const fe=w.value,de=v.value.entry?.channel;if(!fe||!de)return[];const J=de.agents.find(ae=>ae.agentId===fe.subagentId);return OPe(de.snapshot,J,{sessionId:fe.sessionId,getFileUrl:ae=>e.getFileUrl(ae)})}),I=O(()=>v.value.entry?.channel.loading??!1),T=O(()=>v.value.entry?.channel.refreshError??!1),$=O(()=>v.value.entry?.channel.loadingOlder??!1),F=O(()=>v.value.entry?.channel.loadOlderError??!1),R=O(()=>v.value.entry?.channel.snapshot.hasMoreOlder??!1),P=O(()=>v.value.entry?.channel.snapshot.meta.activity==="turn"),M=O(()=>b.value!==null);function D(fe){const de=e.activeSessionId.value;if(!fe||!de)return;const J=y(fe);if(n.value==="agent"&&w.value?.sessionId===de&&w.value.subagentId===J){B();return}const ae=w.value;ae&&ae.subagentId!==J&&e.auxiliaryTranscripts.deactivate(ae.sessionId,ae.subagentId),w.value={sessionId:de,subagentId:J},n.value="agent",e.auxiliaryTranscripts.activate(de,J)}function B(){const fe=w.value;fe&&e.auxiliaryTranscripts.deactivate(fe.sessionId,fe.subagentId),w.value=null,n.value==="agent"&&(n.value=null)}Ye(n,(fe,de)=>{if(de!=="agent"||fe==="agent")return;const J=w.value;J&&e.auxiliaryTranscripts.deactivate(J.sessionId,J.subagentId)});function z(){v.value.entry?.channel.loadOlder().catch(()=>{})}const A=V(null),L=O(()=>{const fe=A.value;if(!fe)return null;const de=HY(e.turns.value,fe);return de?{id:fe,title:Is(de.name),path:cw(de.arg),lines:de.status==="error"?null:uw(de),output:de.output}:null}),W=O(()=>L.value!==null);function j(fe){if(n.value==="toolDiff"&&A.value===fe){re();return}n.value="toolDiff",A.value=fe}function re(){A.value=null,n.value==="toolDiff"&&(n.value=null)}const Q=V("list"),Y=V(null);function G(){if(n.value==="diff"){X();return}n.value="diff",Q.value="list",Y.value=null,e.loadGitStatus(e.activeSessionId.value)}function X(){n.value==="diff"&&(n.value=null),Q.value="list",Y.value=null,e.clearFileDiff()}async function te(fe){Q.value="detail",Y.value=fe,await e.loadFileDiff(fe)}async function q(fe){!e.activeSessionId.value&&e.activeWorkspaceId.value?await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,fe):await e.openSideChat(fe),n.value="btw"}function me(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function xe(){n.value==="btw"&&(n.value=null)}const We=O(()=>e.sideChatVisible.value),he=O(()=>n.value!==null&&(n.value!=="compaction"||h.value)&&(n.value!=="agent"||M.value)&&(n.value!=="toolDiff"||W.value)&&(n.value!=="btw"||We.value)),ee=V(!1),ne=V({});function H(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return w.value?{kind:"agent",...w.value}:null;case"toolDiff":return A.value?{kind:"toolDiff",toolId:A.value}:null;case"btw":return{kind:"btw"};default:return null}}function Z(fe){if(fe)switch(fe.kind){case"compaction":f.value={turnId:fe.turnId},n.value="compaction";break;case"agent":{const de=e.activeSessionId.value;if(!de)break;const J=y(fe.subagentId);w.value={sessionId:de,subagentId:J},n.value="agent",e.auxiliaryTranscripts.activate(de,J);break}case"toolDiff":A.value=fe.toolId,n.value="toolDiff";break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function ye(){return n.value==="compaction"&&h.value?(k(),!0):n.value==="agent"&&M.value?(B(),!0):n.value==="toolDiff"&&W.value?(re(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(X(),!0):n.value==="btw"?(me(),!0):!1}return Ye(e.activeSessionId,(fe,de)=>{if(de){const J=H();J?ne.value[de]=J:delete ne.value[de]}o(),k(),B(),re(),X(),xe(),fe&&Z(ne.value[fe])}),{PREVIEW_WIDTH_KEY:jPe,PREVIEW_MIN:Hc,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:h,openCompactionPanel:m,closeCompactionPanel:k,agentPanelMember:b,agentPanelTurns:S,agentPanelLoading:I,agentPanelLoadError:T,agentPanelLoadingMore:$,agentPanelLoadMoreError:F,agentPanelHasMore:R,agentPanelRunning:P,agentPanelVisible:M,openAgentPanel:D,closeAgentPanel:B,loadOlderAgentMessages:z,toolDiffTarget:L,toolDiffVisible:W,openToolDiff:j,closeToolDiff:re,detailDiffMode:Q,detailDiffPath:Y,openDiffDetail:G,closeDiffDetail:X,selectDiffFile:te,btwVisible:We,openSideChatTab:q,closeSideChat:me,hideSideChatPanel:xe,sidePanelVisible:he,panelDragging:ee,closeOpenSidePanel:ye}}const VPe=rn.sidebarWidth,CM=rn.sidebarCollapsed,AM=270,Ok=170,qPe=480,KPe=320;function GPe(e={}){const{viewportWidth:t}=jN(),n=V(AM),o=V(!1),s=V(!1),i=O(()=>{const c=KPe+(YM(e.previewOpen)?Hc:0);return Math.min(qPe,HN(t.value,Ok,c))}),r=O(()=>T2(n.value,Ok,i.value));function l(){try{o.value=zo(CM)==="true"}catch{o.value=!1}}function a(){try{ts(CM,String(o.value))}catch{}}function u(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:VPe,SIDEBAR_DEFAULT:AM,SIDEBAR_MIN:Ok,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}async function ZPe(e){if(!e.fileId)return{url:e.url};try{const t=await St().getFileBlob(e.fileId),n=URL.createObjectURL(t);return{url:n,revoke:()=>URL.revokeObjectURL(n)}}catch{return{url:e.url}}}function YPe({client:e,detailTarget:t}){const{t:n}=$t(),o=V(null),s=V(null),i=V(!1),r=V(null),l=V(null);let a=0;const u=O(()=>{const y=l.value;return y?e.getFileDownloadUrl(y):null}),c=O(()=>o.value!==null);function d(y){return y.length>1?y.replace(/\/+$/,""):y}function f(y){const b=[];for(const S of y.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){b.pop();continue}b.push(S)}return b.join("/")}function p(y){const b=y.trim();if(!b)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(b))return{error:n("filePreview.errors.unsupportedPath")};if(b.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const S=d(e.status.value.cwd);if(b.startsWith("/")){if(!S||b!==S&&!b.startsWith(`${S}/`))return{error:n("filePreview.errors.outsideWorkspace")};const T=b===S?"":b.slice(S.length+1);if(T.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const $=f(T);return $?{path:$}:{error:n("filePreview.errors.isDirectory")}}if(b.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const I=f(b);return I?{path:I}:{error:n("filePreview.errors.emptyPath")}}async function h(y){const b=o.value;if(t.value==="file"&&b&&b.path===y.path&&b.line===y.line){k();return}const S=++a;t.value="file",s.value=null,r.value=null,i.value=!0,o.value=y,l.value=null;const I=p(y.path);if("error"in I){i.value=!1,r.value=I.error;return}l.value=I.path;try{const T=await e.readFileContent(I.path);if(S!==a)return;T?s.value={...T,path:T.path||I.path}:r.value=n("filePreview.errors.loadFailed")}catch(T){if(S!==a)return;r.value=T instanceof Error?T.message:n("filePreview.errors.loadFailed")}finally{S===a&&(i.value=!1)}}function m(){a+=1,o.value=null,l.value=null,s.value=null,r.value=null,i.value=!1}function k(){m(),t.value==="file"&&(t.value=null)}Ye(t,(y,b)=>{b==="file"&&y!=="file"&&m()});function w(){const y=s.value?.path??o.value?.path;y&&e.openWorkspaceFile(y,o.value?.line)}function v(){const y=s.value?.path??o.value?.path;y&&e.revealWorkspaceFile(y)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:h,closeFilePreview:k,openPreviewInEditor:w,revealPreviewFile:v}}const JPe={class:"server-auth-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"server-auth-title"},XPe={class:"server-auth-card"},QPe={class:"server-auth-body"},eDe={class:"server-auth-foot"},tDe=Ze({__name:"ServerAuthDialog",setup(e){const t=V(""),n=V(null),o=V(!1);Sn(()=>{xt(()=>n.value?.focus())});function s(){const r=t.value;!r||o.value||(o.value=!0,_7(r),window.location.reload())}function i(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(g(),C("div",JPe,[_("div",XPe,[l[1]||(l[1]=_("div",{class:"server-auth-head"},[_("h1",{id:"server-auth-title",class:"server-auth-title"},"Server token required"),_("p",{class:"server-auth-hint"},[qe(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),_("code",null,"PYTHINKER_CODE_PASSWORD"),qe("). ")])],-1)),_("div",QPe,[K(ms,{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),_("div",eDe,[K(nn,{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:ve(()=>[qe(N(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])])])]))}}),nDe=ht(tDe,[["__scopeId","data-v-82dad292"]]),oDe=["aria-label"],sDe=Ze({__name:"InternalBuildBanner",setup(e){const{t}=$t(),n=Df;return(o,s)=>x(n)?(g(),C("span",{key:0,class:"internal-build-tag",role:"note","aria-label":x(t)("app.internalBuildBanner")},[s[0]||(s[0]=_("svg",{viewBox:"0 0 16 16",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[_("path",{d:"M8 2 14 13H2L8 2Z"}),_("path",{d:"M8 6v3.5"}),_("path",{d:"M8 11.5h.01"})],-1)),_("span",null,N(x(t)("app.internalBuildBanner")),1)],8,oDe)):oe("",!0)}}),iDe=ht(sDe,[["__scopeId","data-v-6eba49b4"]]),rDe={class:"app-shell"},lDe={key:1,class:"auth-page"},aDe={class:"auth-page-inner"},uDe={class:"auth-page-copy"},cDe=["aria-label","aria-hidden"],dDe={class:"action-toast-stack"},fDe=Ze({__name:"App",setup(e){Lke();const t=V(!1);let n=null;const o=q0(),s=V([]),i=V(!1),r=V(null),l=V(null),a=V(null);let u=null;const c=O(()=>{const Xe=o.activeWorkspaceId.value;return Xe?[...o.sessionsForView.value,...s.value].filter(ge=>ge.workspaceId===Xe).toSorted((ge,Le)=>new Date(Le.updatedAt??0).getTime()-new Date(ge.updatedAt??0).getTime()).slice(0,6):[]});function d(Xe){return{id:Xe.id,title:Xe.title,time:new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,Math.floor((Date.now()-new Date(Xe.updatedAt).getTime())/864e5)),"day"),busy:!1,updatedAt:Xe.updatedAt,workspaceId:Xe.workspaceId,archived:!0}}async function f(){try{const Xe=[];let ge;for(;;){const Le=await o.loadArchivedSessions({beforeId:ge,pageSize:100});if(Xe.push(...Le.items),!Le.hasMore||Le.items.length===0||(ge=Le.items.at(-1)?.id,ge===void 0))break}s.value=Xe.map(d)}catch(Xe){console.warn("loadDoneSessions failed",Xe)}}const p=O(()=>{const Xe=new Map(o.workspaceGroups.value.flatMap(ge=>ge.sessions.map(Le=>[Le.id,Le.updatedAt])));return o.sessionsForView.value.map(ge=>({id:ge.id,title:ge.title,workspaceId:ge.workspaceId??"",workspaceName:ge.workspaceName??"-",lastPrompt:ge.lastPrompt,updatedAt:ge.updatedAt??Xe.get(ge.id)??new Date(0).toISOString(),archived:!1}))});async function h(){const Xe=[];let ge;for(;;){const un=await o.loadArchivedSessions({beforeId:ge,pageSize:100});if(Xe.push(...un.items),!un.hasMore||un.items.length===0||(ge=un.items.at(-1)?.id,ge===void 0))break}const Le=o.workspacesView.value;return Xe.filter(un=>!un.parentSessionId).map(un=>{const tl=Le.find(nl=>nl.id===un.workspaceId||nl.root===un.cwd);return{id:un.id,title:un.title,workspaceId:tl?.id??un.workspaceId??un.cwd,workspaceName:tl?.name??un.cwd.split("/").filter(Boolean).at(-1)??"-",lastPrompt:un.lastPrompt,updatedAt:un.updatedAt,archived:!0}})}function m(){i.value=!0,o.loadAllSessions()}function k(Xe,ge){r.value={kind:Xe,ids:Array.isArray(ge)?ge:[ge]}}const w=O(()=>!o.dangerousBypassAuth.value&&t.value);Vn("resolveImage",o.resolveImageUrl),Vn("resolveDynamicWorkflowMembers",Xe=>o.dynamicWorkflowMembersByToolCallId.value.get(Xe)??[]);const{t:v}=$t(),{confirm:y}=Ka(),b=Nr(),S=FN(),I=V(!1),T=V(!1),$=O(()=>{const Xe=o.activeSessionId.value;return o.sessions.value.find(ge=>ge.id===Xe)?.title??s.value.find(ge=>ge.id===Xe)?.title??""}),F=O(()=>{const Xe=o.activeSessionId.value;return o.sessions.value.find(ge=>ge.id===Xe)?.lastTurnReason}),R=O(()=>{const Xe=o.activeSessionId.value;if(Xe)return dke(Xe)}),P=O(()=>s.value.some(Xe=>Xe.id===o.activeSessionId.value)),M=O(()=>o.visibleWorkspace.value?.sessionCount??0),D=O(()=>o.activity.value!=="idle"),B=V(null),{showAuthGate:z,blinkAuthLogo:A}=LPe({client:o,authLogoRef:B});FPe({running:D,showAuthGate:z});function L(Xe){const ge=o.models.value.find(nl=>nl.id===o.status.value.modelId),Le=kh(ge),un=Le.indexOf(L1(ge,Xe)),tl=Le[(un+1)%Le.length]??Le[0]??"off";return Wx(ge,tl)}const W=O(()=>{const Xe=o.models.value.find(ge=>ge.id===o.status.value.modelId);return L1(Xe,o.thinking.value)}),j=V(!o.onboarded.value);function re(){o.setOnboarded(!0),j.value=!1}function Q(){j.value=!0}let Y=0;function G(){const Xe=window.visualViewport,ge=document.documentElement.style;ge.setProperty("--app-height",`${Xe?.height??window.innerHeight}px`),ge.setProperty("--app-top",`${Xe?.offsetTop??0}px`)}function X(){Y||(Y=requestAnimationFrame(()=>{Y=0,G()}))}Sn(()=>{n=Rke(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),Pt(),G(),window.visualViewport?.addEventListener("resize",X),window.visualViewport?.addEventListener("scroll",X),window.addEventListener("resize",X),document.addEventListener("keydown",te,!0)}),En(()=>{Re(),document.removeEventListener("keydown",te,!0),window.visualViewport?.removeEventListener("resize",X),window.visualViewport?.removeEventListener("scroll",X),window.removeEventListener("resize",X),Y&&(cancelAnimationFrame(Y),Y=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function te(Xe){if(Xe.key==="Escape"&&!ln.value){if(q.value==="turnDiff")We();else if(!Cn())return;Xe.stopPropagation(),Xe.preventDefault()}}const q=V(null),me=V(null);function xe(Xe){if(q.value==="turnDiff"&&me.value?.turnId===Xe.turnId){We();return}me.value=Xe,q.value="turnDiff"}function We(){me.value=null,q.value==="turnDiff"&&(q.value=null)}const he=V(!1);Ye(o.activeSessionId,()=>{We(),he.value=!0,xt(()=>{he.value=!1})});const{previewTarget:ee,previewFile:ne,previewLoading:H,previewError:Z,previewDownloadUrl:ye,previewExternalActions:fe,openFilePreview:de,closeFilePreview:J,openPreviewInEditor:ae,revealPreviewFile:be}=YPe({client:o,detailTarget:q}),_e=V(null),ce=V(null);let Se=0,ie;async function we(Xe){if(Xe.kind!=="image"&&Xe.kind!=="video")return;const ge=++Se;ie?.(),ie=void 0,_e.value=null,ce.value=null;const Le=await ZPe(Xe);if(ge!==Se){Le.revoke?.();return}ie=Le.revoke,_e.value=Xe,ce.value=Le.url}function Re(){Se+=1,ie?.(),ie=void 0,_e.value=null,ce.value=null}const at=O(()=>q.value!==null),{SIDEBAR_WIDTH_KEY:ft,SIDEBAR_DEFAULT:Mt,SIDEBAR_MIN:Tt,sidebarMax:tn,sessionColWidth:Kt,sidebarCollapsed:Qe,sidebarDragging:nt,sideWidth:ut,loadSidebarCollapsed:Pt,toggleSidebarCollapse:Oe}=GPe({previewOpen:at}),{PREVIEW_WIDTH_KEY:Je,PREVIEW_MIN:it,previewDefaultWidth:rt,previewMax:vt,previewWidth:Nt,previewPanelWidth:on,compactionPanelText:mn,compactionPanelVisible:Zt,openCompactionPanel:jn,closeCompactionPanel:Xt,agentPanelMember:xo,agentPanelTurns:Wo,agentPanelLoading:vo,agentPanelLoadError:Un,agentPanelLoadingMore:$s,agentPanelLoadMoreError:ot,agentPanelHasMore:Ae,agentPanelRunning:wt,openAgentPanel:Lt,closeAgentPanel:Qt,loadOlderAgentMessages:_o,toolDiffTarget:Zn,openToolDiff:Xn,closeToolDiff:io,detailDiffMode:ro,detailDiffPath:ys,openDiffDetail:Ti,closeDiffDetail:Ns,selectDiffFile:Us,btwVisible:Vs,openSideChatTab:li,closeSideChat:ss,sidePanelVisible:ai,panelDragging:ui,closeOpenSidePanel:Cn}=UPe({client:o,sideWidth:ut,detailTarget:q,closeFilePreview:J}),Ls=V(null),Fn=V(!1),Io=V(!1),Ho=V(!1),Fs=V(!1),qs=V("general"),Ii=O(()=>ku.value>0||Fn.value||Io.value||Ho.value||Fs.value||I.value||T.value||_e.value!==null),cs=V(null),Po=V(null),ln=O(()=>ku.value>0||Fn.value||Io.value||Ho.value||Fs.value||j.value||I.value||T.value||_e.value!==null),Os=V(!1),ds=V(!1),jo=V(!1);async function Ks(){Os.value=!0,ds.value=!1,Fn.value=!0;try{await o.refreshAllProviders()}catch{ds.value=!0}finally{Os.value=!1}}function $i(Xe="general"){qs.value=Xe,Fs.value=!0}function ks(){$i("providers")}function Nn(){ks()}async function $o(Xe){Fn.value=!1,await Lr(Xe)}async function Lr(Xe){await o.setModel(Xe)&&Xe!==o.defaultModel.value&&o.updateConfig({defaultModel:Xe})}async function Me(Xe){await o.archiveSession(Xe),await f(),k("done",Xe)}async function Ie(Xe){await o.restoreSession(Xe)&&(s.value=s.value.filter(ge=>ge.id!==Xe),k("open",Xe))}async function Ve(Xe,ge){await o.renameSession(Xe,ge),s.value.some(Le=>Le.id===Xe)&&await f()}async function an(Xe,ge){const Le=s.value.find(un=>un.id===Xe);if(!Le){await o.setSessionEmoji(Xe,ge);return}await Ve(Xe,KE(ge,Le.title))}async function gn(Xe,ge){const Le=Xe.map(un=>un.id);for(const un of Le)ge==="archive"?await o.archiveSession(un):await o.restoreSession(un);await f(),k(ge==="archive"?"done":"open",Le)}async function Ln(){const Xe=r.value;if(Xe){r.value=null;for(const ge of Xe.ids)Xe.kind==="done"?await o.restoreSession(ge):await o.archiveSession(ge);await f()}}async function xn(Xe){const ge=Xe??o.activeSessionId.value;if(!ge)return;l.value={state:"running",sessionId:ge};const Le=await o.exportSession(ge);l.value=Le?{state:"done",sessionId:ge}:null}async function ue(Xe){const ge=o.workspacesView.value.find(Le=>Le.id===Xe)?.name??Xe;await y({title:v("sidebar.removeWorkspace"),message:v("workspace.removeWorkspaceConfirm",{name:ge}),variant:"danger",action:()=>o.deleteWorkspace(Xe)})}async function Ce(Xe){jo.value=!0;try{await o.updateConfig(Xe)&&await o.checkAuth()}finally{jo.value=!1}}async function Ne(Xe){await o.undo(1),await xt(),Ls.value?.loadComposerForEdit(Xe.text,Xe.attachments)}function Ue(Xe){if(Xe==="/compact"||Xe.startsWith("/compact ")){o.compact(Xe.slice(8).trim()||void 0);return}if(Xe==="/dynamic_workflow"||Xe.startsWith("/dynamic_workflow ")){const ge=Xe.slice(17).trim();ge==="on"?o.setDynamicWorkflowMode(!0):ge==="off"?o.setDynamicWorkflowMode(!1):ge?(o.setDynamicWorkflowMode(!0),o.sendPrompt(ge)):o.toggleDynamicWorkflowMode();return}if(Xe==="/goal"||Xe.startsWith("/goal ")){const ge=Xe.slice(5).trim();ge==="pause"||ge==="resume"||ge==="cancel"?o.controlGoal(ge):ge?o.createGoal(ge):o.toggleGoalMode();return}if(Xe==="/btw"||Xe.startsWith("/btw ")){const ge=Xe.slice(4).trim();!ge&&o.sideChatVisible.value?ss():li(ge||void 0);return}switch(Xe){case"/new":case"/clear":dn();break;case"/fork":o.forkSession();break;case"/export":xn();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/auto":o.setPermission("auto");break;case"/yolo":o.setPermission("yolo");break;case"/thinking":o.setThinking(L(o.thinking.value));break;case"/status":Ho.value=!0;break;case"/login":Nn();break;default:{const ge=Xe.indexOf(" "),Le=N_e((ge===-1?Xe:Xe.slice(0,ge)).slice(1)),un=ge===-1?void 0:Xe.slice(ge+1).trim()||void 0;if(!Le)break;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Le,un):o.activateSkill(Le,un);break}}}function dt(Xe){o.unqueue(Xe)}function yt(Xe){o.unqueue(Xe)}function Yt(Xe){o.reorderQueue(Xe.from,Xe.to)}async function sn(Xe){const ge=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&ge){await o.startSessionAndSendPrompt(ge,Xe.text,Xe.attachments);return}if(!o.activeSessionId.value&&!ge){cs.value=Xe,Io.value=!0;return}o.sendPrompt(Xe.text,Xe.attachments)}async function Qn(Xe){const ge=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&ge){await o.startSessionAndSendPrompt(ge,Xe,[]);return}o.activeSessionId.value&&o.sendPrompt(Xe)}async function kn(Xe){if(Po.value=null,!await o.addWorkspaceByPath(Xe)){Po.value=v("workspace.addFailed");return}Io.value=!1;const Le=cs.value;cs.value=null;const un=o.activeWorkspaceId.value;Le&&un&&await o.startSessionAndSendPrompt(un,Le.text,Le.attachments)}function Tn(){cs.value=null,Po.value=null,Io.value=!1}async function No(Xe){for(const ge of Xe)if(Po.value=null,!await o.addWorkspaceByPath(ge)){Po.value=v("workspace.addFailed"),Io.value=!0;return}}async function Dt(Xe,ge){const Le=await o.generateSessionTitle(Xe);Le===null&&(a.value=v("sidebar.genTitleUnavailable"),u!==null&&clearTimeout(u),u=setTimeout(()=>{a.value=null,u=null},5e3)),ge(Le)}function Vt(){xt(()=>{Ls.value?.focusComposer()})}function dn(){const Xe=o.activeWorkspaceId.value;Xe?o.openWorkspaceDraft(Xe):o.clearActiveSession(),Vt()}function lo(Xe){o.openWorkspaceDraft(Xe),Vt()}function Yn(Xe){Xe&&window.open(Xe,"_blank","noopener")}return(Xe,ge)=>(g(),C("div",rDe,[K(WFe),w.value?(g(),pe(nDe,{key:0})):oe("",!0),x(z)?(g(),C("section",lDe,[_("div",aDe,[(g(),C("svg",{ref_key:"authLogoRef",ref:B,class:"auth-page-logo ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Pythinker Code",onMousedown:ge[0]||(ge[0]=Ct(()=>{},["prevent"])),onClick:ge[1]||(ge[1]=(...Le)=>x(A)&&x(A)(...Le))},[...ge[111]||(ge[111]=[K2('',2)])],544)),_("div",uDe,[_("h1",null,N(x(v)("app.authPageTitle")),1),_("p",null,N(x(v)("app.authPageMessage")),1)]),K(nn,{class:"auth-page-btn",variant:"primary",onClick:Nn},{default:ve(()=>[K(Fe,{name:"log-in",size:"md"}),_("span",null,N(x(v)("app.authPageLogin")),1)]),_:1})])])):(g(),C("div",{key:2,class:ze(["app",{mobile:x(S),"sidebar-collapsed":x(Qe)&&!x(S),"macos-desktop":x(ld)}]),style:jt({"--preview-w":x(on)+"px"})},[x(S)?(g(),pe(YFe,{key:1,workspace:x(o).visibleWorkspace.value,"session-title":$.value,running:D.value,branch:x(o).status.value.branch,"session-count":M.value,onOpenSwitcher:ge[22]||(ge[22]=Le=>I.value=!0),onOpenSettings:ge[23]||(ge[23]=Le=>T.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(g(),C(Te,{key:0},[K(GK,{collapsed:x(Qe),dragging:x(nt),"col-width":x(ut),"active-workspace":x(o).visibleWorkspace.value,"active-workspace-id":x(o).activeWorkspaceId.value,sessions:x(o).sessionsForView.value,"archived-sessions":s.value,"pinned-ids":x(o).pinnedSessionIds.value,"pinned-collapsed":x(o).pinnedCollapsed.value,groups:x(o).workspaceGroups.value,"active-id":x(o).activeSessionId.value,"attention-by-session":x(o).attentionBySession.value,"pending-by-session":x(o).pendingBySession.value,"unread-by-session":x(o).unreadBySession.value,"workspace-sort-mode":x(o).workspaceSortMode.value,workspaces:x(o).workspacesView.value,"tabs-enabled":x(o).config.value?.experimental?.sidebarTabs===!0,onSelect:ge[2]||(ge[2]=Le=>x(o).selectSession(Le)),onCreate:dn,onCreateInWorkspace:ge[3]||(ge[3]=Le=>lo(Le)),onSelectWorkspace:ge[4]||(ge[4]=Le=>x(o).openWorkspace(Le)),onAddWorkspace:ge[5]||(ge[5]=Le=>Io.value=!0),onAddWorkspacePaths:No,onRename:Ve,onGenerateTitle:Dt,onArchive:ge[6]||(ge[6]=Le=>Me(Le)),onRestore:ge[7]||(ge[7]=Le=>Ie(Le)),onPin:ge[8]||(ge[8]=Le=>x(o).togglePinnedSession(Le)),onReorderPins:ge[9]||(ge[9]=Le=>x(o).reorderPinnedSessions(Le)),onTogglePinnedCollapsed:ge[10]||(ge[10]=Le=>x(o).togglePinnedCollapsed()),onSetSessionEmoji:an,onLoadDoneSessions:f,onFork:ge[11]||(ge[11]=Le=>x(o).forkSession(Le)),onExport:ge[12]||(ge[12]=Le=>xn(Le)),onRenameWorkspace:ge[13]||(ge[13]=(Le,un)=>x(o).renameWorkspace(Le,un)),onDeleteWorkspace:ge[14]||(ge[14]=Le=>ue(Le)),onReorderWorkspaces:ge[15]||(ge[15]=Le=>x(o).reorderWorkspaces(Le)),onSetWorkspaceSortMode:ge[16]||(ge[16]=Le=>x(o).setWorkspaceSortMode(Le)),onLoadMoreSessions:ge[17]||(ge[17]=Le=>void x(o).loadMoreSessions(Le)),onLoadAllSessions:ge[18]||(ge[18]=Le=>void x(o).loadAllSessions()),onOpenSettings:ge[19]||(ge[19]=Le=>$i()),onOpenSessionAdmin:m,onCollapse:x(Oe)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","archived-sessions","pinned-ids","pinned-collapsed","groups","active-id","attention-by-session","pending-by-session","unread-by-session","workspace-sort-mode","workspaces","tabs-enabled","onCollapse"]),Bn(K(p4,{class:"side-handle","storage-key":x(ft),"default-width":x(Mt),min:x(Tt),max:x(tn),"onUpdate:width":ge[20]||(ge[20]=Le=>Kt.value=Le),"onUpdate:dragging":ge[21]||(ge[21]=Le=>nt.value=Le)},null,8,["storage-key","default-width","min","max"]),[[yi,!x(Qe)]])],64)),i.value?(g(),pe(GG,{key:2,"open-sessions":p.value,workspaces:x(o).workspacesView.value,"load-archived":h,"archive-session":Me,"restore-session":Ie,"run-batch":gn,onOpen:ge[24]||(ge[24]=Le=>{i.value=!1,x(o).selectSession(Le)}),onRename:ge[25]||(ge[25]=(Le,un)=>x(o).renameSession(Le,un)),onFork:ge[26]||(ge[26]=Le=>x(o).forkSession(Le)),onExport:ge[27]||(ge[27]=Le=>xn(Le)),onBack:ge[28]||(ge[28]=Le=>i.value=!1)},null,8,["open-sessions","workspaces"])):(g(),pe(TEe,{key:3,ref_key:"conversationPaneRef",ref:Ls,mobile:x(S),turns:x(o).turns.value,"session-id":x(o).activeSessionId.value,approvals:x(o).pendingApprovals.value,changes:x(o).changes.value,"git-info":x(o).gitInfo.value,tasks:x(o).tasks.value,todos:x(o).todos.value,goal:x(o).goal.value,"activation-badges":x(o).activationBadges.value,status:x(o).status.value,thinking:x(o).thinking.value,"plan-mode":x(o).planMode.value,"plan-armed":x(o).planArmed.value,"session-plans":x(o).sessionPlans.value,"overlay-open":Ii.value,"goal-mode":x(o).goalMode.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,models:x(o).models.value,"starred-ids":x(o).starredModelIds.value,skills:x(o).skills.value,questions:x(o).questions.value,"pending-question-actions":x(o).pendingQuestionActions,"pending-approval-actions":x(o).pendingApprovalActions,running:D.value,"turn-active":x(o).turnActive.value,queued:x(o).queued.value,"search-files":x(o).searchFiles,"upload-image":x(o).uploadImage,working:x(o).working.value,starting:x(o).isStartingFirstPrompt.value,"fast-moon":x(o).fastMoon.value,"file-reload-key":x(o).activeSessionId.value,"session-loading":x(o).sessionLoading.value,compaction:x(o).compaction.value,"has-more-messages":x(o).hasMoreMessages.value,"loading-more":x(o).loadingMoreMessages.value,"loading-more-error":x(o).loadMoreMessagesError.value,"load-older-messages":x(o).loadOlderMessages,"workspace-name":x(o).visibleWorkspace.value?.name,"workspace-root":x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,"git-diff-stats":x(o).gitDiffStats.value,workspaces:x(o).workspacesView.value,"active-workspace-id":x(o).activeWorkspaceId.value,"session-title":$.value,pr:x(o).activePullRequest.value,"conversation-toc":x(o).conversationToc.value,"last-turn-reason":F.value,"turn-error-kind":R.value?.reason==="max_steps"?"max_steps":void 0,"turn-error-message":R.value?.message,"session-done":P.value,pinned:x(o).pinnedSessionIds.value.includes(x(o).activeSessionId.value??""),"recent-sessions":c.value,onOpenChanges:ge[29]||(ge[29]=Le=>x(Ti)()),onSelectWorkspace:ge[30]||(ge[30]=Le=>lo(Le)),onAddWorkspace:ge[31]||(ge[31]=Le=>Io.value=!0),onOpenPr:Yn,onSubmit:ge[32]||(ge[32]=Le=>sn(Le)),onSteer:ge[33]||(ge[33]=Le=>x(o).steerPrompt(Le.text,Le.attachments)),onApproval:ge[34]||(ge[34]=(Le,un)=>x(o).respondApproval(Le,un)),onCancelTask:ge[35]||(ge[35]=Le=>x(o).cancelTask(Le)),onAnswer:ge[36]||(ge[36]=(Le,un)=>x(o).respondQuestion(Le,un)),onDismiss:ge[37]||(ge[37]=Le=>x(o).dismissQuestion(Le)),onCommand:Ue,onInterrupt:ge[38]||(ge[38]=Le=>x(o).abortCurrentPrompt()),onUnqueue:dt,onEditQueued:yt,onReorderQueue:Yt,onSetPermission:ge[39]||(ge[39]=Le=>x(o).setPermission(Le)),onSetThinking:ge[40]||(ge[40]=Le=>x(o).setThinking(Le)),onTogglePlan:ge[41]||(ge[41]=Le=>x(o).togglePlanMode()),onToggleWorkflow:ge[42]||(ge[42]=Le=>x(o).toggleDynamicWorkflowMode()),onToggleGoal:ge[43]||(ge[43]=Le=>x(o).toggleGoalMode()),onCreateGoal:ge[44]||(ge[44]=Le=>x(o).createGoal(Le)),onControlGoal:ge[45]||(ge[45]=Le=>x(o).controlGoal(Le)),onRefreshGitStatus:ge[46]||(ge[46]=Le=>x(o).activeSessionId.value&&x(o).loadGitStatus(x(o).activeSessionId.value)),onRenameSession:ge[47]||(ge[47]=(Le,un)=>x(o).renameSession(Le,un)),onForkSession:ge[48]||(ge[48]=Le=>x(o).forkSession(Le)),onArchiveSession:ge[49]||(ge[49]=Le=>Me(Le)),onRestoreSession:ge[50]||(ge[50]=Le=>Ie(Le)),onSelectSession:ge[51]||(ge[51]=Le=>x(o).selectSession(Le)),onTogglePin:ge[52]||(ge[52]=Le=>x(o).togglePinnedSession(Le)),onOpenSessionAdmin:m,onExportSession:ge[53]||(ge[53]=Le=>xn(Le)),onCompact:ge[54]||(ge[54]=Le=>x(o).compact()),onPickModel:ge[55]||(ge[55]=Le=>Ks()),onSelectModel:ge[56]||(ge[56]=Le=>Lr(Le)),onOpenFile:ge[57]||(ge[57]=Le=>x(de)(Le)),onOpenMedia:ge[58]||(ge[58]=Le=>we(Le)),onOpenCompaction:ge[59]||(ge[59]=Le=>x(jn)(Le)),onOpenAgent:ge[60]||(ge[60]=Le=>x(Lt)(Le)),onOpenToolDiff:ge[61]||(ge[61]=Le=>x(Xn)(Le)),onOpenTurnDiff:ge[62]||(ge[62]=Le=>xe(Le)),onEditMessage:Ne,onContinueTurn:Qn},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","plan-armed","session-plans","overlay-open","goal-mode","dynamic-workflow-mode","models","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","turn-active","queued","search-files","upload-image","working","starting","fast-moon","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr","conversation-toc","last-turn-reason","turn-error-kind","turn-error-message","session-done","pinned","recent-sessions"])),!x(S)&&(x(ld)||x(Qe))?(g(),pe(Jt,{key:4,class:"sidebar-toggle-btn",size:"sm",label:x(Qe)?x(v)("sidebar.expandSidebar"):x(v)("sidebar.collapseSidebar"),onClick:x(Oe)},{default:ve(()=>[K(Fe,{name:x(Qe)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):oe("",!0),!x(S)&&x(Qe)?(g(),pe(Jt,{key:5,class:"new-chat-btn",size:"sm",label:x(v)("sidebar.newChat"),onClick:dn},{default:ve(()=>[K(Fe,{name:"chat-new"})]),_:1},8,["label"])):oe("",!0),!i.value&&x(ai)&&!x(S)?(g(),pe(p4,{key:6,class:"preview-handle","storage-key":x(Je),"default-width":x(rt),min:x(it),max:x(vt),reverse:"","aria-label":x(v)("layout.resizePreviewAria"),"onUpdate:width":ge[63]||(ge[63]=Le=>Nt.value=Le),"onUpdate:dragging":ge[64]||(ge[64]=Le=>ui.value=Le)},null,8,["storage-key","default-width","min","max","aria-label"])):oe("",!0),!i.value&&(!x(S)||x(ai))?(g(),C("aside",{key:7,class:ze(["global-preview",{open:x(ai),mobile:x(S),"no-anim":x(ui)||he.value}]),role:"complementary","aria-label":x(v)("layout.detailPanelAria"),"aria-hidden":!x(ai)},[q.value==="compaction"&&x(Zt)?(g(),pe(UTe,{key:0,text:x(mn)??"",subtitle:x(v)("conversation.summaryTitle"),onClose:x(Xt)},null,8,["text","subtitle","onClose"])):q.value==="agent"&&x(xo)?(g(),pe(XTe,{key:1,member:x(xo),turns:x(Wo),running:x(wt),loading:x(vo),"load-error":x(Un),"has-more":x(Ae),"loading-more":x($s),"load-more-error":x(ot),onClose:x(Qt),onLoadOlderMessages:x(_o),onOpenFile:ge[65]||(ge[65]=Le=>x(de)(Le)),onOpenMedia:ge[66]||(ge[66]=Le=>we(Le)),onOpenAgent:ge[67]||(ge[67]=Le=>x(Lt)(Le)),onOpenTurnDiff:ge[68]||(ge[68]=Le=>xe(Le))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages"])):q.value==="btw"&&x(Vs)?(g(),pe(L9e,{key:2,turns:x(o).sideChatTurns.value,running:x(o).sideChatRunning.value,sending:x(o).sideChatSending.value,onSend:ge[69]||(ge[69]=Le=>x(o).sendSideChatPrompt(Le)),onClose:x(ss)},null,8,["turns","running","sending","onClose"])):q.value==="diff"?(g(),pe(lIe,{key:3,mode:x(ro),changes:x(o).changes.value,"git-info":x(o).gitInfo.value,"file-diff":x(o).fileDiff.value,"selected-diff-path":x(o).selectedDiffPath.value,"file-diff-loading":x(o).fileDiffLoading.value,closable:"",onOpen:x(Us),onBack:ge[70]||(ge[70]=Le=>{ro.value="list",ys.value=null,x(o).clearFileDiff()}),onClose:x(Ns)},null,8,["mode","changes","git-info","file-diff","selected-diff-path","file-diff-loading","onOpen","onClose"])):q.value==="toolDiff"&&x(Zn)?(g(),pe(s9e,{key:4,target:x(Zn),onClose:x(io)},null,8,["target","onClose"])):q.value==="turnDiff"&&me.value?(g(),pe(x9e,{key:5,changes:me.value.changes,cwd:x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,onOpenFile:ge[71]||(ge[71]=Le=>x(de)(Le)),onClose:We},null,8,["changes","cwd"])):q.value==="file"?(g(),pe(WTe,{key:6,file:x(ne),loading:x(H),error:x(Z),line:x(ee)?.line,"download-url":x(ye),closable:"","external-actions":x(fe),"open-file":x(de),onClose:x(J),onOpenExternal:x(ae),onReveal:x(be)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):oe("",!0)],10,cDe)):oe("",!0),K(iDe,{class:"internal-build-fab"}),_e.value&&ce.value?(g(),pe(REe,{key:8,media:_e.value,src:ce.value,onClose:Re},null,8,["media","src"])):oe("",!0),Fn.value?(g(),pe(SIe,{key:9,models:x(o).models.value,current:x(o).status.value.modelId,"starred-ids":x(o).starredModelIds.value,loading:Os.value,unavailable:ds.value,onSelect:ge[72]||(ge[72]=Le=>$o(Le)),onToggleStar:ge[73]||(ge[73]=Le=>x(o).toggleStarModel(Le)),onClose:ge[74]||(ge[74]=Le=>Fn.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):oe("",!0),Ho.value?(g(),pe(fFe,{key:10,status:x(o).status.value,thinking:W.value,"plan-mode":x(o).planMode.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,"cost-usd":x(o).sessionCost.value,onClose:ge[75]||(ge[75]=Le=>Ho.value=!1)},null,8,["status","thinking","plan-mode","dynamic-workflow-mode","cost-usd"])):oe("",!0),Io.value?(g(),pe(YLe,{key:11,"browse-fs":x(o).browseFs,"get-fs-home":x(o).getFsHome,"default-path":x(o).visibleWorkspace.value?.root??x(o).status.value.cwd,error:Po.value,onAdd:ge[76]||(ge[76]=Le=>kn(Le)),onClose:Tn},null,8,["browse-fs","get-fs-home","default-path","error"])):oe("",!0),K(Cr,{name:"gload-fade"},{default:ve(()=>[x(o).initialized.value?oe("",!0):(g(),pe(nPe,{key:0,issue:x(o).connectIssue.value},null,8,["issue"]))]),_:1}),x(o).initialized.value&&j.value&&!x(z)?(g(),pe(GRe,{key:12,onComplete:re,onSkip:re})):oe("",!0),K(SFe,{warnings:x(o).warnings.value,onDismiss:x(o).dismissWarning},null,8,["warnings","onDismiss"]),K(NFe),_("div",dDe,[r.value?(g(),pe(Fk,{key:`${r.value.kind}:${r.value.ids.join(",")}`,duration:8e3,onDismiss:ge[77]||(ge[77]=Le=>r.value=null)},{default:ve(()=>[_("span",null,N(x(v)(r.value.kind==="done"?"admin.actionArchived":"admin.actionRestored",{n:r.value.ids.length})),1),_("button",{type:"button",class:"session-action-undo",onClick:Ln},N(x(v)("sidebar.archiveToastUndo")),1)]),_:1})):oe("",!0),l.value?(g(),pe(Fk,{key:`${l.value.sessionId}:${l.value.state}`,duration:l.value.state==="running"?6e4:4e3,onDismiss:ge[78]||(ge[78]=Le=>l.value=null)},{default:ve(()=>[qe(N(x(v)(l.value.state==="running"?"admin.exporting":"admin.exported")),1)]),_:1},8,["duration"])):oe("",!0),a.value?(g(),pe(Fk,{key:a.value,duration:5e3,onDismiss:ge[79]||(ge[79]=Le=>a.value=null)},{default:ve(()=>[qe(N(a.value),1)]),_:1})):oe("",!0)]),x(b)?(g(),pe(NPe,{key:13})):oe("",!0),x(S)?(g(),pe(kOe,{key:14,modelValue:I.value,"onUpdate:modelValue":ge[80]||(ge[80]=Le=>I.value=Le),groups:x(o).workspaceGroups.value,"active-workspace-id":x(o).activeWorkspaceId.value,"active-id":x(o).activeSessionId.value,"attention-by-session":x(o).attentionBySession.value,"attention-by-workspace":x(o).attentionByWorkspace.value,onSelect:ge[81]||(ge[81]=Le=>x(o).selectSession(Le)),onCreate:dn,onCreateInWorkspace:ge[82]||(ge[82]=Le=>lo(Le)),onAddWorkspace:ge[83]||(ge[83]=Le=>Io.value=!0),onRename:ge[84]||(ge[84]=(Le,un)=>x(o).renameSession(Le,un)),onArchive:ge[85]||(ge[85]=Le=>Me(Le)),onDeleteWorkspace:ge[86]||(ge[86]=Le=>ue(Le)),onLoadMore:ge[87]||(ge[87]=Le=>void x(o).loadMoreSessions(Le))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):oe("",!0),x(S)?(g(),pe(TRe,{key:15,modelValue:T.value,"onUpdate:modelValue":ge[88]||(ge[88]=Le=>T.value=Le),status:x(o).status.value,thinking:x(o).thinking.value,models:x(o).models.value,"plan-mode":x(o).planMode.value,"goal-mode":x(o).goalMode.value,goal:x(o).goal.value,"dynamic-workflow-mode":x(o).dynamicWorkflowMode.value,"color-scheme":x(o).colorScheme.value,"ui-font-size":x(o).uiFontSize.value,"auth-ready":x(o).authReady.value,"conversation-toc":x(o).conversationToc.value,"server-version":x(o).serverVersion.value,onPickModel:ge[89]||(ge[89]=Le=>Ks()),onSetThinking:ge[90]||(ge[90]=Le=>x(o).setThinking(Le)),onTogglePlan:ge[91]||(ge[91]=Le=>x(o).togglePlanMode()),onToggleWorkflow:ge[92]||(ge[92]=Le=>x(o).toggleDynamicWorkflowMode()),onToggleGoal:ge[93]||(ge[93]=Le=>x(o).toggleGoalMode()),onControlGoal:ge[94]||(ge[94]=Le=>x(o).controlGoal(Le)),onSetPermission:ge[95]||(ge[95]=Le=>x(o).setPermission(Le)),onSetColorScheme:ge[96]||(ge[96]=Le=>x(o).setColorScheme(Le)),onSetUiFontSize:ge[97]||(ge[97]=Le=>x(o).setUiFontSize(Le)),onSetConversationToc:ge[98]||(ge[98]=Le=>x(o).setConversationToc(Le)),onLogin:ge[99]||(ge[99]=()=>{T.value=!1,Nn()}),onLogout:x(o).logout},null,8,["modelValue","status","thinking","models","plan-mode","goal-mode","goal","dynamic-workflow-mode","color-scheme","ui-font-size","auth-ready","conversation-toc","server-version","onLogout"])):oe("",!0)],6)),Fs.value?(g(),pe(pLe,{key:3,"color-scheme":x(o).colorScheme.value,accent:x(o).accent.value,"ui-font-size":x(o).uiFontSize.value,"auth-ready":x(o).authReady.value,"account-model":x(o).defaultModel.value,notify:x(o).notifyOnComplete.value,"notify-question":x(o).notifyOnQuestion.value,"notify-approval":x(o).notifyOnApproval.value,"notify-permission":x(o).notifyPermission.value,sound:x(o).soundOnComplete.value,"conversation-toc":x(o).conversationToc.value,config:x(o).config.value,models:x(o).models.value,"config-saving":jo.value,"server-version":x(o).serverVersion.value,backend:x(o).backend.value,"initial-tab":qs.value,onSetColorScheme:ge[100]||(ge[100]=Le=>x(o).setColorScheme(Le)),onSetAccent:ge[101]||(ge[101]=Le=>x(o).setAccent(Le)),onSetUiFontSize:ge[102]||(ge[102]=Le=>x(o).setUiFontSize(Le)),onSetNotify:ge[103]||(ge[103]=Le=>x(o).setNotifyOnComplete(Le)),onSetNotifyQuestion:ge[104]||(ge[104]=Le=>x(o).setNotifyOnQuestion(Le)),onSetNotifyApproval:ge[105]||(ge[105]=Le=>x(o).setNotifyOnApproval(Le)),onSetSound:ge[106]||(ge[106]=Le=>x(o).setSoundOnComplete(Le)),onSetConversationToc:ge[107]||(ge[107]=Le=>x(o).setConversationToc(Le)),onUpdateConfig:ge[108]||(ge[108]=Le=>Ce(Le)),onLogout:x(o).logout,onOpenOnboarding:ge[109]||(ge[109]=()=>{Fs.value=!1,Q()}),onClose:ge[110]||(ge[110]=Le=>Fs.value=!1)},null,8,["color-scheme","accent","ui-font-size","auth-ready","account-model","notify","notify-question","notify-approval","notify-permission","sound","conversation-toc","config","models","config-saving","server-version","backend","initial-tab","onLogout"])):oe("",!0),K(eFe)]))}}),pDe=ht(fDe,[["__scopeId","data-v-d64883cf"]]);qye();zg(pDe).use(fo).mount("#app");export{cF as $,Ap as A,eO as B,Zo as C,uBe as D,LM as E,Te as F,K2 as G,qe as H,K as I,FF as J,FDe as K,or as L,Ze as M,CR as N,DDe as O,BDe as P,HDe as Q,_g as R,id as S,Hl as T,zDe as U,Z2 as V,PDe as W,dBe as X,WDe as Y,sBe as Z,hDe as _,u5 as a,Ko as a$,es as a0,N2 as a1,wDe as a2,P2 as a3,B5 as a4,cn as a5,Fd as a6,MDe as a7,hBe as a8,IDe as a9,h5 as aA,dO as aB,vO as aC,Sn as aD,gO as aE,mO as aF,Ld as aG,hO as aH,En as aI,B2 as aJ,BF as aK,g as aL,xR as aM,CDe as aN,Vn as aO,JM as aP,SDe as aQ,Mg as aR,Ms as aS,Bk as aT,V as aU,XDe as aV,WR as aW,st as aX,An as aY,kO as aZ,ODe as a_,LDe as aa,NDe as ab,$De as ac,eBe as ad,mBe as ae,wn as af,tR as ag,s0 as ah,wa as ai,Fl as aj,Bo as ak,QDe as al,Pi as am,Ta as an,Et as ao,VDe as ap,qDe as aq,Dn as ar,xt as as,rR as at,ze as au,iF as av,jt as aw,cO as ax,pO as ay,po as az,_De as b,Bce as b$,lBe as b0,Cp as b1,Lg as b2,iBe as b3,Ea as b4,TF as b5,gDe as b6,Co as b7,qF as b8,rBe as b9,vs as bA,yi as bB,nR as bC,nBe as bD,Ye as bE,s5 as bF,EDe as bG,GF as bH,GDe as bI,ve as bJ,jDe as bK,Bn as bL,Do as bM,tBe as bN,Ct as bO,ADe as bP,Gn as bQ,Ts as bR,wBe as bS,xBe as bT,BI as bU,_Be as bV,sce as bW,DI as bX,Nb as bY,MBe as bZ,Hce as b_,mDe as ba,N as bb,Gm as bc,RDe as bd,Rn as be,yDe as bf,vDe as bg,YM as bh,JDe as bi,$F as bj,x as bk,sh as bl,pBe as bm,cBe as bn,MR as bo,TDe as bp,ZDe as bq,KF as br,fBe as bs,UDe as bt,Zm as bu,a5 as bv,Bg as bw,RR as bx,tE as by,eb as bz,oBe as c,Xw as c0,Yw as c1,Jw as c2,TBe as c3,m1 as c4,Kc as c5,p1 as c6,Oce as c7,Rce as c8,IBe as c9,ht as cA,EBe as ca,yBe as cb,$Be as cc,S0 as cd,vi as ce,Xce as cf,Jce as cg,Jue as ch,bBe as ci,Kue as cj,Gue as ck,kBe as cl,Qw as cm,Qce as cn,ZA as co,TA as cp,rce as cq,h1 as cr,f1 as cs,SBe as ct,ABe as cu,vBe as cv,CBe as cw,Fe as cx,gBe as cy,C9e as cz,YDe as d,xa as e,kDe as f,Cr as g,IR as h,bDe as i,xDe as j,ar as k,th as l,us as m,Y1 as n,Ol as o,aBe as p,O as q,zg as r,pe as s,oe as t,C as u,_ as v,WO as w,KDe as x,zO as y,HR as z}; diff --git a/apps/pythinker-code/dist-web/assets/index-DIKFd2HX.js b/apps/pythinker-code/dist-web/assets/index-DIKFd2HX.js new file mode 100644 index 000000000..18e129bbf --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/index-DIKFd2HX.js @@ -0,0 +1,788 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-D-vmFZBh.js","assets/DesignSystemView-Bux62PsO.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/CodeBlockNode-CWWX6v_C.js","assets/safeRaf-DGuzXxDK.js","assets/index5-C6_B7c7s.js","assets/index11-Bg3KTJTT.js"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();/** +* @vue/shared v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function e5(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const In={},Q0=[],il=()=>{},VS=()=>!1,sd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),t5=e=>e.startsWith("onUpdate:"),no=Object.assign,R7=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hz=Object.prototype.hasOwnProperty,Wn=(e,t)=>hz.call(e,t),qt=Array.isArray,ec=e=>Nc(e)==="[object Map]",X1=e=>Nc(e)==="[object Set]",Hv=e=>Nc(e)==="[object Date]",mz=e=>Nc(e)==="[object RegExp]",hn=e=>typeof e=="function",io=e=>typeof e=="string",Vr=e=>typeof e=="symbol",qn=e=>e!==null&&typeof e=="object",H7=e=>(qn(e)||hn(e))&&hn(e.then)&&hn(e.catch),WS=Object.prototype.toString,Nc=e=>WS.call(e),gz=e=>Nc(e).slice(8,-1),n5=e=>Nc(e)==="[object Object]",o5=e=>io(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,L1=e5(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),s5=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},vz=/-\w/g,rs=s5(e=>e.replace(vz,t=>t.slice(1).toUpperCase())),wz=/\B([A-Z])/g,kr=s5(e=>e.replace(wz,"-$1").toLowerCase()),r5=s5(e=>e.charAt(0).toUpperCase()+e.slice(1)),t3=s5(e=>e?`on${r5(e)}`:""),Cs=(e,t)=>!Object.is(e,t),tc=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},l5=e=>{const t=parseFloat(e);return isNaN(t)?e:t},E3=e=>{const t=io(e)?Number(e):NaN;return isNaN(t)?e:t};let Pv;const i5=()=>Pv||(Pv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),yz="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",kz=e5(yz);function Pt(e){if(qt(e)){const t={};for(let n=0;n{if(n){const o=n.split(_z);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function He(e){let t="";if(io(e))t=e;else if(qt(e))for(let n=0;nIi(n,t))}const ZS=e=>!!(e&&e.__v_isRef===!0),N=e=>io(e)?e:e==null?"":qt(e)||qn(e)&&(e.toString===WS||!hn(e.toString))?ZS(e)?N(e.value):JSON.stringify(e,KS,2):String(e),KS=(e,t)=>ZS(t)?KS(e,t.value):ec(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],r)=>(n[X6(o,r)+" =>"]=s,n),{})}:X1(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>X6(n))}:Vr(t)?X6(t):qn(t)&&!qt(t)&&!n5(t)?String(t):t,X6=(e,t="")=>{var n;return Vr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Ez(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +* @vue/reactivity v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ns;class GS{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ns&&(ns.active?(this.parent=ns,this.index=(ns.scopes||(ns.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(ns===this)ns=this.prevScope;else{let t=ns;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(tu){let t=tu;for(tu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;eu;){let t=eu;for(eu=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function JS(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function QS(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),W7(o),Lz(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function qh(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eC(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eC(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Su)||(e.globalVersion=Su,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!qh(e))))return;e.flags|=2;const t=e.dep,n=po,o=Sl;po=e,Sl=!0;try{JS(e);const s=e.fn(e._value);(t.version===0||Cs(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{po=n,Sl=o,QS(e),e.flags&=-3}}function W7(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)W7(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Lz(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function aRe(e,t){e.effect instanceof I3&&(e=e.effect.fn);const n=new I3(e);t&&no(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function cRe(e){e.effect.stop()}let Sl=!0;const tC=[];function Li(){tC.push(Sl),Sl=!1}function $i(){const e=tC.pop();Sl=e===void 0?!0:e}function Dv(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=po;po=void 0;try{t()}finally{po=n}}}let Su=0;class $z{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class c5{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!po||!Sl||po===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==po)n=this.activeLink=new $z(po,this),po.deps?(n.prevDep=po.depsTail,po.depsTail.nextDep=n,po.depsTail=n):po.deps=po.depsTail=n,nC(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=po.depsTail,n.nextDep=void 0,po.depsTail.nextDep=n,po.depsTail=n,po.deps===n&&(po.deps=o)}return n}trigger(t){this.version++,Su++,this.notify(t)}notify(t){D7();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{V7()}}}function nC(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)nC(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const L3=new WeakMap,$1=Symbol(""),Uh=Symbol(""),Cu=Symbol("");function Rs(e,t,n){if(Sl&&po){let o=L3.get(e);o||L3.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new c5),s.map=o,s.key=n),s.track()}}function bi(e,t,n,o,s,r){const l=L3.get(e);if(!l){Su++;return}const i=a=>{a&&a.trigger()};if(D7(),t==="clear")l.forEach(i);else{const a=qt(e),c=a&&o5(n);if(a&&n==="length"){const u=Number(o);l.forEach((d,f)=>{(f==="length"||f===Cu||!Vr(f)&&f>=u)&&i(d)})}else switch((n!==void 0||l.has(void 0))&&i(l.get(n)),c&&i(l.get(Cu)),t){case"add":a?c&&i(l.get("length")):(i(l.get($1)),ec(e)&&i(l.get(Uh)));break;case"delete":a||(i(l.get($1)),ec(e)&&i(l.get(Uh)));break;case"set":ec(e)&&i(l.get($1));break}}V7()}function Nz(e,t){const n=L3.get(e);return n&&n.get(t)}function b0(e){const t=Bn(e);return t===e?t:(Rs(t,"iterate",Cu),Or(e)?t:t.map(Tl))}function u5(e){return Rs(e=Bn(e),"iterate",Cu),e}function Kl(e,t){return Ni(e)?wc(ba(e)?Tl(t):t):Tl(t)}const zz={__proto__:null,[Symbol.iterator](){return Q6(this,Symbol.iterator,e=>Kl(this,e))},concat(...e){return b0(this).concat(...e.map(t=>qt(t)?b0(t):t))},entries(){return Q6(this,"entries",e=>(e[1]=Kl(this,e[1]),e))},every(e,t){return ci(this,"every",e,t,void 0,arguments)},filter(e,t){return ci(this,"filter",e,t,n=>n.map(o=>Kl(this,o)),arguments)},find(e,t){return ci(this,"find",e,t,n=>Kl(this,n),arguments)},findIndex(e,t){return ci(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ci(this,"findLast",e,t,n=>Kl(this,n),arguments)},findLastIndex(e,t){return ci(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ci(this,"forEach",e,t,void 0,arguments)},includes(...e){return ep(this,"includes",e)},indexOf(...e){return ep(this,"indexOf",e)},join(e){return b0(this).join(e)},lastIndexOf(...e){return ep(this,"lastIndexOf",e)},map(e,t){return ci(this,"map",e,t,void 0,arguments)},pop(){return h2(this,"pop")},push(...e){return h2(this,"push",e)},reduce(e,...t){return Vv(this,"reduce",e,t)},reduceRight(e,...t){return Vv(this,"reduceRight",e,t)},shift(){return h2(this,"shift")},some(e,t){return ci(this,"some",e,t,void 0,arguments)},splice(...e){return h2(this,"splice",e)},toReversed(){return b0(this).toReversed()},toSorted(e){return b0(this).toSorted(e)},toSpliced(...e){return b0(this).toSpliced(...e)},unshift(...e){return h2(this,"unshift",e)},values(){return Q6(this,"values",e=>Kl(this,e))}};function Q6(e,t,n){const o=u5(e),s=o[t]();return o!==e&&!Or(e)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.done||(r.value=n(r.value)),r}),s}const Bz=Array.prototype;function ci(e,t,n,o,s,r){const l=u5(e),i=l!==e&&!Or(e),a=l[t];if(a!==Bz[t]){const d=a.apply(e,r);return i?Tl(d):d}let c=n;l!==e&&(i?c=function(d,f){return n.call(this,Kl(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(l,c,o);return i&&s?s(u):u}function Vv(e,t,n,o){const s=u5(e),r=s!==e&&!Or(e);let l=n,i=!1;s!==e&&(r?(i=o.length===0,l=function(c,u,d){return i&&(i=!1,c=Kl(e,c)),n.call(this,c,Kl(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const a=s[t](l,...o);return i?Kl(e,a):a}function ep(e,t,n){const o=Bn(e);Rs(o,"iterate",Cu);const s=o[t](...n);return(s===-1||s===!1)&&p5(n[0])?(n[0]=Bn(n[0]),o[t](...n)):s}function h2(e,t,n=[]){Li(),D7();const o=Bn(e)[t].apply(e,n);return V7(),$i(),o}const jz=e5("__proto__,__v_isRef,__isVue"),oC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Vr));function Oz(e){Vr(e)||(e=String(e));const t=Bn(this);return Rs(t,"has",e),t.hasOwnProperty(e)}class sC{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(s?r?uC:cC:r?aC:iC).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=qt(t);if(!s){let a;if(l&&(a=zz[n]))return a;if(n==="hasOwnProperty")return Oz}const i=Reflect.get(t,n,jo(t)?t:o);if((Vr(n)?oC.has(n):jz(n))||(s||Rs(t,"get",n),r))return i;if(jo(i)){const a=l&&o5(n)?i:i.value;return s&&qn(a)?Kh(a):a}return qn(i)?s?Kh(i):As(i):i}}class rC extends sC{constructor(t=!1){super(!1,t)}set(t,n,o,s){let r=t[n];const l=qt(t)&&o5(n);if(!this._isShallow){const c=Ni(r);if(!Or(o)&&!Ni(o)&&(r=Bn(r),o=Bn(o)),!l&&jo(r)&&!jo(o))return c||(r.value=o),!0}const i=l?Number(n)e,ef=e=>Reflect.getPrototypeOf(e);function Dz(e,t,n){return function(...o){const s=this.__v_raw,r=Bn(s),l=ec(r),i=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=s[e](...o),u=n?Zh:t?wc:Tl;return!t&&Rs(r,"iterate",a?Uh:$1),no(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:i?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function tf(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Vz(e,t){const n={get(s){const r=this.__v_raw,l=Bn(r),i=Bn(s);e||(Cs(s,i)&&Rs(l,"get",s),Rs(l,"get",i));const{has:a}=ef(l),c=t?Zh:e?wc:Tl;if(a.call(l,s))return c(r.get(s));if(a.call(l,i))return c(r.get(i));r!==l&&r.get(s)},get size(){const s=this.__v_raw;return!e&&Rs(Bn(s),"iterate",$1),s.size},has(s){const r=this.__v_raw,l=Bn(r),i=Bn(s);return e||(Cs(s,i)&&Rs(l,"has",s),Rs(l,"has",i)),s===i?r.has(s):r.has(s)||r.has(i)},forEach(s,r){const l=this,i=l.__v_raw,a=Bn(i),c=t?Zh:e?wc:Tl;return!e&&Rs(a,"iterate",$1),i.forEach((u,d)=>s.call(r,c(u),c(d),l))}};return no(n,e?{add:tf("add"),set:tf("set"),delete:tf("delete"),clear:tf("clear")}:{add(s){const r=Bn(this),l=ef(r),i=Bn(s),a=!t&&!Or(s)&&!Ni(s)?i:s;return l.has.call(r,a)||Cs(s,a)&&l.has.call(r,s)||Cs(i,a)&&l.has.call(r,i)||(r.add(a),bi(r,"add",a,a)),this},set(s,r){!t&&!Or(r)&&!Ni(r)&&(r=Bn(r));const l=Bn(this),{has:i,get:a}=ef(l);let c=i.call(l,s);c||(s=Bn(s),c=i.call(l,s));const u=a.call(l,s);return l.set(s,r),c?Cs(r,u)&&bi(l,"set",s,r):bi(l,"add",s,r),this},delete(s){const r=Bn(this),{has:l,get:i}=ef(r);let a=l.call(r,s);a||(s=Bn(s),a=l.call(r,s)),i&&i.call(r,s);const c=r.delete(s);return a&&bi(r,"delete",s,void 0),c},clear(){const s=Bn(this),r=s.size!==0,l=s.clear();return r&&bi(s,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Dz(s,e,t)}),n}function d5(e,t){const n=Vz(e,t);return(o,s,r)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(Wn(n,s)&&s in o?n:o,s,r)}const Wz={get:d5(!1,!1)},qz={get:d5(!1,!0)},Uz={get:d5(!0,!1)},Zz={get:d5(!0,!0)},iC=new WeakMap,aC=new WeakMap,cC=new WeakMap,uC=new WeakMap;function Kz(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function As(e){return Ni(e)?e:f5(e,!1,Fz,Wz,iC)}function Gz(e){return f5(e,!1,Hz,qz,aC)}function Kh(e){return f5(e,!0,Rz,Uz,cC)}function uRe(e){return f5(e,!0,Pz,Zz,uC)}function f5(e,t,n,o,s){if(!qn(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=s.get(e);if(r)return r;const l=Kz(gz(e));if(l===0)return e;const i=new Proxy(e,l===2?o:n);return s.set(e,i),i}function ba(e){return Ni(e)?ba(e.__v_raw):!!(e&&e.__v_isReactive)}function Ni(e){return!!(e&&e.__v_isReadonly)}function Or(e){return!!(e&&e.__v_isShallow)}function p5(e){return e?!!e.__v_raw:!1}function Bn(e){const t=e&&e.__v_raw;return t?Bn(t):e}function Et(e){return!Wn(e,"__v_skip")&&Object.isExtensible(e)&&qS(e,"__v_skip",!0),e}const Tl=e=>qn(e)?As(e):e,wc=e=>qn(e)?Kh(e):e;function jo(e){return e?e.__v_isRef===!0:!1}function q(e){return dC(e,!1)}function _o(e){return dC(e,!0)}function dC(e,t){return jo(e)?e:new Yz(e,t)}class Yz{constructor(t,n){this.dep=new c5,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Bn(t),this._value=n?t:Tl(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Or(t)||Ni(t);t=o?t:Bn(t),Cs(t,n)&&(this._rawValue=t,this._value=o?t:Tl(t),this.dep.trigger())}}function Xz(e){e.dep&&e.dep.trigger()}function _(e){return jo(e)?e.value:e}function fC(e){return hn(e)?e():_(e)}const Jz={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return jo(s)&&!jo(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function pC(e){return ba(e)?e:new Proxy(e,Jz)}class Qz{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new c5,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function eB(e){return new Qz(e)}function dRe(e){const t=qt(e)?new Array(e.length):{};for(const n in e)t[n]=hC(e,n);return t}class tB{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=Vr(n)?n:String(n),this._raw=Bn(t);let s=!0,r=t;if(!qt(t)||Vr(this._key)||!o5(this._key))do s=!p5(r)||Or(r);while(s&&(r=r.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=_(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&jo(this._raw[this._key])){const n=this._object[this._key];if(jo(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Nz(this._raw,this._key)}}class nB{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function fRe(e,t,n){return jo(e)?e:hn(e)?new nB(e):qn(e)&&arguments.length>1?hC(e,t,n):q(e)}function hC(e,t,n){return new tB(e,t,n)}class oB{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new c5(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Su-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&po!==this)return XS(this,!0),!0}get value(){const t=this.dep.track();return eC(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function sB(e,t,n=!1){let o,s;return hn(e)?o=e:(o=e.get,s=e.set),new oB(o,s,n)}const pRe={GET:"get",HAS:"has",ITERATE:"iterate"},hRe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},nf={},$3=new WeakMap;let ua;function mRe(){return ua}function rB(e,t=!1,n=ua){if(n){let o=$3.get(n);o||$3.set(n,o=[]),o.push(e)}}function lB(e,t,n=In){const{immediate:o,deep:s,once:r,scheduler:l,augmentJob:i,call:a}=n,c=k=>s?k:Or(k)||s===!1||s===0?_i(k,1):_i(k);let u,d,f,p,h=!1,m=!1;if(jo(e)?(d=()=>e.value,h=Or(e)):ba(e)?(d=()=>c(e),h=!0):qt(e)?(m=!0,h=e.some(k=>ba(k)||Or(k)),d=()=>e.map(k=>{if(jo(k))return k.value;if(ba(k))return c(k);if(hn(k))return a?a(k,2):k()})):hn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Li();try{f()}finally{$i()}}const k=ua;ua=u;try{return a?a(e,3,[p]):e(p)}finally{ua=k}}:d=il,t&&s){const k=d,S=s===!0?1/0:s;d=()=>_i(k(),S)}const y=P7(),b=()=>{u.stop(),y&&y.active&&R7(y.effects,u)};if(r&&t){const k=t;t=(...S)=>{k(...S),b()}}let v=m?new Array(e.length).fill(nf):nf;const w=k=>{if(!(!(u.flags&1)||!u.dirty&&!k))if(t){const S=u.run();if(s||h||(m?S.some(($,T)=>Cs($,v[T])):Cs(S,v))){f&&f();const $=ua;ua=u;try{const T=[S,v===nf?void 0:m&&v[0]===nf?[]:v,p];v=S,a?a(t,3,T):t(...T)}finally{ua=$}}}else u.run()};return i&&i(w),u=new I3(d),u.scheduler=l?()=>l(w,!1):w,p=k=>rB(k,!1,u),f=u.onStop=()=>{const k=$3.get(u);if(k){if(a)a(k,4);else for(const S of k)S();$3.delete(u)}},t?o?w(!0):v=u.run():l?l(w.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function _i(e,t=1/0,n){if(t<=0||!qn(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,jo(e))_i(e.value,t,n);else if(qt(e))for(let o=0;o{_i(o,t,n)});else if(n5(e)){for(const o in e)_i(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&_i(e[o],t,n)}return e}/** +* @vue/runtime-core v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const mC=[];function iB(e){mC.push(e)}function aB(){mC.pop()}function gRe(e,t){}const vRe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},cB={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function rd(e,t,n,o){try{return o?e(...o):e()}catch(s){Bc(s,t,n)}}function cl(e,t,n,o){if(hn(e)){const s=rd(e,t,n,o);return s&&H7(s)&&s.catch(r=>{Bc(r,t,n)}),s}if(qt(e)){const s=[];for(let r=0;r>>1,s=Qs[o],r=Mu(s);r=Mu(n)?Qs.push(e):Qs.splice(dB(t),0,e),e.flags|=1,vC()}}function vC(){N3||(N3=gC.then(wC))}function z3(e){qt(e)?nc.push(...e):da&&e.id===-1?da.splice(z0+1,0,e):e.flags&1||(nc.push(e),e.flags|=1),vC()}function Wv(e,t,n=Wl+1){for(;nMu(n)-Mu(o));if(nc.length=0,da){da.push(...t);return}for(da=t,z0=0;z0e.id==null?e.flags&2?-1:1/0:e.id;function wC(e){try{for(Wl=0;WlB0.emit(s,...r)),of=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{yC(r,t)}),setTimeout(()=>{B0||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,of=[])},3e3)):of=[]}let Ts=null,h5=null;function Au(e){const t=Ts;return Ts=e,h5=e&&e.type.__scopeId||null,t}function wRe(e){h5=e}function yRe(){h5=null}const kRe=e=>ve;function ve(e,t=Ts,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&H3(-1);const r=Au(t);let l;try{l=e(...s)}finally{Au(r),o._d&&H3(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function Rn(e,t){if(Ts===null)return e;const n=cd(Ts),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&hn(t)?t.call(o&&o.proxy):t}}function bRe(){return!!(Xo()||N1)}const fB=Symbol.for("v-scx"),pB=()=>kn(fB);function kC(e,t){return ld(e,null,t)}function _Re(e,t){return ld(e,null,{flush:"post"})}function hB(e,t){return ld(e,null,{flush:"sync"})}function Xe(e,t,n){return ld(e,t,n)}function ld(e,t,n=In){const{immediate:o,deep:s,flush:r,once:l}=n,i=no({},n),a=t&&o||!t&&r!=="post";let c;if(P1){if(r==="sync"){const p=pB();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=il,p.resume=il,p.pause=il,p}}const u=Ms;i.call=(p,h,m)=>cl(p,u,h,m);let d=!1;r==="post"?i.scheduler=p=>{Do(p,u&&u.suspense)}:r!=="sync"&&(d=!0,i.scheduler=(p,h)=>{h?p():q7(p)}),i.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=lB(e,t,i);return P1&&(c?c.push(f):a&&f()),f}function mB(e,t,n){const o=this.proxy,s=io(e)?e.includes(".")?bC(o,e):()=>o[e]:e.bind(o,o);let r;hn(t)?r=t:(r=t.handler,n=t);const l=jc(this),i=ld(s,r.bind(o),n);return l(),i}function bC(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,w1=e=>e&&(e.disabled||e.disabled===""),gB=e=>e&&(e.defer||e.defer===""),qv=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Uv=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Gh=(e,t)=>{const n=e&&e.to;return io(n)?t?t(n):null:n},vB={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,r,l,i,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:y,parentNode:b}}=c,v=w1(t.props);let{dynamicChildren:w}=t;const k=(T,I,L)=>{T.shapeFlag&16&&u(T.children,I,L,s,r,l,i,a)},S=(T=t)=>{const I=w1(T.props),L=T.target=Gh(T.props,h),j=Yh(L,T,m,p);L&&(l!=="svg"&&qv(L)?l="svg":l!=="mathml"&&Uv(L)&&(l="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(L),I||(k(T,L,j),j2(T,!1)))},$=T=>{const I=()=>{if(la.get(T)===I){if(la.delete(T),w1(T.props)){const L=b(T.el)||n;k(T,L,T.anchor),j2(T,!0)}S(T)}};la.set(T,I),Do(I,r)};if(e==null){const T=t.el=m(""),I=t.anchor=m("");if(p(T,n,o),p(I,n,o),gB(t.props)||r&&r.pendingBranch){$(t);return}v&&(k(t,n,I),j2(t,!0)),S()}else{t.el=e.el;const T=t.anchor=e.anchor,I=la.get(e);if(I){I.flags|=8,la.delete(e),$(t);return}t.targetStart=e.targetStart;const L=t.target=e.target,j=t.targetAnchor=e.targetAnchor,O=w1(e.props),A=O?n:L,F=O?T:j;if(l==="svg"||qv(L)?l="svg":(l==="mathml"||Uv(L))&&(l="mathml"),w?(f(e.dynamicChildren,w,A,s,r,l,i),tm(e,t,!0)):a||d(e,t,A,F,s,r,l,i,!1),v)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):sf(t,n,T,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=t.target=Gh(t.props,h);P&&sf(t,P,null,c,0)}else O&&sf(t,L,j,c,1);j2(t,v)}},remove(e,t,n,{um:o,o:{remove:s}},r){const{shapeFlag:l,children:i,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,p=r||!w1(f),h=la.get(e);if(h&&(h.flags|=8,la.delete(e)),d&&(s(c),s(u)),r&&s(a),!h&&l&16)for(let m=0;m{e.isMounted=!0}),uo(()=>{e.isUnmounting=!0}),e}const Gr=[Function,Array],CC={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gr,onEnter:Gr,onAfterEnter:Gr,onEnterCancelled:Gr,onBeforeLeave:Gr,onLeave:Gr,onAfterLeave:Gr,onLeaveCancelled:Gr,onBeforeAppear:Gr,onAppear:Gr,onAfterAppear:Gr,onAppearCancelled:Gr},MC=e=>{const t=e.subTree;return t.component?MC(t.component):t},yB={name:"BaseTransition",props:CC,setup(e,{slots:t}){const n=Xo(),o=SC();return()=>{const s=t.default&&U7(t.default(),!0),r=s&&s.length?AC(s):n.subTree?ne():void 0;if(!r)return;const l=Bn(e),{mode:i}=l;if(o.isLeaving)return tp(r);const a=Zv(r);if(!a)return tp(r);let c=Tu(a,l,o,n,d=>c=d);a.type!==Uo&&Ta(a,c);let u=n.subTree&&Zv(n.subTree);if(u&&u.type!==Uo&&!bl(u,a)&&MC(n).type!==Uo){let d=Tu(u,l,o,n);if(Ta(u,d),i==="out-in"&&a.type!==Uo)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},tp(r);i==="in-out"&&a.type!==Uo?d.delayLeave=(f,p,h)=>{const m=TC(o,u);m[String(u.key)]=u,f[el]=()=>{p(),f[el]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function AC(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Uo){t=n;break}}return t}const kB=yB;function TC(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Tu(e,t,n,o,s){const{appear:r,mode:l,persisted:i=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:y,onAppear:b,onAfterAppear:v,onAppearCancelled:w}=t,k=String(e.key),S=TC(n,e),$=(L,j)=>{L&&cl(L,o,9,j)},T=(L,j)=>{const O=j[1];$(L,j),qt(L)?L.every(A=>A.length<=1)&&O():L.length<=1&&O()},I={mode:l,persisted:i,beforeEnter(L){let j=a;if(!n.isMounted)if(r)j=y||a;else return;L[el]&&L[el](!0);const O=S[k];O&&bl(e,O)&&O.el[el]&&O.el[el](),$(j,[L])},enter(L){if(S[k]===e)return;let j=c,O=u,A=d;if(!n.isMounted)if(r)j=b||c,O=v||u,A=w||d;else return;let F=!1;L[m2]=H=>{F||(F=!0,H?$(A,[L]):$(O,[L]),I.delayedLeave&&I.delayedLeave(),L[m2]=void 0)};const P=L[m2].bind(null,!1);j?T(j,[L,P]):P()},leave(L,j){const O=String(e.key);if(L[m2]&&L[m2](!0),n.isUnmounting)return j();$(f,[L]);let A=!1;L[el]=P=>{A||(A=!0,j(),P?$(m,[L]):$(h,[L]),L[el]=void 0,S[O]===e&&delete S[O])};const F=L[el].bind(null,!1);S[O]=e,p?T(p,[L,F]):F()},clone(L){const j=Tu(L,t,n,o,s);return s&&s(j),j}};return I}function tp(e){if(id(e))return e=zi(e),e.children=null,e}function Zv(e){if(!id(e))return xC(e.type)&&e.children?AC(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&hn(n.default))return n.default()}}function Ta(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ta(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function U7(e,t=!1,n){let o=[],s=0;for(let r=0;r1)for(let r=0;rn.value,set:r=>n.value=r})}return n}function Kv(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const j3=new WeakMap;function oc(e,t,n,o,s=!1){if(qt(e)){e.forEach((m,y)=>oc(m,t&&(qt(t)?t[y]:t),n,o,s));return}if(Ei(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&oc(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?cd(o.component):o.el,l=s?null:r,{i,r:a}=e,c=t&&t.r,u=i.refs===In?i.refs={}:i.refs,d=i.setupState,f=Bn(d),p=d===In?VS:m=>Kv(u,m)?!1:Wn(f,m),h=(m,y)=>!(y&&Kv(u,y));if(c!=null&&c!==a){if(Gv(t),io(c))u[c]=null,p(c)&&(d[c]=null);else if(jo(c)){const m=t;h(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(hn(a))rd(a,i,12,[l,u]);else{const m=io(a),y=jo(a);if(m||y){const b=()=>{if(e.f){const v=m?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(s)qt(v)&&R7(v,r);else if(qt(v))v.includes(r)||v.push(r);else if(m)u[a]=[r],p(a)&&(d[a]=u[a]);else{const w=[r];h(a,e.k)&&(a.value=w),e.k&&(u[e.k]=w)}}else m?(u[a]=l,p(a)&&(d[a]=l)):y&&(h(a,e.k)&&(a.value=l),e.k&&(u[e.k]=l))};if(l){const v=()=>{b(),j3.delete(e)};v.id=-1,j3.set(e,v),Do(v,n)}else Gv(e),b()}}}function Gv(e){const t=j3.get(e);t&&(t.flags|=8,j3.delete(e))}let Yv=!1;const _0=()=>{Yv||(console.error("Hydration completed but contains mismatches."),Yv=!0)},bB=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",_B=e=>e.namespaceURI.includes("MathML"),rf=e=>{if(e.nodeType===1){if(bB(e))return"svg";if(_B(e))return"mathml"}},V0=e=>e.nodeType===8;function xB(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:r,parentNode:l,remove:i,insert:a,createComment:c}}=e,u=(w,k)=>{if(!k.hasChildNodes()){n(null,w,k),B3(),k._vnode=w;return}d(k.firstChild,w,null,null,null),B3(),k._vnode=w},d=(w,k,S,$,T,I=!1)=>{I=I||!!k.dynamicChildren;const L=V0(w)&&w.data==="[",j=()=>m(w,k,S,$,T,L),{type:O,ref:A,shapeFlag:F,patchFlag:P}=k;let H=w.nodeType;k.el=w,P===-2&&(I=!1,k.dynamicChildren=null);let M=null;switch(O){case _a:H!==3?k.children===""?(a(k.el=s(""),l(w),w),M=w):M=j():(w.data!==k.children&&(_0(),w.data=k.children),M=r(w));break;case Uo:v(w)?(M=r(w),b(k.el=w.content.firstChild,w,S)):H!==8||L?M=j():M=r(w);break;case rc:if(L&&(w=r(w),H=w.nodeType),H===1||H===3){M=w;const B=!k.children.length;for(let R=0;R{I=I||!!k.dynamicChildren;const{type:L,props:j,patchFlag:O,shapeFlag:A,dirs:F,transition:P}=k,H=L==="input"||L==="option";if(H||O!==-1){F&&ql(k,null,S,"created");let M=!1;if(v(w)){M=ZC(null,P)&&S&&S.vnode.props&&S.vnode.props.appear;const R=w.content.firstChild;if(M){const W=R.getAttribute("class");W&&(R.$cls=W),P.beforeEnter(R)}b(R,w,S),k.el=w=R}if(A&16&&!(j&&(j.innerHTML||j.textContent))){let R=p(w.firstChild,k,w,S,$,T,I);for(R&&!lf(w,1)&&_0();R;){const W=R;R=R.nextSibling,i(W)}}else if(A&8){let R=k.children;R[0]===` +`&&(w.tagName==="PRE"||w.tagName==="TEXTAREA")&&(R=R.slice(1));const{textContent:W}=w;W!==R&&W!==R.replace(/\r\n|\r/g,` +`)&&(lf(w,0)||_0(),w.textContent=k.children)}if(j){if(H||!I||O&48){const R=w.tagName.includes("-");for(const W in j)(H&&(W.endsWith("value")||W==="indeterminate")||sd(W)&&!L1(W)||W[0]==="."||R&&!L1(W))&&o(w,W,null,j[W],void 0,S)}else if(j.onClick)o(w,"onClick",null,j.onClick,void 0,S);else if(O&4&&ba(j.style))for(const R in j.style)j.style[R]}let B;(B=j&&j.onVnodeBeforeMount)&&hr(B,S,k),F&&ql(k,null,S,"beforeMount"),((B=j&&j.onVnodeMounted)||F||M)&&XC(()=>{B&&hr(B,S,k),M&&P.enter(w),F&&ql(k,null,S,"mounted")},$)}return w.nextSibling},p=(w,k,S,$,T,I,L)=>{L=L||!!k.dynamicChildren;const j=k.children,O=j.length;let A=!1;for(let F=0;F{const{slotScopeIds:L}=k;L&&(T=T?T.concat(L):L);const j=l(w),O=p(r(w),k,j,S,$,T,I);return O&&V0(O)&&O.data==="]"?r(k.anchor=O):(_0(),a(k.anchor=c("]"),j,O),O)},m=(w,k,S,$,T,I)=>{if(lf(w.parentElement,1)||_0(),k.el=null,I){const O=y(w);for(;;){const A=r(w);if(A&&A!==O)i(A);else break}}const L=r(w),j=l(w);return i(w),n(null,k,j,L,S,$,rf(j),T),S&&(S.vnode.el=k.el,v5(S,k.el)),L},y=(w,k="[",S="]")=>{let $=0;for(;w;)if(w=r(w),w&&V0(w)&&(w.data===k&&$++,w.data===S)){if($===0)return r(w);$--}return w},b=(w,k,S)=>{const $=k.parentNode;$&&$.replaceChild(w,k);let T=S;for(;T;)T.vnode.el===k&&(T.vnode.el=T.subTree.el=w),T=T.parent},v=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const Xv="data-allow-mismatch",SB={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function lf(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Xv);)e=e.parentElement;const n=e&&e.getAttribute(Xv);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:o.includes(SB[t])}}const CB=i5().requestIdleCallback||(e=>setTimeout(e,1)),MB=i5().cancelIdleCallback||(e=>clearTimeout(e)),SRe=(e=1e4)=>t=>{const n=CB(t,{timeout:e});return()=>MB(n)};function AB(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:r,innerWidth:l}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const r of s)if(r.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(AB(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},MRe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},ARe=(e=[])=>(t,n)=>{io(e)&&(e=[e]);let o=!1;const s=l=>{o||(o=!0,r(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},r=()=>{n(l=>{for(const i of e)l.removeEventListener(i,s)})};return n(l=>{for(const i of e)l.addEventListener(i,s,{once:!0})}),r};function TB(e,t){if(V0(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(V0(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Ei=e=>!!e.type.__asyncLoader;function ol(e){hn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:r,timeout:l,suspensible:i=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let h;return c||(h=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((y,b)=>{a(m,()=>y(f()),()=>b(m),d+1)});throw m}).then(m=>h!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return Ze({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(h,m,y){let b=!1;(m.bu||(m.bu=[])).push(()=>b=!0);const v=()=>{b||y()},w=r?()=>{const k=r(v,S=>TB(h,S));k&&(m.bum||(m.bum=[])).push(k)}:v;u?w():p().then(()=>!m.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const h=Ms;if(Z7(h),u)return()=>af(u,h);const m=w=>{c=null,Bc(w,h,13,!o)};if(i&&h.suspense||P1)return p().then(w=>()=>af(w,h)).catch(w=>(m(w),()=>o?Z(o,{error:w}):null));const y=q(!1),b=q(),v=q(!!s);return s&&setTimeout(()=>{v.value=!1},s),l!=null&&setTimeout(()=>{if(!y.value&&!b.value){const w=new Error(`Async component timed out after ${l}ms.`);m(w),b.value=w}},l),p().then(()=>{y.value=!0,h.parent&&id(h.parent.vnode)&&h.parent.update()}).catch(w=>{m(w),b.value=w}),()=>{if(y.value&&u)return af(u,h);if(b.value&&o)return Z(o,{error:b.value});if(n&&!v.value)return af(n,h)}}})}function af(e,t){const{ref:n,props:o,children:s,ce:r}=t.vnode,l=Z(e,o,s);return l.ref=n,l.ce=r,delete t.vnode.ce,l}const id=e=>e.type.__isKeepAlive,EB={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Xo(),o=n.ctx;if(!o.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const s=new Map,r=new Set;let l=null;const i=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(v,w,k,S,$)=>{const T=v.component;c(v,w,k,0,i),a(T.vnode,v,w,k,T,i,S,v.slotScopeIds,$),Do(()=>{T.isDeactivated=!1,T.a&&tc(T.a);const I=v.props&&v.props.onVnodeMounted;I&&hr(I,T.parent,v)},i)},o.deactivate=v=>{const w=v.component;F3(w.m),F3(w.a),c(v,f,null,1,i),Do(()=>{w.da&&tc(w.da);const k=v.props&&v.props.onVnodeUnmounted;k&&hr(k,w.parent,v),w.isDeactivated=!0},i)};function p(v){np(v),u(v,n,i,!0)}function h(v){s.forEach((w,k)=>{const S=r8(Ei(w)?w.type.__asyncResolved||{}:w.type);S&&!v(S)&&m(k)})}function m(v){const w=s.get(v);w&&(!l||!bl(w,l))?p(w):l&&np(l),s.delete(v),r.delete(v)}Xe(()=>[e.include,e.exclude],([v,w])=>{v&&h(k=>O2(v,k)),w&&h(k=>!O2(w,k))},{flush:"post",deep:!0});let y=null;const b=()=>{y!=null&&(R3(n.subTree.type)?Do(()=>{s.set(y,cf(n.subTree))},n.subTree.suspense):s.set(y,cf(n.subTree)))};return Sn(b),K7(b),uo(()=>{s.forEach(v=>{const{subTree:w,suspense:k}=n,S=cf(w);if(v.type===S.type&&v.key===S.key){np(S);const $=S.component.da;$&&Do($,k);return}p(v)})}),()=>{if(y=null,!t.default)return l=null;const v=t.default(),w=v[0];if(v.length>1)return l=null,v;if(!Ea(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return l=null,w;let k=cf(w);if(k.type===Uo)return l=null,k;const S=k.type,$=r8(Ei(k)?k.type.__asyncResolved||{}:S),{include:T,exclude:I,max:L}=e;if(T&&(!$||!O2(T,$))||I&&$&&O2(I,$))return k.shapeFlag&=-257,l=k,w;const j=k.key==null?S:k.key,O=s.get(j);return k.el&&(k=zi(k),w.shapeFlag&128&&(w.ssContent=k)),y=j,O?(k.el=O.el,k.component=O.component,k.transition&&Ta(k,k.transition),k.shapeFlag|=512,r.delete(j),r.add(j)):(r.add(j),L&&r.size>parseInt(L,10)&&m(r.values().next().value)),k.shapeFlag|=256,l=k,R3(w.type)?w:k}}},TRe=EB;function O2(e,t){return qt(e)?e.some(n=>O2(n,t)):io(e)?e.split(",").includes(t):mz(e)?(e.lastIndex=0,e.test(t)):!1}function IB(e,t){EC(e,"a",t)}function LB(e,t){EC(e,"da",t)}function EC(e,t,n=Ms){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(m5(t,o,n),n){let s=n.parent;for(;s&&s.parent;)id(s.parent.vnode)&&$B(o,t,n,s),s=s.parent}}function $B(e,t,n,o){const s=m5(t,e,o,!0);An(()=>{R7(o[t],s)},n)}function np(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function cf(e){return e.shapeFlag&128?e.ssContent:e}function m5(e,t,n=Ms,o=!1){if(n){const s=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...l)=>{Li();const i=jc(n),a=cl(t,n,e,l);return i(),$i(),a});return o?s.unshift(r):s.push(r),r}}const Di=e=>(t,n=Ms)=>{(!P1||e==="sp")&&m5(e,(...o)=>t(...o),n)},NB=Di("bm"),Sn=Di("m"),IC=Di("bu"),K7=Di("u"),uo=Di("bum"),An=Di("um"),zB=Di("sp"),BB=Di("rtg"),jB=Di("rtc");function OB(e,t=Ms){m5("ec",e,t)}const G7="components",FB="directives";function RB(e,t){return Y7(G7,e,!0,t)||e}const LC=Symbol.for("v-ndc");function Wo(e){return io(e)?Y7(G7,e,!1)||e:e||LC}function ERe(e){return Y7(FB,e)}function Y7(e,t,n=!0,o=!1){const s=Ts||Ms;if(s){const r=s.type;if(e===G7){const i=r8(r,!1);if(i&&(i===t||i===rs(t)||i===r5(rs(t))))return r}const l=Jv(s[e]||r[e],t)||Jv(s.appContext[e],t);return!l&&o?r:l}}function Jv(e,t){return e&&(e[t]||e[rs(t)]||e[r5(rs(t))])}function rt(e,t,n,o){let s;const r=n&&n[o],l=qt(e);if(l||io(e)){const i=l&&ba(e);let a=!1,c=!1;i&&(a=!Or(e),c=Ni(e),e=u5(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(i,a,void 0,r&&r[a]));else{const i=Object.keys(e);s=new Array(i.length);for(let a=0,c=i.length;a{const r=o.fn(...s);return r&&(r.key=o.key),r}:o.fn)}return e}function bn(e,t,n={},o,s){if(Ts.ce||Ts.parent&&Ei(Ts.parent)&&Ts.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),fe(Le,null,[Z("slot",n,o&&o())],c?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),g();const l=r&&X7(r(n)),i=n.key||l&&l.key,a=fe(Le,{key:(i&&!Vr(i)?i:`_${t}`)+(!l&&o?"_fb":"")},l||(o?o():[]),l&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function X7(e){return e.some(t=>Ea(t)?!(t.type===Uo||t.type===Le&&!X7(t.children)):!0)?e:null}function IRe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:t3(o)]=e[o];return n}const Xh=e=>e?oM(e)?cd(e):Xh(e.parent):null,nu=no(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xh(e.parent),$root:e=>Xh(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>J7(e),$forceUpdate:e=>e.f||(e.f=()=>{q7(e.update)}),$nextTick:e=>e.n||(e.n=_t.bind(e.proxy)),$watch:e=>mB.bind(e)}),op=(e,t)=>e!==In&&!e.__isScriptSetup&&Wn(e,t),Jh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:r,accessCache:l,type:i,appContext:a}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return r[t]}else{if(op(o,t))return l[t]=1,o[t];if(s!==In&&Wn(s,t))return l[t]=2,s[t];if(Wn(r,t))return l[t]=3,r[t];if(n!==In&&Wn(n,t))return l[t]=4,n[t];Qh&&(l[t]=0)}}const c=nu[t];let u,d;if(c)return t==="$attrs"&&Rs(e.attrs,"get",""),c(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(n!==In&&Wn(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,Wn(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:r}=e;return op(s,t)?(s[t]=n,!0):o!==In&&Wn(o,t)?(o[t]=n,!0):Wn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:r,type:l}},i){let a;return!!(n[i]||e!==In&&i[0]!=="$"&&Wn(e,i)||op(t,i)||Wn(r,i)||Wn(o,i)||Wn(nu,i)||Wn(s.config.globalProperties,i)||(a=l.__cssModules)&&a[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Wn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},HB=no({},Jh,{get(e,t){if(t!==Symbol.unscopables)return Jh.get(e,t,e)},has(e,t){return t[0]!=="_"&&!kz(t)}});function LRe(){return null}function $Re(){return null}function NRe(e){}function zRe(e){}function BRe(){return null}function jRe(){}function ORe(e,t){return null}function FRe(){return $C().slots}function ad(){return $C().attrs}function $C(e){const t=Xo();return t.setupContext||(t.setupContext=lM(t))}function Iu(e){return qt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function RRe(e,t){const n=Iu(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?qt(s)||hn(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function HRe(e,t){return!e||!t?e||t:qt(e)&&qt(t)?e.concat(t):no({},Iu(e),Iu(t))}function PRe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function DRe(e){const t=Xo(),n=P1;let o=e();$u(),n&&lc(!1);const s=()=>{jc(t),n&&lc(!0)},r=()=>{Xo()!==t&&t.scope.off(),$u(),n&&lc(!1)};return H7(o)&&(o=o.catch(l=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(r)),l})),[o,()=>{s(),Promise.resolve().then(r)}]}let Qh=!0;function PB(e){const t=J7(e),n=e.proxy,o=e.ctx;Qh=!1,t.beforeCreate&&Qv(t.beforeCreate,e,"bc");const{data:s,computed:r,methods:l,watch:i,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:v,destroyed:w,unmounted:k,render:S,renderTracked:$,renderTriggered:T,errorCaptured:I,serverPrefetch:L,expose:j,inheritAttrs:O,components:A,directives:F,filters:P}=t;if(c&&DB(c,o,null),l)for(const B in l){const R=l[B];hn(R)&&(o[B]=R.bind(n))}if(s){const B=s.call(n,n);qn(B)&&(e.data=As(B))}if(Qh=!0,r)for(const B in r){const R=r[B],W=hn(R)?R.bind(n,n):hn(R.get)?R.get.bind(n,n):il,le=!hn(R)&&hn(R.set)?R.set.bind(n):il,J=z({get:W,set:le});Object.defineProperty(o,B,{enumerable:!0,configurable:!0,get:()=>J.value,set:G=>J.value=G})}if(i)for(const B in i)NC(i[B],o,n,B);if(a){const B=hn(a)?a.call(n):a;Reflect.ownKeys(B).forEach(R=>{Vn(R,B[R])})}u&&Qv(u,e,"c");function M(B,R){qt(R)?R.forEach(W=>B(W.bind(n))):R&&B(R.bind(n))}if(M(NB,d),M(Sn,f),M(IC,p),M(K7,h),M(IB,m),M(LB,y),M(OB,I),M(jB,$),M(BB,T),M(uo,v),M(An,k),M(zB,L),qt(j))if(j.length){const B=e.exposed||(e.exposed={});j.forEach(R=>{Object.defineProperty(B,R,{get:()=>n[R],set:W=>n[R]=W,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===il&&(e.render=S),O!=null&&(e.inheritAttrs=O),A&&(e.components=A),F&&(e.directives=F),L&&Z7(e)}function DB(e,t,n=il){qt(e)&&(e=e8(e));for(const o in e){const s=e[o];let r;qn(s)?"default"in s?r=kn(s.from||o,s.default,!0):r=kn(s.from||o):r=kn(s),jo(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[o]=r}}function Qv(e,t,n){cl(qt(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function NC(e,t,n,o){let s=o.includes(".")?bC(n,o):()=>n[o];if(io(e)){const r=t[e];hn(r)&&Xe(s,r)}else if(hn(e))Xe(s,e.bind(n));else if(qn(e))if(qt(e))e.forEach(r=>NC(r,t,n,o));else{const r=hn(e.handler)?e.handler.bind(n):t[e.handler];hn(r)&&Xe(s,r,e)}}function J7(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,i=r.get(t);let a;return i?a=i:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>O3(a,c,l,!0)),O3(a,t,l)),qn(t)&&r.set(t,a),a}function O3(e,t,n,o=!1){const{mixins:s,extends:r}=t;r&&O3(e,r,n,!0),s&&s.forEach(l=>O3(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const i=VB[l]||n&&n[l];e[l]=i?i(e[l],t[l]):t[l]}return e}const VB={data:ew,props:tw,emits:tw,methods:F2,computed:F2,beforeCreate:Ks,created:Ks,beforeMount:Ks,mounted:Ks,beforeUpdate:Ks,updated:Ks,beforeDestroy:Ks,beforeUnmount:Ks,destroyed:Ks,unmounted:Ks,activated:Ks,deactivated:Ks,errorCaptured:Ks,serverPrefetch:Ks,components:F2,directives:F2,watch:qB,provide:ew,inject:WB};function ew(e,t){return t?e?function(){return no(hn(e)?e.call(this,this):e,hn(t)?t.call(this,this):t)}:t:e}function WB(e,t){return F2(e8(e),e8(t))}function e8(e){if(qt(e)){const t={};for(let n=0;n{let u,d=In,f;return hB(()=>{const p=e[s];Cs(u,p)&&(u=p,c())}),{get(){return a(),n.get?n.get(u):u},set(p){const h=n.set?n.set(p):p;if(!Cs(h,u)&&!(d!==In&&Cs(p,d)))return;const m=o.vnode.props;m&&(t in m||s in m||r in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${r}`in m)||(u=p,c()),o.emit(`update:${t}`,h),Cs(p,h)&&Cs(p,d)&&!Cs(h,f)&&c(),d=p,f=h}}});return i[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?l||In:i,done:!1}:{done:!0}}}},i}const BC=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${rs(t)}Modifiers`]||e[`${kr(t)}Modifiers`];function KB(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||In;let s=n;const r=t.startsWith("update:"),l=r&&BC(o,t.slice(7));l&&(l.trim&&(s=n.map(u=>io(u)?u.trim():u)),l.number&&(s=n.map(l5)));let i,a=o[i=t3(t)]||o[i=t3(rs(t))];!a&&r&&(a=o[i=t3(kr(t))]),a&&cl(a,e,6,s);const c=o[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,cl(c,e,6,s)}}const GB=new WeakMap;function jC(e,t,n=!1){const o=n?GB:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const r=e.emits;let l={},i=!1;if(!hn(e)){const a=c=>{const u=jC(c,t,!0);u&&(i=!0,no(l,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!i?(qn(e)&&o.set(e,null),null):(qt(r)?r.forEach(a=>l[a]=null):no(l,r),qn(e)&&o.set(e,l),l)}function g5(e,t){return!e||!sd(t)?!1:(t=t.slice(2).replace(/Once$/,""),Wn(e,t[0].toLowerCase()+t.slice(1))||Wn(e,kr(t))||Wn(e,t))}function o3(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[r],slots:l,attrs:i,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e,y=Au(e);let b,v;try{if(n.shapeFlag&4){const k=s||o,S=k;b=yr(c.call(S,k,u,d,p,f,h)),v=i}else{const k=t;b=yr(k.length>1?k(d,{attrs:i,slots:l,emit:a}):k(d,null)),v=t.props?i:XB(i)}}catch(k){ou.length=0,Bc(k,e,1),b=Z(Uo)}let w=b;if(v&&m!==!1){const k=Object.keys(v),{shapeFlag:S}=w;k.length&&S&7&&(r&&k.some(t5)&&(v=JB(v,r)),w=zi(w,v,!1,!0))}return n.dirs&&(w=zi(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&Ta(w,n.transition),b=w,Au(y),b}function YB(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||sd(n))&&((t||(t={}))[n]=e[n]);return t},JB=(e,t)=>{const n={};for(const o in e)(!t5(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function QB(e,t,n){const{props:o,children:s,component:r}=e,{props:l,children:i,patchFlag:a}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?nw(o,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(FC),HC=e=>Object.getPrototypeOf(e)===FC;function ej(e,t,n,o=!1){const s={},r=RC();e.propsDefaults=Object.create(null),PC(e,t,s,r);for(const l in e.propsOptions[0])l in s||(s[l]=void 0);n?e.props=o?s:Gz(s):e.type.props?e.props=s:e.props=r,e.attrs=r}function tj(e,t,n,o){const{props:s,attrs:r,vnode:{patchFlag:l}}=e,i=Bn(s),[a]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,p]=DC(d,t,!0);no(l,f),p&&i.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!a)return qn(e)&&o.set(e,Q0),Q0;if(qt(r))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",em=e=>qt(e)?e.map(yr):[yr(e)],oj=(e,t,n)=>{if(t._n)return t;const o=ve((...s)=>em(t(...s)),n);return o._c=!1,o},VC=(e,t,n)=>{const o=e._ctx;for(const s in e){if(Q7(s))continue;const r=e[s];if(hn(r))t[s]=oj(s,r,o);else if(r!=null){const l=em(r);t[s]=()=>l}}},WC=(e,t)=>{const n=em(t);e.slots.default=()=>n},qC=(e,t,n)=>{for(const o in t)(n||!Q7(o))&&(e[o]=t[o])},sj=(e,t,n)=>{const o=e.slots=RC();if(e.vnode.shapeFlag&32){const s=t._;s?(qC(o,t,n),n&&qS(o,"_",s,!0)):VC(t,o)}else t&&WC(e,t)},rj=(e,t,n)=>{const{vnode:o,slots:s}=e;let r=!0,l=In;if(o.shapeFlag&32){const i=t._;i?n&&i===1?r=!1:qC(s,t,n):(r=!t.$stable,VC(t,s)),l=t}else t&&(WC(e,t),l={default:1});if(r)for(const i in s)!Q7(i)&&l[i]==null&&delete s[i]},Do=XC;function lj(e){return UC(e)}function ij(e){return UC(e,xB)}function UC(e,t){const n=i5();n.__VUE__=!0;const{insert:o,remove:s,patchProp:r,createElement:l,createText:i,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=il,insertStaticContent:h}=e,m=(D,Y,we,pe=null,de=null,X=null,ae=void 0,ke=null,xe=!!Y.dynamicChildren)=>{if(D===Y)return;D&&!bl(D,Y)&&(pe=me(D),G(D,de,X,!0),D=null),Y.patchFlag===-2&&(xe=!1,Y.dynamicChildren=null);const{type:ue,ref:Se,shapeFlag:se}=Y;switch(ue){case _a:y(D,Y,we,pe);break;case Uo:b(D,Y,we,pe);break;case rc:D==null&&v(Y,we,pe,ae);break;case Le:A(D,Y,we,pe,de,X,ae,ke,xe);break;default:se&1?S(D,Y,we,pe,de,X,ae,ke,xe):se&6?F(D,Y,we,pe,de,X,ae,ke,xe):(se&64||se&128)&&ue.process(D,Y,we,pe,de,X,ae,ke,xe,ge)}Se!=null&&de?oc(Se,D&&D.ref,X,Y||D,!Y):Se==null&&D&&D.ref!=null&&oc(D.ref,null,X,D,!0)},y=(D,Y,we,pe)=>{if(D==null)o(Y.el=i(Y.children),we,pe);else{const de=Y.el=D.el;Y.children!==D.children&&c(de,Y.children)}},b=(D,Y,we,pe)=>{D==null?o(Y.el=a(Y.children||""),we,pe):Y.el=D.el},v=(D,Y,we,pe)=>{[D.el,D.anchor]=h(D.children,Y,we,pe,D.el,D.anchor)},w=({el:D,anchor:Y},we,pe)=>{let de;for(;D&&D!==Y;)de=f(D),o(D,we,pe),D=de;o(Y,we,pe)},k=({el:D,anchor:Y})=>{let we;for(;D&&D!==Y;)we=f(D),s(D),D=we;s(Y)},S=(D,Y,we,pe,de,X,ae,ke,xe)=>{if(Y.type==="svg"?ae="svg":Y.type==="math"&&(ae="mathml"),D==null)$(Y,we,pe,de,X,ae,ke,xe);else{const ue=D.el&&D.el._isVueCE?D.el:null;try{ue&&ue._beginPatch(),L(D,Y,de,X,ae,ke,xe)}finally{ue&&ue._endPatch()}}},$=(D,Y,we,pe,de,X,ae,ke)=>{let xe,ue;const{props:Se,shapeFlag:se,transition:be,dirs:je}=D;if(xe=D.el=l(D.type,X,Se&&Se.is,Se),se&8?u(xe,D.children):se&16&&I(D.children,xe,null,pe,de,sp(D,X),ae,ke),je&&ql(D,null,pe,"created"),T(xe,D,D.scopeId,ae,pe),Se){for(const pt in Se)pt!=="value"&&!L1(pt)&&r(xe,pt,null,Se[pt],X,pe);"value"in Se&&r(xe,"value",null,Se.value,X),(ue=Se.onVnodeBeforeMount)&&hr(ue,pe,D)}je&&ql(D,null,pe,"beforeMount");const ut=ZC(de,be);ut&&be.beforeEnter(xe),o(xe,Y,we),((ue=Se&&Se.onVnodeMounted)||ut||je)&&Do(()=>{try{ue&&hr(ue,pe,D),ut&&be.enter(xe),je&&ql(D,null,pe,"mounted")}finally{}},de)},T=(D,Y,we,pe,de)=>{if(we&&p(D,we),pe)for(let X=0;X{for(let ue=xe;ue{const ke=Y.el=D.el;let{patchFlag:xe,dynamicChildren:ue,dirs:Se}=Y;xe|=D.patchFlag&16;const se=D.props||In,be=Y.props||In;let je;if(we&&r1(we,!1),(je=be.onVnodeBeforeUpdate)&&hr(je,we,Y,D),Se&&ql(Y,D,we,"beforeUpdate"),we&&r1(we,!0),(se.innerHTML&&be.innerHTML==null||se.textContent&&be.textContent==null)&&u(ke,""),ue?j(D.dynamicChildren,ue,ke,we,pe,sp(Y,de),X):ae||R(D,Y,ke,null,we,pe,sp(Y,de),X,!1),xe>0){if(xe&16)O(ke,se,be,we,de);else if(xe&2&&se.class!==be.class&&r(ke,"class",null,be.class,de),xe&4&&r(ke,"style",se.style,be.style,de),xe&8){const ut=Y.dynamicProps;for(let pt=0;pt{je&&hr(je,we,Y,D),Se&&ql(Y,D,we,"updated")},pe)},j=(D,Y,we,pe,de,X,ae)=>{for(let ke=0;ke{if(Y!==we){if(Y!==In)for(const X in Y)!L1(X)&&!(X in we)&&r(D,X,Y[X],null,de,pe);for(const X in we){if(L1(X))continue;const ae=we[X],ke=Y[X];ae!==ke&&X!=="value"&&r(D,X,ke,ae,de,pe)}"value"in we&&r(D,"value",Y.value,we.value,de)}},A=(D,Y,we,pe,de,X,ae,ke,xe)=>{const ue=Y.el=D?D.el:i(""),Se=Y.anchor=D?D.anchor:i("");let{patchFlag:se,dynamicChildren:be,slotScopeIds:je}=Y;je&&(ke=ke?ke.concat(je):je),D==null?(o(ue,we,pe),o(Se,we,pe),I(Y.children||[],we,Se,de,X,ae,ke,xe)):se>0&&se&64&&be&&D.dynamicChildren&&D.dynamicChildren.length===be.length?(j(D.dynamicChildren,be,we,de,X,ae,ke),(Y.key!=null||de&&Y===de.subTree)&&tm(D,Y,!0)):R(D,Y,we,Se,de,X,ae,ke,xe)},F=(D,Y,we,pe,de,X,ae,ke,xe)=>{Y.slotScopeIds=ke,D==null?Y.shapeFlag&512?de.ctx.activate(Y,we,pe,ae,xe):P(Y,we,pe,de,X,ae,xe):H(D,Y,xe)},P=(D,Y,we,pe,de,X,ae)=>{const ke=D.component=nM(D,pe,de);if(id(D)&&(ke.ctx.renderer=ge),sM(ke,!1,ae),ke.asyncDep){if(de&&de.registerDep(ke,M,ae),!D.el){const xe=ke.subTree=Z(Uo);b(null,xe,Y,we),D.placeholder=xe.el}}else M(ke,D,Y,we,de,X,ae)},H=(D,Y,we)=>{const pe=Y.component=D.component;if(QB(D,Y,we))if(pe.asyncDep&&!pe.asyncResolved){B(pe,Y,we);return}else pe.next=Y,pe.update();else Y.el=D.el,pe.vnode=Y},M=(D,Y,we,pe,de,X,ae)=>{const ke=()=>{if(D.isMounted){let{next:se,bu:be,u:je,parent:ut,vnode:pt}=D;{const Je=KC(D);if(Je){se&&(se.el=pt.el,B(D,se,ae)),Je.asyncDep.then(()=>{Do(()=>{D.isUnmounted||ue()},de)});return}}let At=se,Tt;r1(D,!1),se?(se.el=pt.el,B(D,se,ae)):se=pt,be&&tc(be),(Tt=se.props&&se.props.onVnodeBeforeUpdate)&&hr(Tt,ut,se,pt),r1(D,!0);const Xt=o3(D),en=D.subTree;D.subTree=Xt,m(en,Xt,d(en.el),me(en),D,de,X),se.el=Xt.el,At===null&&v5(D,Xt.el),je&&Do(je,de),(Tt=se.props&&se.props.onVnodeUpdated)&&Do(()=>hr(Tt,ut,se,pt),de)}else{let se;const{el:be,props:je}=Y,{bm:ut,m:pt,parent:At,root:Tt,type:Xt}=D,en=Ei(Y);if(r1(D,!1),ut&&tc(ut),!en&&(se=je&&je.onVnodeBeforeMount)&&hr(se,At,Y),r1(D,!0),be&&oe){const Je=()=>{D.subTree=o3(D),oe(be,D.subTree,D,de,null)};en&&Xt.__asyncHydrate?Xt.__asyncHydrate(be,D,Je):Je()}else{Tt.ce&&Tt.ce._hasShadowRoot()&&Tt.ce._injectChildStyle(Xt,D.parent?D.parent.type:void 0);const Je=D.subTree=o3(D);m(null,Je,we,pe,D,de,X),Y.el=Je.el}if(pt&&Do(pt,de),!en&&(se=je&&je.onVnodeMounted)){const Je=Y;Do(()=>hr(se,At,Je),de)}(Y.shapeFlag&256||At&&Ei(At.vnode)&&At.vnode.shapeFlag&256)&&D.a&&Do(D.a,de),D.isMounted=!0,Y=we=pe=null}};D.scope.on();const xe=D.effect=new I3(ke);D.scope.off();const ue=D.update=xe.run.bind(xe),Se=D.job=xe.runIfDirty.bind(xe);Se.i=D,Se.id=D.uid,xe.scheduler=()=>q7(Se),r1(D,!0),ue()},B=(D,Y,we)=>{Y.component=D;const pe=D.vnode.props;D.vnode=Y,D.next=null,tj(D,Y.props,pe,we),rj(D,Y.children,we),Li(),Wv(D),$i()},R=(D,Y,we,pe,de,X,ae,ke,xe=!1)=>{const ue=D&&D.children,Se=D?D.shapeFlag:0,se=Y.children,{patchFlag:be,shapeFlag:je}=Y;if(be>0){if(be&128){le(ue,se,we,pe,de,X,ae,ke,xe);return}else if(be&256){W(ue,se,we,pe,de,X,ae,ke,xe);return}}je&8?(Se&16&&U(ue,de,X),se!==ue&&u(we,se)):Se&16?je&16?le(ue,se,we,pe,de,X,ae,ke,xe):U(ue,de,X,!0):(Se&8&&u(we,""),je&16&&I(se,we,pe,de,X,ae,ke,xe))},W=(D,Y,we,pe,de,X,ae,ke,xe)=>{D=D||Q0,Y=Y||Q0;const ue=D.length,Se=Y.length,se=Math.min(ue,Se);let be;for(be=0;beSe?U(D,de,X,!0,!1,se):I(Y,we,pe,de,X,ae,ke,xe,se)},le=(D,Y,we,pe,de,X,ae,ke,xe)=>{let ue=0;const Se=Y.length;let se=D.length-1,be=Se-1;for(;ue<=se&&ue<=be;){const je=D[ue],ut=Y[ue]=xe?yi(Y[ue]):yr(Y[ue]);if(bl(je,ut))m(je,ut,we,null,de,X,ae,ke,xe);else break;ue++}for(;ue<=se&&ue<=be;){const je=D[se],ut=Y[be]=xe?yi(Y[be]):yr(Y[be]);if(bl(je,ut))m(je,ut,we,null,de,X,ae,ke,xe);else break;se--,be--}if(ue>se){if(ue<=be){const je=be+1,ut=jebe)for(;ue<=se;)G(D[ue],de,X,!0),ue++;else{const je=ue,ut=ue,pt=new Map;for(ue=ut;ue<=be;ue++){const Ot=Y[ue]=xe?yi(Y[ue]):yr(Y[ue]);Ot.key!=null&&pt.set(Ot.key,ue)}let At,Tt=0;const Xt=be-ut+1;let en=!1,Je=0;const st=new Array(Xt);for(ue=0;ue=Xt){G(Ot,de,X,!0);continue}let Be;if(Ot.key!=null)Be=pt.get(Ot.key);else for(At=ut;At<=be;At++)if(st[At-ut]===0&&bl(Ot,Y[At])){Be=At;break}Be===void 0?G(Ot,de,X,!0):(st[Be-ut]=ue+1,Be>=Je?Je=Be:en=!0,m(Ot,Y[Be],we,null,de,X,ae,ke,xe),Tt++)}const at=en?aj(st):Q0;for(At=at.length-1,ue=Xt-1;ue>=0;ue--){const Ot=ut+ue,Be=Y[Ot],Qe=Y[Ot+1],lt=Ot+1{const{el:X,type:ae,transition:ke,children:xe,shapeFlag:ue}=D;if(ue&6){J(D.component.subTree,Y,we,pe);return}if(ue&128){D.suspense.move(Y,we,pe);return}if(ue&64){ae.move(D,Y,we,ge);return}if(ae===Le){o(X,Y,we);for(let se=0;seke.enter(X),de));else{const{leave:se,delayLeave:be,afterLeave:je}=ke,ut=()=>{D.ctx.isUnmounted?s(X):o(X,Y,we)},pt=()=>{const At=X._isLeaving||!!X[el];X._isLeaving&&X[el](!0),ke.persisted&&!At?ut():se(X,()=>{ut(),je&&je()})};be?be(X,ut,pt):pt()}else o(X,Y,we)},G=(D,Y,we,pe=!1,de=!1)=>{const{type:X,props:ae,ref:ke,children:xe,dynamicChildren:ue,shapeFlag:Se,patchFlag:se,dirs:be,cacheIndex:je,memo:ut}=D;if(se===-2&&(de=!1),ke!=null&&(Li(),oc(ke,null,we,D,!0),$i()),je!=null&&(Y.renderCache[je]=void 0),Se&256){Y.ctx.deactivate(D);return}const pt=Se&1&&be,At=!Ei(D);let Tt;if(At&&(Tt=ae&&ae.onVnodeBeforeUnmount)&&hr(Tt,Y,D),Se&6)te(D.component,we,pe);else{if(Se&128){D.suspense.unmount(we,pe);return}pt&&ql(D,null,Y,"beforeUnmount"),Se&64?D.type.remove(D,Y,we,ge,pe):ue&&!ue.hasOnce&&(X!==Le||se>0&&se&64)?U(ue,Y,we,!1,!0):(X===Le&&se&384||!de&&Se&16)&&U(xe,Y,we),pe&&K(D)}const Xt=ut!=null&&je==null;(At&&(Tt=ae&&ae.onVnodeUnmounted)||pt||Xt)&&Do(()=>{Tt&&hr(Tt,Y,D),pt&&ql(D,null,Y,"unmounted"),Xt&&(D.el=null)},we)},K=D=>{const{type:Y,el:we,anchor:pe,transition:de}=D;if(Y===Le){Q(we,pe);return}if(Y===rc){k(D);return}const X=()=>{s(we),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(D.shapeFlag&1&&de&&!de.persisted){const{leave:ae,delayLeave:ke}=de,xe=()=>ae(we,X);ke?ke(D.el,X,xe):xe()}else X()},Q=(D,Y)=>{let we;for(;D!==Y;)we=f(D),s(D),D=we;s(Y)},te=(D,Y,we)=>{const{bum:pe,scope:de,job:X,subTree:ae,um:ke,m:xe,a:ue}=D;F3(xe),F3(ue),pe&&tc(pe),de.stop(),X&&(X.flags|=8,G(ae,D,Y,we)),ke&&Do(ke,Y),Do(()=>{D.isUnmounted=!0},Y)},U=(D,Y,we,pe=!1,de=!1,X=0)=>{for(let ae=X;ae{if(D.shapeFlag&6)return me(D.component.subTree);if(D.shapeFlag&128)return D.suspense.next();const Y=f(D.anchor||D.el),we=Y&&Y[_C];return we?f(we):Y};let _e=!1;const Pe=(D,Y,we)=>{let pe;D==null?Y._vnode&&(G(Y._vnode,null,null,!0),pe=Y._vnode.component):m(Y._vnode||null,D,Y,null,null,null,we),Y._vnode=D,_e||(_e=!0,Wv(pe),B3(),_e=!1)},ge={p:m,um:G,m:J,r:K,mt:P,mc:I,pc:R,pbc:j,n:me,o:e};let ee,oe;return t&&([ee,oe]=t(ge)),{render:Pe,hydrate:ee,createApp:ZB(Pe,ee)}}function sp({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function r1({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ZC(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function tm(e,t,n=!1){const o=e.children,s=t.children;if(qt(o)&&qt(s))for(let r=0;r>1,e[n[i]]0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,l=n[r-1];r-- >0;)n[r]=l,l=t[l];return n}function KC(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:KC(t)}function F3(e){if(e)for(let t=0;te.__isSuspense;let n8=0;const cj={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,r,l,i,a,c){if(e==null)uj(t,n,o,s,r,l,i,a,c);else{if(r&&r.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}dj(e,t,n,o,s,l,i,a,c)}},hydrate:fj,normalize:pj},WRe=cj;function Lu(e,t){const n=e.props&&e.props[t];hn(n)&&n()}function uj(e,t,n,o,s,r,l,i,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=YC(e,s,o,t,d,n,r,l,i,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,r,l),f.deps>0?(Lu(e,"onPending"),Lu(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,r,l),sc(f,e.ssFallback)):f.resolve(!1,!0)}function dj(e,t,n,o,s,r,l,i,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:y,isHydrating:b}=d;if(m)d.pendingBranch=f,bl(m,f)?(a(m,f,d.hiddenContainer,null,s,d,r,l,i),d.deps<=0?d.resolve():y&&(b||(a(h,p,n,o,s,null,r,l,i),sc(d,p)))):(d.pendingId=n8++,b?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),y?(a(null,f,d.hiddenContainer,null,s,d,r,l,i),d.deps<=0?d.resolve():(a(h,p,n,o,s,null,r,l,i),sc(d,p))):h&&bl(h,f)?(a(h,f,n,o,s,d,r,l,i),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,r,l,i),d.deps<=0&&d.resolve()));else if(h&&bl(h,f))a(h,f,n,o,s,d,r,l,i),sc(d,f);else if(Lu(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=n8++,a(null,f,d.hiddenContainer,null,s,d,r,l,i),d.deps<=0)d.resolve();else{const{timeout:v,pendingId:w}=d;v>0?setTimeout(()=>{d.pendingId===w&&d.fallback(p)},v):v===0&&d.fallback(p)}}function YC(e,t,n,o,s,r,l,i,a,c,u=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:y}}=c;let b;const v=hj(e);v&&t&&t.pendingBranch&&(b=t.pendingId,t.deps++);const w=e.props?E3(e.props.timeout):void 0,k=r,S={vnode:e,parent:t,parentComponent:n,namespace:l,container:o,hiddenContainer:s,deps:0,pendingId:n8++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve($=!1,T=!1){const{vnode:I,activeBranch:L,pendingBranch:j,pendingId:O,effects:A,parentComponent:F,container:P,isInFallback:H}=S;let M=!1;if(S.isHydrating)S.isHydrating=!1;else if(!$){M=L&&j.transition&&j.transition.mode==="out-in";let W=!1;M&&(L.transition.afterLeave=()=>{O===S.pendingId&&(f(j,P,r===k&&!W?h(L):r,0),z3(A),H&&I.ssFallback&&(I.ssFallback.el=null))}),L&&!S.isFallbackMountPending&&(m(L.el)===P&&(r=h(L),W=!0),p(L,F,S,!0),!M&&H&&I.ssFallback&&Do(()=>I.ssFallback.el=null,S)),M||f(j,P,r,0)}S.isFallbackMountPending=!1,sc(S,j),S.pendingBranch=null,S.isInFallback=!1;let B=S.parent,R=!1;for(;B;){if(B.pendingBranch){B.effects.push(...A),R=!0;break}B=B.parent}!R&&!M&&z3(A),S.effects=[],v&&t&&t.pendingBranch&&b===t.pendingId&&(t.deps--,t.deps===0&&!T&&t.resolve()),Lu(I,"onResolve")},fallback($){if(!S.pendingBranch)return;const{vnode:T,activeBranch:I,parentComponent:L,container:j,namespace:O}=S;Lu(T,"onFallback");const A=h(I),F=()=>{S.isFallbackMountPending=!1,S.isInFallback&&(d(null,$,j,A,L,null,O,i,a),sc(S,$))},P=$.transition&&$.transition.mode==="out-in";P&&(S.isFallbackMountPending=!0,I.transition.afterLeave=F),S.isInFallback=!0,p(I,L,null,!0),P||F()},move($,T,I){S.activeBranch&&f(S.activeBranch,$,T,I),S.container=$},next(){return S.activeBranch&&h(S.activeBranch)},registerDep($,T,I){const L=!!S.pendingBranch;L&&S.deps++;const j=$.vnode.el;$.asyncDep.catch(O=>{Bc(O,$,0)}).then(O=>{if($.isUnmounted||S.isUnmounted||S.pendingId!==$.suspenseId)return;$u(),$.asyncResolved=!0;const{vnode:A}=$;o8($,O,!1),j&&(A.el=j);const F=!j&&$.subTree.el;T($,A,m(j||$.subTree.el),j?null:h($.subTree),S,l,I),F&&(A.placeholder=null,y(F)),v5($,A.el),L&&--S.deps===0&&S.resolve()})},unmount($,T){S.isUnmounted=!0,S.activeBranch&&p(S.activeBranch,n,$,T),S.pendingBranch&&p(S.pendingBranch,n,$,T)}};return S}function fj(e,t,n,o,s,r,l,i,a){const c=t.suspense=YC(t,o,n,e.parentNode,document.createElement("div"),null,s,r,l,i,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,r,l);return c.deps===0&&c.resolve(!1,!0),u}function pj(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=sw(o?n.default:n),e.ssFallback=o?sw(n.fallback):Z(Uo)}function sw(e){let t;if(hn(e)){const n=H1&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=Ps,JC())}return qt(e)&&(e=YB(e)),e=yr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function XC(e,t){t&&t.pendingBranch?qt(e)?t.effects.push(...e):t.effects.push(e):z3(e)}function sc(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,v5(o,s))}function hj(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Le=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Uo=Symbol.for("v-cmt"),rc=Symbol.for("v-stc"),ou=[];let Ps=null;function g(e=!1){ou.push(Ps=e?null:[])}function JC(){ou.pop(),Ps=ou[ou.length-1]||null}let H1=1;function H3(e,t=!1){H1+=e,e<0&&Ps&&t&&(Ps.hasOnce=!0)}function QC(e){return e.dynamicChildren=H1>0?Ps||Q0:null,JC(),H1>0&&Ps&&Ps.push(e),e}function C(e,t,n,o,s,r){return QC(x(e,t,n,o,s,r,!0))}function fe(e,t,n,o,s){return QC(Z(e,t,n,o,s,!0))}function Ea(e){return e?e.__v_isVNode===!0:!1}function bl(e,t){return e.type===t.type&&e.key===t.key}function qRe(e){}const eM=({key:e})=>e??null,s3=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?io(e)||jo(e)||hn(e)?{i:Ts,r:e,k:t,f:!!n}:e:null);function x(e,t=null,n=null,o=0,s=null,r=e===Le?0:1,l=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&eM(t),ref:t&&s3(t),scopeId:h5,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ts};return i?(nm(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=io(n)?8:16),H1>0&&!l&&Ps&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&Ps.push(a),a}const Z=mj;function mj(e,t=null,n=null,o=0,s=null,r=!1){if((!e||e===LC)&&(e=Uo),Ea(e)){const i=zi(e,t,!0);return n&&nm(i,n),H1>0&&!r&&Ps&&(i.shapeFlag&6?Ps[Ps.indexOf(e)]=i:Ps.push(i)),i.patchFlag=-2,i}if(kj(e)&&(e=e.__vccOpts),t){t=tM(t);let{class:i,style:a}=t;i&&!io(i)&&(t.class=He(i)),qn(a)&&(p5(a)&&!qt(a)&&(a=no({},a)),t.style=Pt(a))}const l=io(e)?1:R3(e)?128:xC(e)?64:qn(e)?4:hn(e)?2:0;return x(e,t,n,o,s,l,r,!0)}function tM(e){return e?p5(e)||HC(e)?no({},e):e:null}function zi(e,t,n=!1,o=!1){const{props:s,ref:r,patchFlag:l,children:i,transition:a}=e,c=t?Fn(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&eM(c),ref:t&&t.ref?n&&r?qt(r)?r.concat(s3(t)):[r,s3(t)]:s3(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&zi(e.ssContent),ssFallback:e.ssFallback&&zi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ta(u,a.clone(u)),u}function Ye(e=" ",t=0){return Z(_a,null,e,t)}function su(e,t){const n=Z(rc,null,e);return n.staticCount=t,n}function ne(e="",t=!1){return t?(g(),fe(Uo,null,e)):Z(Uo,null,e)}function yr(e){return e==null||typeof e=="boolean"?Z(Uo):qt(e)?Z(Le,null,e.slice()):Ea(e)?yi(e):Z(_a,null,String(e))}function yi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:zi(e)}function nm(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(qt(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),nm(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!HC(t)?t._ctx=Ts:s===3&&Ts&&(Ts.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else hn(t)?(t={default:t,_ctx:Ts},n=32):(t=String(t),o&64?(n=16,t=[Ye(t)]):n=8);e.children=t,e.shapeFlag|=n}function Fn(...e){const t={};for(let n=0;nMs||Ts;let P3,lc;{const e=i5(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),r=>{s.length>1?s.forEach(l=>l(r)):s[0](r)}};P3=t("__VUE_INSTANCE_SETTERS__",n=>Ms=n),lc=t("__VUE_SSR_SETTERS__",n=>P1=n)}const jc=e=>{const t=Ms;return P3(e),e.scope.on(),()=>{e.scope.off(),P3(t)}},$u=()=>{Ms&&Ms.scope.off(),P3(null)};function oM(e){return e.vnode.shapeFlag&4}let P1=!1;function sM(e,t=!1,n=!1){t&&lc(t);const{props:o,children:s}=e.vnode,r=oM(e);ej(e,o,r,t),sj(e,s,n||t);const l=r?wj(e,t):void 0;return t&&lc(!1),l}function wj(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Jh);const{setup:o}=n;if(o){Li();const s=e.setupContext=o.length>1?lM(e):null,r=jc(e),l=rd(o,e,0,[e.props,s]),i=H7(l);if($i(),r(),(i||e.sp)&&!Ei(e)&&Z7(e),i){if(l.then($u,$u),t)return l.then(a=>{o8(e,a,t)}).catch(a=>{Bc(a,e,0)});e.asyncDep=l}else o8(e,l,t)}else rM(e,t)}function o8(e,t,n){hn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:qn(t)&&(e.setupState=pC(t)),rM(e,n)}let D3,s8;function URe(e){D3=e,s8=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,HB))}}const ZRe=()=>!D3;function rM(e,t,n){const o=e.type;if(!e.render){if(!t&&D3&&!o.render){const s=o.template||J7(e).template;if(s){const{isCustomElement:r,compilerOptions:l}=e.appContext.config,{delimiters:i,compilerOptions:a}=o,c=no(no({isCustomElement:r,delimiters:i},l),a);o.render=D3(s,c)}}e.render=o.render||il,s8&&s8(e)}{const s=jc(e);Li();try{PB(e)}finally{$i(),s()}}}const yj={get(e,t){return Rs(e,"get",""),e[t]}};function lM(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,yj),slots:e.slots,emit:e.emit,expose:t}}function cd(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(pC(Et(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in nu)return nu[n](e)},has(t,n){return n in t||n in nu}})):e.proxy}function r8(e,t=!0){return hn(e)?e.displayName||e.name:e.name||t&&e.__name}function kj(e){return hn(e)&&"__vccOpts"in e}const z=(e,t)=>sB(e,t,P1);function cn(e,t,n){try{H3(-1);const o=arguments.length;return o===2?qn(t)&&!qt(t)?Ea(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Ea(n)&&(n=[n]),Z(e,t,n))}finally{H3(1)}}function KRe(){}function GRe(e,t,n,o){const s=n[o];if(s&&bj(s,e))return s;const r=t();return r.memo=e.slice(),r.cacheIndex=o,n[o]=r}function bj(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&Ps&&Ps.push(e),!0}const _j="3.5.35",YRe=il,XRe=cB,JRe=B0,QRe=yC,xj={createComponentInstance:nM,setupComponent:sM,renderComponentRoot:o3,setCurrentRenderingInstance:Au,isVNode:Ea,normalizeVNode:yr,getComponentPublicInstance:cd,ensureValidVNode:X7,pushWarningContext:iB,popWarningContext:aB},eHe=xj,tHe=null,nHe=null,oHe=null;/** +* @vue/runtime-dom v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let l8;const rw=typeof window<"u"&&window.trustedTypes;if(rw)try{l8=rw.createPolicy("vue",{createHTML:e=>e})}catch{}const iM=l8?e=>l8.createHTML(e):e=>e,Sj="http://www.w3.org/2000/svg",Cj="http://www.w3.org/1998/Math/MathML",hi=typeof document<"u"?document:null,lw=hi&&hi.createElement("template"),Mj={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?hi.createElementNS(Sj,e):t==="mathml"?hi.createElementNS(Cj,e):n?hi.createElement(e,{is:n}):hi.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>hi.createTextNode(e),createComment:e=>hi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,r){const l=n?n.previousSibling:t.lastChild;if(s&&(s===r||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{lw.innerHTML=iM(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const i=lw.content;if(o==="svg"||o==="mathml"){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Xi="transition",g2="animation",yc=Symbol("_vtc"),aM={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},cM=no({},CC,aM),Aj=e=>(e.displayName="Transition",e.props=cM,e),Cl=Aj((e,{slots:t})=>cn(kB,uM(e),t)),l1=(e,t=[])=>{qt(e)?e.forEach(n=>n(...t)):e&&e(...t)},iw=e=>e?qt(e)?e.some(t=>t.length>1):e.length>1:!1;function uM(e){const t={};for(const A in e)A in aM||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:c=l,appearToClass:u=i,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=Tj(s),m=h&&h[0],y=h&&h[1],{onBeforeEnter:b,onEnter:v,onEnterCancelled:w,onLeave:k,onLeaveCancelled:S,onBeforeAppear:$=b,onAppear:T=v,onAppearCancelled:I=w}=t,L=(A,F,P,H)=>{A._enterCancelled=H,ia(A,F?u:i),ia(A,F?c:l),P&&P()},j=(A,F)=>{A._isLeaving=!1,ia(A,d),ia(A,p),ia(A,f),F&&F()},O=A=>(F,P)=>{const H=A?T:v,M=()=>L(F,A,P);l1(H,[F,M]),aw(()=>{ia(F,A?a:r),Vl(F,A?u:i),iw(H)||cw(F,o,m,M)})};return no(t,{onBeforeEnter(A){l1(b,[A]),Vl(A,r),Vl(A,l)},onBeforeAppear(A){l1($,[A]),Vl(A,a),Vl(A,c)},onEnter:O(!1),onAppear:O(!0),onLeave(A,F){A._isLeaving=!0;const P=()=>j(A,F);Vl(A,d),A._enterCancelled?(Vl(A,f),i8(A)):(i8(A),Vl(A,f)),aw(()=>{A._isLeaving&&(ia(A,d),Vl(A,p),iw(k)||cw(A,o,y,P))}),l1(k,[A,P])},onEnterCancelled(A){L(A,!1,void 0,!0),l1(w,[A])},onAppearCancelled(A){L(A,!0,void 0,!0),l1(I,[A])},onLeaveCancelled(A){j(A),l1(S,[A])}})}function Tj(e){if(e==null)return null;if(qn(e))return[rp(e.enter),rp(e.leave)];{const t=rp(e);return[t,t]}}function rp(e){return E3(e)}function Vl(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[yc]||(e[yc]=new Set)).add(t)}function ia(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[yc];n&&(n.delete(t),n.size||(e[yc]=void 0))}function aw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ej=0;function cw(e,t,n,o){const s=e._endId=++Ej,r=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:l,timeout:i,propCount:a}=dM(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),r()},f=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[h]||"").split(", "),s=o(`${Xi}Delay`),r=o(`${Xi}Duration`),l=uw(s,r),i=o(`${g2}Delay`),a=o(`${g2}Duration`),c=uw(i,a);let u=null,d=0,f=0;t===Xi?l>0&&(u=Xi,d=l,f=r.length):t===g2?c>0&&(u=g2,d=c,f=a.length):(d=Math.max(l,c),u=d>0?l>c?Xi:g2:null,f=u?u===Xi?r.length:a.length:0);const p=u===Xi&&/\b(?:transform|all)(?:,|$)/.test(o(`${Xi}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function uw(e,t){for(;e.lengthdw(n)+dw(e[o])))}function dw(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function i8(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ij(e,t,n){const o=e[yc];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const V3=Symbol("_vod"),fM=Symbol("_vsh"),wr={name:"show",beforeMount(e,{value:t},{transition:n}){e[V3]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):v2(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),v2(e,!0),o.enter(e)):o.leave(e,()=>{v2(e,!1)}):v2(e,t))},beforeUnmount(e,{value:t}){v2(e,t)}};function v2(e,t){e.style.display=t?e[V3]:"none",e[fM]=!t}function Lj(){wr.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const pM=Symbol("");function sHe(e){const t=Xo();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(r=>W3(r,s))},o=()=>{const s=e(t.proxy);t.ce?W3(t.ce,s):a8(t.subTree,s),n(s)};IC(()=>{z3(o)}),Sn(()=>{Xe(o,il,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),An(()=>s.disconnect())})}function a8(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{a8(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)W3(e.el,t);else if(e.type===Le)e.children.forEach(n=>a8(n,t));else if(e.type===rc){let{el:n,anchor:o}=e;for(;n&&(W3(n,t),n!==o);)n=n.nextSibling}}function W3(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const r=Ez(t[s]);n.setProperty(`--${s}`,r),o+=`--${s}: ${r};`}n[pM]=o}}const $j=/(?:^|;)\s*display\s*:/;function Nj(e,t,n){const o=e.style,s=io(n);let r=!1;if(n&&!s){if(t)if(io(t))for(const l of t.split(";")){const i=l.slice(0,l.indexOf(":")).trim();n[i]==null&&R2(o,i,"")}else for(const l in t)n[l]==null&&R2(o,l,"");for(const l in n){l==="display"&&(r=!0);const i=n[l];i!=null?Bj(e,l,!io(t)&&t?t[l]:void 0,i)||R2(o,l,i):R2(o,l,"")}}else if(s){if(t!==n){const l=o[pM];l&&(n+=";"+l),o.cssText=n,r=$j.test(n)}}else t&&e.removeAttribute("style");V3 in e&&(e[V3]=r?o.display:"",e[fM]&&(o.display="none"))}const fw=/\s*!important$/;function R2(e,t,n){if(qt(n))n.forEach(o=>R2(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=zj(e,t);fw.test(n)?e.setProperty(kr(o),n.replace(fw,""),"important"):e[o]=n}}const pw=["Webkit","Moz","ms"],lp={};function zj(e,t){const n=lp[t];if(n)return n;let o=rs(t);if(o!=="filter"&&o in e)return lp[t]=o;o=r5(o);for(let s=0;sip||(Rj.then(()=>ip=0),ip=Date.now());function Pj(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(qt(s)){const r=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{r.call(o),o._stopped=!0};const l=s.slice(),i=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dj=(e,t,n,o,s,r)=>{const l=s==="svg";t==="class"?Ij(e,o,l):t==="style"?Nj(e,n,o):sd(t)?t5(t)||Oj(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vj(e,t,o,l))?(gw(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&mw(e,t,o,l,r,t!=="value")):e._isVueCE&&(Wj(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!io(o)))?gw(e,rs(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),mw(e,t,o,l))};function Vj(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&yw(t)&&hn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return yw(t)&&io(n)?!1:t in e}function Wj(e,t){const n=e._def.props;if(!n)return!1;const o=rs(t);return Array.isArray(n)?n.some(s=>rs(s)===o):Object.keys(n).some(s=>rs(s)===o)}const kw={};function qj(e,t,n){let o=Ze(e,t);n5(o)&&(o=no({},o,t));class s extends om{constructor(l){super(o,l,n)}}return s.def=o,s}const rHe=((e,t)=>qj(e,t,aO)),Uj=typeof HTMLElement<"u"?HTMLElement:class{};class om extends Uj{constructor(t,n={},o=Z3){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==Z3?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(no({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof om){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,_t(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:l}=o;let i;if(r&&!qt(r))for(const a in r){const c=r[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=E3(this._props[a])),(i||(i=Object.create(null)))[rs(a)]=!0)}this._numberProps=i,this._resolveProps(o),this.shadowRoot&&this._applyStyles(l),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)Wn(this,o)||Object.defineProperty(this,o,{get:()=>_(n[o])})}_resolveProps(t){const{props:n}=t,o=qt(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(rs))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(r){this._setProp(s,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):kw;const s=rs(t);n&&this._numberProps&&this._numberProps[s]&&(o=E3(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===kw?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(kr(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(kr(t),n+""):n||this.removeAttribute(kr(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),iO(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Z(this._def,no(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(r,l)=>{this.dispatchEvent(new CustomEvent(r,n5(l[0])?no({detail:l},l[0]):{detail:l}))};o.emit=(r,...l)=>{s(r,l),kr(r)!==r&&s(kr(r),l)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,r=this.shadowRoot,l=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(r);let i=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");s&&c.setAttribute("nonce",s),c.textContent=t[a],r.insertBefore(c,i||l),i=c,a===0&&(o||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),Gj=Kj({name:"TransitionGroup",props:no({},cM,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Xo(),o=SC();let s,r;return K7(()=>{if(!s.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!eO(s[0].el,n.vnode.el,l)){s=[];return}s.forEach(Xj),s.forEach(Jj);const i=s.filter(Qj);i8(n.vnode.el),i.forEach(a=>{const c=a.el,u=c.style;Vl(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[q3]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[q3]=null,ia(c,l))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const l=Bn(e),i=uM(l);let a=l.tag||Le;if(s=[],r)for(let c=0;c{i.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(i=>i&&o.classList.add(i)),o.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(o);const{hasTransform:l}=dM(o);return r.removeChild(o),l}const Ia=e=>{const t=e.props["onUpdate:modelValue"]||!1;return qt(t)?n=>tc(t,n):t};function tO(e){e.target.composing=!0}function _w(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const al=Symbol("_assign");function xw(e,t,n){return t&&(e=e.trim()),n&&(e=l5(e)),e}const ms={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[al]=Ia(s);const r=o||s.props&&s.props.type==="number";xi(e,t?"change":"input",l=>{l.target.composing||e[al](xw(e.value,n,r))}),(n||r)&&xi(e,"change",()=>{e.value=xw(e.value,n,r)}),t||(xi(e,"compositionstart",tO),xi(e,"compositionend",_w),xi(e,"change",_w))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:r}},l){if(e[al]=Ia(l),e.composing)return;const i=(r||e.type==="number")&&!/^0\d/.test(e.value)?l5(e.value):e.value,a=t??"";if(i===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},U3={deep:!0,created(e,t,n){e[al]=Ia(n),xi(e,"change",()=>{const o=e._modelValue,s=kc(e),r=e.checked,l=e[al];if(qt(o)){const i=a5(o,s),a=i!==-1;if(r&&!a)l(o.concat(s));else if(!r&&a){const c=[...o];c.splice(i,1),l(c)}}else if(X1(o)){const i=new Set(o);r?i.add(s):i.delete(s),l(i)}else l(wM(e,r))})},mounted:Sw,beforeUpdate(e,t,n){e[al]=Ia(n),Sw(e,t,n)}};function Sw(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(qt(t))s=a5(t,o.props.value)>-1;else if(X1(t))s=t.has(o.props.value);else{if(t===n)return;s=Ii(t,wM(e,!0))}e.checked!==s&&(e.checked=s)}const vM={created(e,{value:t},n){e.checked=Ii(t,n.props.value),e[al]=Ia(n),xi(e,"change",()=>{e[al](kc(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[al]=Ia(o),t!==n&&(e.checked=Ii(t,o.props.value))}},c8={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=X1(t);xi(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?l5(kc(l)):kc(l));e[al](e.multiple?s?new Set(r):r:r[0]),e._assigning=!0,_t(()=>{e._assigning=!1})}),e[al]=Ia(o)},mounted(e,{value:t}){Cw(e,t)},beforeUpdate(e,t,n){e[al]=Ia(n)},updated(e,{value:t}){e._assigning||Cw(e,t)}};function Cw(e,t){const n=e.multiple,o=qt(t);if(!(n&&!o&&!X1(t))){for(let s=0,r=e.options.length;sString(c)===String(i)):l.selected=a5(t,i)>-1}else l.selected=t.has(i);else if(Ii(kc(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function kc(e){return"_value"in e?e._value:e.value}function wM(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const nO={created(e,t,n){uf(e,t,n,null,"created")},mounted(e,t,n){uf(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){uf(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){uf(e,t,n,o,"updated")}};function yM(e,t){switch(e){case"SELECT":return c8;case"TEXTAREA":return ms;default:switch(t){case"checkbox":return U3;case"radio":return vM;default:return ms}}}function uf(e,t,n,o,s){const l=yM(e.tagName,n.props&&n.props.type)[s];l&&l(e,t,n,o)}function oO(){ms.getSSRProps=({value:e})=>({value:e}),vM.getSSRProps=({value:e},t)=>{if(t.props&&Ii(t.props.value,e))return{checked:!0}},U3.getSSRProps=({value:e},t)=>{if(qt(e)){if(t.props&&a5(e,t.props.value)>-1)return{checked:!0}}else if(X1(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},nO.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=yM(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const sO=["ctrl","shift","alt","meta"],rO={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>sO.some(n=>e[`${n}Key`]&&!t.includes(n))},Ct=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...r)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const r=kr(s.key);if(t.some(l=>l===r||lO[l]===r))return e(s)}))},kM=no({patchProp:Dj},Mj);let ru,Mw=!1;function bM(){return ru||(ru=lj(kM))}function _M(){return ru=Mw?ru:ij(kM),Mw=!0,ru}const iO=((...e)=>{bM().render(...e)}),aHe=((...e)=>{_M().hydrate(...e)}),Z3=((...e)=>{const t=bM().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=SM(o);if(!s)return;const r=t._component;!hn(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const l=n(s,!1,xM(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t}),aO=((...e)=>{const t=_M().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=SM(o);if(s)return n(s,!0,xM(s))},t});function xM(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function SM(e){return io(e)?document.querySelector(e):e}let Aw=!1;const cHe=()=>{Aw||(Aw=!0,oO(),Lj())};/*! + * shared v11.4.8 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */const K3=typeof window<"u",Fa=(e,t=!1)=>t?Symbol.for(e):Symbol(e),cO=(e,t,n)=>uO({l:e,k:t,s:n}),uO=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Zo=e=>typeof e=="number"&&isFinite(e),CM=e=>rm(e)==="[object Date]",bc=e=>rm(e)==="[object RegExp]",sm=e=>eo(e)&&Object.keys(e).length===0,Go=Object.assign,dO=Object.create,lo=(e=null)=>dO(e);let Tw;const C1=()=>Tw||(Tw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:lo()),fO=Object.prototype.hasOwnProperty;function sl(e,t){return fO.call(e,t)}const Io=Array.isArray,wo=e=>typeof e=="function",Rt=e=>typeof e=="string",Pn=e=>typeof e=="boolean",Dn=e=>e!==null&&typeof e=="object",pO=e=>Dn(e)&&wo(e.then)&&wo(e.catch),MM=Object.prototype.toString,rm=e=>MM.call(e),eo=e=>rm(e)==="[object Object]",hO=e=>e==null?"":Io(e)||eo(e)&&e.toString===MM?JSON.stringify(e,null,2):String(e);function lm(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}function mO(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function Ew(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function gO(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const vO=/^javascript:/i,wO=/^(?:href|src|action|formaction)$/i,yO=/&#(?:x([0-9a-f]+)|(\d+));?/gi,kO=/&(?:Tab|NewLine);/g,bO=/:?/gi,_O=/[\u0000-\u0020\u007f-\u009f]/g,xO=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,SO=/(^|[\s"'<>/])on(\w+\s*=)/gi,CO=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function MO(e,t,n){const o=t||n;if(!o)return e;const s=Number.parseInt(o,t?16:10);return s<=127?String.fromCharCode(s):e}function im(e){const t=e.replace(yO,MO).replace(kO,"").replace(bO,":").replace(_O,"");return vO.test(t)}function AO(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const r=s.index,l=t.lastIndex-1;let i=l+1,a=1,c=null;for(;i`${n}="${Iw(n,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,o)=>`${n}='${Iw(n,o)}'`),xO.test(e)&&(e=e.replace(SO,"$1on$2")),e=e.replace(CO,(t,n,o,s)=>im(s)?`${n}${o}about:blank`:t),e}const df=e=>!Dn(e)||Io(e);function r3(e,t){if(df(e)||df(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(r=>{r!=="__proto__"&&(Dn(o[r])&&!Dn(s[r])&&(s[r]=Array.isArray(o[r])?[]:lo()),df(s[r])||df(o[r])?s[r]=o[r]:n.push({src:o[r],des:s[r]}))})}}/*! + * message-compiler v11.4.8 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function EO(e,t,n){return{line:e,column:t,offset:n}}function u8(e,t,n){return{start:e,end:t}}const Kn={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},IO=17;function w5(e,t,n={}){const{domain:o,messages:s,args:r}=n,l=e,i=new SyntaxError(String(l));return i.code=e,t&&(i.location=t),i.domain=o,i}function LO(e){throw e}const Fl=" ",$O="\r",Os=` +`,NO="\u2028",zO="\u2029";function BO(e){const t=e;let n=0,o=1,s=1,r=0;const l=T=>t[T]===$O&&t[T+1]===Os,i=T=>t[T]===Os,a=T=>t[T]===zO,c=T=>t[T]===NO,u=T=>l(T)||i(T)||a(T)||c(T),d=()=>n,f=()=>o,p=()=>s,h=()=>r,m=T=>l(T)||a(T)||c(T)?Os:t[T],y=()=>m(n),b=()=>m(n+r);function v(){return r=0,u(n)&&(o++,s=0),l(n)&&n++,n++,s++,t[n]}function w(){return l(n+r)&&r++,r++,t[n+r]}function k(){n=0,o=1,s=1,r=0}function S(T=0){r=T}function $(){const T=n+r;for(;T!==n;)v();r=0}return{index:d,line:f,column:p,peekOffset:h,charAt:m,currentChar:y,currentPeek:b,next:v,peek:w,reset:k,resetPeek:S,skipToPeek:$}}const ui=void 0,jO=".",Lw="'",OO="tokenizer";function FO(e,t={}){const n=t.location!==!1,o=BO(e),s=()=>o.index(),r=()=>EO(o.line(),o.column(),o.index()),l=r(),i=s(),a={currentType:13,offset:i,startLoc:l,endLoc:l,lastType:13,lastOffset:i,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=t;function d(X,ae,ke,...xe){const ue=c();if(ae.column+=ke,ae.offset+=ke,u){const Se=n?u8(ue.startLoc,ae):null,se=w5(X,Se,{domain:OO,args:xe});u(se)}}function f(X,ae,ke){X.endLoc=r(),X.currentType=ae;const xe={type:ae};return n&&(xe.loc=u8(X.startLoc,X.endLoc)),ke!=null&&(xe.value=ke),xe}const p=X=>f(X,13);function h(X,ae){return X.currentChar()===ae?(X.next(),ae):(d(Kn.EXPECTED_TOKEN,r(),0,ae),"")}function m(X){let ae="";for(;X.currentPeek()===Fl||X.currentPeek()===Os;)ae+=X.currentPeek(),X.peek();return ae}function y(X){const ae=m(X);return X.skipToPeek(),ae}function b(X){if(X===ui)return!1;const ae=X.charCodeAt(0);return ae>=97&&ae<=122||ae>=65&&ae<=90||ae===95}function v(X){if(X===ui)return!1;const ae=X.charCodeAt(0);return ae>=48&&ae<=57}function w(X,ae){const{currentType:ke}=ae;if(ke!==2)return!1;m(X);const xe=b(X.currentPeek());return X.resetPeek(),xe}function k(X,ae){const{currentType:ke}=ae;if(ke!==2)return!1;m(X);const xe=X.currentPeek()==="-"?X.peek():X.currentPeek(),ue=v(xe);return X.resetPeek(),ue}function S(X,ae){const{currentType:ke}=ae;if(ke!==2)return!1;m(X);const xe=X.currentPeek()===Lw;return X.resetPeek(),xe}function $(X,ae){const{currentType:ke}=ae;if(ke!==7)return!1;m(X);const xe=X.currentPeek()===".";return X.resetPeek(),xe}function T(X,ae){const{currentType:ke}=ae;if(ke!==8)return!1;m(X);const xe=b(X.currentPeek());return X.resetPeek(),xe}function I(X,ae){const{currentType:ke}=ae;if(!(ke===7||ke===11))return!1;m(X);const xe=X.currentPeek()===":";return X.resetPeek(),xe}function L(X,ae){const{currentType:ke}=ae;if(ke!==9)return!1;const xe=()=>{const Se=X.currentPeek();return Se==="{"?b(X.peek()):Se==="@"||Se==="|"||Se===":"||Se==="."||Se===Fl||!Se?!1:Se===Os?(X.peek(),xe()):O(X,!1)},ue=xe();return X.resetPeek(),ue}function j(X){m(X);const ae=X.currentPeek()==="|";return X.resetPeek(),ae}function O(X,ae=!0){const ke=(ue=!1,Se="")=>{const se=X.currentPeek();return se==="{"||se==="@"||!se?ue:se==="|"?!(Se===Fl||Se===Os):se===Fl?(X.peek(),ke(!0,Fl)):se===Os?(X.peek(),ke(!0,Os)):!0},xe=ke();return ae&&X.resetPeek(),xe}function A(X,ae){const ke=X.currentChar();return ke===ui?ui:ae(ke)?(X.next(),ke):null}function F(X){const ae=X.charCodeAt(0);return ae>=97&&ae<=122||ae>=65&&ae<=90||ae>=48&&ae<=57||ae===95||ae===36}function P(X){return A(X,F)}function H(X){const ae=X.charCodeAt(0);return ae>=97&&ae<=122||ae>=65&&ae<=90||ae>=48&&ae<=57||ae===95||ae===36||ae===45}function M(X){return A(X,H)}function B(X){const ae=X.charCodeAt(0);return ae>=48&&ae<=57}function R(X){return A(X,B)}function W(X){const ae=X.charCodeAt(0);return ae>=48&&ae<=57||ae>=65&&ae<=70||ae>=97&&ae<=102}function le(X){return A(X,W)}function J(X){let ae="",ke="";for(;ae=R(X);)ke+=ae;return ke}function G(X){let ae="";for(;;){const ke=X.currentChar();if(ke==="\\"){const xe=X.peek();xe==="{"||xe==="}"||xe==="@"||xe==="|"||xe==="\\"?(ae+=ke+xe,X.next(),X.next()):(X.resetPeek(),ae+=ke,X.next())}else{if(ke==="{"||ke==="}"||ke==="@"||ke==="|"||!ke)break;if(ke===Fl||ke===Os)if(O(X))ae+=ke,X.next();else{if(j(X))break;ae+=ke,X.next()}else ae+=ke,X.next()}}return ae}function K(X){y(X);let ae="",ke="";for(;ae=M(X);)ke+=ae;const xe=X.currentChar();if(xe&&xe!=="}"&&xe!==ui&&xe!==Fl&&xe!==Os&&xe!==" "){const ue=ge(X);return d(Kn.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,ke+ue),ke+ue}return X.currentChar()===ui&&d(Kn.UNTERMINATED_CLOSING_BRACE,r(),0),ke}function Q(X){y(X);let ae="";return X.currentChar()==="-"?(X.next(),ae+=`-${J(X)}`):ae+=J(X),X.currentChar()===ui&&d(Kn.UNTERMINATED_CLOSING_BRACE,r(),0),ae}function te(X){return X!==Lw&&X!==Os}function U(X){y(X),h(X,"'");let ae="",ke="";for(;ae=A(X,te);)ae==="\\"?ke+=me(X):ke+=ae;const xe=X.currentChar();return xe===Os||xe===ui?(d(Kn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),xe===Os&&(X.next(),h(X,"'")),ke):(h(X,"'"),ke)}function me(X){const ae=X.currentChar();switch(ae){case"\\":case"'":return X.next(),`\\${ae}`;case"u":return _e(X,ae,4);case"U":return _e(X,ae,6);default:return d(Kn.UNKNOWN_ESCAPE_SEQUENCE,r(),0,ae),""}}function _e(X,ae,ke){h(X,ae);let xe="";for(let ue=0;ue{const xe=X.currentChar();return xe==="{"||xe==="@"||xe==="|"||xe==="("||xe===")"||!xe||xe===Fl?ke:(ke+=xe,X.next(),ae(ke))};return ae("")}function D(X){y(X);const ae=h(X,"|");return y(X),ae}function Y(X,ae){let ke=null;switch(X.currentChar()){case"{":return ae.braceNest>=1&&d(Kn.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),X.next(),ke=f(ae,2,"{"),y(X),ae.braceNest++,ke;case"}":return ae.braceNest>0&&ae.currentType===2&&d(Kn.EMPTY_PLACEHOLDER,r(),0),X.next(),ke=f(ae,3,"}"),ae.braceNest--,ae.braceNest>0&&y(X),ae.inLinked&&ae.braceNest===0&&(ae.inLinked=!1),ke;case"@":return ae.braceNest>0&&d(Kn.UNTERMINATED_CLOSING_BRACE,r(),0),ke=we(X,ae)||p(ae),ae.braceNest=0,ke;default:{let ue=!0,Se=!0,se=!0;if(j(X))return ae.braceNest>0&&d(Kn.UNTERMINATED_CLOSING_BRACE,r(),0),ke=f(ae,1,D(X)),ae.braceNest=0,ae.inLinked=!1,ke;if(ae.braceNest>0&&(ae.currentType===4||ae.currentType===5||ae.currentType===6))return d(Kn.UNTERMINATED_CLOSING_BRACE,r(),0),ae.braceNest=0,pe(X,ae);if(ue=w(X,ae))return ke=f(ae,4,K(X)),y(X),ke;if(Se=k(X,ae))return ke=f(ae,5,Q(X)),y(X),ke;if(se=S(X,ae))return ke=f(ae,6,U(X)),y(X),ke;if(!ue&&!Se&&!se)return ke=f(ae,12,ge(X)),d(Kn.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,ke.value),y(X),ke;break}}return ke}function we(X,ae){const{currentType:ke}=ae;let xe=null;const ue=X.currentChar();switch((ke===7||ke===8||ke===11||ke===9)&&(ue===Os||ue===Fl)&&d(Kn.INVALID_LINKED_FORMAT,r(),0),ue){case"@":return X.next(),xe=f(ae,7,"@"),ae.inLinked=!0,xe;case".":return y(X),X.next(),f(ae,8,".");case":":return y(X),X.next(),f(ae,9,":");default:return j(X)?(xe=f(ae,1,D(X)),ae.braceNest=0,ae.inLinked=!1,xe):$(X,ae)||I(X,ae)?(y(X),we(X,ae)):T(X,ae)?(y(X),f(ae,11,ee(X))):L(X,ae)?(y(X),ue==="{"?Y(X,ae)||xe:f(ae,10,oe(X))):(ke===7&&d(Kn.INVALID_LINKED_FORMAT,r(),0),ae.braceNest=0,ae.inLinked=!1,pe(X,ae))}}function pe(X,ae){let ke={type:13};if(ae.braceNest>0)return Y(X,ae)||p(ae);if(ae.inLinked)return we(X,ae)||p(ae);switch(X.currentChar()){case"{":return Y(X,ae)||p(ae);case"}":return d(Kn.UNBALANCED_CLOSING_BRACE,r(),0),X.next(),f(ae,3,"}");case"@":return we(X,ae)||p(ae);default:{if(j(X))return ke=f(ae,1,D(X)),ae.braceNest=0,ae.inLinked=!1,ke;if(O(X))return f(ae,0,G(X));break}}return ke}function de(){const{currentType:X,offset:ae,startLoc:ke,endLoc:xe}=a;return a.lastType=X,a.lastOffset=ae,a.lastStartLoc=ke,a.lastEndLoc=xe,a.offset=s(),a.startLoc=r(),o.currentChar()===ui?f(a,13):pe(o,a)}return{nextToken:de,currentOffset:s,currentPosition:r,context:c}}const RO="parser",HO=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,PO=/\\([\\@{}|])/g;function DO(e,t){return t}function VO(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function WO(e={}){const t=e.location!==!1,{onError:n}=e;function o(b,v,w,k,...S){const $=b.currentPosition();if($.offset+=k,$.column+=k,n){const T=t?u8(w,$):null,I=w5(v,T,{domain:RO,args:S});n(I)}}function s(b,v,w){const k={type:b};return t&&(k.start=v,k.end=v,k.loc={start:w,end:w}),k}function r(b,v,w,k){t&&(b.end=v,b.loc&&(b.loc.end=w))}function l(b,v){const w=b.context(),k=s(3,w.offset,w.startLoc);return k.value=v.replace(PO,DO),r(k,b.currentOffset(),b.currentPosition()),k}function i(b,v){const w=b.context(),{lastOffset:k,lastStartLoc:S}=w,$=s(5,k,S);return $.index=parseInt(v,10),b.nextToken(),r($,b.currentOffset(),b.currentPosition()),$}function a(b,v){const w=b.context(),{lastOffset:k,lastStartLoc:S}=w,$=s(4,k,S);return $.key=v,b.nextToken(),r($,b.currentOffset(),b.currentPosition()),$}function c(b,v){const w=b.context(),{lastOffset:k,lastStartLoc:S}=w,$=s(9,k,S);return $.value=v.replace(HO,VO),b.nextToken(),r($,b.currentOffset(),b.currentPosition()),$}function u(b){const v=b.nextToken(),w=b.context(),{lastOffset:k,lastStartLoc:S}=w,$=s(8,k,S);return v.type!==11?(o(b,Kn.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),$.value="",r($,k,S),{nextConsumeToken:v,node:$}):(v.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Rl(v)),$.value=v.value||"",r($,b.currentOffset(),b.currentPosition()),{node:$})}function d(b,v){const w=b.context(),k=s(7,w.offset,w.startLoc);return k.value=v,r(k,b.currentOffset(),b.currentPosition()),k}function f(b){const v=b.context(),w=s(6,v.offset,v.startLoc);let k=b.nextToken();if(k.type===8){const S=u(b);w.modifier=S.node,k=S.nextConsumeToken||b.nextToken()}switch(k.type!==9&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(k)),k=b.nextToken(),k.type===2&&(k=b.nextToken()),k.type){case 10:k.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(k)),w.key=d(b,k.value||"");break;case 4:k.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(k)),w.key=a(b,k.value||"");break;case 5:k.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(k)),w.key=i(b,k.value||"");break;case 6:k.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(k)),w.key=c(b,k.value||"");break;default:{o(b,Kn.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const S=b.context(),$=s(7,S.offset,S.startLoc);return $.value="",r($,S.offset,S.startLoc),w.key=$,r(w,S.offset,S.startLoc),{nextConsumeToken:k,node:w}}}return r(w,b.currentOffset(),b.currentPosition()),{node:w}}function p(b){const v=b.context(),w=v.currentType===1?b.currentOffset():v.offset,k=v.currentType===1?v.endLoc:v.startLoc,S=s(2,w,k);S.items=[];let $=null;do{const L=$||b.nextToken();switch($=null,L.type){case 0:L.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(L)),S.items.push(l(b,L.value||""));break;case 5:L.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(L)),S.items.push(i(b,L.value||""));break;case 4:L.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(L)),S.items.push(a(b,L.value||""));break;case 6:L.value==null&&o(b,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,Rl(L)),S.items.push(c(b,L.value||""));break;case 7:{const j=f(b);S.items.push(j.node),$=j.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const T=v.currentType===1?v.lastOffset:b.currentOffset(),I=v.currentType===1?v.lastEndLoc:b.currentPosition();return r(S,T,I),S}function h(b,v,w,k){const S=b.context();let $=k.items.length===0;const T=s(1,v,w);T.cases=[],T.cases.push(k);do{const I=p(b);$||($=I.items.length===0),T.cases.push(I)}while(S.currentType!==13);return $&&o(b,Kn.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),r(T,b.currentOffset(),b.currentPosition()),T}function m(b){const v=b.context(),{offset:w,startLoc:k}=v,S=p(b);return v.currentType===13?S:h(b,w,k,S)}function y(b){const v=FO(b,Go({},e)),w=v.context(),k=s(0,w.offset,w.startLoc);return t&&k.loc&&(k.loc.source=b),k.body=m(v),e.onCacheKey&&(k.cacheKey=e.onCacheKey(b)),w.currentType!==13&&o(v,Kn.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,b[w.offset]||""),r(k,v.currentOffset(),v.currentPosition()),k}return{parse:y}}function Rl(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function qO(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:r=>(n.helpers.add(r),r)}}function $w(e,t){for(let n=0;nNw(n)),e}function Nw(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nl;function a(m,y){l.code+=m}function c(m,y=!0){const b=y?o:"";a(s?b+" ".repeat(m):b)}function u(m=!0){const y=++l.indentLevel;m&&c(y)}function d(m=!0){const y=--l.indentLevel;m&&c(y)}function f(){c(l.indentLevel)}return{context:i,push:a,indent:u,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>l.needIndent}}function GO(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),_c(e,t.key),t.modifier?(e.push(", "),_c(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function YO(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let r=0;r1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let r=0;r{const n=Rt(t.mode)?t.mode:"normal",o=Rt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,r=t.needIndent?t.needIndent:n!=="arrow",l=e.helpers||[],i=KO(e,{filename:o,breakLineCode:s,needIndent:r});i.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(r),l.length>0&&(i.push(`const { ${lm(l.map(u=>`${u}: _${u}`),", ")} } = ctx`),i.newline()),i.push("return "),_c(i,e),i.deindent(r),i.push("}"),delete e.helpers;const{code:a,map:c}=i.context();return{ast:e,code:a,map:c?c.toJSON():void 0}};function eF(e,t={}){const n=Go({},t),o=!!n.jit,s=!!n.minify,r=n.optimize==null?!0:n.optimize,i=WO(n).parse(e);return o?(r&&ZO(i),s&&j0(i),{ast:i,code:""}):(UO(i,n),QO(i,n))}/*! + * core-base v11.4.8 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function tF(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(C1().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(C1().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Ql(e){return Dn(e)&&cm(e)===0&&(sl(e,"b")||sl(e,"body"))}const AM=["b","body"];function nF(e){return Ra(e,AM)}const TM=["c","cases"];function oF(e){return Ra(e,TM,[])}const EM=["s","static"];function sF(e){return Ra(e,EM)}const IM=["i","items"];function rF(e){return Ra(e,IM,[])}const LM=["t","type"];function cm(e){return Ra(e,LM)}const $M=["v","value"];function ff(e,t){const n=Ra(e,$M);if(n!=null)return n;throw Nu(t)}const NM=["m","modifier"];function lF(e){return Ra(e,NM)}const zM=["k","key"];function iF(e){const t=Ra(e,zM);if(t)return t;throw Nu(6)}function Ra(e,t,n){for(let o=0;oaF(n,e)}function aF(e,t){const n=nF(t);if(n==null)throw Nu(0);if(cm(n)===1){const r=oF(n);return e.plural(r.reduce((l,i)=>[...l,zw(e,i)],[]))}else return zw(e,n)}function zw(e,t){const n=sF(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=rF(t).reduce((s,r)=>[...s,d8(e,r)],[]);return e.normalize(o)}}function d8(e,t){const n=cm(t);switch(n){case 3:return ff(t,n);case 9:return ff(t,n);case 4:{const o=t;if(sl(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(sl(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw Nu(n)}case 5:{const o=t;if(sl(o,"i")&&Zo(o.i))return e.interpolate(e.list(o.i));if(sl(o,"index")&&Zo(o.index))return e.interpolate(e.list(o.index));throw Nu(n)}case 6:{const o=t,s=lF(o),r=iF(o);return e.linked(d8(e,r),s?d8(e,s):void 0,e.type)}case 7:return ff(t,n);case 8:return ff(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const cF=e=>e;let pf=lo();function uF(e,t={}){let n=!1;const o=t.onError||LO;return t.onError=s=>{n=!0,o(s)},{...eF(e,t),detectError:n}}function dF(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Rt(e)){Pn(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||cF)(e),s=pf[o];if(s)return s;const{ast:r,detectError:l}=uF(e,{...t,location:!1,jit:!0}),i=ap(r);return l?i:pf[o]=i}else{const n=e.cacheKey;if(n){const o=pf[n];return o||(pf[n]=ap(e))}else return ap(e)}}let zu=null;function fF(e){zu=e}function pF(e,t,n){zu&&zu.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const hF=mF("function:translate");function mF(e){return t=>zu&&zu.emit(e,t)}const Mi={INVALID_ARGUMENT:IO,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},gF=24;function Ai(e){return w5(e,null,void 0)}function um(e,t){return t.locale!=null?Bw(t.locale):Bw(e.locale)}let cp;function Bw(e){if(Rt(e))return e;if(wo(e)){if(e.resolvedOnce&&cp!=null)return cp;if(e.constructor.name==="Function"){const t=e();if(pO(t))throw Ai(Mi.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return cp=t}else throw Ai(Mi.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ai(Mi.NOT_SUPPORT_LOCALE_TYPE)}function vF(e,t,n){return[...new Set([n,...Io(t)?t:Dn(t)?Object.keys(t):Rt(t)?[t]:[n]])]}function f8(e,t,n){const o=Rt(n)?n:Bu,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(o);if(!r){r=[];let l=[n];for(;Io(l);)l=jw(r,l,t);const i=Io(t)||!eo(t)?t:t.default?t.default:null;l=Rt(i)?[i]:i,Io(l)&&jw(r,l,!1),s.__localeChainCache.set(o,r)}return r}function jw(e,t,n){let o=!0;for(let s=0;s{l===void 0?l=i:l+=i},f[1]=()=>{l!==void 0&&(t.push(l),l=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,l===void 0||(l=SF(l),l===!1))return!1;f[1]()}};function p(){const h=e[n+1];if(o===5&&h==="'"||o===6&&h==='"')return n++,i="\\"+h,f[0](),!0}for(;o!==null;)if(n++,r=e[n],!(r==="\\"&&p())){if(a=xF(r),d=Ha[o],c=d[a]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(i=r,u()===!1))))return;if(o===7)return t}}const Ow=new Map;function MF(e,t){return Dn(e)?e[t]:null}function AF(e,t){if(!Dn(e))return null;let n=Ow.get(t);if(n||(n=CF(t),n&&Ow.set(t,n)),!n)return null;const o=n.length;let s=e,r=0;for(;r`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function EF(){return{upper:(e,t)=>t==="text"&&Rt(e)?e.toUpperCase():t==="vnode"&&Dn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Rt(e)?e.toLowerCase():t==="vnode"&&Dn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Rt(e)?Fw(e):t==="vnode"&&Dn(e)&&"__v_isVNode"in e?Fw(e.children):e}}let jM;function IF(e){jM=e}let OM;function LF(e){OM=e}let FM;function $F(e){FM=e}let RM=null;const NF=e=>{RM=e},zF=()=>RM;let HM=null;const Rw=e=>{HM=e},BF=()=>HM;let Hw=0;function jF(e={}){const t=wo(e.onWarn)?e.onWarn:mO,n=Rt(e.version)?e.version:TF,o=Rt(e.locale)||wo(e.locale)?e.locale:Bu,s=wo(o)?Bu:o,r=Io(e.fallbackLocale)||eo(e.fallbackLocale)||Rt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,l=eo(e.messages)?e.messages:up(s),i=eo(e.datetimeFormats)?e.datetimeFormats:up(s),a=eo(e.numberFormats)?e.numberFormats:up(s),c=Go(lo(),e.modifiers,EF()),u=e.pluralRules||lo(),d=wo(e.missing)?e.missing:null,f=Pn(e.missingWarn)||bc(e.missingWarn)?e.missingWarn:!0,p=Pn(e.fallbackWarn)||bc(e.fallbackWarn)?e.fallbackWarn:!0,h=!!e.fallbackFormat,m=!!e.unresolving,y=wo(e.postTranslation)?e.postTranslation:null,b=eo(e.processor)?e.processor:null,v=Pn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,k=wo(e.messageCompiler)?e.messageCompiler:jM,S=wo(e.messageResolver)?e.messageResolver:OM||MF,$=wo(e.localeFallbacker)?e.localeFallbacker:FM||vF,T=Dn(e.fallbackContext)?e.fallbackContext:void 0,I=e,L=Dn(I.__datetimeFormatters)?I.__datetimeFormatters:new Map,j=Dn(I.__numberFormatters)?I.__numberFormatters:new Map,O=Dn(I.__meta)?I.__meta:{};Hw++;const A={version:n,cid:Hw,locale:o,fallbackLocale:r,messages:l,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:m,postTranslation:y,processor:b,warnHtmlMessage:v,escapeParameter:w,messageCompiler:k,messageResolver:S,localeFallbacker:$,fallbackContext:T,onWarn:t,__meta:O};return A.datetimeFormats=i,A.numberFormats=a,A.__datetimeFormatters=L,A.__numberFormatters=j,__INTLIFY_PROD_DEVTOOLS__&&pF(A,n,O),A}const up=e=>({[e]:lo()});function PM(e,t,n,o,s){const{missing:r,onWarn:l}=e;if(r!==null){const i=r(e,n,t,s);return Rt(i)?i:t}else return t}function w2(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function OF(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function FF(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{o.includes(a)?i[a]=s[a]:t[a]=s[a]}),Rt(r)?t.locale=r:eo(r)&&(i=r),eo(l)&&(i=l),i}function Pw(e,...t){const{datetimeFormats:n,unresolving:o,onWarn:s}=e,{__datetimeFormatters:r}=e;if(!Rt(t[0])&&!CM(t[0])&&!Zo(t[0]))return G3;const[l,i,a,c]=p8(...t),u=Pn(a.missingWarn)?a.missingWarn:e.missingWarn,d=Pn(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=um(e,a);if(!Rt(l)||l===""){const v=new Intl.DateTimeFormat(p.replace(/!/g,""),c);return f?v.formatToParts(i):v.format(i)}const h=DM(e,l,p,n,u,d,"datetime format");if(!Rt(h))return o?y5:l;const m=n[h][l],y=VM(h,l,c);let b=r.get(y);return b||(b=new Intl.DateTimeFormat(h,Go({},m,c)),r.set(y,b)),f?b.formatToParts(i):b.format(i)}const UM=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function p8(...e){const[t]=e,n=lo(),o=lo();let s;if(Rt(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw Ai(Mi.INVALID_ISO_DATE_ARGUMENT);const i=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();s=new Date(i);try{s.toISOString()}catch{throw Ai(Mi.INVALID_ISO_DATE_ARGUMENT)}}else if(CM(t)){if(isNaN(t.getTime()))throw Ai(Mi.INVALID_DATE_ARGUMENT);s=t}else if(Zo(t))s=t;else throw Ai(Mi.INVALID_ARGUMENT);const r=qM(e,n,o,UM);return[n.key||"",s,n,r]}function Dw(e,t,n){WM(e.__datetimeFormatters,t,n)}function Vw(e,...t){const{numberFormats:n,unresolving:o,onWarn:s}=e,{__numberFormatters:r}=e;if(!Zo(t[0]))return G3;const[l,i,a,c]=h8(...t),u=Pn(a.missingWarn)?a.missingWarn:e.missingWarn,d=Pn(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn,f=!!a.part,p=um(e,a);if(!Rt(l)||l===""){const v=new Intl.NumberFormat(p.replace(/!/g,""),c);return f?v.formatToParts(i):v.format(i)}const h=DM(e,l,p,n,u,d,"number format");if(!Rt(h))return o?y5:l;const m=n[h][l],y=VM(h,l,c);let b=r.get(y);return b||(b=new Intl.NumberFormat(h,Go({},m,c)),r.set(y,b)),f?b.formatToParts(i):b.format(i)}const ZM=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function h8(...e){const[t]=e,n=lo(),o=lo();if(!Zo(t))throw Ai(Mi.INVALID_ARGUMENT);const s=t,r=qM(e,n,o,ZM);return[n.key||"",s,n,r]}function Ww(e,t,n){WM(e.__numberFormatters,t,n)}const RF=e=>e,HF=e=>"",PF="text",DF=e=>e.length===0?"":lm(e),VF=hO;function dp(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function WF(e){const t=Zo(e.pluralIndex)?e.pluralIndex:-1;return Zo(e.named?.count)?e.named.count:Zo(e.named?.n)?e.named.n:t}function qF(e={}){const t=e.locale,n=WF(e),o=Rt(t)&&wo(e.pluralRules?.[t])?e.pluralRules[t]:dp,s=o===dp?void 0:dp,r=b=>b[o(n,b.length,s)],l=e.list||[],i=b=>l[b],a=e.named||lo();Zo(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const c=b=>a[b];function u(b,v){const w=wo(e.messages)?e.messages(b,!!v):Dn(e.messages)?e.messages[b]:!1;return w||(e.parent?e.parent.message(b):HF)}const d=b=>e.modifiers?e.modifiers[b]:RF,f=wo(e.processor?.normalize)?e.processor.normalize:DF,p=wo(e.processor?.interpolate)?e.processor.interpolate:VF,h=Rt(e.processor?.type)?e.processor.type:PF,y={list:i,named:c,plural:r,linked:(b,...v)=>{const[w,k]=v;let S="text",$="";v.length===1?Dn(w)?($=w.modifier||$,S=w.type||S):Rt(w)&&($=w||$):v.length===2&&(Rt(w)&&($=w||$),Rt(k)&&(S=k||S));const T=u(b,!0)(y),I=T===""||T===void 0?b:T,L=S==="vnode"&&Io(I)&&$?I[0]:I;return $?d($)(L,S):L},message:u,type:h,interpolate:p,normalize:f,values:Go(lo(),l,a)};return y}const qw=()=>"",tl=e=>wo(e);function Uw(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:r,fallbackLocale:l,messages:i}=e,[a,c]=m8(...t),u=Pn(c.missingWarn)?c.missingWarn:e.missingWarn,d=Pn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=Pn(c.escapeParameter)?c.escapeParameter:e.escapeParameter,p=!!c.resolvedMessage,h=Rt(c.default)||Pn(c.default)?Pn(c.default)?r?a:()=>a:c.default:n?r?a:()=>a:null,m=n||h!=null&&(Rt(h)||wo(h)),y=um(e,c);f&&UF(c);let[b,v,w]=p?[a,y,i[y]||lo()]:KM(e,a,y,l,d,u),k=b,S=a;if(!p&&!(Rt(k)||Ql(k)||tl(k))&&m&&(k=h,S=k),!p&&(!(Rt(k)||Ql(k)||tl(k))||!Rt(v)))return s?y5:a;let $=!1;const T=()=>{$=!0},I=tl(k)?k:GM(e,a,v,k,S,T);if($)return k;const L=GF(e,v,w,c),j=qF(L),O=ZF(e,I,j);let A=o?o(O,a):O;if(f&&Rt(A)&&(A=TO(A)),__INTLIFY_PROD_DEVTOOLS__){const F={timestamp:Date.now(),key:Rt(a)?a:tl(k)?k.key:"",locale:v||(tl(k)?k.locale:""),format:Rt(k)?k:tl(k)?k.source:"",message:A};F.meta=Go({},e.__meta,zF()||{}),hF(F)}return A}function UF(e){Io(e.list)?e.list=e.list.map(t=>Rt(t)?Ew(t):t):Dn(e.named)&&Object.keys(e.named).forEach(t=>{Rt(e.named[t])&&(e.named[t]=Ew(e.named[t]))})}function KM(e,t,n,o,s,r){const{messages:l,onWarn:i,messageResolver:a,localeFallbacker:c}=e,u=c(e,o,n);let d=lo(),f,p=null;const h="translate";for(let m=0;mo);return c.locale=n,c.key=t,c}const a=l(o,KF(e,n,s,o,i,r));return a.locale=n,a.key=t,a.source=o,a}function ZF(e,t,n){return t(n)}function m8(...e){const[t,n,o]=e,s=lo();if(!Rt(t)&&!Zo(t)&&!tl(t)&&!Ql(t))throw Ai(Mi.INVALID_ARGUMENT);const r=Zo(t)?String(t):(tl(t),t);return Zo(n)?s.plural=n:Rt(n)?s.default=n:eo(n)&&!sm(n)?s.named=n:Io(n)&&(s.list=n),Zo(o)?s.plural=o:Rt(o)?s.default=o:eo(o)&&Go(s,o),[r,s]}function KF(e,t,n,o,s,r){return{locale:t,key:n,warnHtmlMessage:s,onError:l=>{throw r&&r(l),l},onCacheKey:l=>cO(t,n,l)}}function GF(e,t,n,o){const{modifiers:s,pluralRules:r,messageResolver:l,fallbackLocale:i,fallbackWarn:a,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:s,pluralRules:r,messages:(p,h)=>{let m=l(n,p);if(m==null&&(u||h)){const[y,,b]=KM(u||e,p,t,i,a,c);m=y??l(b,p)}if(Rt(m)||Ql(m)){let y=!1;const v=GM(e,p,t,m,p,()=>{y=!0});return y?qw:v}else return tl(m)?m:qw}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),Zo(o.plural)&&(f.pluralIndex=o.plural),f}tF();/*! + * vue-i18n v11.4.8 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */const YF="11.4.8";function XF(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(C1().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(C1().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(C1().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(C1().__INTLIFY_PROD_DEVTOOLS__=!1)}const tr={UNEXPECTED_RETURN_TYPE:gF,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function br(e,...t){return w5(e,null,void 0)}const g8=Fa("__translateVNode"),v8=Fa("__datetimeParts"),w8=Fa("__numberParts"),YM=Fa("__setPluralRules"),XM=Fa("__injectWithOption"),W0=Fa("__dispose");function ju(e){if(!Dn(e)||Ql(e))return e;for(const t in e)if(sl(e,t))if(!t.includes("."))Dn(e[t])&&ju(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,r=!1;for(let l=0;l{if("locale"in i&&"resource"in i){const{locale:a,resource:c}=i;a?(l[a]=l[a]||lo(),r3(c,l[a])):r3(c,l)}else Rt(i)&&r3(JSON.parse(i),l)}),s==null&&r)for(const i in l)sl(l,i)&&ju(l[i]);return l}function JM(e){return e.type}function QM(e,t,n){let o=Dn(t.messages)?t.messages:lo();"__i18nGlobal"in n&&(o=dm(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(r=>{e.mergeLocaleMessage(r,o[r])});{if(Dn(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(l=>{e.mergeDateTimeFormat(l,t.datetimeFormats[l])})}if(Dn(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(l=>{e.mergeNumberFormat(l,t.numberFormats[l])})}}}function Zw(e){return Z(_a,null,e,0)}function Ou(){return Xo()}const Kw="__INTLIFY_META__",Gw=()=>[],JF=()=>!1;let Yw=0;function Xw(e){return((t,n,o,s)=>e(n,o,Ou()||void 0,s))}const QF=()=>{const e=Ou();let t=null;return e&&(t=JM(e)[Kw])?{[Kw]:t}:null};function Y3(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,r=K3?q:_o;let l=Pn(e.inheritLocale)?e.inheritLocale:!0;const i=r(t&&l?t.locale.value:Rt(e.locale)?e.locale:Bu),a=r(t&&l?t.fallbackLocale.value:Rt(e.fallbackLocale)||Io(e.fallbackLocale)||eo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),c=r(dm(i.value,e)),u=r(eo(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),d=r(eo(e.numberFormats)?e.numberFormats:{[i.value]:{}});let f=t?t.missingWarn:Pn(e.missingWarn)||bc(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:Pn(e.fallbackWarn)||bc(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:Pn(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,y=wo(e.missing)?e.missing:null,b=wo(e.missing)?Xw(e.missing):null,v=wo(e.postTranslation)?e.postTranslation:null,w=t?t.warnHtmlMessage:Pn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,k=!!e.escapeParameter;const S=t?t.modifiers:eo(e.modifiers)?e.modifiers:{};let $=e.pluralRules||t&&t.pluralRules,T;T=(()=>{o&&Rw(null);const se={version:YF,locale:i.value,fallbackLocale:a.value,messages:c.value,modifiers:S,pluralRules:$,missing:b===null?void 0:b,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:w,escapeParameter:k,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};se.datetimeFormats=u.value,se.numberFormats=d.value,se.__datetimeFormatters=eo(T)?T.__datetimeFormatters:void 0,se.__numberFormatters=eo(T)?T.__numberFormatters:void 0;const be=jF(se);return o&&Rw(be),be})(),w2(T,i.value,a.value);function L(){return[i.value,a.value,c.value,u.value,d.value]}const j=z({get:()=>i.value,set:se=>{T.locale=se,i.value=se}}),O=z({get:()=>a.value,set:se=>{T.fallbackLocale=se,a.value=se,w2(T,i.value,se)}}),A=z(()=>c.value),F=z(()=>u.value),P=z(()=>d.value);function H(){return wo(v)?v:null}function M(se){v=se,T.postTranslation=se}function B(){return y}function R(se){se!==null&&(b=Xw(se)),y=se,T.missing=b}const W=(se,be,je,ut,pt,At)=>{L();let Tt;try{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=t?BF():void 0),Tt=se(T)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=void 0)}if(je!=="translate exists"&&Zo(Tt)&&Tt===y5||je==="translate exists"&&!Tt){const[Xt,en]=be();return t&&h?ut(t):pt(Xt)}else{if(At(Tt))return Tt;throw br(tr.UNEXPECTED_RETURN_TYPE)}};function le(...se){return W(be=>Reflect.apply(Uw,null,[be,...se]),()=>m8(...se),"translate",be=>Reflect.apply(be.t,be,[...se]),be=>be,be=>Rt(be))}function J(...se){const[be,je,ut]=se;if(ut&&!Dn(ut))throw br(tr.INVALID_ARGUMENT);return le(be,je,Go({resolvedMessage:!0},ut||{}))}function G(...se){return W(be=>Reflect.apply(Pw,null,[be,...se]),()=>p8(...se),"datetime format",be=>Reflect.apply(be.d,be,[...se]),()=>G3,be=>Rt(be)||Io(be))}function K(...se){return W(be=>Reflect.apply(Vw,null,[be,...se]),()=>h8(...se),"number format",be=>Reflect.apply(be.n,be,[...se]),()=>G3,be=>Rt(be)||Io(be))}function Q(se){return se.map(be=>Rt(be)||Zo(be)||Pn(be)?Zw(String(be)):be)}const U={normalize:Q,interpolate:se=>se,type:"vnode"};function me(...se){return W(be=>{let je;const ut=be;try{ut.processor=U,je=Reflect.apply(Uw,null,[ut,...se])}finally{ut.processor=null}return je},()=>m8(...se),"translate",be=>be[g8](...se),be=>[Zw(be)],be=>Io(be))}function _e(...se){return W(be=>Reflect.apply(Vw,null,[be,...se]),()=>h8(...se),"number format",be=>be[w8](...se),Gw,be=>Rt(be)||Io(be))}function Pe(...se){return W(be=>Reflect.apply(Pw,null,[be,...se]),()=>p8(...se),"datetime format",be=>be[v8](...se),Gw,be=>Rt(be)||Io(be))}function ge(se){$=se,T.pluralRules=$}function ee(se,be){return W(()=>{if(!se)return!1;const je=Rt(be)?be:i.value,ut=Rt(be)?[je]:f8(T,a.value,je);for(let pt=0;pt[se],"translate exists",je=>Reflect.apply(je.te,je,[se,be]),JF,je=>Pn(je))}function oe(se){let be=null;const je=f8(T,a.value,i.value);for(let ut=0;ut{l&&(i.value=se,T.locale=se,w2(T,i.value,a.value))}),Xe(t.fallbackLocale,se=>{l&&(a.value=se,T.fallbackLocale=se,w2(T,i.value,a.value))}));const Se={id:Yw,locale:j,fallbackLocale:O,get inheritLocale(){return l},set inheritLocale(se){l=se,se&&t&&(i.value=t.locale.value,a.value=t.fallbackLocale.value,w2(T,i.value,a.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:A,get modifiers(){return S},get pluralRules(){return $||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(se){f=se,T.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(se){p=se,T.fallbackWarn=p},get fallbackRoot(){return h},set fallbackRoot(se){h=se},get fallbackFormat(){return m},set fallbackFormat(se){m=se,T.fallbackFormat=m},get warnHtmlMessage(){return w},set warnHtmlMessage(se){w=se,T.warnHtmlMessage=se},get escapeParameter(){return k},set escapeParameter(se){k=se,T.escapeParameter=se},t:le,getLocaleMessage:Y,setLocaleMessage:we,mergeLocaleMessage:pe,getPostTranslationHandler:H,setPostTranslationHandler:M,getMissingHandler:B,setMissingHandler:R,[YM]:ge};return Se.datetimeFormats=F,Se.numberFormats=P,Se.rt=J,Se.te=ee,Se.tm=D,Se.d=G,Se.n=K,Se.getDateTimeFormat=de,Se.setDateTimeFormat=X,Se.mergeDateTimeFormat=ae,Se.getNumberFormat=ke,Se.setNumberFormat=xe,Se.mergeNumberFormat=ue,Se[XM]=n,Se[g8]=me,Se[v8]=Pe,Se[w8]=_e,Se}function eR(e){const t=Rt(e.locale)?e.locale:Bu,n=Rt(e.fallbackLocale)||Io(e.fallbackLocale)||eo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=wo(e.missing)?e.missing:void 0,s=Pn(e.silentTranslationWarn)||bc(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=Pn(e.silentFallbackWarn)||bc(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=Pn(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,a=eo(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=wo(e.postTranslation)?e.postTranslation:void 0,d=Rt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=Pn(e.sync)?e.sync:!0;let h=e.messages;if(eo(e.sharedMessages)){const S=e.sharedMessages;h=Object.keys(S).reduce((T,I)=>{const L=T[I]||(T[I]={});return Go(L,S[I]),T},h||{})}const{__i18n:m,__root:y,__injectWithOption:b}=e,v=e.datetimeFormats,w=e.numberFormats,k=e.flatJson;return{locale:t,fallbackLocale:n,messages:h,flatJson:k,datetimeFormats:v,numberFormats:w,missing:o,missingWarn:s,fallbackWarn:r,fallbackRoot:l,fallbackFormat:i,modifiers:a,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:y,__injectWithOption:b}}function y8(e={}){const t=Y3(eR(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Pn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Pn(s)?!s:s},get silentFallbackWarn(){return Pn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Pn(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,r){return t.te(s,r)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,r){t.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){t.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,r){t.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){t.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,r){t.setNumberFormat(s,r)},mergeNumberFormat(s,r){t.mergeNumberFormat(s,r)}};return o.__extender=n,o}function tR(e,t,n){return{beforeCreate(){const o=Ou();if(!o)throw br(tr.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=t,this===this.$root)this.$i18n=Jw(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=y8(r);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Jw(e,s);else{this.$i18n=y8({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&QM(t,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,l)=>this.$i18n.te(r,l),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=Ou();if(!o)throw br(tr.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function Jw(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[YM](t.pluralizationRules||e.pluralizationRules);const n=dm(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const fm={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function nR({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===Le?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},lo())}function eA(){return Le}const oR=Ze({name:"i18n-t",props:Go({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Zo(e)||!isNaN(e)}},fm),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||It({useScope:e.scope,__useComponent:!0});return()=>{const r=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),c=lo();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Rt(e.plural)?+e.plural:e.plural);const u=nR(t,a);return s[g8](e.keypath,u,c)},l=Go(lo(),o),i=Rt(e.tag)||Dn(e.tag)?e.tag:eA();return Dn(i)?cn(i,l,{default:r}):cn(i,l,r())}}}),Qw=oR;function sR(e){return Io(e)&&!Rt(e[0])}function tA(e,t,n,o){const{slots:s,attrs:r}=t;return()=>{const l=()=>{const c={part:!0};let u=lo();e.locale&&(c.locale=e.locale),Rt(e.format)?c.key=e.format:Dn(e.format)&&(Rt(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((p,h)=>n.includes(h)?Go(lo(),p,{[h]:e.format[h]}):p,lo()));const d=o(e.value,c,u);let f=[c.key];return Io(d)?f=d.map((p,h)=>{const m=s[p.type],y=m?m({[p.type]:p.value,index:h,parts:d}):[p.value];return sR(y)&&(y[0].key=`${p.type}-${h}`),y}):Rt(d)&&(f=[d]),f},i=Go(lo(),r),a=Rt(e.tag)||Dn(e.tag)?e.tag:eA();return Dn(a)?cn(a,i,{default:l}):cn(a,i,l())}}const rR=Ze({name:"i18n-n",props:Go({value:{type:Number,required:!0},format:{type:[String,Object]}},fm),setup(e,t){const n=e.i18n||It({useScope:e.scope,__useComponent:!0});return tA(e,t,ZM,(...o)=>n[w8](...o))}}),ey=rR;function lR(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function iR(e){const t=l=>{const{instance:i,value:a}=l;if(!i||!i.$)throw br(tr.UNEXPECTED_ERROR);const c=lR(e,i.$),u=ty(a);return[Reflect.apply(c.t,c,[...ny(u)]),c]};return{created:(l,i)=>{const[a,c]=t(i);K3&&(l.__i18nWatcher=Xe(c.locale,()=>{i.instance&&i.instance.$forceUpdate()})),l.__composer=c,l.textContent=a},unmounted:l=>{K3&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:i})=>{if(l.__composer){const a=l.__composer,c=ty(i);l.textContent=Reflect.apply(a.t,a,[...ny(c)])}},getSSRProps:l=>{const[i]=t(l);return{textContent:i}}}}function ty(e){if(Rt(e))return{path:e};if(eo(e)){if(!("path"in e))throw br(tr.REQUIRED_VALUE,"path");return e}else throw br(tr.INVALID_VALUE)}function ny(e){const{path:t,locale:n,args:o,choice:s,plural:r}=e,l={},i=o||{};return Rt(n)&&(l.locale=n),Zo(s)&&(l.plural=s),Zo(r)&&(l.plural=r),[t,i,l]}function aR(e,t,...n){const o=eo(n[0])?n[0]:{};(Pn(o.globalInstall)?o.globalInstall:!0)&&([Qw.name,"I18nT"].forEach(r=>e.component(r,Qw)),[ey.name,"I18nN"].forEach(r=>e.component(r,ey)),[ry.name,"I18nD"].forEach(r=>e.component(r,ry))),e.directive("t",iR(t))}const cR=Fa("global-vue-i18n");function uR(e={}){const t=__VUE_I18N_LEGACY_API__&&Pn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Pn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,r]=dR(e,t),l=Fa("");function i(d){return o.get(d)||null}function a(d,f){o.set(d,f)}function c(d){o.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=l,d.provide(d.__VUE_I18N_SYMBOL__,u),eo(f[0])){const m=f[0];u.__composerExtend=m.__composerExtend,u.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=wR(d,u.global)),__VUE_I18N_FULL_INSTALL__&&aR(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(tR(r,r.__composer,u));const h=d.unmount;d.unmount=()=>{p&&p(),u.dispose(),h()}},get global(){return r},dispose(){s.stop()},__instances:o,__getInstance:i,__setInstance:a,__deleteInstance:c};return u}function It(e={}){const t=Ou();if(t==null)throw br(tr.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw br(tr.NOT_INSTALLED);const n=fR(t),o=hR(n),s=JM(t),r=pR(e,s);if(r==="global")return QM(o,e,s),o;if(r==="parent"){let a=oy(n,t,e.__useComponent);return a==null&&(a=o),a}if(r==="isolated"){if(n.mode!=="composition")throw br(tr.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,c=Go({},e),u=oy(n,t);c.__root=u||o;const d=Y3(c);return a.__composerExtend&&(d[W0]=a.__composerExtend(d)),P7()&&zc(()=>{const p=d[W0];p&&(p(),delete d[W0])}),d}const l=n;let i=l.__getInstance(t);if(i==null){const a=Go({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),i=Y3(a),l.__composerExtend&&(i[W0]=l.__composerExtend(i)),gR(l,t,i),l.__setInstance(t,i)}return i}function dR(e,t){const n=Iz(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>y8(e)):n.run(()=>Y3(e));if(o==null)throw br(tr.UNEXPECTED_ERROR);return[n,o]}function fR(e){const t=kn(e.isCE?cR:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw br(e.isCE?tr.NOT_INSTALLED_WITH_PROVIDE:tr.UNEXPECTED_ERROR);return t}function pR(e,t){return sm(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function hR(e){return e.mode==="composition"?e.global:e.global.__composer}function oy(e,t,n=!1){let o=null;const s=t.root;let r=mR(t,n);for(;r!=null;){const l=e;if(e.mode==="composition")o=l.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const i=l.__getInstance(r);i!=null&&(o=i.__composer,n&&o&&!o[XM]&&(o=null))}if(o!=null||s===r)break;r=r.parent}return o}function mR(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function gR(e,t,n){Sn(()=>{},t),An(()=>{const o=n;e.__deleteInstance(t);const s=o[W0];s&&(s(),delete o[W0])},t)}const vR=["locale","fallbackLocale","availableLocales"],sy=["t","rt","d","n","tm","te"];function wR(e,t){const n=Object.create(null);return vR.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw br(tr.UNEXPECTED_ERROR);const l=jo(r.value)?{get(){return r.value.value},set(i){r.value.value=i}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,l)}),e.config.globalProperties.$i18n=n,sy.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw br(tr.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)}),()=>{delete e.config.globalProperties.$i18n,sy.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const yR=Ze({name:"i18n-d",props:Go({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},fm),setup(e,t){const n=e.i18n||It({useScope:e.scope,__useComponent:!0});return tA(e,t,UM,(...o)=>n[v8](...o))}}),ry=yR;XF();IF(dF);LF(AF);$F(f8);if(__INTLIFY_PROD_DEVTOOLS__){const e=C1();e.__INTLIFY__=!0,fF(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const kR="modulepreload",bR=function(e){return"/"+e},ly={},Es=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=i?.nonce||i?.getAttribute("nonce");s=l(n.map(c=>{if(c=bR(c),c in ly)return;ly[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":kR,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(l){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=l,window.dispatchEvent(i),!i.defaultPrevented)throw l}return s.then(l=>{for(const i of l||[])i.status==="rejected"&&r(i.reason);return t().catch(r)})};async function Ko(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return xR(e)}function _R(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||Ko(e)}function xR(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const sn={permission:"pythinker-web.permission",activeWorkspace:"pythinker-active-workspace",planMode:"pythinker-web.plan-mode",planArmed:"pythinker-web.plan-armed",dynamicWorkflowMode:"pythinker-web.dynamic-workflow-mode",goalMode:"pythinker-web.goal-mode",uiFontSize:"pythinker-web.ui-font-size",starredModels:"pythinker-web.starred-models",unread:"pythinker-web.unread",onboarded:"pythinker-web.onboarded",accent:"pythinker-web.accent",colorScheme:"pythinker-web.color-scheme",hiddenWorkspaces:"pythinker-web.hidden-workspaces",collapsedWorkspaces:"pythinker-web.collapsed-workspaces",workspaceOrder:"pythinker-web.workspace-order",workspaceNameOverrides:"pythinker-web.workspace-name-overrides",workspaceSort:"pythinker-web.workspace-sort",pinnedSessions:"pythinker-web.pinned-sessions",pinnedCollapsed:"pythinker-web.pinned-collapsed",recentEmojis:"pythinker-web.recent-emojis",conversationToc:"pythinker-web.beta-toc",notifyOnComplete:"pythinker-web.notify-on-complete",notifyOnQuestion:"pythinker-web.notify-on-question",notifyOnApproval:"pythinker-web.notify-on-approval",soundOnComplete:"pythinker-web.sound-on-complete",inputHistory:"pythinker-web.input-history",clientId:"pythinker-web.client-id",debug:"pythinker-web.debug",openInLastTarget:"pythinker-web.open-in.last-target",sidebarCollapsed:"pythinker-web.sidebar-collapsed",sidebarWidth:"pythinker-web.sidebar-width",codeFont:"pythinker-web.code-font",contentAlign:"pythinker-web.content-align",theme:"pythinker-web.theme",thinking:"pythinker-web.thinking"};function iy(e){return`pythinker-web.draft.${e&&e.length>0?e:"__new__"}`}function Oo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Jo(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function D1(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Oc(e){const t=Oo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Pa(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function pm(){const e=Oo(sn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[o,s]of Object.entries(t))s===!0&&(n[o]=!0);return n}catch{return{}}}function hm(e){const n={...pm()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];Jo(sn.unread,JSON.stringify(n))}function SR(){const e=Oc(sn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function fp(e){Pa(sn.collapsedWorkspaces,Array.from(e))}function CR(){const e=Oc(sn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function nA(e){Pa(sn.workspaceOrder,Array.from(e))}function hf(){const e=Oc(sn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}function ay(e){Pa(sn.workspaceNameOverrides,e)}function MR(){return Oo(sn.workspaceSort)}function oA(e){Jo(sn.workspaceSort,e)}function AR(e,t){if(e.length===0)return null;const n=new Set(e),o=t.filter(r=>n.has(r)),s=e.filter(r=>!t.includes(r));return s.length===0&&o.length===t.length?null:[...s,...o]}function TR(e,t){const n=new Map(t.map((o,s)=>[o,s]));return e.toSorted((o,s)=>(n.get(o.id)??-1)-(n.get(s.id)??-1))}function ER(e,t,n,o="before"){const s=e.indexOf(t),r=e.indexOf(n);if(s===-1||r===-1||s===r)return e;const l=[...e];l.splice(s,1);const i=s(t.get(o.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function LR(e,t=2e4){const n=q(`${e}?r=0`);let o=0;const s=setInterval(()=>{o+=1,n.value=`${e}?r=${o}`},t);return An(()=>clearInterval(s)),n}const $R=["src","alt","role"],NR=Ze({__name:"PythinkerLogo",props:{size:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:"Pythinker Code"},interactive:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=LR("/brand/mascot-waving.png"),o=e,s=t;function r(){o.interactive&&s("click")}return(l,i)=>(g(),C("img",{src:e.animated?_(n):"/brand/icon.svg",class:He(["pythinker-logo",[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?"button":"img",onClick:r},null,10,$R))}}),ht=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},X3=ht(NR,[["__scopeId","data-v-58c4fde0"]]),zR={"&":"&","<":"<",">":">",'"':""","'":"'"};function cy(e){return e.replace(/[&<>"']/g,t=>zR[t]??t)}function BR(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jR(e,t,n=40){const o=e.replace(/\s+/g," ").trim();if(o.length===0)return"";const s=t.trim();if(s.length===0)return uy(o,n*2);const r=o.toLowerCase().indexOf(s.toLowerCase());if(r<0)return uy(o,n*2);const l=Math.max(0,r-n),i=Math.min(o.length,r+s.length+n),a=l>0,c=i`${r}`)}const y1=q(0),OR=["type","disabled","aria-label"],FR=Ze({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},type:{default:"button"}},setup(e,{expose:t}){const n=q();return t({el:n}),(o,s)=>(g(),C("button",{ref_key:"el",ref:n,class:He(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[bn(o.$slots,"default",{},void 0,!0)],10,OR))}}),Gt=ht(FR,[["__scopeId","data-v-4b23513f"]]),mf=q(!1);let dy=!1;function pp(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function mm(){return!dy&&typeof window<"u"&&typeof document<"u"&&(dy=!0,mf.value=pp(),new MutationObserver(()=>{mf.value=pp()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{mf.value=pp()})),mf}const sA="file",RR="folder",gf={"._sc_":"godot-assets",".adonisrc.json":"adonis",".aiexclude":"gemini-ai",".angular-cli.json":"angular",".appveyor.yml":"appveyor",".astylerc":"astyle",".autorc":"auto",".babel-plugin-macrosrc":"babel",".babel-plugin-macrosrc.cjs":"babel",".babel-plugin-macrosrc.cts":"babel",".babel-plugin-macrosrc.js":"babel",".babel-plugin-macrosrc.json":"babel",".babel-plugin-macrosrc.json5":"babel",".babel-plugin-macrosrc.jsonc":"babel",".babel-plugin-macrosrc.mjs":"babel",".babel-plugin-macrosrc.mts":"babel",".babel-plugin-macrosrc.toml":"babel",".babel-plugin-macrosrc.ts":"babel",".babel-plugin-macrosrc.yaml":"babel",".babel-plugin-macrosrc.yml":"babel",".babelrc":"babel",".babelrc.cjs":"babel",".babelrc.cts":"babel",".babelrc.js":"babel",".babelrc.json":"babel",".babelrc.json5":"babel",".babelrc.jsonc":"babel",".babelrc.mjs":"babel",".babelrc.mts":"babel",".babelrc.toml":"babel",".babelrc.ts":"babel",".babelrc.yaml":"babel",".babelrc.yml":"babel",".bazelignore":"bazel",".bazelrc":"bazel",".bazelversion":"bazel",".biome.json":"biome",".biome.jsonc":"biome",".bithoundrc":"bithound",".blitz.config.compiled.js":"blitz",".bowerrc":"bower",".browserslistrc":"browserlist",".buckconfig":"buck",".buildignore":"settings",".bun-version":"bun",".cfignore":"cloudfoundry",".clang-format":"settings",".clang-format-ignore":"settings",".clang-tidy":"settings",".clangd":"clangd",".clinerules":"cline",".codeclimate.yml":"code-climate",".codecov.yaml":"codecov",".codecov.yml":"codecov",".coderabbit.yaml":"coderabbit-ai",".coderabbit.yml":"coderabbit-ai",".commitlint.yaml":"commitlint",".commitlint.yml":"commitlint",".commitlintrc":"commitlint",".commitlintrc.cjs":"commitlint",".commitlintrc.cts":"commitlint",".commitlintrc.js":"commitlint",".commitlintrc.json":"commitlint",".commitlintrc.json5":"commitlint",".commitlintrc.jsonc":"commitlint",".commitlintrc.mjs":"commitlint",".commitlintrc.mts":"commitlint",".commitlintrc.toml":"commitlint",".commitlintrc.ts":"commitlint",".commitlintrc.yaml":"commitlint",".commitlintrc.yml":"commitlint",".conf":"settings",".config/babel-plugin-macrosrc":"babel",".config/babel-plugin-macrosrc.cjs":"babel",".config/babel-plugin-macrosrc.cts":"babel",".config/babel-plugin-macrosrc.js":"babel",".config/babel-plugin-macrosrc.json":"babel",".config/babel-plugin-macrosrc.json5":"babel",".config/babel-plugin-macrosrc.jsonc":"babel",".config/babel-plugin-macrosrc.mjs":"babel",".config/babel-plugin-macrosrc.mts":"babel",".config/babel-plugin-macrosrc.toml":"babel",".config/babel-plugin-macrosrc.ts":"babel",".config/babel-plugin-macrosrc.yaml":"babel",".config/babel-plugin-macrosrc.yml":"babel",".config/babelrc":"babel",".config/babelrc.cjs":"babel",".config/babelrc.cts":"babel",".config/babelrc.js":"babel",".config/babelrc.json":"babel",".config/babelrc.json5":"babel",".config/babelrc.jsonc":"babel",".config/babelrc.mjs":"babel",".config/babelrc.mts":"babel",".config/babelrc.toml":"babel",".config/babelrc.ts":"babel",".config/babelrc.yaml":"babel",".config/babelrc.yml":"babel",".config/commitlintrc":"commitlint",".config/commitlintrc.cjs":"commitlint",".config/commitlintrc.cts":"commitlint",".config/commitlintrc.js":"commitlint",".config/commitlintrc.json":"commitlint",".config/commitlintrc.json5":"commitlint",".config/commitlintrc.jsonc":"commitlint",".config/commitlintrc.mjs":"commitlint",".config/commitlintrc.mts":"commitlint",".config/commitlintrc.toml":"commitlint",".config/commitlintrc.ts":"commitlint",".config/commitlintrc.yaml":"commitlint",".config/commitlintrc.yml":"commitlint",".config/cracorc":"craco",".config/cracorc.cjs":"craco",".config/cracorc.cts":"craco",".config/cracorc.js":"craco",".config/cracorc.json":"craco",".config/cracorc.json5":"craco",".config/cracorc.jsonc":"craco",".config/cracorc.mjs":"craco",".config/cracorc.mts":"craco",".config/cracorc.toml":"craco",".config/cracorc.ts":"craco",".config/cracorc.yaml":"craco",".config/cracorc.yml":"craco",".config/eslintrc":"eslint",".config/eslintrc.cjs":"eslint",".config/eslintrc.cts":"eslint",".config/eslintrc.js":"eslint",".config/eslintrc.json":"eslint",".config/eslintrc.json5":"eslint",".config/eslintrc.jsonc":"eslint",".config/eslintrc.mjs":"eslint",".config/eslintrc.mts":"eslint",".config/eslintrc.toml":"eslint",".config/eslintrc.ts":"eslint",".config/eslintrc.yaml":"eslint",".config/eslintrc.yml":"eslint",".config/graphqlrc":"graphql",".config/graphqlrc.cjs":"graphql",".config/graphqlrc.cts":"graphql",".config/graphqlrc.js":"graphql",".config/graphqlrc.json":"graphql",".config/graphqlrc.json5":"graphql",".config/graphqlrc.jsonc":"graphql",".config/graphqlrc.mjs":"graphql",".config/graphqlrc.mts":"graphql",".config/graphqlrc.toml":"graphql",".config/graphqlrc.ts":"graphql",".config/graphqlrc.yaml":"graphql",".config/graphqlrc.yml":"graphql",".config/huskyrc":"husky",".config/huskyrc.cjs":"husky",".config/huskyrc.cts":"husky",".config/huskyrc.js":"husky",".config/huskyrc.json":"husky",".config/huskyrc.json5":"husky",".config/huskyrc.jsonc":"husky",".config/huskyrc.mjs":"husky",".config/huskyrc.mts":"husky",".config/huskyrc.toml":"husky",".config/huskyrc.ts":"husky",".config/huskyrc.yaml":"husky",".config/huskyrc.yml":"husky",".config/postcssrc":"postcss",".config/postcssrc.cjs":"postcss",".config/postcssrc.cts":"postcss",".config/postcssrc.js":"postcss",".config/postcssrc.json":"postcss",".config/postcssrc.json5":"postcss",".config/postcssrc.jsonc":"postcss",".config/postcssrc.mjs":"postcss",".config/postcssrc.mts":"postcss",".config/postcssrc.toml":"postcss",".config/postcssrc.ts":"postcss",".config/postcssrc.yaml":"postcss",".config/postcssrc.yml":"postcss",".config/posthtmlrc":"posthtml",".config/posthtmlrc.cjs":"posthtml",".config/posthtmlrc.cts":"posthtml",".config/posthtmlrc.js":"posthtml",".config/posthtmlrc.json":"posthtml",".config/posthtmlrc.json5":"posthtml",".config/posthtmlrc.jsonc":"posthtml",".config/posthtmlrc.mjs":"posthtml",".config/posthtmlrc.mts":"posthtml",".config/posthtmlrc.toml":"posthtml",".config/posthtmlrc.ts":"posthtml",".config/posthtmlrc.yaml":"posthtml",".config/posthtmlrc.yml":"posthtml",".config/prettierrc":"prettier",".config/prettierrc.cjs":"prettier",".config/prettierrc.cts":"prettier",".config/prettierrc.js":"prettier",".config/prettierrc.json":"prettier",".config/prettierrc.json5":"prettier",".config/prettierrc.jsonc":"prettier",".config/prettierrc.mjs":"prettier",".config/prettierrc.mts":"prettier",".config/prettierrc.toml":"prettier",".config/prettierrc.ts":"prettier",".config/prettierrc.yaml":"prettier",".config/prettierrc.yml":"prettier",".config/puppeteerrc":"puppeteer",".config/puppeteerrc.cjs":"puppeteer",".config/puppeteerrc.cts":"puppeteer",".config/puppeteerrc.js":"puppeteer",".config/puppeteerrc.json":"puppeteer",".config/puppeteerrc.json5":"puppeteer",".config/puppeteerrc.jsonc":"puppeteer",".config/puppeteerrc.mjs":"puppeteer",".config/puppeteerrc.mts":"puppeteer",".config/puppeteerrc.toml":"puppeteer",".config/puppeteerrc.ts":"puppeteer",".config/puppeteerrc.yaml":"puppeteer",".config/puppeteerrc.yml":"puppeteer",".config/releaserc":"semantic-release",".config/releaserc.cjs":"semantic-release",".config/releaserc.cts":"semantic-release",".config/releaserc.js":"semantic-release",".config/releaserc.json":"semantic-release",".config/releaserc.json5":"semantic-release",".config/releaserc.jsonc":"semantic-release",".config/releaserc.mjs":"semantic-release",".config/releaserc.mts":"semantic-release",".config/releaserc.toml":"semantic-release",".config/releaserc.ts":"semantic-release",".config/releaserc.yaml":"semantic-release",".config/releaserc.yml":"semantic-release",".config/stylelintrc":"stylelint",".config/stylelintrc.cjs":"stylelint",".config/stylelintrc.cts":"stylelint",".config/stylelintrc.js":"stylelint",".config/stylelintrc.json":"stylelint",".config/stylelintrc.json5":"stylelint",".config/stylelintrc.jsonc":"stylelint",".config/stylelintrc.mjs":"stylelint",".config/stylelintrc.mts":"stylelint",".config/stylelintrc.toml":"stylelint",".config/stylelintrc.ts":"stylelint",".config/stylelintrc.yaml":"stylelint",".config/stylelintrc.yml":"stylelint",".config/svgrrc":"svgr",".config/svgrrc.cjs":"svgr",".config/svgrrc.cts":"svgr",".config/svgrrc.js":"svgr",".config/svgrrc.json":"svgr",".config/svgrrc.json5":"svgr",".config/svgrrc.jsonc":"svgr",".config/svgrrc.mjs":"svgr",".config/svgrrc.mts":"svgr",".config/svgrrc.toml":"svgr",".config/svgrrc.ts":"svgr",".config/svgrrc.yaml":"svgr",".config/svgrrc.yml":"svgr",".config/syncpackrc":"syncpack",".config/syncpackrc.cjs":"syncpack",".config/syncpackrc.cts":"syncpack",".config/syncpackrc.js":"syncpack",".config/syncpackrc.json":"syncpack",".config/syncpackrc.json5":"syncpack",".config/syncpackrc.jsonc":"syncpack",".config/syncpackrc.mjs":"syncpack",".config/syncpackrc.mts":"syncpack",".config/syncpackrc.toml":"syncpack",".config/syncpackrc.ts":"syncpack",".config/syncpackrc.yaml":"syncpack",".config/syncpackrc.yml":"syncpack",".copilotignore":"copilot",".coverage":"python-misc",".coveragerc":"python-misc",".cracorc":"craco",".cracorc.cjs":"craco",".cracorc.cts":"craco",".cracorc.js":"craco",".cracorc.json":"craco",".cracorc.json5":"craco",".cracorc.jsonc":"craco",".cracorc.mjs":"craco",".cracorc.mts":"craco",".cracorc.toml":"craco",".cracorc.ts":"craco",".cracorc.yaml":"craco",".cracorc.yml":"craco",".cursor":"cursor",".cursor.json":"cursor",".cursorignore":"cursor",".cursorindexingignore":"cursor",".cursorrc":"cursor",".cursorrules":"cursor",".cz.json":"commitizen",".cz.toml":"commitizen",".cz.yaml":"commitizen",".cz.yml":"commitizen",".czrc":"commitizen",".deepsource.toml":"deepsource",".dev.vars":"tune",".drone.yml":"drone",".easignore":"expo",".ecrc":"editorconfig",".editorconfig":"editorconfig",".editorconfig-checker.json":"editorconfig",".ember-cli":"ember",".ember-cli.js":"ember",".env.alpha":"tune",".env.defaults":"tune",".env.dev":"tune",".env.dev.local":"tune",".env.development":"tune",".env.development.local":"tune",".env.dist":"tune",".env.e2e":"tune",".env.example":"tune",".env.local":"tune",".env.preview":"tune",".env.prod":"tune",".env.prod.example":"tune",".env.prod.local":"tune",".env.production":"tune",".env.production.example":"tune",".env.production.local":"tune",".env.qa":"tune",".env.qa.local":"tune",".env.sample":"tune",".env.schema":"tune",".env.sentry-build-plugin":"sentry",".env.stage":"tune",".env.staging":"tune",".env.staging.local":"tune",".env.stg":"tune",".env.stg.local":"tune",".env.template":"tune",".env.test":"tune",".env.test.local":"tune",".env.testing":"tune",".env.uat":"tune",".envrc":"console",".esformatter":"json",".eslintcache":"eslint",".eslintignore":"eslint",".eslintrc":"eslint",".eslintrc-jsdoc.js":"eslint",".eslintrc-md.js":"eslint",".eslintrc.base.json":"eslint",".eslintrc.cjs":"eslint",".eslintrc.cts":"eslint",".eslintrc.js":"eslint",".eslintrc.json":"eslint",".eslintrc.json5":"eslint",".eslintrc.jsonc":"eslint",".eslintrc.mjs":"eslint",".eslintrc.mts":"eslint",".eslintrc.toml":"eslint",".eslintrc.ts":"eslint",".eslintrc.yaml":"eslint",".eslintrc.yml":"eslint",".esmrc":"nodejs",".firebaserc":"firebase",".flowconfig":"flow",".gardenignore":"garden",".gcloudignore":"gcp",".gdignore":"godot-assets",".git":"git",".git-blame-ignore":"git",".git-blame-ignore-revs":"git",".git-for-windows-updater":"git",".gitattributes":"git",".gitattributes-global":"git",".gitattributes_global":"git",".gitconfig":"git",".github/funding.yml":"github-sponsors",".github/labeler.yaml":"label",".github/labeler.yml":"label",".gitignore":"git",".gitignore-global":"git",".gitignore_global":"git",".gitinclude":"git",".gitkeep":"git",".gitmessage":"git",".gitmodules":"git",".gitpod.yml":"gitpod",".gitpreserve":"git",".graphqlconfig":"graphql",".graphqlrc":"graphql",".graphqlrc.cjs":"graphql",".graphqlrc.cts":"graphql",".graphqlrc.js":"graphql",".graphqlrc.json":"graphql",".graphqlrc.json5":"graphql",".graphqlrc.jsonc":"graphql",".graphqlrc.mjs":"graphql",".graphqlrc.mts":"graphql",".graphqlrc.toml":"graphql",".graphqlrc.ts":"graphql",".graphqlrc.yaml":"graphql",".graphqlrc.yml":"graphql",".hadolint.yaml":"hadolint",".hadolint.yml":"hadolint",".happo.cjs":"happo",".happo.js":"happo",".happo.mjs":"happo",".helmignore":"helm",".hg":"mercurial",".hgflow":"mercurial",".hgignore":"mercurial",".hgrc":"mercurial",".hgtags":"mercurial",".hhconfig":"hack",".hintrc":"webhint",".histoire.cjs":"histoire",".histoire.cts":"histoire",".histoire.js":"histoire",".histoire.mjs":"histoire",".histoire.mts":"histoire",".histoire.ts":"histoire",".htaccess":"xml",".htpasswd":"key",".hushlogin":"console",".huskyrc":"husky",".huskyrc.cjs":"husky",".huskyrc.cts":"husky",".huskyrc.js":"husky",".huskyrc.json":"husky",".huskyrc.json5":"husky",".huskyrc.jsonc":"husky",".huskyrc.mjs":"husky",".huskyrc.mts":"husky",".huskyrc.toml":"husky",".huskyrc.ts":"husky",".huskyrc.yaml":"husky",".huskyrc.yml":"husky",".io-config.json":"ionic",".istanbul.yml":"istanbul",".jestrc":"jest",".jestrc.js":"jest",".jestrc.json":"jest",".jsbeautifyrc":"json",".jscsrc":"json",".jshintignore":"settings",".jshintrc":"json",".justfile":"just",".k8s.yaml":"kubernetes",".k8s.yml":"kubernetes",".keep":"git",".kl":"kl",".knip.json":"knip",".knip.jsonc":"knip",".latexmkrc":"latexmk",".lefthook-local.json":"lefthook",".lefthook-local.toml":"lefthook",".lefthook-local.yaml":"lefthook",".lefthook-local.yml":"lefthook",".lefthook.json":"lefthook",".lefthook.toml":"lefthook",".lefthook.yaml":"lefthook",".lefthook.yml":"lefthook",".lefthookrc":"lefthook",".liaraignore":"liara",".lighthouserc.cjs":"lighthouse",".lighthouserc.js":"lighthouse",".lighthouserc.json":"lighthouse",".lighthouserc.yaml":"lighthouse",".lighthouserc.yml":"lighthouse",".lintstagedrc":"lintstaged",".lintstagedrc.cjs":"lintstaged",".lintstagedrc.js":"lintstaged",".lintstagedrc.json":"lintstaged",".lintstagedrc.mjs":"lintstaged",".lintstagedrc.yaml":"lintstaged",".lintstagedrc.yml":"lintstaged",".luacheckrc":"lua",".luaurc":"luau",".mailmap":"email",".markdownlint-cli2.cjs":"markdownlint",".markdownlint-cli2.jsonc":"markdownlint",".markdownlint-cli2.mjs":"markdownlint",".markdownlint-cli2.yaml":"markdownlint",".markdownlint.json":"markdownlint",".markdownlint.jsonc":"markdownlint",".markdownlint.yaml":"markdownlint",".markdownlint.yml":"markdownlint",".markdownlintignore":"markdownlint",".mcattributes":"minecraft",".mcdefinitions":"minecraft",".mcignore":"minecraft",".mincloudrc":"ifanr-cloud",".mjmlconfig":"mjml",".mocharc.cjs":"mocha",".mocharc.js":"mocha",".mocharc.json":"mocha",".mocharc.jsonc":"mocha",".mocharc.yaml":"mocha",".mocharc.yml":"mocha",".modernizrrc":"modernizr",".modernizrrc.js":"modernizr",".modernizrrc.json":"modernizr",".mrconfig":"settings",".nano-staged.cjs":"nano-staged",".nano-staged.js":"nano-staged",".nano-staged.json":"nano-staged",".nano-staged.mjs":"nano-staged",".nanostagedrc":"nano-staged",".nest-cli.json":"nest",".nestconfig.json":"nest",".node-version":"nodejs",".nowignore":"vercel",".npmignore":"npm",".npmrc":"npm",".nuspec":"nuget",".nuxtignore":"nuxt",".nuxtrc":"nuxt",".nvmrc":"nodejs",".nxignore":"nx",".nycrc":"istanbul",".nycrc.json":"istanbul",".nycrc.yaml":"istanbul",".nycrc.yml":"istanbul",".oxfmtrc.json":"oxc",".oxfmtrc.jsonc":"oxc",".oxlintrc.json":"oxc",".oxlintrc.jsonc":"oxc",".packshiprc":"packship",".packshiprc.js":"packship",".packshiprc.json":"packship",".packshiprc.ts":"packship",".parcelrc":"parcel",".pdm-python":"pdm",".percy.yml":"percy",".php-cs-fixer.dist.php":"php-cs-fixer",".php-cs-fixer.php":"php-cs-fixer",".php_cs":"php-cs-fixer",".php_cs.dist":"php-cs-fixer",".php_cs.dist.php":"php-cs-fixer",".php_cs.php":"php-cs-fixer",".phpunit-watcher.yml":"phpunit",".phpunit.result.cache":"phpunit",".pnpmfile.cjs":"pnpm",".postcssrc":"postcss",".postcssrc.cjs":"postcss",".postcssrc.cts":"postcss",".postcssrc.js":"postcss",".postcssrc.json":"postcss",".postcssrc.json5":"postcss",".postcssrc.jsonc":"postcss",".postcssrc.mjs":"postcss",".postcssrc.mts":"postcss",".postcssrc.toml":"postcss",".postcssrc.ts":"postcss",".postcssrc.yaml":"postcss",".postcssrc.yml":"postcss",".posthtmlrc":"posthtml",".posthtmlrc.cjs":"posthtml",".posthtmlrc.cts":"posthtml",".posthtmlrc.js":"posthtml",".posthtmlrc.json":"posthtml",".posthtmlrc.json5":"posthtml",".posthtmlrc.jsonc":"posthtml",".posthtmlrc.mjs":"posthtml",".posthtmlrc.mts":"posthtml",".posthtmlrc.toml":"posthtml",".posthtmlrc.ts":"posthtml",".posthtmlrc.yaml":"posthtml",".posthtmlrc.yml":"posthtml",".pre-commit-config.yaml":"pre-commit",".pre-commit-hooks.yaml":"pre-commit",".prettierignore":"prettier",".prettierrc":"prettier",".prettierrc.cjs":"prettier",".prettierrc.cts":"prettier",".prettierrc.js":"prettier",".prettierrc.json":"prettier",".prettierrc.json5":"prettier",".prettierrc.jsonc":"prettier",".prettierrc.mjs":"prettier",".prettierrc.mts":"prettier",".prettierrc.toml":"prettier",".prettierrc.ts":"prettier",".prettierrc.yaml":"prettier",".prettierrc.yml":"prettier",".pubignore":"dart",".pug-lintrc":"pug",".pug-lintrc.js":"pug",".pug-lintrc.json":"pug",".puppeteerrc":"puppeteer",".puppeteerrc.cjs":"puppeteer",".puppeteerrc.cts":"puppeteer",".puppeteerrc.js":"puppeteer",".puppeteerrc.json":"puppeteer",".puppeteerrc.json5":"puppeteer",".puppeteerrc.jsonc":"puppeteer",".puppeteerrc.mjs":"puppeteer",".puppeteerrc.mts":"puppeteer",".puppeteerrc.toml":"puppeteer",".puppeteerrc.ts":"puppeteer",".puppeteerrc.yaml":"puppeteer",".puppeteerrc.yml":"puppeteer",".pylintrc":"python-misc",".python-version":"python-misc",".qa-mincloudrc":"ifanr-cloud",".release-it.cjs":"rocket",".release-it.js":"rocket",".release-it.json":"rocket",".release-it.toml":"rocket",".release-it.ts":"rocket",".release-it.yaml":"rocket",".release-it.yml":"rocket",".release-plz.toml":"rocket",".releaserc":"semantic-release",".releaserc.cjs":"semantic-release",".releaserc.cts":"semantic-release",".releaserc.js":"semantic-release",".releaserc.json":"semantic-release",".releaserc.json5":"semantic-release",".releaserc.jsonc":"semantic-release",".releaserc.mjs":"semantic-release",".releaserc.mts":"semantic-release",".releaserc.toml":"semantic-release",".releaserc.ts":"semantic-release",".releaserc.yaml":"semantic-release",".releaserc.yml":"semantic-release",".remarkignore":"remark",".remarkrc":"remark",".remarkrc.cjs":"remark",".remarkrc.js":"remark",".remarkrc.json":"remark",".remarkrc.mjs":"remark",".remarkrc.yaml":"remark",".remarkrc.yml":"remark",".renovaterc":"renovate",".renovaterc.json":"renovate",".replit":"replit",".rhistory":"r",".rspec":"rspec",".rubocop-todo.yml":"rubocop",".rubocop.yml":"rubocop",".rubocop_todo.yml":"rubocop",".ruby-version":"ruby",".ruff.toml":"ruff",".scrapy":"python-misc",".secrets":"key",".semgrepignore":"semgrep",".sentryclirc":"sentry",".sequelizerc":"sequelize",".shellcheckrc":"shellcheck",".slugignore":"slug",".snyk":"snyk",".sonarcloud.properties":"sonarcloud",".stackblitzrc":"stackblitz",".steadybit.yaml":"steadybit",".steadybit.yml":"steadybit",".stryker.conf.cjs":"stryker",".stryker.conf.js":"stryker",".stryker.conf.json":"stryker",".stryker.conf.mjs":"stryker",".stryker.config.cjs":"stryker",".stryker.config.js":"stryker",".stryker.config.json":"stryker",".stryker.config.mjs":"stryker",".stylelintcache":"stylelint",".stylelintignore":"stylelint",".stylelintrc":"stylelint",".stylelintrc.cjs":"stylelint",".stylelintrc.cts":"stylelint",".stylelintrc.js":"stylelint",".stylelintrc.json":"stylelint",".stylelintrc.json5":"stylelint",".stylelintrc.jsonc":"stylelint",".stylelintrc.mjs":"stylelint",".stylelintrc.mts":"stylelint",".stylelintrc.toml":"stylelint",".stylelintrc.ts":"stylelint",".stylelintrc.yaml":"stylelint",".stylelintrc.yml":"stylelint",".svgrrc":"svgr",".svgrrc.cjs":"svgr",".svgrrc.cts":"svgr",".svgrrc.js":"svgr",".svgrrc.json":"svgr",".svgrrc.json5":"svgr",".svgrrc.jsonc":"svgr",".svgrrc.mjs":"svgr",".svgrrc.mts":"svgr",".svgrrc.toml":"svgr",".svgrrc.ts":"svgr",".svgrrc.yaml":"svgr",".svgrrc.yml":"svgr",".swift-format":"swift",".swift-version":"swift",".swiftformat":"swift",".syncpackrc":"syncpack",".syncpackrc.cjs":"syncpack",".syncpackrc.cts":"syncpack",".syncpackrc.js":"syncpack",".syncpackrc.json":"syncpack",".syncpackrc.json5":"syncpack",".syncpackrc.jsonc":"syncpack",".syncpackrc.mjs":"syncpack",".syncpackrc.mts":"syncpack",".syncpackrc.toml":"syncpack",".syncpackrc.ts":"syncpack",".syncpackrc.yaml":"syncpack",".syncpackrc.yml":"syncpack",".taskrc.yaml":"taskfile",".taskrc.yml":"taskfile",".taurignore":"tauri",".tazerc":"taze",".tazerc.json":"taze",".textlintignore":"textlint",".textlintrc":"textlint",".textlintrc.cjs":"textlint",".textlintrc.js":"textlint",".textlintrc.json":"textlint",".textlintrc.yaml":"textlint",".textlintrc.yml":"textlint",".tobimake":"tobimake",".travis.yml":"travis",".umirc.cjs":"umi",".umirc.cts":"umi",".umirc.js":"umi",".umirc.mjs":"umi",".umirc.mts":"umi",".umirc.ts":"umi",".uv.toml":"uv",".vars":"tune",".vercelignore":"vercel",".vfl":"vfl",".vsconfig":"visualstudio",".vuerc":"vue-config",".wakatime-project":"wakatime",".watchmanconfig":"watchman",".whitesource":"json",".yardopts":"settings",".yarn-integrity":"yarn",".yarnclean":"yarn",".yarnrc":"yarn",".yarnrc.yaml":"yarn",".yarnrc.yml":"yarn",_sc_:"godot-assets",ace:"adonis","amplify.yml":"amplify","androidmanifest.xml":"android","angular-cli.json":"angular","angular.json":"angular",apkbuild:"console","apollo.config.js":"apollo",appfile:"fastlane",appraisals:"ruby","appveyor.yml":"appveyor","appwrite.js":"appwrite","appwrite.json":"appwrite","appwrite.ts":"appwrite",architecture:"architecture","architecture.md":"architecture","architecture.rst":"architecture","architecture.txt":"architecture",artisan:"laravel","astro.config.cjs":"astro-config","astro.config.cts":"astro-config","astro.config.js":"astro-config","astro.config.mjs":"astro-config","astro.config.mts":"astro-config","astro.config.ts":"astro-config","aurelia.json":"aurelia",authors:"authors","authors.md":"authors","authors.rst":"authors","authors.txt":"authors","auto-config.js":"auto","auto-config.json":"auto","auto-config.ts":"auto","auto-config.yaml":"auto","auto-config.yml":"auto","auto.config.js":"auto","auto.config.ts":"auto","azure-pipelines-main.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines.yml":"azure-pipelines","babel-plugin-macros.config.cjs":"babel","babel-plugin-macros.config.cts":"babel","babel-plugin-macros.config.js":"babel","babel-plugin-macros.config.json":"babel","babel-plugin-macros.config.json5":"babel","babel-plugin-macros.config.jsonc":"babel","babel-plugin-macros.config.mjs":"babel","babel-plugin-macros.config.mts":"babel","babel-plugin-macros.config.toml":"babel","babel-plugin-macros.config.ts":"babel","babel-plugin-macros.config.yaml":"babel","babel-plugin-macros.config.yml":"babel","babel-transform.js":"babel","babel.config.cjs":"babel","babel.config.cts":"babel","babel.config.js":"babel","babel.config.json":"babel","babel.config.json5":"babel","babel.config.jsonc":"babel","babel.config.mjs":"babel","babel.config.mts":"babel","babel.config.toml":"babel","babel.config.ts":"babel","babel.config.yaml":"babel","babel.config.yml":"babel",bashrc_apple_terminal:"console",berksfile:"ruby","berksfile.lock":"ruby","biome.json":"biome","biome.jsonc":"biome","bitbucket-pipelines.yaml":"bitbucket","bitbucket-pipelines.yml":"bitbucket","blitz.config.js":"blitz","blitz.config.ts":"blitz","bower.json":"bower",brewfile:"ruby",browserslist:"browserlist","buildkite.yaml":"buildkite","buildkite.yml":"buildkite","bun.lock":"bun","bun.lockb":"bun","bunfig.toml":"bun","cabal.project":"cabal","cabal.project.freeze":"cabal","cabal.project.local":"cabal",caddyfile:"caddy","capacitor.config.json":"capacitor","capacitor.config.ts":"capacitor",capfile:"ruby","cdp.pid":"json","celerybeat-schedule":"python-misc","celerybeat.pid":"python-misc",changelog:"changelog","changelog.md":"changelog","changelog.rst":"changelog","changelog.txt":"changelog",changes:"changelog","changes.md":"changelog","changes.rst":"changelog","changes.txt":"changelog",cheffile:"ruby","chromatic.config.json":"chromatic","circle.yml":"circleci","citation.cff":"citation","claude.local.md":"claude","claude.md":"claude","cmakecache.txt":"cmake","cmakelists.txt":"cmake","cmakepresets.json":"cmake",cname:"http",code_of_conduct:"conduct","code_of_conduct.md":"conduct","code_of_conduct.txt":"conduct","codecov.yaml":"codecov","codecov.yml":"codecov",codeowners:"codeowners","commit-msg":"console",commit_editmsg:"git","commitlint.config.cjs":"commitlint","commitlint.config.cts":"commitlint","commitlint.config.js":"commitlint","commitlint.config.json":"commitlint","commitlint.config.json5":"commitlint","commitlint.config.jsonc":"commitlint","commitlint.config.mjs":"commitlint","commitlint.config.mts":"commitlint","commitlint.config.toml":"commitlint","commitlint.config.ts":"commitlint","commitlint.config.yaml":"commitlint","commitlint.config.yml":"commitlint","compile_flags.txt":"settings","compose.alpha.yaml":"docker","compose.alpha.yml":"docker","compose.beta.yaml":"docker","compose.beta.yml":"docker","compose.ci.yaml":"docker","compose.ci.yml":"docker","compose.dev.yaml":"docker","compose.dev.yml":"docker","compose.development.yaml":"docker","compose.development.yml":"docker","compose.local.yaml":"docker","compose.local.yml":"docker","compose.override.yaml":"docker","compose.override.yml":"docker","compose.prod.yaml":"docker","compose.prod.yml":"docker","compose.production.yaml":"docker","compose.production.yml":"docker","compose.stage.yaml":"docker","compose.stage.yml":"docker","compose.staging.yaml":"docker","compose.staging.yml":"docker","compose.test.yaml":"docker","compose.test.yml":"docker","compose.testing.yaml":"docker","compose.testing.yml":"docker","compose.web.yaml":"docker","compose.web.yml":"docker","compose.worker.yaml":"docker","compose.worker.yml":"docker","compose.yaml":"docker","compose.yml":"docker","composer.lock":"json","concourse.yml":"concourse",containerfile:"docker","containerfile.alpha":"docker","containerfile.beta":"docker","containerfile.ci":"docker","containerfile.dev":"docker","containerfile.development":"docker","containerfile.local":"docker","containerfile.prod":"docker","containerfile.production":"docker","containerfile.stage":"docker","containerfile.staging":"docker","containerfile.test":"docker","containerfile.testing":"docker","containerfile.web":"docker","containerfile.worker":"docker","contentlayer.config.cjs":"contentlayer","contentlayer.config.cts":"contentlayer","contentlayer.config.js":"contentlayer","contentlayer.config.mjs":"contentlayer","contentlayer.config.mts":"contentlayer","contentlayer.config.ts":"contentlayer",contributing:"contributing","contributing.md":"contributing","contributing.rst":"contributing","contributing.txt":"contributing",contributors:"authors","contributors.md":"authors","contributors.rst":"authors","contributors.txt":"authors","copilot-instructions.md":"copilot",copying:"license","copying.md":"license","copying.rst":"license","copying.txt":"license",copyright:"license","copyright.md":"license","copyright.rst":"license","copyright.txt":"license","craco.config.cjs":"craco","craco.config.cts":"craco","craco.config.js":"craco","craco.config.json":"craco","craco.config.json5":"craco","craco.config.jsonc":"craco","craco.config.mjs":"craco","craco.config.mts":"craco","craco.config.toml":"craco","craco.config.ts":"craco","craco.config.yaml":"craco","craco.config.yml":"craco",credits:"credits","credits.md":"credits","credits.rst":"credits","credits.txt":"credits","cypress.config.cjs":"cypress","cypress.config.cts":"cypress","cypress.config.js":"cypress","cypress.config.mjs":"cypress","cypress.config.mts":"cypress","cypress.config.ts":"cypress","cypress.env.json":"cypress","cypress.json":"cypress","cz.json":"commitizen","cz.toml":"commitizen","cz.yaml":"commitizen","cz.yml":"commitizen",dangerfile:"ruby",deliverfile:"ruby","deno.json":"deno","deno.jsonc":"deno","deno.lock":"deno","dependabot.yaml":"dependabot","dependabot.yml":"dependabot","docker-compose.alpha.yaml":"docker","docker-compose.alpha.yml":"docker","docker-compose.beta.yaml":"docker","docker-compose.beta.yml":"docker","docker-compose.ci.yaml":"docker","docker-compose.ci.yml":"docker","docker-compose.dev.yaml":"docker","docker-compose.dev.yml":"docker","docker-compose.development.yaml":"docker","docker-compose.development.yml":"docker","docker-compose.local.yaml":"docker","docker-compose.local.yml":"docker","docker-compose.override.yaml":"docker","docker-compose.override.yml":"docker","docker-compose.prod.yaml":"docker","docker-compose.prod.yml":"docker","docker-compose.production.yaml":"docker","docker-compose.production.yml":"docker","docker-compose.stage.yaml":"docker","docker-compose.stage.yml":"docker","docker-compose.staging.yaml":"docker","docker-compose.staging.yml":"docker","docker-compose.test.yaml":"docker","docker-compose.test.yml":"docker","docker-compose.testing.yaml":"docker","docker-compose.testing.yml":"docker","docker-compose.web.yaml":"docker","docker-compose.web.yml":"docker","docker-compose.worker.yaml":"docker","docker-compose.worker.yml":"docker","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker","dockerfile.alpha":"docker","dockerfile.beta":"docker","dockerfile.ci":"docker","dockerfile.dev":"docker","dockerfile.development":"docker","dockerfile.local":"docker","dockerfile.prod":"docker","dockerfile.production":"docker","dockerfile.stage":"docker","dockerfile.staging":"docker","dockerfile.test":"docker","dockerfile.testing":"docker","dockerfile.web":"docker","dockerfile.windows":"docker","dockerfile.worker":"docker","drizzle.config.dev.js":"drizzle","drizzle.config.dev.json":"drizzle","drizzle.config.dev.ts":"drizzle","drizzle.config.js":"drizzle","drizzle.config.json":"drizzle","drizzle.config.prod.js":"drizzle","drizzle.config.prod.json":"drizzle","drizzle.config.prod.ts":"drizzle","drizzle.config.ts":"drizzle","duc.fbs":"duc",dune:"dune","dune-project":"dune","dune-workspace":"dune","dune-workspace.dev":"dune","eas.json":"expo","ecosystem.config.cjs":"pm2-ecosystem","ecosystem.config.cts":"pm2-ecosystem","ecosystem.config.js":"pm2-ecosystem","ecosystem.config.mjs":"pm2-ecosystem","ecosystem.config.mts":"pm2-ecosystem","ecosystem.config.ts":"pm2-ecosystem","ember-cli-builds.js":"ember","esbuild.cjs":"esbuild","esbuild.config.cjs":"esbuild","esbuild.config.cts":"esbuild","esbuild.config.js":"esbuild","esbuild.config.mjs":"esbuild","esbuild.config.mts":"esbuild","esbuild.config.ts":"esbuild","esbuild.cts":"esbuild","esbuild.dev.cjs":"esbuild","esbuild.dev.cts":"esbuild","esbuild.dev.js":"esbuild","esbuild.dev.mjs":"esbuild","esbuild.dev.mts":"esbuild","esbuild.dev.ts":"esbuild","esbuild.js":"esbuild","esbuild.mjs":"esbuild","esbuild.mts":"esbuild","esbuild.prod.cjs":"esbuild","esbuild.prod.cts":"esbuild","esbuild.prod.js":"esbuild","esbuild.prod.mjs":"esbuild","esbuild.prod.mts":"esbuild","esbuild.prod.ts":"esbuild","esbuild.stage.cjs":"esbuild","esbuild.stage.cts":"esbuild","esbuild.stage.js":"esbuild","esbuild.stage.mjs":"esbuild","esbuild.stage.mts":"esbuild","esbuild.stage.ts":"esbuild","esbuild.test.cjs":"esbuild","esbuild.test.cts":"esbuild","esbuild.test.js":"esbuild","esbuild.test.mjs":"esbuild","esbuild.test.mts":"esbuild","esbuild.test.ts":"esbuild","esbuild.ts":"esbuild","eslint-options.js":"eslint","eslint.config.cjs":"eslint","eslint.config.cts":"eslint","eslint.config.js":"eslint","eslint.config.json":"eslint","eslint.config.json5":"eslint","eslint.config.jsonc":"eslint","eslint.config.mjs":"eslint","eslint.config.mts":"eslint","eslint.config.toml":"eslint","eslint.config.ts":"eslint","eslint.config.yaml":"eslint","eslint.config.yml":"eslint",excalidraw:"excalidraw","excalidraw.json":"excalidraw","excalidraw.png":"excalidraw","excalidraw.svg":"excalidraw","fabric.mod.json":"minecraft-fabric",fastfile:"fastlane","favicon.ico":"favicon","firebase.config.js":"firebase","firebase.json":"firebase","firestore.indexes.json":"firebase","firestore.rules":"firebase","fuse.js":"fusebox","garden.yaml":"garden","garden.yml":"garden","gatsby-browser.js":"gatsby","gatsby-browser.tsx":"gatsby","gatsby-config.js":"gatsby","gatsby-config.mjs":"gatsby","gatsby-config.ts":"gatsby","gatsby-node.js":"gatsby","gatsby-node.mjs":"gatsby","gatsby-node.ts":"gatsby","gatsby-ssr.js":"gatsby","gatsby-ssr.tsx":"gatsby",gemfile:"gemfile","gemini.md":"gemini-ai","git-history":"git","git-rebase-todo":"git","gleam.toml":"gleam",gnumakefile:"makefile","go.mod":"go-mod","go.sum":"go-mod","go.work":"go-mod","go.work.sum":"go-mod","google-services.json":"google","googleservice-info.plist":"google","gradle-wrapper.properties":"gradle","gradle.properties":"gradle",gradlew:"gradle","gradlew.bat":"gradle","graphql.config.cjs":"graphql","graphql.config.cts":"graphql","graphql.config.js":"graphql","graphql.config.json":"graphql","graphql.config.json5":"graphql","graphql.config.jsonc":"graphql","graphql.config.mjs":"graphql","graphql.config.mts":"graphql","graphql.config.toml":"graphql","graphql.config.ts":"graphql","graphql.config.yaml":"graphql","graphql.config.yml":"graphql","gridsome.config.js":"gridsome","gridsome.server.js":"gridsome","gruntfile.babel.coffee":"grunt","gruntfile.babel.js":"grunt","gruntfile.babel.ts":"grunt","gruntfile.cjs":"grunt","gruntfile.coffee":"grunt","gruntfile.cts":"grunt","gruntfile.js":"grunt","gruntfile.ts":"grunt",guardfile:"ruby","gulpfile.babel.js":"gulp","gulpfile.cjs":"gulp","gulpfile.cts":"gulp","gulpfile.js":"gulp","gulpfile.mjs":"gulp","gulpfile.mts":"gulp","gulpfile.ts":"gulp",gymfile:"ruby","hadolint.yaml":"hadolint","hadolint.yml":"hadolint","hardhat.config.js":"hardhat","hardhat.config.ts":"hardhat","harmonix.config.js":"harmonix","harmonix.config.ts":"harmonix",hgrc:"mercurial","histoire.config.cjs":"histoire","histoire.config.cts":"histoire","histoire.config.js":"histoire","histoire.config.mjs":"histoire","histoire.config.mts":"histoire","histoire.config.ts":"histoire",hobofile:"ruby","horusec-config.json":"horusec",hosts:"hosts","husky.config.cjs":"husky","husky.config.cts":"husky","husky.config.js":"husky","husky.config.json":"husky","husky.config.json5":"husky","husky.config.jsonc":"husky","husky.config.mjs":"husky","husky.config.mts":"husky","husky.config.toml":"husky","husky.config.ts":"husky","husky.config.yaml":"husky","husky.config.yml":"husky",install:"installation",installation:"installation","ionic.config.json":"ionic",jakefile:"javascript",jenkinsfile:"jenkins","jest-e2e.config.cjs":"jest","jest-e2e.config.cts":"jest","jest-e2e.config.js":"jest","jest-e2e.config.json":"jest","jest-e2e.config.mjs":"jest","jest-e2e.config.mts":"jest","jest-e2e.config.ts":"jest","jest-e2e.json":"jest","jest-github-actions-reporter.js":"jest","jest-preset.cjs":"jest","jest-preset.js":"jest","jest-preset.json":"jest","jest-preset.mjs":"jest","jest-unit.config.js":"jest","jest.config.cjs":"jest","jest.config.cts":"jest","jest.config.js":"jest","jest.config.json":"jest","jest.config.mjs":"jest","jest.config.mts":"jest","jest.config.ts":"jest","jest.e2e.config.cjs":"jest","jest.e2e.config.cts":"jest","jest.e2e.config.js":"jest","jest.e2e.config.json":"jest","jest.e2e.config.mjs":"jest","jest.e2e.config.mts":"jest","jest.e2e.config.ts":"jest","jest.e2e.json":"jest","jest.json":"jest","jest.preset.cjs":"jest","jest.preset.js":"jest","jest.preset.json":"jest","jest.preset.mjs":"jest","jest.setup.js":"jest","jest.setup.ts":"jest","jest.teardown.js":"jest","jsconfig.json":"jsconfig","jsr.json":"jsr","jsr.jsonc":"jsr",justfile:"just","jvm.config":"maven","k8s.yaml":"kubernetes","k8s.yml":"kubernetes","karma-main.js":"karma","karma-main.ts":"karma","karma.conf.coffee":"karma","karma.conf.js":"karma","karma.conf.ts":"karma","karma.config.js":"karma","karma.config.ts":"karma",kbuild:"makefile","kcl.mod":"kcl","kcl.yaml":"kcl","kcl.yml":"kcl","keystatic.config.js":"keystatic","keystatic.config.jsx":"keystatic","keystatic.config.ts":"keystatic","keystatic.config.tsx":"keystatic","knip.config.js":"knip","knip.config.ts":"knip","knip.js":"knip","knip.json":"knip","knip.jsonc":"knip","knip.ts":"knip","kubernetes.yaml":"kubernetes","kubernetes.yml":"kubernetes",latexmkrc:"latexmk","lefthook-local.json":"lefthook","lefthook-local.toml":"lefthook","lefthook-local.yaml":"lefthook","lefthook-local.yml":"lefthook","lefthook.json":"lefthook","lefthook.toml":"lefthook","lefthook.yaml":"lefthook","lefthook.yml":"lefthook",lefthookrc:"lefthook","lerna.json":"lerna","liara.json":"liara",licence:"license","licence-agpl":"license","licence-apache":"license","licence-bsd":"license","licence-gpl":"license","licence-lgpl":"license","licence-mit":"license","licence.md":"license","licence.rst":"license","licence.txt":"license",license:"license","license-agpl":"license","license-apache":"license","license-bsd":"license","license-gpl":"license","license-lgpl":"license","license-mit":"license","license.md":"license","license.rst":"license","license.txt":"license","lighthouserc.cjs":"lighthouse","lighthouserc.js":"lighthouse","lighthouserc.json":"lighthouse","lighthouserc.yaml":"lighthouse","lighthouserc.yml":"lighthouse","lint-staged.config.cjs":"lintstaged","lint-staged.config.js":"lintstaged","lint-staged.config.mjs":"lintstaged","lynx.config.cjs":"lynx","lynx.config.cts":"lynx","lynx.config.js":"lynx","lynx.config.mjs":"lynx","lynx.config.mts":"lynx","lynx.config.ts":"lynx",makefile:"makefile","manifest.in":"python-misc","manifest.mf":"settings","markdoc.config.cjs":"markdoc-config","markdoc.config.cts":"markdoc-config","markdoc.config.js":"markdoc-config","markdoc.config.mjs":"markdoc-config","markdoc.config.mts":"markdoc-config","markdoc.config.ts":"markdoc-config",matchfile:"ruby","maven.config":"maven","mercurial.ini":"mercurial",merge_msg:"git","meson.build":"meson","meson.options":"meson","meson_options.txt":"meson","metro.config.cjs":"metro","metro.config.cts":"metro","metro.config.js":"metro","metro.config.json":"metro","metro.config.mjs":"metro","metro.config.mts":"metro","metro.config.ts":"metro","milestones.md":"roadmap","milestones.txt":"roadmap","mocha.opts":"mocha","moon.yml":"moon","nano-staged.cjs":"nano-staged","nano-staged.js":"nano-staged","nano-staged.json":"nano-staged","nano-staged.mjs":"nano-staged","nest-cli.json":"nest","nestconfig.json":"nest","netlify.json":"netlify","netlify.toml":"netlify","netlify.yaml":"netlify","netlify.yml":"netlify","next.config.js":"next","next.config.mjs":"next","next.config.mts":"next","next.config.ts":"next","ng-package.json":"angular","nginx.conf":"nginx","nodemon-debug.json":"nodemon","nodemon.json":"nodemon","now.json":"vercel","nuget.config":"nuget","nuget.exe":"nuget","nuxt.config.js":"nuxt","nuxt.config.ts":"nuxt","nx.json":"nx","nyc.config.cjs":"istanbul","nyc.config.js":"istanbul","openapi.json":"openapi","openapi.yaml":"openapi","openapi.yml":"openapi","opencode.json":"opencode","opencode.jsonc":"opencode",owners:"codeowners","oxfmt.config.ts":"oxc","oxlint.config.ts":"oxc","package-lock.json":"nodejs","package.json":"nodejs","packship.config.js":"packship","packship.config.json":"packship","packship.config.mjs":"packship","packship.config.mts":"packship","packship.config.ts":"packship","panda.config.cjs":"panda","panda.config.cts":"panda","panda.config.js":"panda","panda.config.mjs":"panda","panda.config.mts":"panda","panda.config.ts":"panda","payload.config.js":"payload","payload.config.mjs":"payload","payload.config.mts":"payload","payload.config.ts":"payload","pdm.lock":"pdm","pdm.toml":"pdm","phpstan.dist.neon":"phpstan","phpstan.neon":"phpstan","phpstan.neon.dist":"phpstan","phpunit-watcher.yml":"phpunit","phpunit-watcher.yml.dist":"phpunit","phpunit.xml":"phpunit","phpunit.xml.dist":"phpunit",pipfile:"python-misc",pkgbuild:"console",pklproject:"pkl","pklproject.deps.json":"pkl","plastic.branchexplorer":"plastic","plastic.selector":"plastic","plastic.wktree":"plastic","plastic.workspace":"plastic","plastic.workspaces":"plastic","playwright-ct.config.cjs":"playwright","playwright-ct.config.cts":"playwright","playwright-ct.config.js":"playwright","playwright-ct.config.mjs":"playwright","playwright-ct.config.mts":"playwright","playwright-ct.config.ts":"playwright","playwright.config.base.cjs":"playwright","playwright.config.base.cts":"playwright","playwright.config.base.js":"playwright","playwright.config.base.mjs":"playwright","playwright.config.base.mts":"playwright","playwright.config.base.ts":"playwright","playwright.config.cjs":"playwright","playwright.config.cts":"playwright","playwright.config.js":"playwright","playwright.config.mjs":"playwright","playwright.config.mts":"playwright","playwright.config.ts":"playwright","plopfile.cjs":"plop","plopfile.js":"plop","plopfile.mjs":"plop","plopfile.ts":"plop","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm",podfile:"ruby","poetry.lock":"poetry","pom.xml":"maven","post-merge":"console","postcss.config.cjs":"postcss","postcss.config.cts":"postcss","postcss.config.js":"postcss","postcss.config.json":"postcss","postcss.config.json5":"postcss","postcss.config.jsonc":"postcss","postcss.config.mjs":"postcss","postcss.config.mts":"postcss","postcss.config.toml":"postcss","postcss.config.ts":"postcss","postcss.config.yaml":"postcss","postcss.config.yml":"postcss","posthtml.config.cjs":"posthtml","posthtml.config.cts":"posthtml","posthtml.config.js":"posthtml","posthtml.config.json":"posthtml","posthtml.config.json5":"posthtml","posthtml.config.jsonc":"posthtml","posthtml.config.mjs":"posthtml","posthtml.config.mts":"posthtml","posthtml.config.toml":"posthtml","posthtml.config.ts":"posthtml","posthtml.config.yaml":"posthtml","posthtml.config.yml":"posthtml","pre-commit":"console","pre-push":"console","prettier.config.cjs":"prettier","prettier.config.cts":"prettier","prettier.config.js":"prettier","prettier.config.json":"prettier","prettier.config.json5":"prettier","prettier.config.jsonc":"prettier","prettier.config.mjs":"prettier","prettier.config.mts":"prettier","prettier.config.toml":"prettier","prettier.config.ts":"prettier","prettier.config.yaml":"prettier","prettier.config.yml":"prettier","prisma.config.ts":"prisma","prisma.yml":"prisma",procfile:"heroku","procfile.windows":"heroku","project.garden.yaml":"garden","project.garden.yml":"garden","project.graphcool":"graphcool","protractor.conf.coffee":"protractor","protractor.conf.js":"protractor","protractor.conf.ts":"protractor","protractor.config.js":"protractor","protractor.config.ts":"protractor","puppeteer.config.cjs":"puppeteer","puppeteer.config.cts":"puppeteer","puppeteer.config.js":"puppeteer","puppeteer.config.json":"puppeteer","puppeteer.config.json5":"puppeteer","puppeteer.config.jsonc":"puppeteer","puppeteer.config.mjs":"puppeteer","puppeteer.config.mts":"puppeteer","puppeteer.config.toml":"puppeteer","puppeteer.config.ts":"puppeteer","puppeteer.config.yaml":"puppeteer","puppeteer.config.yml":"puppeteer",puppetfile:"ruby","py.typed":"python-misc",pylintrc:"python-misc","pyproject.toml":"python-misc","quasar.conf.js":"quasar","quasar.conf.ts":"quasar","quasar.config.cjs":"quasar","quasar.config.js":"quasar","quasar.config.ts":"quasar",rakefile:"ruby",rantfile:"ruby",readme:"readme","readme.md":"readme","readme.rst":"readme","readme.txt":"readme","release-plz.toml":"rocket","release.config.cjs":"semantic-release","release.config.cts":"semantic-release","release.config.js":"semantic-release","release.config.json":"semantic-release","release.config.json5":"semantic-release","release.config.jsonc":"semantic-release","release.config.mjs":"semantic-release","release.config.mts":"semantic-release","release.config.toml":"semantic-release","release.config.ts":"semantic-release","release.config.yaml":"semantic-release","release.config.yml":"semantic-release","release.toml":"rocket","remix.config.js":"remix","remix.config.ts":"remix","renovate-config.json":"renovate","renovate.json":"renovate","renovate.json5":"renovate","requirements.txt":"python-misc","roadmap.md":"roadmap","roadmap.txt":"roadmap","robots.txt":"robots","rolldown.config.cjs":"rolldown","rolldown.config.cts":"rolldown","rolldown.config.js":"rolldown","rolldown.config.mjs":"rolldown","rolldown.config.mts":"rolldown","rolldown.config.ts":"rolldown","rollup-config.js":"rollup","rollup-config.mjs":"rollup","rollup-config.ts":"rollup","rollup.config.base.js":"rollup","rollup.config.base.mjs":"rollup","rollup.config.base.ts":"rollup","rollup.config.common.js":"rollup","rollup.config.common.mjs":"rollup","rollup.config.common.ts":"rollup","rollup.config.dev.js":"rollup","rollup.config.dev.mjs":"rollup","rollup.config.dev.ts":"rollup","rollup.config.js":"rollup","rollup.config.mjs":"rollup","rollup.config.prod.js":"rollup","rollup.config.prod.mjs":"rollup","rollup.config.prod.ts":"rollup","rollup.config.prod.vendor.js":"rollup","rollup.config.prod.vendor.mjs":"rollup","rollup.config.prod.vendor.ts":"rollup","rollup.config.ts":"rollup","rome.json":"rome","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","router.js":"routing","router.jsx":"routing","router.ts":"routing","router.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","rsbuild.config.cjs":"rstack","rsbuild.config.cts":"rstack","rsbuild.config.js":"rstack","rsbuild.config.mjs":"rstack","rsbuild.config.mts":"rstack","rsbuild.config.ts":"rstack","rslib.config.cjs":"rstack","rslib.config.cts":"rstack","rslib.config.js":"rstack","rslib.config.mjs":"rstack","rslib.config.mts":"rstack","rslib.config.ts":"rstack","rslint.config.cjs":"rstack","rslint.config.cts":"rstack","rslint.config.js":"rstack","rslint.config.mjs":"rstack","rslint.config.mts":"rstack","rslint.config.ts":"rstack","rslint.json":"rstack","rslint.jsonc":"rstack","rspack.config.cjs":"rstack","rspack.config.cts":"rstack","rspack.config.js":"rstack","rspack.config.mjs":"rstack","rspack.config.mts":"rstack","rspack.config.ts":"rstack","rspress.config.cjs":"rstack","rspress.config.cts":"rstack","rspress.config.js":"rstack","rspress.config.mjs":"rstack","rspress.config.mts":"rstack","rspress.config.ts":"rstack","rstest.config.cjs":"rstack","rstest.config.cts":"rstack","rstest.config.js":"rstack","rstest.config.mjs":"rstack","rstest.config.mts":"rstack","rstest.config.ts":"rstack","ruff.toml":"ruff",scanfile:"ruby",sconscript:"scons",sconstruct:"scons","screwdriver.yaml":"screwdriver","screwdriver.yml":"screwdriver",scsub:"scons",security:"lock","security.md":"lock","security.txt":"lock","semgrep.yml":"semgrep","sentry.client.config.cjs":"sentry","sentry.client.config.cts":"sentry","sentry.client.config.js":"sentry","sentry.client.config.mjs":"sentry","sentry.client.config.mts":"sentry","sentry.client.config.ts":"sentry","sentry.edge.config.cjs":"sentry","sentry.edge.config.cts":"sentry","sentry.edge.config.js":"sentry","sentry.edge.config.mjs":"sentry","sentry.edge.config.mts":"sentry","sentry.edge.config.ts":"sentry","sentry.server.config.cjs":"sentry","sentry.server.config.cts":"sentry","sentry.server.config.js":"sentry","sentry.server.config.mjs":"sentry","sentry.server.config.mts":"sentry","sentry.server.config.ts":"sentry","serverless.js":"serverless","serverless.json":"serverless","serverless.ts":"serverless","serverless.yaml":"serverless","serverless.yml":"serverless",sha256sums:"key",shellcheckrc:"shellcheck","skill.md":"skill",snakefile:"snakemake","snapcraft.yaml":"snapcraft","snapcraft.yml":"snapcraft",snapfile:"ruby","snowpack.config.cjs":"snowpack","snowpack.config.cts":"snowpack","snowpack.config.js":"snowpack","snowpack.config.json":"snowpack","snowpack.config.mjs":"snowpack","snowpack.config.mts":"snowpack","snowpack.config.ts":"snowpack","snowpack.deps.json":"snowpack","sonar-project.properties":"sonarcloud","sonarcloud.yaml":"sonarcloud","sonarqube.analysis.xml":"sonarcloud","src/bashly.yaml":"bashly","src/bashly.yml":"bashly","steadybit.yaml":"steadybit","steadybit.yml":"steadybit","stencil.config.js":"stencil","stencil.config.ts":"stencil","stitches.config.js":"stitches","stitches.config.ts":"stitches","stryker.conf.cjs":"stryker","stryker.conf.js":"stryker","stryker.conf.json":"stryker","stryker.conf.mjs":"stryker","stryker.config.cjs":"stryker","stryker.config.js":"stryker","stryker.config.json":"stryker","stryker.config.mjs":"stryker","stylelint.config.cjs":"stylelint","stylelint.config.cts":"stylelint","stylelint.config.js":"stylelint","stylelint.config.json":"stylelint","stylelint.config.json5":"stylelint","stylelint.config.jsonc":"stylelint","stylelint.config.mjs":"stylelint","stylelint.config.mts":"stylelint","stylelint.config.toml":"stylelint","stylelint.config.ts":"stylelint","stylelint.config.yaml":"stylelint","stylelint.config.yml":"stylelint","supabase.js":"supabase","supabase.py":"supabase","supabase.ts":"supabase","svelte.config.cjs":"svelte","svelte.config.cts":"svelte","svelte.config.js":"svelte","svelte.config.mjs":"svelte","svelte.config.mts":"svelte","svelte.config.ts":"svelte","svgo.config.cjs":"svgo","svgo.config.js":"svgo","svgo.config.mjs":"svgo","svgr.config.cjs":"svgr","svgr.config.cts":"svgr","svgr.config.js":"svgr","svgr.config.json":"svgr","svgr.config.json5":"svgr","svgr.config.jsonc":"svgr","svgr.config.mjs":"svgr","svgr.config.mts":"svgr","svgr.config.toml":"svgr","svgr.config.ts":"svgr","svgr.config.yaml":"svgr","svgr.config.yml":"svgr","swagger.json":"swagger","swagger.yaml":"swagger","swagger.yml":"swagger","syncpack.config.cjs":"syncpack","syncpack.config.cts":"syncpack","syncpack.config.js":"syncpack","syncpack.config.json":"syncpack","syncpack.config.json5":"syncpack","syncpack.config.jsonc":"syncpack","syncpack.config.mjs":"syncpack","syncpack.config.mts":"syncpack","syncpack.config.toml":"syncpack","syncpack.config.ts":"syncpack","syncpack.config.yaml":"syncpack","syncpack.config.yml":"syncpack",tags:"label","tailwind.config.cjs":"tailwindcss","tailwind.config.cts":"tailwindcss","tailwind.config.js":"tailwindcss","tailwind.config.mjs":"tailwindcss","tailwind.config.mts":"tailwindcss","tailwind.config.ts":"tailwindcss","tailwind.js":"tailwindcss","tailwind.ts":"tailwindcss","taskfile.dist.yaml":"taskfile","taskfile.dist.yml":"taskfile","taskfile.yaml":"taskfile","taskfile.yml":"taskfile","tauri.conf.json":"tauri","tauri.config.json":"tauri","tauri.linux.conf.json":"tauri","tauri.macos.conf.json":"tauri","tauri.windows.conf.json":"tauri","taze.config.cjs":"taze","taze.config.cts":"taze","taze.config.js":"taze","taze.config.mjs":"taze","taze.config.mts":"taze","taze.config.ts":"taze",thorfile:"ruby",tiltfile:"tilt","timeline.md":"roadmap","timeline.txt":"roadmap","todo.md":"todo","todos.md":"todo","trigger.config.cjs":"trigger","trigger.config.cts":"trigger","trigger.config.js":"trigger","trigger.config.mjs":"trigger","trigger.config.mts":"trigger","trigger.config.ts":"trigger","tsconfig.app.json":"tsconfig","tsconfig.base.json":"tsconfig","tsconfig.build.json":"tsconfig","tsconfig.cjs.json":"tsconfig","tsconfig.client.json":"tsconfig","tsconfig.config.json":"tsconfig","tsconfig.declaration.json":"tsconfig","tsconfig.doc.json":"tsconfig","tsconfig.e2e.json":"tsconfig","tsconfig.editor.json":"tsconfig","tsconfig.eslint.json":"tsconfig","tsconfig.esm.json":"tsconfig","tsconfig.json":"tsconfig","tsconfig.lib.json":"tsconfig","tsconfig.lib.prod.json":"tsconfig","tsconfig.main.json":"tsconfig","tsconfig.mjs.json":"tsconfig","tsconfig.node.json":"tsconfig","tsconfig.paths.json":"tsconfig","tsconfig.renderer.json":"tsconfig","tsconfig.server.json":"tsconfig","tsconfig.spec.json":"tsconfig","tsconfig.test.json":"tsconfig","tsconfig.vitest.json":"tsconfig","tsconfig.web.json":"tsconfig","tsconfig.webworker.json":"tsconfig","tsconfig.worker.json":"tsconfig","tsdoc.json":"tsdoc","tsdown.config":"tsdown","tsdown.config.cjs":"tsdown","tsdown.config.cts":"tsdown","tsdown.config.js":"tsdown","tsdown.config.json":"tsdown","tsdown.config.mjs":"tsdown","tsdown.config.mts":"tsdown","tsdown.config.ts":"tsdown","turbo.json":"turborepo","turbo.jsonc":"turborepo","typedoc.js":"typedoc","typedoc.json":"typedoc","typst.toml":"typst",unlicense:"unlicense","unlicense.txt":"unlicense","uno.config.js":"unocss","uno.config.mjs":"unocss","uno.config.mts":"unocss","uno.config.ts":"unocss","unocss.config.js":"unocss","unocss.config.mjs":"unocss","unocss.config.mts":"unocss","unocss.config.ts":"unocss","uv.lock":"uv","uv.toml":"uv","v.mod":"vlang",vagrantfile:"vagrant","velite.config.cjs":"velite","velite.config.cts":"velite","velite.config.js":"velite","velite.config.mjs":"velite","velite.config.mts":"velite","velite.config.ts":"velite","vercel.json":"vercel","vercel.ts":"vercel","verdaccio.yml":"verdaccio","vetur.config.js":"vue-config","vetur.config.ts":"vue-config","vite.config.cjs":"vite","vite.config.cts":"vite","vite.config.js":"vite","vite.config.mjs":"vite","vite.config.mts":"vite","vite.config.ts":"vite","vitest.config.cjs":"vitest","vitest.config.cts":"vitest","vitest.config.js":"vitest","vitest.config.mjs":"vitest","vitest.config.mts":"vitest","vitest.config.ts":"vitest","vitest.e2e.config.cjs":"vitest","vitest.e2e.config.cts":"vitest","vitest.e2e.config.js":"vitest","vitest.e2e.config.mjs":"vitest","vitest.e2e.config.mts":"vitest","vitest.e2e.config.ts":"vitest","vitest.unit.config.cjs":"vitest","vitest.unit.config.cts":"vitest","vitest.unit.config.js":"vitest","vitest.unit.config.mjs":"vitest","vitest.unit.config.mts":"vitest","vitest.unit.config.ts":"vitest","vitest.workspace.cjs":"vitest","vitest.workspace.cts":"vitest","vitest.workspace.js":"vitest","vitest.workspace.mjs":"vitest","vitest.workspace.mts":"vitest","vitest.workspace.ts":"vitest","volar.config.js":"vue-config","vpkg.json":"vlang","vue.config.cjs":"vue-config","vue.config.js":"vue-config","vue.config.mjs":"vue-config","vue.config.ts":"vue-config","wallaby.conf.js":"wallaby","wallaby.js":"wallaby","wally.toml":"wally","warp.md":"warp","webpack.base.cjs":"webpack","webpack.base.cts":"webpack","webpack.base.js":"webpack","webpack.base.mjs":"webpack","webpack.base.mts":"webpack","webpack.base.ts":"webpack","webpack.cjs":"webpack","webpack.client.cjs":"webpack","webpack.client.cts":"webpack","webpack.client.js":"webpack","webpack.client.mjs":"webpack","webpack.client.mts":"webpack","webpack.client.ts":"webpack","webpack.common.cjs":"webpack","webpack.common.cts":"webpack","webpack.common.js":"webpack","webpack.common.mjs":"webpack","webpack.common.mts":"webpack","webpack.common.ts":"webpack","webpack.config.babel.cjs":"webpack","webpack.config.babel.cts":"webpack","webpack.config.babel.js":"webpack","webpack.config.babel.mjs":"webpack","webpack.config.babel.mts":"webpack","webpack.config.babel.ts":"webpack","webpack.config.base.babel.cjs":"webpack","webpack.config.base.babel.cts":"webpack","webpack.config.base.babel.js":"webpack","webpack.config.base.babel.mjs":"webpack","webpack.config.base.babel.mts":"webpack","webpack.config.base.babel.ts":"webpack","webpack.config.base.cjs":"webpack","webpack.config.base.cts":"webpack","webpack.config.base.js":"webpack","webpack.config.base.mjs":"webpack","webpack.config.base.mts":"webpack","webpack.config.base.ts":"webpack","webpack.config.cjs":"webpack","webpack.config.client.cjs":"webpack","webpack.config.client.cts":"webpack","webpack.config.client.js":"webpack","webpack.config.client.mjs":"webpack","webpack.config.client.mts":"webpack","webpack.config.client.ts":"webpack","webpack.config.coffee":"webpack","webpack.config.common.babel.cjs":"webpack","webpack.config.common.babel.cts":"webpack","webpack.config.common.babel.js":"webpack","webpack.config.common.babel.mjs":"webpack","webpack.config.common.babel.mts":"webpack","webpack.config.common.babel.ts":"webpack","webpack.config.common.cjs":"webpack","webpack.config.common.cts":"webpack","webpack.config.common.js":"webpack","webpack.config.common.mjs":"webpack","webpack.config.common.mts":"webpack","webpack.config.common.ts":"webpack","webpack.config.cts":"webpack","webpack.config.dev.babel.cjs":"webpack","webpack.config.dev.babel.cts":"webpack","webpack.config.dev.babel.js":"webpack","webpack.config.dev.babel.mjs":"webpack","webpack.config.dev.babel.mts":"webpack","webpack.config.dev.babel.ts":"webpack","webpack.config.dev.cjs":"webpack","webpack.config.dev.cts":"webpack","webpack.config.dev.js":"webpack","webpack.config.dev.mjs":"webpack","webpack.config.dev.mts":"webpack","webpack.config.dev.ts":"webpack","webpack.config.js":"webpack","webpack.config.main.cjs":"webpack","webpack.config.main.cts":"webpack","webpack.config.main.js":"webpack","webpack.config.main.mjs":"webpack","webpack.config.main.mts":"webpack","webpack.config.main.ts":"webpack","webpack.config.mjs":"webpack","webpack.config.mts":"webpack","webpack.config.prod.babel.cjs":"webpack","webpack.config.prod.babel.cts":"webpack","webpack.config.prod.babel.js":"webpack","webpack.config.prod.babel.mjs":"webpack","webpack.config.prod.babel.mts":"webpack","webpack.config.prod.babel.ts":"webpack","webpack.config.prod.cjs":"webpack","webpack.config.prod.cts":"webpack","webpack.config.prod.js":"webpack","webpack.config.prod.mjs":"webpack","webpack.config.prod.mts":"webpack","webpack.config.prod.ts":"webpack","webpack.config.production.babel.cjs":"webpack","webpack.config.production.babel.cts":"webpack","webpack.config.production.babel.js":"webpack","webpack.config.production.babel.mjs":"webpack","webpack.config.production.babel.mts":"webpack","webpack.config.production.babel.ts":"webpack","webpack.config.production.cjs":"webpack","webpack.config.production.cts":"webpack","webpack.config.production.js":"webpack","webpack.config.production.mjs":"webpack","webpack.config.production.mts":"webpack","webpack.config.production.ts":"webpack","webpack.config.renderer.cjs":"webpack","webpack.config.renderer.cts":"webpack","webpack.config.renderer.js":"webpack","webpack.config.renderer.mjs":"webpack","webpack.config.renderer.mts":"webpack","webpack.config.renderer.ts":"webpack","webpack.config.server.cjs":"webpack","webpack.config.server.cts":"webpack","webpack.config.server.js":"webpack","webpack.config.server.mjs":"webpack","webpack.config.server.mts":"webpack","webpack.config.server.ts":"webpack","webpack.config.staging.babel.cjs":"webpack","webpack.config.staging.babel.cts":"webpack","webpack.config.staging.babel.js":"webpack","webpack.config.staging.babel.mjs":"webpack","webpack.config.staging.babel.mts":"webpack","webpack.config.staging.babel.ts":"webpack","webpack.config.staging.cjs":"webpack","webpack.config.staging.cts":"webpack","webpack.config.staging.js":"webpack","webpack.config.staging.mjs":"webpack","webpack.config.staging.mts":"webpack","webpack.config.staging.ts":"webpack","webpack.config.test.cjs":"webpack","webpack.config.test.cts":"webpack","webpack.config.test.js":"webpack","webpack.config.test.mjs":"webpack","webpack.config.test.mts":"webpack","webpack.config.test.ts":"webpack","webpack.config.ts":"webpack","webpack.config.vendor.cjs":"webpack","webpack.config.vendor.cts":"webpack","webpack.config.vendor.js":"webpack","webpack.config.vendor.mjs":"webpack","webpack.config.vendor.mts":"webpack","webpack.config.vendor.production.cjs":"webpack","webpack.config.vendor.production.cts":"webpack","webpack.config.vendor.production.js":"webpack","webpack.config.vendor.production.mjs":"webpack","webpack.config.vendor.production.mts":"webpack","webpack.config.vendor.production.ts":"webpack","webpack.config.vendor.ts":"webpack","webpack.cts":"webpack","webpack.dev.cjs":"webpack","webpack.dev.cts":"webpack","webpack.dev.js":"webpack","webpack.dev.mjs":"webpack","webpack.dev.mts":"webpack","webpack.dev.ts":"webpack","webpack.development.cjs":"webpack","webpack.development.cts":"webpack","webpack.development.js":"webpack","webpack.development.mjs":"webpack","webpack.development.mts":"webpack","webpack.development.ts":"webpack","webpack.dist.cjs":"webpack","webpack.dist.cts":"webpack","webpack.dist.js":"webpack","webpack.dist.mjs":"webpack","webpack.dist.mts":"webpack","webpack.dist.ts":"webpack","webpack.js":"webpack","webpack.mix.cjs":"webpack","webpack.mix.cts":"webpack","webpack.mix.js":"webpack","webpack.mix.mjs":"webpack","webpack.mix.mts":"webpack","webpack.mix.ts":"webpack","webpack.mjs":"webpack","webpack.mts":"webpack","webpack.prod.cjs":"webpack","webpack.prod.config.cjs":"webpack","webpack.prod.config.cts":"webpack","webpack.prod.config.js":"webpack","webpack.prod.config.mjs":"webpack","webpack.prod.config.mts":"webpack","webpack.prod.config.ts":"webpack","webpack.prod.cts":"webpack","webpack.prod.js":"webpack","webpack.prod.mjs":"webpack","webpack.prod.mts":"webpack","webpack.prod.ts":"webpack","webpack.production.cjs":"webpack","webpack.production.cts":"webpack","webpack.production.js":"webpack","webpack.production.mjs":"webpack","webpack.production.mts":"webpack","webpack.production.ts":"webpack","webpack.server.cjs":"webpack","webpack.server.cts":"webpack","webpack.server.js":"webpack","webpack.server.mjs":"webpack","webpack.server.mts":"webpack","webpack.server.ts":"webpack","webpack.test.cjs":"webpack","webpack.test.cts":"webpack","webpack.test.js":"webpack","webpack.test.mjs":"webpack","webpack.test.mts":"webpack","webpack.test.ts":"webpack","webpack.ts":"webpack","webpackfile.cjs":"webpack","webpackfile.cts":"webpack","webpackfile.js":"webpack","webpackfile.mjs":"webpack","webpackfile.mts":"webpack","webpackfile.ts":"webpack","werf-giterminism.yaml":"werf","werf-giterminism.yml":"werf","werf-includes.lock":"werf","werf-includes.yaml":"werf","werf-includes.yml":"werf","werf.yaml":"werf","werf.yml":"werf","windi.config.cjs":"windicss","windi.config.cts":"windicss","windi.config.js":"windicss","windi.config.json":"windicss","windi.config.ts":"windicss","wrangler.json":"wrangler","wrangler.jsonc":"wrangler","wrangler.toml":"wrangler","wxt.config.cjs":"wxt","wxt.config.cts":"wxt","wxt.config.js":"wxt","wxt.config.mjs":"wxt","wxt.config.mts":"wxt","wxt.config.ts":"wxt","xamlstyler.json":"xaml",xmake:"xmake","xmake.lua":"xmake","yarn-error.log":"yarn","yarn.lock":"yarn","zeabur.json":"zeabur","zeabur.json5":"zeabur","zeabur.jsonc":"zeabur","zeabur.toml":"zeabur","zeabur.yaml":"zeabur","zeabur.yml":"zeabur",zlogin:"console",zlogout:"console",zprofile:"console",zshenv:"console",zshrc:"console",zshrc_apple_terminal:"console"},fy={60:"slint",".ncurc.js":"dependencies-update",".ncurc.json":"dependencies-update",".ncurc.yml":"dependencies-update",".wakatime-project":"wakatime","001":"zip","123dx":"3d","3dm":"3d","3ds":"3d","3fr":"image","3mf":"3d","4th":"forth","7z":"zip","8svx":"audio",a:"lib",a51:"assembly",aa:"audio",aac:"audio",aax:"audio",abap:"abap",abc:"abc",ac:"3d",ac3:"audio",accdb:"database",accde:"database",acds:"abap",act:"palette",ad:"asciidoc",ada:"ada",adb:"ada",adoc:"asciidoc",adp:"database",ads:"ada",aea:"assembly",afphoto:"image",agc:"assembly",ags:"assembly",ahk:"autohotkey",ai:"adobe-illustrator",aif:"audio",aiff:"audio",ait:"adobe-illustrator",alac:"audio",ali:"ada",alloy:"grafana-alloy",ami:"image",amr:"audio",amx:"pawn",ape:"audio",apfs:"zip",apib:"apiblueprint",apiblueprint:"apiblueprint",apk:"android",applescript:"applescript",apx:"image",argus:"assembly",ari:"image",arj:"zip",arw:"image",as:"actionscript",asc:"key",asciidoc:"asciidoc",ascx:"xml",asddls:"abap",ase:"image",aseprite:"image",asm:"assembly",asp:"html",aspx:"html",ass:"subtitles",ast:"sas",astore:"sas",astro:"astro",atom:"xml",au3:"autoit",aux:"tex",avi:"video",avif:"image",awk:"console",axaml:"xml",axml:"xml",azcli:"azure","azure-pipelines-main.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines.yml":"azure-pipelines",b:"brainfuck",bak:"database",bal:"ballerina",balx:"ballerina",bas:"visualstudio",bash:"console",bash_aliases:"console",bash_login:"console",bash_logout:"console",bash_profile:"console",bashrc:"console",bat:"console",bay:"image",bazel:"bazel",bbl:"bibliography",bbx:"bbx",bcf:"bibliography",bdb:"database",bean:"beancount",beancount:"beancount","bench.cjs":"bench-js","bench.cts":"bench-ts","bench.js":"bench-js","bench.jsx":"bench-jsx","bench.mjs":"bench-js","bench.mts":"bench-ts","bench.ts":"bench-ts","bench.tsx":"bench-jsx",bf:"brainfuck",bib:"bibliography",bicep:"bicep",bin:"hex",binsource:"assembly","blade.php":"laravel",blend:"blender",blend1:"blender",blend2:"blender",blg:"bibliography",blink:"blink",bmap:"font",bmp:"image",bpg:"image",bpmn:"xml",br:"zip",braw:"image",brk:"image",brotli:"zip",brs:"visualstudio",bru:"bruno",bst:"bibtex-style",bubble:"dinophp",bz2:"zip",bzip2:"zip",bzl:"bazel",c:"c","c++":"cpp","c++m":"cpp",c3:"c3",cab:"zip",cabal:"cabal",caf:"audio",cairo:"cairo",cake:"cake",cap:"image",capnp:"capnp",catpart:"3d",catproduct:"3d",cbl:"cobol",cbx:"cbx",cc:"cpp",ccm:"cpp",cda:"audio",cdc:"cadence",cdr:"audio",cds:"cds",cer:"certificate",cert:"certificate",cfc:"coldfusion",cff:"yaml",cfg:"settings",cfm:"coldfusion",cfml:"coldfusion",cginc:"shader",cjs:"javascript","cjs.map":"javascript-map",cl:"lisp",class:"javaclass",clip:"image",clj:"clojure",cljc:"clojure",cljs:"clojure",cljx:"clojure",clo:"tex",clojure:"clojure",cls:"tex",cm:"sml",cmake:"cmake",cmd:"console",cmj:"bucklescript",cmx:"ocaml",cnf:"settings",coafile:"coala",coarc:"coala",cob:"cobol",coco:"coconut","code-profile":"vscode","code-search":"search","code-snippets":"vscode","code-workplace":"vscode","code-workspace":"vscode",coffee:"coffee",command:"command",comp:"shader","comp.glsl":"shader","comp.hlsl":"shader","compose.yaml":"docker","compose.yml":"docker",compute:"shader","compute.glsl":"shader","compute.hlsl":"shader",computeshader:"shader",conf:"settings",config:"settings",containerfile:"docker",containerignore:"docker","controller.js":"controller","controller.ts":"controller",copilotmd:"markdown",cp:"cpp",cpio:"zip",cpn:"coloredpetrinets",cpp:"cpp",cppm:"cpp",cpt:"image",cpy:"python",cr:"crystal",cr2:"image",cr3:"image",crt:"certificate",crw:"image",crx:"chrome",cs:"csharp",csh:"console",csharp:"csharp",cshrc:"console",cshtml:"razor",csl:"xml",cson:"coffee",csproj:"visualstudio","csproj.user":"xml",css:"css","css.cjs":"vanilla-extract","css.js":"vanilla-extract","css.jsx":"vanilla-extract","css.map":"css-map","css.mjs":"vanilla-extract","css.ts":"vanilla-extract","css.tsx":"vanilla-extract",csv:"table",csx:"csharp",ctp:"php",cts:"typescript",ctx:"context",cu:"cuda",cue:"cue",cuh:"cuda",cur:"image",cxx:"cpp",cxxm:"cpp","cy.js":"test-js","cy.jsx":"test-jsx","cy.ts":"test-ts","cy.tsx":"test-jsx",d:"d","d.cts":"typescript-def","d.ets":"typescript-def","d.mts":"typescript-def","d.ts":"typescript-def",dae:"3d",dart:"dart",dat:"hex",data:"image",db:"database",db3:"database",dbf:"database",dblite:"database",dblite3:"database",dcr:"image",dcs:"image",dds:"image",deb:"zip",debugsymbols:"database",def:"dotjs",dex:"android",dfxp:"subtitles",dhall:"dhall",dhallb:"dhall",diff:"diff",dio:"drawio",directory:"settings",dita:"xml",ditamap:"xml",djt:"django",dlc:"settings",dll:"dll",dmg:"disc",dmn:"xml",dng:"image",do:"tcl",doc:"word","docker-compose.yaml":"docker","docker-compose.yml":"docker",dockerfile:"docker",dockerignore:"docker",docx:"word",dot:"dotjs",drawio:"drawio",drf:"image","drone.yml":"drone",dsc:"denizenscript",dsql:"database",dss:"audio",dtd:"xml",dtml:"xml",duc:"duc",dwg:"3d",dxf:"3d","e2e-spec.cjs":"test-js","e2e-spec.cts":"test-ts","e2e-spec.js":"test-js","e2e-spec.mjs":"test-js","e2e-spec.mts":"test-ts","e2e-spec.ts":"test-ts",ebuild:"console",ec3:"audio",eclass:"console",ecr:"crystal",edb:"email",edge:"edge",edn:"clojure",eex:"elixir",efs:"audio",egg:"python-misc",eip:"image",ejs:"ejs",elm:"elm",eml:"email",emlx:"email",enc:"audio",ent:"xml",env:"tune",eot:"font",eps:"image",epub:"epub",erb:"ruby",erf:"image",erl:"erlang",es6:"javascript",esd:"zip",esx:"javascript",ex:"elixir",excalidraw:"excalidraw","excalidraw.json":"excalidraw","excalidraw.png":"excalidraw","excalidraw.svg":"excalidraw",exe:"exe",exp:"console",exr:"image",exrc:"vim",exs:"elixir",eyaml:"yaml",eyml:"yaml",f:"fortran",f03:"fortran",f08:"fortran",f3d:"3d",f77:"fortran",f90:"fortran",f95:"fortran",far:"zip",fast:"lisp",fat:"zip",fbx:"3d",fdb:"database",feather:"database",feature:"cucumber",features:"cucumber",fen:"chess",fff:"image",fhtml:"velocity",fig:"figma",fish:"console",flac:"audio",flp:"audio",flv:"video",fnt:"font",font:"font",fonts:"font",fpx:"image",frag:"shader","frag.glsl":"shader","fragment.glsl":"shader",fragmentshader:"shader","freezed.dart":"dart_generated",frm:"database",frt:"forth",fs:"fsharp","fs.glsl":"shader",fsi:"fsharp",fsproj:"fsharp",fsscript:"fsharp",fsx:"fsharp",fth:"forth",ftl:"freemarker",fun:"sml",fx:"shader",fxh:"shader",fxml:"xml",fxp:"foxpro","g.dart":"dart_generated",g4:"antlr","garden.yaml":"garden","garden.yml":"garden",gbr:"image",gd:"godot",gdb:"database",gdextension:"godot-assets",gdnlib:"godot-assets",gdns:"godot-assets",gdshader:"godot-assets",gdshaderinc:"godot-assets",gemini:"gemini",gemspec:"ruby",geojson:"json",geom:"shader","geom.glsl":"shader","geom.hlsl":"shader","geometry.glsl":"shader","geometry.hlsl":"shader",geometryshader:"shader",gif:"image",gifv:"video","gitlab-ci.yml":"gitlab",glb:"3d",gleam:"gleam",glsl:"shader",gltf:"3d",gmi:"gemini",gml:"gamemaker",gnu:"gnuplot",go:"go",godot:"godot-assets",gp:"audio",gpg:"key",gpl:"palette",gpr:"image",gql:"graphql",gr:"grain",gradle:"gradle",graphcool:"graphcool",graphql:"graphql",grm:"sml",groovy:"groovy",gs:"apps-script","gs.glsl":"shader",gsm:"audio",gvimrc:"vim",gvy:"groovy",gyp:"python",gypi:"python",gz:"zip",gzip:"zip",h:"h","h++":"hpp","h.in":"cpp",haml:"haml",handlebars:"handlebars",har:"json",hbs:"handlebars",hcl:"hcl",hdd:"disc",heex:"elixir",heic:"image",heif:"image",hex:"hex",hfs:"zip",hh:"hpp",hip:"hip",hjs:"handlebars",hjson:"hjson",hlsl:"shader",hlsli:"shader","horusec-config.json":"horusec",hp:"hpp",hpp:"hpp","hpp.in":"cpp",hs:"haskell",htm:"html",html:"html","html.bubble":"dinophp",html_vm:"html",http:"http",huff:"huff",hurl:"hurl",hx:"haxe",hxx:"hpp",i:"c",iam:"3d",ibc:"idris",ibd:"database",iced:"coffee",icns:"image",ico:"image",ics:"email",idr:"idris",ige:"3d",iges:"3d",igs:"3d",ii:"cpp",iiq:"image",ilk:"dll",imba:"imba",img:"image",iml:"xml",inc:"assembly",ini:"settings","inky.php":"laravel",inl:"hpp",ino:"arduino",ins:"doctex-installer",ipa:"applescript",ipp:"cpp",ipt:"3d",ipy:"python",ipynb:"jupyter",isml:"xml",iso:"disc",it:"audio",iuml:"uml",ixx:"cpp",j2:"jinja",jade:"pug",jar:"jar",jav:"java",java:"java",jb2:"image",jbig2:"image",jenkins:"jenkins",jenkinsfile:"jenkins",jfif:"image",jinja:"jinja","jinja-html":"jinja",jinja2:"jinja",jl:"julia",jmx:"xml",jng:"image",jpeg:"image",jpg:"image",jrxml:"xml",js:"javascript","js.map":"javascript-map","js.snap":"test-js","jsconfig.json":"jsconfig",jshtm:"html",json:"json",json5:"json",jsonc:"json",jsonl:"json",jsonld:"json",jsp:"java",jst:"dotjs",jsx:"react","jsx.snap":"test-jsx",jt:"3d",jxl:"image",jxr:"image",k:"kcl",k25:"image",kdbx:"database",kdc:"image",key:"key",kl:"kl",kql:"kusto",kra:"image",ksh:"console",kt:"kotlin",kts:"kotlin",ktx:"image",ktx2:"image",kv:"kivy",lang:"i18n",latex:"tex",launch:"xml",lbx:"lbx",ldf:"database",lean:"lean",leex:"elixir",less:"less",lex:"sml",lha:"zip",lhs:"haskell",lib:"lib",liquid:"liquid",lisp:"lisp",litcoffee:"markdown",liz:"zip",lock:"lock",log:"log",lol:"lolcode",lottie:"lottie",lrc:"lyric",ls:"livescript",lsp:"lisp",ltx:"tex",lua:"lua",luau:"luau",lucee:"coldfusion",ly:"lilypond",lz:"zip",lz4:"zip",lz5:"zip",lzh:"zip",lzma:"zip",lzma2:"zip",m:"objective-c",m2:"macaulay2",m2v:"video",m3u:"audio",m3u8:"audio",m4a:"audio",m4b:"audio",m4p:"audio",m4r:"audio",m4v:"video",mak:"settings",manifest:"xml",markdn:"markdown",markdoc:"markdoc","markdoc.md":"markdoc",markdown:"markdown",marko:"markojs",mbox:"email",mca:"minecraft",mcaddon:"minecraft",mcfunction:"minecraft",mcgame:"minecraft",mclevel:"minecraft",mcmeta:"minecraft",mcpack:"minecraft",mcproject:"minecraft",mcr:"minecraft",mcstructure:"minecraft",mctemplate:"minecraft",mcworld:"minecraft",md:"markdown",mdb:"database",mdc:"image",mde:"database",mdf:"database",mdoc:"markdoc",mdown:"markdown",mdp:"image",mdtext:"markdown",mdtxt:"markdown",mdwn:"markdown",mdx:"mdx",mef:"image",menu:"xml",merlin:"merlin",mermaid:"mermaid",mesh:"3d",mi:"c",mid:"audio",mii:"cpp",mine:"minecraft",mint:"mint",mitigus:"assembly",mjml:"mjml",mjs:"javascript","mjs.map":"javascript-map",mk:"makefile",mka:"audio",mkd:"markdown",mkdn:"markdown",mkv:"video",ml:"ocaml",mlb:"sml",mli:"ocaml",mlton:"sml",mm:"objective-cpp",mmd:"mermaid",mmf:"audio",mo:"i18n",mod:"audio","module.js":"angular","module.ts":"angular",mojo:"mojo",moon:"moonscript",mos:"image",mov:"video",mp2:"video",mp3:"audio",mp4:"video",mpc:"audio",mpe:"video",mpeg:"video",mpg:"video",mpv:"video",mqo:"3d",mrf:"font",mrpack:"mrpack",mrw:"image",ms:"assembly",mscz:"audio",msg:"email",msi:"exe",mtm:"audio",mts:"typescript",mui:"audio",mus:"minecraft",mustache:"handlebars",musx:"audio",mxl:"audio",mxml:"mxml",myd:"database",myi:"database",nasm:"assembly",nb:"mathematica",ndf:"database",ndjson:"json","ndst.json":"ndst","ndst.yaml":"ndst","ndst.yml":"ndst",nef:"image",nf:"groovy","ng-template":"angular",nginx:"nginx",nginxconf:"nginx",nginxconfig:"nginx",nim:"nim",nimble:"nim",nix:"nix",njk:"nunjucks",npmrc:"settings",nrw:"image",nsa:"audio",ntf:"font",ntfs:"zip",nu:"console",nunjucks:"nunjucks",nupkg:"nuget",nuspec:"nuget",o:"3d",obj:"3d",obm:"image",odb:"database",odin:"odin",odp:"powerpoint",ods:"table",odt:"word",odttf:"font",oft:"email",ogg:"video",ogv:"video",olm:"email",onnx:"onnx",opam:"opam","openapi.json":"openapi","openapi.yaml":"openapi","openapi.yml":"openapi",opml:"xml",option:"settings",opus:"audio",ora:"image",orc:"database",orf:"image",ost:"email",otf:"font",otne:"otne",owl:"xml",p:"prolog",p7s:"email",pac:"javascript",pal:"palette",parquet:"database",pas:"pascal",passwd:"key",patch:"git",pbm:"image",pcss:"postcss",pdb:"database",pde:"processing",pdf:"pdf","pdm.lock":"pdm","pdm.toml":"pdm",pdn:"image",pef:"image",pem:"key",pgf:"image",pgm:"image",pgn:"chess",pgsql:"database",php:"php","php.bubble":"dinophp",php4:"php",php5:"php",phtml:"php",pic:"image",pine:"pinejs",pipeline:"pipeline","pixel.hlsl":"shader",pkb:"database",pkf:"audio",pkl:"pkl",pks:"database",pl:"prolog",plantuml:"uml",plist:"xml",plpgsql:"database",ply:"3d",pm:"perl",pmd:"3d",pmx:"3d",png:"image",pnm:"image",pnml:"coloredpetrinets",po:"i18n",pod:"perl",podspec:"ruby",postgres:"database",pot:"i18n",potm:"powerpoint",potx:"powerpoint",pp:"puppet",ppa:"powerpoint",ppam:"powerpoint",ppm:"image",pps:"powerpoint",ppsm:"powerpoint",ppsx:"powerpoint",ppt:"powerpoint",pptm:"powerpoint",pptx:"powerpoint",prefs:"settings",prg:"foxpro",prisma:"prisma",pro:"prolog",profile:"console",proj:"xml",project:"xml","prompt.md":"prompt","prompts.md":"prompt",prop:"settings",properties:"settings",props:"settings",proto:"proto",prt:"3d",prw:"advpl",prx:"advpl",ps1:"powershell",ps1xml:"powershell",psb:"adobe-photoshop",psc1:"powershell",psd:"adobe-photoshop",psd1:"powershell",psdt:"adobe-photoshop",psgi:"perl",psh:"shader",psm1:"powershell",psql:"database",psrc:"powershell",pssc:"powershell",pst:"email",psv:"table",pt:"pytorch",pth:"pytorch",ptx:"image",pu:"uml",pub:"key",publishsettings:"xml",pubxml:"xml","pubxml.user":"xml",pug:"pug",puml:"uml",pure:"purescript",purs:"purescript",pwf:"pytorch",pwn:"pawn","px.hlsl":"shader",pxn:"image",py:"python",pyc:"python-misc",pyi:"python",pyt:"python",pyw:"python",qcow:"disc",qcow2:"disc",qcp:"audio",qed:"disc",qmd:"quarto",qs:"qsharp",qt:"video","quokka.js":"quokka","quokka.jsx":"quokka","quokka.ts":"quokka","quokka.tsx":"quokka",r:"r",r3d:"image",ra:"audio",raf:"image",rahit:"shader","rahit.glsl":"shader",rake:"ruby",raku:"perl",raml:"raml",rar:"zip",raw:"image",razor:"razor",rb:"ruby",rbi:"ruby",rbs:"ruby",rbx:"ruby",rbxl:"roblox",rbxlx:"roblox",rbxm:"roblox","rbxmk.lua":"rbxmk","rbxmk.luau":"rbxmk",rbxmx:"roblox",rc:"rc",rcall:"shader","rcall.glsl":"shader",rchit:"shader","rchit.glsl":"shader",rdf:"xml",re:"reason",reb:"image",red:"red",reg:"regedit",rego:"opa",rei:"reason",rej:"diff",repo:"settings",res:"rescript",resi:"rescript-interface",rest:"http",restql:"restql",resx:"xml",rf64:"audio",rgen:"shader","rgen.glsl":"shader",rhistory:"r",rhtml:"html",rint:"shader","rint.glsl":"shader",riot:"riot",rip:"audio",rjs:"ruby",rkt:"racket",rm:"video",rmd:"r",rmiss:"shader","rmiss.glsl":"shader",rmvb:"video",rng:"xml",robot:"robot",ron:"rust",ronn:"markdown","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","routing.js":"routing","routing.jsx":"routing","routing.ts":"routing","routing.tsx":"routing",rpm:"zip",rpmsg:"email",rprofile:"r",rpy:"python",rql:"restql",rs:"rust",rss:"xml",rst:"markdown",rt:"r",rtf:"word",ru:"ruby",ruleset:"visualstudio",rw2:"image",rwl:"image",rwz:"image",s:"assembly",sab:"3d",sai:"image",san:"san",sas:"sas",sas7bdat:"sas",sashdat:"sas",sass:"sass",sast:"sas",sat:"3d",sbt:"sbt",sbv:"subtitles",sc:"scala",scala:"scala","schema.json":"json_schema",scm:"scheme",scss:"sass",sdf:"database",sdt:"audio",secret:"key",sesx:"audio",settings:"settings",sf2:"audio",sh:"console",sha256:"key",sha256sum:"key",sha256sums:"key",shader:"shader",shasum:"key",shproj:"xml",shtml:"html",sig:"sml","sigstore.json":"verified",sketch:"sketch","skill.md":"skill","skills.md":"skill",skp:"3d",slang:"shader",sldasm:"3d",slddrw:"3d",sldprt:"3d",slim:"slim",slint:"slint",sln:"visualstudio","sln.dotsettings":"settings","sln.dotsettings.user":"settings",slnf:"visualstudio",slnx:"visualstudio",sls:"salt",slx:"simulink",smali:"android",smb:"3d",smk:"snakemake",sml:"sml",smt:"3d",snakemake:"snakemake",so:"dll",sol:"solidity","spec-d.ts":"test-ts","spec-d.tsx":"test-jsx","spec.cjs":"test-js","spec.cts":"test-ts","spec.js":"test-js","spec.jsx":"test-jsx","spec.mjs":"test-js","spec.mts":"test-ts","spec.ts":"test-ts","spec.tsx":"test-jsx",spv:"shader",spwn:"spwn",sql:"database",sqlite:"database",sqlite3:"database",squashfs:"zip",sr2:"image",srf:"image",srt:"subtitles",srw:"image",ss:"scheme",ssa:"subtitles",sss:"postcss","st.css":"stylable",stan:"stan",stap:"audio",ste:"3d","steadybit.yaml":"steadybit","steadybit.yml":"steadybit",step:"3d",stl:"3d","stories.js":"storybook","stories.jsx":"storybook","stories.mdx":"storybook","stories.svelte":"storybook","stories.ts":"storybook","stories.tsx":"storybook","stories.vue":"storybook","story.js":"storybook","story.jsx":"storybook","story.mdx":"storybook","story.ts":"storybook","story.tsx":"storybook",storyboard:"xml",stp:"3d",styl:"stylus",sub:"subtitles","sublime-project":"sublime","sublime-workspace":"sublime",sui:"font",suit:"font",suo:"visualstudio",sv:"verilog",svelte:"svelte",svg:"svg",svh:"verilog",svx:"mdsvex",sw:"sway","swagger.json":"swagger","swagger.yaml":"swagger","swagger.yml":"swagger",swc:"adobe-swc",swcrc:"swc",swf:"flash",swift:"swift",swiftdeps:"swift",swiftdoc:"swift",swiftmodule:"swift",swiftsourceinfo:"swift",swm:"zip",sy:"siyuan",synctex:"tex","synctex.gz":"tex",t:"perl",tag:"riot",tar:"zip",targets:"xml","taskfile.yaml":"taskfile","taskfile.yml":"taskfile",tauri:"tauri",taz:"zip",tbz:"zip",tbz2:"zip",tcc:"hpp",tcl:"tcl",tcsh:"console",tcshrc:"console",templ:"templ",template:"template",terraformignore:"terraform",tesc:"shader","tesc.glsl":"shader",tese:"shader","tese.glsl":"shader","tess.hlsl":"shader","tessellation.hlsl":"shader","test-d.ts":"test-ts","test-d.tsx":"test-jsx","test.cjs":"test-js","test.cts":"test-ts","test.js":"test-js","test.jsx":"test-jsx","test.mjs":"test-js","test.mts":"test-ts","test.ts":"test-ts","test.tsx":"test-jsx",tex:"tex",tf:"terraform","tf.json":"terraform",tfbackend:"terraform",tfstate:"terraform",tfvars:"terraform",tg:"audio",tga:"image",tgz:"zip",tif:"image",tiff:"image",tikz:"tex",tl:"teal",tld:"xml",tldr:"tldraw",tlz:"zip",tmlanguage:"xml",tmx:"xml",tnef:"email",tobi:"tobi",toc:"toc",todo:"todo",tofu:"opentofu",toml:"toml","tool-versions":"settings",toon:"toon",tpl:"smarty",tpp:"cpp",tpz:"zip",tree:"tree",tres:"godot-assets",ts:"typescript","ts.glsl":"shader","ts.map":"json","ts.snap":"test-ts",tsbuildinfo:"json",tscn:"godot-assets","tsconfig.json":"tsconfig",tsv:"table",tsx:"react_ts","tsx.snap":"test-jsx",ttc:"font",ttf:"font",ttml:"subtitles",tw:"twine",twee:"twine",twig:"twig",txt:"document",txx:"cpp",txz:"zip",typ:"typst",tz:"zip",tzst:"zip",tzstd:"zip",ua:"uiua",unity:"unity",unitypackage:"unity",url:"url",usd:"3d",usdz:"3d",use:"sml",v:"vlang",vac:"3d",vagrantfile:"vagrant",vala:"vala",vb:"visualstudio",vba:"visualstudio",vbhtml:"razor",vbox:"virtual","vbox-prev":"virtual",vbproj:"xml","vbproj.user":"xml",vbs:"visualstudio",vcl:"varnish",vcxitems:"visualstudio","vcxitems.filters":"visualstudio",vcxproj:"visualstudio","vcxproj.filters":"visualstudio",vdi:"virtual",vdp:"3d",ved:"vedic",veda:"vedic",vedic:"vedic",verse:"verse",vert:"shader","vert.glsl":"shader","vertex.glsl":"shader",vertexshader:"shader",vfl:"vfl",vhd:"verilog",vhdl:"verilog",vhdx:"verilog",vim:"vim",viminfo:"vim",vimrc:"vim",vm:"velocity",vmdk:"disc",vob:"video",voc:"audio",volt:"html",vox:"3d",vqf:"audio","vs.glsl":"shader",vscodeignore:"vscode",vsh:"shader",vsix:"vscode",vsixmanifest:"vscode",vtl:"velocity",vtt:"subtitles",vue:"vue",wasm:"webassembly",wat:"webassembly",wav:"audio",weba:"audio",webm:"video",webmanifest:"json",webp:"image",wfp:"audio",wgsl:"shader",whl:"python-misc",wim:"zip",windi:"windicss",winget:"yaml",wire:"3d",wixproj:"visualstudio",wl:"wolframlanguage",wls:"wolframlanguage",wma:"audio",wmv:"video",woff:"font",woff2:"font",workbook:"markdown",wpl:"audio",wproj:"audio",wpy:"wepy",wrap:"meson",wrl:"3d",wsd:"uml",wsdl:"xml",wv:"audio",wxi:"xml",wxl:"xml",wxs:"xml",x3f:"image",x_b:"3d",x_t:"3d",xaml:"xaml",xar:"zip",xbl:"xml",xcf:"image",xcplayground:"swift",xht:"html",xhtml:"html",xib:"xml",xlf:"i18n",xliff:"xml",xls:"table",xlsm:"table",xlsx:"table",xml:"xml","xml.dist":"xml","xml.dist.sample":"xml",xmp:"xml",xoml:"xml",xpdl:"xml",xprofile:"console",xquery:"xml",xsd:"xml",xsession:"console",xsessionrc:"console",xsh:"console",xsl:"xml",xslt:"xml",xul:"xml",xz:"zip",yaml:"yaml","yaml-tmlanguage":"yaml","yaml-tmpreferences":"yaml","yaml-tmtheme":"yaml","yaml.dist":"yaml",yang:"yang",yash_profile:"console",yashrc:"console",yml:"yaml","yml.dist":"yaml",yuv:"video",yy:"gamemaker",yyp:"gamemaker",yyz:"gamemaker",z:"zip",zeabur:"zeabur",zig:"zig",zip:"zip",zlogin:"console",zlogout:"console",zon:"zig",zprofile:"console",zsh:"console","zsh-theme":"console",zshenv:"console",zshrc:"console",zst:"zip",zstd:"zip",ц:"tsil","🔥":"mojo"},vf={"-@types":"folder-typescript","-addin":"folder-plugin","-addins":"folder-plugin","-addon":"folder-plugin","-addons":"folder-plugin","-admin":"folder-admin","-admins":"folder-admin","-agent":"folder-robot","-agents":"folder-robot","-android":"folder-android","-angular":"folder-angular","-anim":"folder-animation","-animated":"folder-animation","-animation":"folder-animation","-animations":"folder-animation","-anims":"folder-animation","-ansible":"folder-ansible","-api":"folder-api","-apis":"folder-api","-apollo":"folder-apollo","-apollo-cache":"folder-apollo","-apollo-client":"folder-apollo","-apollo-config":"folder-apollo","-app":"folder-app","-apple":"folder-macos","-application":"folder-app","-applications":"folder-app","-apps":"folder-app","-appwrite":"folder-appwrite","-arc":"folder-archive","-archival":"folder-archive","-archive":"folder-archive","-archives":"folder-archive","-arcs":"folder-archive","-article":"folder-docs","-articles":"folder-docs","-asm":"folder-assembly","-assembly":"folder-assembly","-asset":"folder-resource","-assets":"folder-resource","-astro":"folder-astro","-atom":"folder-atom","-atoms":"folder-atom","-attachment":"folder-attachment","-attachments":"folder-attachment","-aud":"folder-audio","-audio":"folder-audio","-audios":"folder-audio","-auds":"folder-audio","-aurelia_project":"folder-aurelia","-auth":"folder-secure","-authentication":"folder-secure","-auto":"folder-generator","-aws":"folder-aws","-azure":"folder-aws","-azure-pipelines":"folder-azure-pipelines","-azure-pipelines-ci":"folder-azure-pipelines","-back-up":"folder-backup","-back-ups":"folder-backup","-backend":"folder-server","-backends":"folder-server","-backup":"folder-backup","-backups":"folder-backup","-bak":"folder-backup","-baks":"folder-backup","-base":"folder-base","-bases":"folder-base","-batch":"folder-batch","-batches":"folder-batch","-batchs":"folder-batch","-bench":"folder-benchmark","-benches":"folder-benchmark","-benchmark":"folder-benchmark","-benchmarks":"folder-benchmark","-bibliographies":"folder-bibliography","-bibliography":"folder-bibliography","-bicep":"folder-bicep","-bin":"folder-dist","-bkp":"folder-backup","-bkps":"folder-backup","-blender":"folder-blender","-blender-assets":"folder-blender","-blender-files":"folder-blender","-blender-models":"folder-blender","-blender-project":"folder-blender","-bloc":"folder-bloc","-blocs":"folder-bloc","-blog":"folder-docs","-book":"folder-bibliography","-books":"folder-bibliography","-bot":"folder-robot","-bots":"folder-robot","-bower_components":"folder-bower","-browser":"folder-public","-browsers":"folder-public","-build":"folder-dist","-buildkite":"folder-buildkite","-builds":"folder-dist","-built":"folder-dist","-bull":"folder-queue","-cache":"folder-temp","-cached":"folder-temp","-calc":"folder-functions","-calcs":"folder-functions","-calculation":"folder-functions","-calculations":"folder-functions","-cargo":"folder-rust","-cart":"folder-cart","-centos":"folder-linux","-cert":"folder-secure","-certificate":"folder-secure","-certificates":"folder-secure","-certs":"folder-secure","-cfg":"folder-config","-cfgs":"folder-config","-cfn-gen":"folder-generator","-changes":"folder-delta","-changeset":"folder-changesets","-changesets":"folder-changesets","-chat":"folder-messages","-chats":"folder-messages","-ci":"folder-ci","-cipher":"folder-secure","-circleci":"folder-circleci","-cjs":"folder-javascript","-class":"folder-class","-classes":"folder-class","-claude":"folder-claude","-cli":"folder-command","-client":"folder-client","-clients":"folder-client","-cline_docs":"folder-cline","-clis":"folder-command","-cloud-firestore":"folder-firestore","-cloud-functions":"folder-cloud-functions","-cloudflare":"folder-cloudflare","-cloudfunctions":"folder-cloud-functions","-cluster":"folder-cluster","-clusters":"folder-cluster","-cmd":"folder-command","-cobol":"folder-cobol","-code":"folder-src","-color":"folder-theme","-colors":"folder-theme","-colour":"folder-theme","-colours":"folder-theme","-command":"folder-command","-commandline":"folder-command","-commands":"folder-command","-common":"folder-shared","-compiled":"folder-dist","-components":"folder-components","-composable":"folder-functions","-composables":"folder-functions","-concept":"folder-mock","-concepts":"folder-mock","-conf":"folder-config","-config":"folder-config","-configs":"folder-config","-configuration":"folder-config","-configurations":"folder-config","-confs":"folder-config","-connection":"folder-connection","-connections":"folder-connection","-console":"folder-console","-const":"folder-constant","-constant":"folder-constant","-constants":"folder-constant","-consts":"folder-constant","-container":"folder-container","-containers":"folder-container","-content":"folder-content","-contents":"folder-content","-context":"folder-context","-contexts":"folder-context","-contract":"folder-contract","-contract-test":"folder-contract","-contract-testing":"folder-contract","-contract-tests":"folder-contract","-contracts":"folder-contract","-controller":"folder-controller","-controllers":"folder-controller","-controls":"folder-controller","-conversation":"folder-messages","-conversations":"folder-messages","-core":"folder-core","-coverage":"folder-coverage","-crash":"folder-error","-crashes":"folder-error","-crates":"folder-lib","-css":"folder-css","-cts":"folder-typescript","-cubit":"folder-bloc","-cubits":"folder-bloc","-cue":"folder-cue","-cues":"folder-cue","-cursor":"folder-cursor","-custom":"folder-custom","-customs":"folder-custom","-cypher":"folder-secure","-cypress":"folder-cypress","-dal":"folder-dal","-dart":"folder-dart","-dart_tool":"folder-dart","-dart_tools":"folder-dart","-data":"folder-database","-data-access":"folder-dal","-data-access-layer":"folder-dal","-database":"folder-database","-databases":"folder-database","-db":"folder-database","-deb":"folder-linux","-debian":"folder-linux","-debug":"folder-debug","-debugger":"folder-debug","-debugging":"folder-debug","-decorator":"folder-decorators","-decorators":"folder-decorators","-deepin":"folder-linux","-delta":"folder-delta","-deltas":"folder-delta","-demo":"folder-examples","-demos":"folder-examples","-dependencies":"folder-packages","-design":"folder-theme","-designs":"folder-theme","-desktop":"folder-desktop","-devcontainer":"folder-container","-devpackages":"folder-packages","-devtools":"folder-tools","-dialog":"folder-messages","-dialogs":"folder-messages","-diary":"folder-docs","-directive":"folder-directive","-directives":"folder-directive","-display":"folder-desktop","-dist":"folder-dist","-distribution":"folder-dist","-doc":"folder-docs","-docker":"folder-docker","-dockerfiles":"folder-docker","-dockerhub":"folder-docker","-docs":"folder-docs","-document":"folder-docs","-documentation":"folder-docs","-documents":"folder-docs","-download":"folder-download","-downloader":"folder-download","-downloaders":"folder-download","-downloads":"folder-download","-draft":"folder-mock","-drafts":"folder-mock","-drizzle":"folder-drizzle","-ds_store":"folder-macos","-dump":"folder-dump","-dumps":"folder-dump","-e2e":"folder-coverage","-easing":"folder-animation","-easings":"folder-animation","-element":"folder-element","-elements":"folder-element","-email":"folder-mail","-emails":"folder-mail","-enum":"folder-enum","-enums":"folder-enum","-env":"folder-environment","-environment":"folder-environment","-environments":"folder-environment","-envs":"folder-environment","-err":"folder-error","-error":"folder-error","-errors":"folder-error","-errs":"folder-error","-eslint":"folder-eslint","-eslint-config":"folder-eslint","-eslint-configs":"folder-eslint","-eslint-plugin":"folder-eslint","-eslint-plugins":"folder-eslint","-etc":"folder-other","-event":"folder-event","-events":"folder-event","-example":"folder-examples","-examples":"folder-examples","-expo":"folder-expo","-expo-shared":"folder-expo","-export":"folder-export","-exported":"folder-export","-exports":"folder-export","-extension":"folder-plugin","-extensions":"folder-plugin","-external":"folder-lib","-externals":"folder-lib","-extra":"folder-other","-extras":"folder-other","-fastlane":"folder-fastlane","-favicon":"folder-favicon","-favicons":"folder-favicon","-feat":"folder-features","-feats":"folder-features","-feature":"folder-features","-features":"folder-features","-fig":"folder-images","-figs":"folder-images","-figure":"folder-images","-figures":"folder-images","-filter":"folder-filter","-filters":"folder-filter","-firebase":"folder-firebase","-firebase-cloud-functions":"folder-cloud-functions","-firebase-cloudfunctions":"folder-cloud-functions","-firebase-firestore":"folder-firestore","-firestore":"folder-firestore","-fixture":"folder-mock","-fixtures":"folder-mock","-flow-typed":"folder-flow","-flutter":"folder-flutter","-font":"folder-font","-fonts":"folder-font","-forgejo":"folder-forgejo","-form":"folder-form","-forms":"folder-form","-forum":"folder-messages","-fragments":"folder-components","-frontend":"folder-client","-frontends":"folder-client","-func":"folder-functions","-funcs":"folder-functions","-function":"folder-functions","-functions":"folder-functions","-game":"folder-console","-gamemaker":"folder-gamemaker","-gamemaker2":"folder-gamemaker","-games":"folder-console","-gcp":"folder-aws","-gemini":"folder-gemini-ai","-gemini-ai":"folder-gemini-ai","-geminiai":"folder-gemini-ai","-gen":"folder-generator","-generated":"folder-generator","-generator":"folder-generator","-generators":"folder-generator","-gens":"folder-generator","-git":"folder-git","-gitea":"folder-gitea","-githooks":"folder-git","-github":"folder-github","-github/issue_template":"folder-template","-github/pull_request_template":"folder-template","-github/workflows":"folder-gh-workflows","-gitlab":"folder-gitlab","-global":"folder-global","-glsl":"folder-shader","-go":"folder-go","-godot":"folder-godot","-godot-cpp":"folder-godot","-golang":"folder-go","-gql":"folder-graphql","-gradle":"folder-gradle","-graphql":"folder-graphql","-guard":"folder-guard","-guards":"folder-guard","-gui":"folder-ui","-gulp":"folder-gulp","-gulp-tasks":"folder-gulp","-gulpfile.babel.js":"folder-gulp","-gulpfile.js":"folder-gulp","-gulpfile.mjs":"folder-gulp","-gulpfile.ts":"folder-gulp","-gulpfiles":"folder-gulp","-handler":"folder-controller","-handlers":"folder-controller","-helm":"folder-helm","-helmchart":"folder-helm","-helmcharts":"folder-helm","-helper":"folder-helper","-helpers":"folder-helper","-hg":"folder-mercurial","-hgext":"folder-mercurial","-hghooks":"folder-mercurial","-histories":"folder-backup","-history":"folder-backup","-hlsl":"folder-shader","-home":"folder-home","-hook":"folder-hook","-hooks":"folder-hook","-html":"folder-views","-husky":"folder-husky","-i18n":"folder-i18n","-ico":"folder-images","-icon":"folder-images","-icons":"folder-images","-icos":"folder-images","-idea":"folder-intellij","-image":"folder-images","-images":"folder-images","-img":"folder-images","-imgs":"folder-images","-import":"folder-import","-imported":"folder-import","-imports":"folder-import","-in":"folder-input","-inc":"folder-include","-inc64":"folder-include","-include":"folder-include","-includes":"folder-include","-infra":"folder-server","-infrastructure":"folder-server","-input":"folder-input","-inputs":"folder-input","-integration":"folder-connection","-integration-test":"folder-coverage","-integration-tests":"folder-coverage","-integrations":"folder-connection","-interceptor":"folder-interceptor","-interceptors":"folder-interceptor","-interface":"folder-interface","-interfaces":"folder-interface","-internationalization":"folder-i18n","-inventories":"folder-server","-inventory":"folder-server","-io":"folder-input","-ios":"folder-ios","-ipad":"folder-macos","-iphone":"folder-macos","-ipod":"folder-macos","-ipynb":"folder-jupyter","-it":"folder-coverage","-j2":"folder-jinja","-java":"folder-java","-javascript":"folder-javascript","-javascripts":"folder-javascript","-jinja":"folder-jinja","-jinja2":"folder-jinja","-job":"folder-job","-jobs":"folder-job","-js":"folder-javascript","-json":"folder-json","-jsonc":"folder-json","-jsonl":"folder-json","-jsons":"folder-json","-jupyter":"folder-jupyter","-jwt":"folder-keys","-k8s":"folder-kubernetes","-key":"folder-keys","-keys":"folder-keys","-kit":"folder-tools","-kits":"folder-tools","-knowledge":"folder-docs","-kotlin":"folder-kotlin","-kql":"folder-kusto","-kubernetes":"folder-kubernetes","-kusto":"folder-kusto","-l10n":"folder-i18n","-lambda":"folder-functions","-lambdas":"folder-functions","-landing":"folder-home","-lang":"folder-i18n","-langs":"folder-i18n","-language":"folder-i18n","-languages":"folder-i18n","-layout":"folder-layout","-layouts":"folder-layout","-lefthook":"folder-lefthook","-lefthook-local":"folder-lefthook","-less":"folder-less","-lib":"folder-lib","-lib64":"folder-lib","-libraries":"folder-lib","-library":"folder-lib","-libs":"folder-lib","-license":"folder-license","-licenses":"folder-license","-link":"folder-link","-links":"folder-link","-linux":"folder-linux","-linuxbsd":"folder-linux","-liquibase":"folder-liquibase","-locale":"folder-i18n","-locales":"folder-i18n","-localization":"folder-i18n","-log":"folder-log","-logging":"folder-log","-logic":"folder-functions","-logs":"folder-log","-lottie":"folder-lottie","-lottiefiles":"folder-lottie","-lotties":"folder-lottie","-lua":"folder-lua","-luau":"folder-luau","-mac":"folder-macos","-macbook":"folder-macos","-macbook-air":"folder-macos","-macos":"folder-macos","-macosx":"folder-macos","-mail":"folder-mail","-mailers":"folder-mail","-mails":"folder-mail","-main":"folder-home","-manager":"folder-admin","-managers":"folder-admin","-mapping":"folder-mappings","-mappings":"folder-mappings","-markdown":"folder-markdown","-math":"folder-functions","-maths":"folder-functions","-md":"folder-markdown","-measure":"folder-benchmark","-measurement":"folder-benchmark","-measures":"folder-benchmark","-media":"folder-video","-messages":"folder-messages","-messaging":"folder-messages","-meta":"folder-meta","-meta-inf":"folder-config","-metadata":"folder-meta","-metro":"folder-metro","-middleware":"folder-middleware","-middlewares":"folder-middleware","-migration":"folder-migrations","-migrations":"folder-migrations","-mint":"folder-linux","-misc":"folder-other","-miscellaneous":"folder-other","-mjml":"folder-mjml","-mjs":"folder-javascript","-mobile":"folder-mobile","-mobiles":"folder-mobile","-mock":"folder-mock","-mocks":"folder-mock","-mod":"folder-plugin","-modding":"folder-plugin","-model":"folder-class","-models":"folder-class","-moderator":"folder-admin","-moderators":"folder-admin","-mods":"folder-plugin","-module":"folder-plugin","-modules":"folder-plugin","-mojo":"folder-mojo","-molecule":"folder-molecule","-molecules":"folder-molecule","-moon":"folder-moon","-motion":"folder-animation","-motions":"folder-animation","-movie":"folder-video","-movies":"folder-video","-mq":"folder-queue","-mts":"folder-typescript","-music":"folder-audio","-navigation":"folder-routes","-navigations":"folder-routes","-netlify":"folder-netlify","-news":"folder-docs","-next":"folder-next","-nginx":"folder-nginx","-node":"folder-node","-node_modules":"folder-node","-nodejs":"folder-node","-note":"folder-docs","-notebook":"folder-jupyter","-notebooks":"folder-jupyter","-notes":"folder-docs","-now":"folder-vercel","-nuxt":"folder-nuxt","-nyc-output":"folder-coverage","-nyc_output":"folder-coverage","-obsidian":"folder-obsidian","-opencode":"folder-opencode","-option":"folder-config","-options":"folder-config","-organism":"folder-organism","-organisms":"folder-organism","-osx":"folder-macos","-other":"folder-other","-others":"folder-other","-out":"folder-dist","-output":"folder-dist","-outputs":"folder-dist","-package":"folder-packages","-packages":"folder-packages","-pact":"folder-contract","-pacts":"folder-contract","-page":"folder-views","-pages":"folder-views","-palette":"folder-theme","-palettes":"folder-theme","-partial":"folder-include","-partials":"folder-include","-patches":"folder-git","-pdf":"folder-pdf","-pdfs":"folder-pdf","-pdm-build":"folder-pdm","-pdm-plugins":"folder-pdm","-perf":"folder-benchmark","-performance":"folder-benchmark","-phone":"folder-mobile","-phones":"folder-mobile","-photo":"folder-images","-photograph":"folder-images","-photographs":"folder-images","-photos":"folder-images","-php":"folder-php","-phpmailer":"folder-phpmailer","-pic":"folder-images","-pics":"folder-images","-picture":"folder-images","-pictures":"folder-images","-pipe":"folder-pipe","-pipeline":"folder-pipe","-pipelines":"folder-pipe","-pipes":"folder-pipe","-pkg":"folder-packages","-pkgs":"folder-packages","-plastic":"folder-plastic","-playground":"folder-sandbox","-playgrounds":"folder-sandbox","-playlist":"folder-audio","-playlists":"folder-audio","-plugin":"folder-plugin","-plugins":"folder-plugin","-policies":"folder-policy","-policy":"folder-policy","-popos":"folder-linux","-portability":"folder-mobile","-portable":"folder-mobile","-post":"folder-docs","-postman":"folder-postman","-posts":"folder-docs","-powershell":"folder-powershell","-pref":"folder-config","-preference":"folder-config","-preferences":"folder-config","-prefs":"folder-config","-presentation":"folder-ui","-preview":"folder-review","-previews":"folder-review","-prisma":"folder-prisma","-prisma/schema":"folder-prisma","-private":"folder-private","-profiling":"folder-benchmark","-proj":"folder-project","-project":"folder-project","-projects":"folder-project","-projs":"folder-project","-prompt":"folder-prompts","-prompts":"folder-prompts","-properties":"folder-config","-props":"folder-config","-proto":"folder-proto","-protobuf":"folder-proto","-protobufs":"folder-proto","-protos":"folder-proto","-provider":"folder-controller","-providers":"folder-controller","-proxy":"folder-public","-ps":"folder-powershell","-ps1":"folder-powershell","-ps4":"folder-console","-ps5":"folder-console","-public":"folder-public","-public_html":"folder-views","-pwa":"folder-client","-pycache":"folder-python","-pytest_cache":"folder-python","-python":"folder-python","-pytorch":"folder-pytorch","-quasar":"folder-quasar","-queue":"folder-queue","-queues":"folder-queue","-r":"folder-r","-recordings":"folder-audio","-release":"folder-dist","-remote":"folder-connection","-remotes":"folder-connection","-repo":"folder-repository","-report":"folder-resource","-reports":"folder-resource","-repos":"folder-repository","-repositories":"folder-repository","-repository":"folder-repository","-res":"folder-resource","-resolver":"folder-resolver","-resolvers":"folder-resolver","-resource":"folder-resource","-resources":"folder-resource","-restapi":"folder-api","-review":"folder-review","-reviewed":"folder-review","-reviews":"folder-review","-revisal":"folder-review","-revisals":"folder-review","-robot":"folder-robot","-robots":"folder-robot","-router":"folder-routes","-routers":"folder-routes","-routes":"folder-routes","-routing":"folder-routes","-rule":"folder-rules","-rules":"folder-rules","-rust":"folder-rust","-salt":"folder-salt","-saltstack":"folder-salt","-sample":"folder-examples","-sample-data":"folder-examples","-samples":"folder-examples","-sandbox":"folder-sandbox","-sandboxes":"folder-sandbox","-sass":"folder-sass","-scala":"folder-scala","-schema":"folder-class","-schemas":"folder-class","-sconf_temp":"folder-scons","-scons":"folder-scons","-scons_cache":"folder-scons","-screen":"folder-views","-screengrab":"folder-images","-screengrabs":"folder-images","-screens":"folder-views","-screenshot":"folder-images","-screenshots":"folder-images","-script":"folder-scripts","-scripting":"folder-scripts","-scripts":"folder-scripts","-scss":"folder-sass","-secret":"folder-keys","-secrets":"folder-keys","-secure":"folder-secure","-security":"folder-secure","-seed":"folder-seeders","-seeders":"folder-seeders","-seeding":"folder-seeders","-seeds":"folder-seeders","-server":"folder-server","-serverless":"folder-serverless","-serverpackages":"folder-packages","-servers":"folder-server","-service":"folder-controller","-services":"folder-controller","-setting":"folder-config","-settings":"folder-config","-shader":"folder-shader","-shaders":"folder-shader","-shared":"folder-shared","-shop":"folder-cart","-shopping":"folder-cart","-shopping-cart":"folder-cart","-sim":"folder-simulations","-sims":"folder-simulations","-simulation":"folder-simulations","-simulations":"folder-simulations","-site":"folder-public","-sketch":"folder-mock","-sketches":"folder-mock","-skill":"folder-skills","-skills":"folder-skills","-smtp":"folder-mail","-snap":"folder-snapcraft","-snapcraft":"folder-snapcraft","-snapshots":"folder-test","-snippet":"folder-snippet","-snippets":"folder-snippet","-song":"folder-audio","-songs":"folder-audio","-sound":"folder-audio","-sounds":"folder-audio","-source":"folder-src","-sources":"folder-src","-spa":"folder-client","-spec":"folder-test","-specs":"folder-test","-spellcheck":"folder-syntax","-spellcheckers":"folder-syntax","-sql":"folder-database","-src":"folder-src","-src-tauri":"folder-src-tauri","-srcs":"folder-src","-ssl":"folder-secure","-stack":"folder-stack","-stacks":"folder-stack","-start":"folder-home","-static":"folder-resource","-stencil":"folder-stencil","-store":"folder-store","-stores":"folder-store","-stories":"folder-storybook","-storybook":"folder-storybook","-style":"folder-css","-styles":"folder-css","-stylesheet":"folder-css","-stylesheets":"folder-css","-stylus":"folder-stylus","-sublime":"folder-sublime","-submodules":"folder-git","-supabase":"folder-supabase","-svelte":"folder-svelte","-svelte-kit":"folder-svelte","-svg":"folder-svg","-svgs":"folder-svg","-switch":"folder-console","-syntax":"folder-syntax","-syntaxes":"folder-syntax","-table-of-contents":"folder-toc","-target":"folder-target","-taskfile":"folder-taskfile","-taskfiles":"folder-taskfile","-tasks":"folder-tasks","-television":"folder-television","-temp":"folder-temp","-template":"folder-template","-templates":"folder-template","-terraform":"folder-terraform","-test":"folder-test","-testfiles":"folder-test","-testing":"folder-test","-tests":"folder-test","-texture":"folder-images","-textures":"folder-images","-theme":"folder-theme","-themes":"folder-theme","-third-party":"folder-lib","-thirdparty":"folder-lib","-tickets":"folder-tasks","-tls":"folder-secure","-tmp":"folder-temp","-toc":"folder-toc","-token":"folder-keys","-tokens":"folder-keys","-toolbox":"folder-tools","-toolboxes":"folder-tools","-tooling":"folder-tools","-toolkit":"folder-tools","-toolkits":"folder-tools","-tools":"folder-tools","-torch":"folder-pytorch","-transition":"folder-animation","-transitions":"folder-animation","-translate":"folder-i18n","-translation":"folder-i18n","-translations":"folder-i18n","-trash":"folder-trash","-trigger":"folder-trigger","-triggers":"folder-trigger","-ts":"folder-typescript","-turbo":"folder-turborepo","-tv":"folder-television","-tx":"folder-i18n","-typeface":"folder-font","-typefaces":"folder-font","-types":"folder-typescript","-typescript":"folder-typescript","-typings":"folder-typescript","-ubuntu":"folder-linux","-ui":"folder-ui","-unity":"folder-unity","-unix":"folder-linux","-update":"folder-update","-updates":"folder-update","-upgrade":"folder-update","-upgrades":"folder-update","-upload":"folder-upload","-uploads":"folder-upload","-util":"folder-utils","-utilities":"folder-utils","-utility":"folder-utils","-utils":"folder-utils","-ux":"folder-ui","-validation":"folder-rules","-validations":"folder-rules","-validator":"folder-rules","-validators":"folder-rules","-vector":"folder-svg","-vectors":"folder-svg","-vendor":"folder-lib","-vendors":"folder-lib","-venv":"folder-environment","-vercel":"folder-vercel","-verdaccio":"folder-verdaccio","-vid":"folder-video","-video":"folder-video","-videos":"folder-video","-vids":"folder-video","-view":"folder-views","-views":"folder-views","-vm":"folder-vm","-vms":"folder-vm","-voice":"folder-audio","-voices":"folder-audio","-vscode":"folder-vscode","-vscode-test":"folder-vscode","-vue":"folder-vue","-vuepress":"folder-vuepress","-wakatime":"folder-wakatime","-web":"folder-public","-webpack":"folder-webpack","-website":"folder-public","-websites":"folder-public","-widget":"folder-components","-widgets":"folder-components","-wiki":"folder-docs","-win":"folder-windows","-win10":"folder-windows","-win11":"folder-windows","-win32":"folder-windows","-windows":"folder-windows","-windows10":"folder-windows","-windows11":"folder-windows","-windowsnt":"folder-windows","-windowsxp":"folder-windows","-winnt":"folder-windows","-winxp":"folder-windows","-wordpress-org":"folder-wordpress","-wp-content":"folder-wordpress","-wsl":"folder-linux","-www":"folder-public","-wwwroot":"folder-public","-xbox":"folder-console","-xtask":"folder-scripts","-yarn":"folder-yarn","-zeabur":"folder-zeabur","-zed":"folder-zed",".@types":"folder-typescript",".addin":"folder-plugin",".addins":"folder-plugin",".addon":"folder-plugin",".addons":"folder-plugin",".admin":"folder-admin",".admins":"folder-admin",".agent":"folder-robot",".agents":"folder-robot",".android":"folder-android",".angular":"folder-angular",".anim":"folder-animation",".animated":"folder-animation",".animation":"folder-animation",".animations":"folder-animation",".anims":"folder-animation",".ansible":"folder-ansible",".api":"folder-api",".apis":"folder-api",".apollo":"folder-apollo",".apollo-cache":"folder-apollo",".apollo-client":"folder-apollo",".apollo-config":"folder-apollo",".app":"folder-app",".apple":"folder-macos",".application":"folder-app",".applications":"folder-app",".apps":"folder-app",".appwrite":"folder-appwrite",".arc":"folder-archive",".archival":"folder-archive",".archive":"folder-archive",".archives":"folder-archive",".arcs":"folder-archive",".article":"folder-docs",".articles":"folder-docs",".asm":"folder-assembly",".assembly":"folder-assembly",".asset":"folder-resource",".assets":"folder-resource",".astro":"folder-astro",".atom":"folder-atom",".atoms":"folder-atom",".attachment":"folder-attachment",".attachments":"folder-attachment",".aud":"folder-audio",".audio":"folder-audio",".audios":"folder-audio",".auds":"folder-audio",".aurelia_project":"folder-aurelia",".auth":"folder-secure",".authentication":"folder-secure",".auto":"folder-generator",".aws":"folder-aws",".azure":"folder-aws",".azure-pipelines":"folder-azure-pipelines",".azure-pipelines-ci":"folder-azure-pipelines",".back-up":"folder-backup",".back-ups":"folder-backup",".backend":"folder-server",".backends":"folder-server",".backup":"folder-backup",".backups":"folder-backup",".bak":"folder-backup",".baks":"folder-backup",".base":"folder-base",".bases":"folder-base",".batch":"folder-batch",".batches":"folder-batch",".batchs":"folder-batch",".bench":"folder-benchmark",".benches":"folder-benchmark",".benchmark":"folder-benchmark",".benchmarks":"folder-benchmark",".bibliographies":"folder-bibliography",".bibliography":"folder-bibliography",".bicep":"folder-bicep",".bin":"folder-dist",".bkp":"folder-backup",".bkps":"folder-backup",".blender":"folder-blender",".blender-assets":"folder-blender",".blender-files":"folder-blender",".blender-models":"folder-blender",".blender-project":"folder-blender",".bloc":"folder-bloc",".blocs":"folder-bloc",".blog":"folder-docs",".book":"folder-bibliography",".books":"folder-bibliography",".bot":"folder-robot",".bots":"folder-robot",".bower_components":"folder-bower",".browser":"folder-public",".browsers":"folder-public",".build":"folder-dist",".buildkite":"folder-buildkite",".builds":"folder-dist",".built":"folder-dist",".bull":"folder-queue",".cache":"folder-temp",".cached":"folder-temp",".calc":"folder-functions",".calcs":"folder-functions",".calculation":"folder-functions",".calculations":"folder-functions",".cargo":"folder-rust",".cart":"folder-cart",".centos":"folder-linux",".cert":"folder-secure",".certificate":"folder-secure",".certificates":"folder-secure",".certs":"folder-secure",".cfg":"folder-config",".cfgs":"folder-config",".cfn-gen":"folder-generator",".changes":"folder-delta",".changeset":"folder-changesets",".changesets":"folder-changesets",".chat":"folder-messages",".chats":"folder-messages",".ci":"folder-ci",".cipher":"folder-secure",".circleci":"folder-circleci",".cjs":"folder-javascript",".class":"folder-class",".classes":"folder-class",".claude":"folder-claude",".cli":"folder-command",".client":"folder-client",".clients":"folder-client",".cline_docs":"folder-cline",".clis":"folder-command",".cloud-firestore":"folder-firestore",".cloud-functions":"folder-cloud-functions",".cloudflare":"folder-cloudflare",".cloudfunctions":"folder-cloud-functions",".cluster":"folder-cluster",".clusters":"folder-cluster",".cmd":"folder-command",".cobol":"folder-cobol",".code":"folder-src",".color":"folder-theme",".colors":"folder-theme",".colour":"folder-theme",".colours":"folder-theme",".command":"folder-command",".commandline":"folder-command",".commands":"folder-command",".common":"folder-shared",".compiled":"folder-dist",".components":"folder-components",".composable":"folder-functions",".composables":"folder-functions",".concept":"folder-mock",".concepts":"folder-mock",".conf":"folder-config",".config":"folder-config",".configs":"folder-config",".configuration":"folder-config",".configurations":"folder-config",".confs":"folder-config",".connection":"folder-connection",".connections":"folder-connection",".console":"folder-console",".const":"folder-constant",".constant":"folder-constant",".constants":"folder-constant",".consts":"folder-constant",".container":"folder-container",".containers":"folder-container",".content":"folder-content",".contents":"folder-content",".context":"folder-context",".contexts":"folder-context",".contract":"folder-contract",".contract-test":"folder-contract",".contract-testing":"folder-contract",".contract-tests":"folder-contract",".contracts":"folder-contract",".controller":"folder-controller",".controllers":"folder-controller",".controls":"folder-controller",".conversation":"folder-messages",".conversations":"folder-messages",".core":"folder-core",".coverage":"folder-coverage",".crash":"folder-error",".crashes":"folder-error",".crates":"folder-lib",".css":"folder-css",".cts":"folder-typescript",".cubit":"folder-bloc",".cubits":"folder-bloc",".cue":"folder-cue",".cues":"folder-cue",".cursor":"folder-cursor",".custom":"folder-custom",".customs":"folder-custom",".cypher":"folder-secure",".cypress":"folder-cypress",".dal":"folder-dal",".dart":"folder-dart",".dart_tool":"folder-dart",".dart_tools":"folder-dart",".data":"folder-database",".data-access":"folder-dal",".data-access-layer":"folder-dal",".database":"folder-database",".databases":"folder-database",".db":"folder-database",".deb":"folder-linux",".debian":"folder-linux",".debug":"folder-debug",".debugger":"folder-debug",".debugging":"folder-debug",".decorator":"folder-decorators",".decorators":"folder-decorators",".deepin":"folder-linux",".delta":"folder-delta",".deltas":"folder-delta",".demo":"folder-examples",".demos":"folder-examples",".dependencies":"folder-packages",".design":"folder-theme",".designs":"folder-theme",".desktop":"folder-desktop",".devcontainer":"folder-container",".devpackages":"folder-packages",".devtools":"folder-tools",".dialog":"folder-messages",".dialogs":"folder-messages",".diary":"folder-docs",".directive":"folder-directive",".directives":"folder-directive",".display":"folder-desktop",".dist":"folder-dist",".distribution":"folder-dist",".doc":"folder-docs",".docker":"folder-docker",".dockerfiles":"folder-docker",".dockerhub":"folder-docker",".docs":"folder-docs",".document":"folder-docs",".documentation":"folder-docs",".documents":"folder-docs",".download":"folder-download",".downloader":"folder-download",".downloaders":"folder-download",".downloads":"folder-download",".draft":"folder-mock",".drafts":"folder-mock",".drizzle":"folder-drizzle",".ds_store":"folder-macos",".dump":"folder-dump",".dumps":"folder-dump",".e2e":"folder-coverage",".easing":"folder-animation",".easings":"folder-animation",".element":"folder-element",".elements":"folder-element",".email":"folder-mail",".emails":"folder-mail",".enum":"folder-enum",".enums":"folder-enum",".env":"folder-environment",".environment":"folder-environment",".environments":"folder-environment",".envs":"folder-environment",".err":"folder-error",".error":"folder-error",".errors":"folder-error",".errs":"folder-error",".eslint":"folder-eslint",".eslint-config":"folder-eslint",".eslint-configs":"folder-eslint",".eslint-plugin":"folder-eslint",".eslint-plugins":"folder-eslint",".etc":"folder-other",".event":"folder-event",".events":"folder-event",".example":"folder-examples",".examples":"folder-examples",".expo":"folder-expo",".expo-shared":"folder-expo",".export":"folder-export",".exported":"folder-export",".exports":"folder-export",".extension":"folder-plugin",".extensions":"folder-plugin",".external":"folder-lib",".externals":"folder-lib",".extra":"folder-other",".extras":"folder-other",".fastlane":"folder-fastlane",".favicon":"folder-favicon",".favicons":"folder-favicon",".feat":"folder-features",".feats":"folder-features",".feature":"folder-features",".features":"folder-features",".fig":"folder-images",".figs":"folder-images",".figure":"folder-images",".figures":"folder-images",".filter":"folder-filter",".filters":"folder-filter",".firebase":"folder-firebase",".firebase-cloud-functions":"folder-cloud-functions",".firebase-cloudfunctions":"folder-cloud-functions",".firebase-firestore":"folder-firestore",".firestore":"folder-firestore",".fixture":"folder-mock",".fixtures":"folder-mock",".flow-typed":"folder-flow",".flutter":"folder-flutter",".font":"folder-font",".fonts":"folder-font",".forgejo":"folder-forgejo",".form":"folder-form",".forms":"folder-form",".forum":"folder-messages",".fragments":"folder-components",".frontend":"folder-client",".frontends":"folder-client",".func":"folder-functions",".funcs":"folder-functions",".function":"folder-functions",".functions":"folder-functions",".game":"folder-console",".gamemaker":"folder-gamemaker",".gamemaker2":"folder-gamemaker",".games":"folder-console",".gcp":"folder-aws",".gemini":"folder-gemini-ai",".gemini-ai":"folder-gemini-ai",".geminiai":"folder-gemini-ai",".gen":"folder-generator",".generated":"folder-generator",".generator":"folder-generator",".generators":"folder-generator",".gens":"folder-generator",".git":"folder-git",".gitea":"folder-gitea",".githooks":"folder-git",".github":"folder-github",".github/issue_template":"folder-template",".github/pull_request_template":"folder-template",".github/workflows":"folder-gh-workflows",".gitlab":"folder-gitlab",".global":"folder-global",".glsl":"folder-shader",".go":"folder-go",".godot":"folder-godot",".godot-cpp":"folder-godot",".golang":"folder-go",".gql":"folder-graphql",".gradle":"folder-gradle",".graphql":"folder-graphql",".guard":"folder-guard",".guards":"folder-guard",".gui":"folder-ui",".gulp":"folder-gulp",".gulp-tasks":"folder-gulp",".gulpfile.babel.js":"folder-gulp",".gulpfile.js":"folder-gulp",".gulpfile.mjs":"folder-gulp",".gulpfile.ts":"folder-gulp",".gulpfiles":"folder-gulp",".handler":"folder-controller",".handlers":"folder-controller",".helm":"folder-helm",".helmchart":"folder-helm",".helmcharts":"folder-helm",".helper":"folder-helper",".helpers":"folder-helper",".hg":"folder-mercurial",".hgext":"folder-mercurial",".hghooks":"folder-mercurial",".histories":"folder-backup",".history":"folder-backup",".hlsl":"folder-shader",".home":"folder-home",".hook":"folder-hook",".hooks":"folder-hook",".html":"folder-views",".husky":"folder-husky",".i18n":"folder-i18n",".ico":"folder-images",".icon":"folder-images",".icons":"folder-images",".icos":"folder-images",".idea":"folder-intellij",".image":"folder-images",".images":"folder-images",".img":"folder-images",".imgs":"folder-images",".import":"folder-import",".imported":"folder-import",".imports":"folder-import",".in":"folder-input",".inc":"folder-include",".inc64":"folder-include",".include":"folder-include",".includes":"folder-include",".infra":"folder-server",".infrastructure":"folder-server",".input":"folder-input",".inputs":"folder-input",".integration":"folder-connection",".integration-test":"folder-coverage",".integration-tests":"folder-coverage",".integrations":"folder-connection",".interceptor":"folder-interceptor",".interceptors":"folder-interceptor",".interface":"folder-interface",".interfaces":"folder-interface",".internationalization":"folder-i18n",".inventories":"folder-server",".inventory":"folder-server",".io":"folder-input",".ios":"folder-ios",".ipad":"folder-macos",".iphone":"folder-macos",".ipod":"folder-macos",".ipynb":"folder-jupyter",".it":"folder-coverage",".j2":"folder-jinja",".java":"folder-java",".javascript":"folder-javascript",".javascripts":"folder-javascript",".jinja":"folder-jinja",".jinja2":"folder-jinja",".job":"folder-job",".jobs":"folder-job",".js":"folder-javascript",".json":"folder-json",".jsonc":"folder-json",".jsonl":"folder-json",".jsons":"folder-json",".jupyter":"folder-jupyter",".jwt":"folder-keys",".k8s":"folder-kubernetes",".key":"folder-keys",".keys":"folder-keys",".kit":"folder-tools",".kits":"folder-tools",".knowledge":"folder-docs",".kotlin":"folder-kotlin",".kql":"folder-kusto",".kubernetes":"folder-kubernetes",".kusto":"folder-kusto",".l10n":"folder-i18n",".lambda":"folder-functions",".lambdas":"folder-functions",".landing":"folder-home",".lang":"folder-i18n",".langs":"folder-i18n",".language":"folder-i18n",".languages":"folder-i18n",".layout":"folder-layout",".layouts":"folder-layout",".lefthook":"folder-lefthook",".lefthook-local":"folder-lefthook",".less":"folder-less",".lib":"folder-lib",".lib64":"folder-lib",".libraries":"folder-lib",".library":"folder-lib",".libs":"folder-lib",".license":"folder-license",".licenses":"folder-license",".link":"folder-link",".links":"folder-link",".linux":"folder-linux",".linuxbsd":"folder-linux",".liquibase":"folder-liquibase",".locale":"folder-i18n",".locales":"folder-i18n",".localization":"folder-i18n",".log":"folder-log",".logging":"folder-log",".logic":"folder-functions",".logs":"folder-log",".lottie":"folder-lottie",".lottiefiles":"folder-lottie",".lotties":"folder-lottie",".lua":"folder-lua",".luau":"folder-luau",".mac":"folder-macos",".macbook":"folder-macos",".macbook-air":"folder-macos",".macos":"folder-macos",".macosx":"folder-macos",".mail":"folder-mail",".mailers":"folder-mail",".mails":"folder-mail",".main":"folder-home",".manager":"folder-admin",".managers":"folder-admin",".mapping":"folder-mappings",".mappings":"folder-mappings",".markdown":"folder-markdown",".math":"folder-functions",".maths":"folder-functions",".md":"folder-markdown",".measure":"folder-benchmark",".measurement":"folder-benchmark",".measures":"folder-benchmark",".media":"folder-video",".messages":"folder-messages",".messaging":"folder-messages",".meta":"folder-meta",".meta-inf":"folder-config",".metadata":"folder-meta",".metro":"folder-metro",".middleware":"folder-middleware",".middlewares":"folder-middleware",".migration":"folder-migrations",".migrations":"folder-migrations",".mint":"folder-linux",".misc":"folder-other",".miscellaneous":"folder-other",".mjml":"folder-mjml",".mjs":"folder-javascript",".mobile":"folder-mobile",".mobiles":"folder-mobile",".mock":"folder-mock",".mocks":"folder-mock",".mod":"folder-plugin",".modding":"folder-plugin",".model":"folder-class",".models":"folder-class",".moderator":"folder-admin",".moderators":"folder-admin",".mods":"folder-plugin",".module":"folder-plugin",".modules":"folder-plugin",".mojo":"folder-mojo",".molecule":"folder-molecule",".molecules":"folder-molecule",".moon":"folder-moon",".motion":"folder-animation",".motions":"folder-animation",".movie":"folder-video",".movies":"folder-video",".mq":"folder-queue",".mts":"folder-typescript",".music":"folder-audio",".navigation":"folder-routes",".navigations":"folder-routes",".netlify":"folder-netlify",".news":"folder-docs",".next":"folder-next",".nginx":"folder-nginx",".node":"folder-node",".node_modules":"folder-node",".nodejs":"folder-node",".note":"folder-docs",".notebook":"folder-jupyter",".notebooks":"folder-jupyter",".notes":"folder-docs",".now":"folder-vercel",".nuxt":"folder-nuxt",".nyc-output":"folder-coverage",".nyc_output":"folder-coverage",".obsidian":"folder-obsidian",".opencode":"folder-opencode",".option":"folder-config",".options":"folder-config",".organism":"folder-organism",".organisms":"folder-organism",".osx":"folder-macos",".other":"folder-other",".others":"folder-other",".out":"folder-dist",".output":"folder-dist",".outputs":"folder-dist",".package":"folder-packages",".packages":"folder-packages",".pact":"folder-contract",".pacts":"folder-contract",".page":"folder-views",".pages":"folder-views",".palette":"folder-theme",".palettes":"folder-theme",".partial":"folder-include",".partials":"folder-include",".patches":"folder-git",".pdf":"folder-pdf",".pdfs":"folder-pdf",".pdm-build":"folder-pdm",".pdm-plugins":"folder-pdm",".perf":"folder-benchmark",".performance":"folder-benchmark",".phone":"folder-mobile",".phones":"folder-mobile",".photo":"folder-images",".photograph":"folder-images",".photographs":"folder-images",".photos":"folder-images",".php":"folder-php",".phpmailer":"folder-phpmailer",".pic":"folder-images",".pics":"folder-images",".picture":"folder-images",".pictures":"folder-images",".pipe":"folder-pipe",".pipeline":"folder-pipe",".pipelines":"folder-pipe",".pipes":"folder-pipe",".pkg":"folder-packages",".pkgs":"folder-packages",".plastic":"folder-plastic",".playground":"folder-sandbox",".playgrounds":"folder-sandbox",".playlist":"folder-audio",".playlists":"folder-audio",".plugin":"folder-plugin",".plugins":"folder-plugin",".policies":"folder-policy",".policy":"folder-policy",".popos":"folder-linux",".portability":"folder-mobile",".portable":"folder-mobile",".post":"folder-docs",".postman":"folder-postman",".posts":"folder-docs",".powershell":"folder-powershell",".pref":"folder-config",".preference":"folder-config",".preferences":"folder-config",".prefs":"folder-config",".presentation":"folder-ui",".preview":"folder-review",".previews":"folder-review",".prisma":"folder-prisma",".prisma/schema":"folder-prisma",".private":"folder-private",".profiling":"folder-benchmark",".proj":"folder-project",".project":"folder-project",".projects":"folder-project",".projs":"folder-project",".prompt":"folder-prompts",".prompts":"folder-prompts",".properties":"folder-config",".props":"folder-config",".proto":"folder-proto",".protobuf":"folder-proto",".protobufs":"folder-proto",".protos":"folder-proto",".provider":"folder-controller",".providers":"folder-controller",".proxy":"folder-public",".ps":"folder-powershell",".ps1":"folder-powershell",".ps4":"folder-console",".ps5":"folder-console",".public":"folder-public",".public_html":"folder-views",".pwa":"folder-client",".pycache":"folder-python",".pytest_cache":"folder-python",".python":"folder-python",".pytorch":"folder-pytorch",".quasar":"folder-quasar",".queue":"folder-queue",".queues":"folder-queue",".r":"folder-r",".recordings":"folder-audio",".release":"folder-dist",".remote":"folder-connection",".remotes":"folder-connection",".repo":"folder-repository",".report":"folder-resource",".reports":"folder-resource",".repos":"folder-repository",".repositories":"folder-repository",".repository":"folder-repository",".res":"folder-resource",".resolver":"folder-resolver",".resolvers":"folder-resolver",".resource":"folder-resource",".resources":"folder-resource",".restapi":"folder-api",".review":"folder-review",".reviewed":"folder-review",".reviews":"folder-review",".revisal":"folder-review",".revisals":"folder-review",".robot":"folder-robot",".robots":"folder-robot",".router":"folder-routes",".routers":"folder-routes",".routes":"folder-routes",".routing":"folder-routes",".rule":"folder-rules",".rules":"folder-rules",".rust":"folder-rust",".salt":"folder-salt",".saltstack":"folder-salt",".sample":"folder-examples",".sample-data":"folder-examples",".samples":"folder-examples",".sandbox":"folder-sandbox",".sandboxes":"folder-sandbox",".sass":"folder-sass",".scala":"folder-scala",".schema":"folder-class",".schemas":"folder-class",".sconf_temp":"folder-scons",".scons":"folder-scons",".scons_cache":"folder-scons",".screen":"folder-views",".screengrab":"folder-images",".screengrabs":"folder-images",".screens":"folder-views",".screenshot":"folder-images",".screenshots":"folder-images",".script":"folder-scripts",".scripting":"folder-scripts",".scripts":"folder-scripts",".scss":"folder-sass",".secret":"folder-keys",".secrets":"folder-keys",".secure":"folder-secure",".security":"folder-secure",".seed":"folder-seeders",".seeders":"folder-seeders",".seeding":"folder-seeders",".seeds":"folder-seeders",".server":"folder-server",".serverless":"folder-serverless",".serverpackages":"folder-packages",".servers":"folder-server",".service":"folder-controller",".services":"folder-controller",".setting":"folder-config",".settings":"folder-config",".shader":"folder-shader",".shaders":"folder-shader",".shared":"folder-shared",".shop":"folder-cart",".shopping":"folder-cart",".shopping-cart":"folder-cart",".sim":"folder-simulations",".sims":"folder-simulations",".simulation":"folder-simulations",".simulations":"folder-simulations",".site":"folder-public",".sketch":"folder-mock",".sketches":"folder-mock",".skill":"folder-skills",".skills":"folder-skills",".smtp":"folder-mail",".snap":"folder-snapcraft",".snapcraft":"folder-snapcraft",".snapshots":"folder-test",".snippet":"folder-snippet",".snippets":"folder-snippet",".song":"folder-audio",".songs":"folder-audio",".sound":"folder-audio",".sounds":"folder-audio",".source":"folder-src",".sources":"folder-src",".spa":"folder-client",".spec":"folder-test",".specs":"folder-test",".spellcheck":"folder-syntax",".spellcheckers":"folder-syntax",".sql":"folder-database",".src":"folder-src",".src-tauri":"folder-src-tauri",".srcs":"folder-src",".ssl":"folder-secure",".stack":"folder-stack",".stacks":"folder-stack",".start":"folder-home",".static":"folder-resource",".stencil":"folder-stencil",".store":"folder-store",".stores":"folder-store",".stories":"folder-storybook",".storybook":"folder-storybook",".style":"folder-css",".styles":"folder-css",".stylesheet":"folder-css",".stylesheets":"folder-css",".stylus":"folder-stylus",".sublime":"folder-sublime",".submodules":"folder-git",".supabase":"folder-supabase",".svelte":"folder-svelte",".svelte-kit":"folder-svelte",".svg":"folder-svg",".svgs":"folder-svg",".switch":"folder-console",".syntax":"folder-syntax",".syntaxes":"folder-syntax",".table-of-contents":"folder-toc",".target":"folder-target",".taskfile":"folder-taskfile",".taskfiles":"folder-taskfile",".tasks":"folder-tasks",".television":"folder-television",".temp":"folder-temp",".template":"folder-template",".templates":"folder-template",".terraform":"folder-terraform",".test":"folder-test",".testfiles":"folder-test",".testing":"folder-test",".tests":"folder-test",".texture":"folder-images",".textures":"folder-images",".theme":"folder-theme",".themes":"folder-theme",".third-party":"folder-lib",".thirdparty":"folder-lib",".tickets":"folder-tasks",".tls":"folder-secure",".tmp":"folder-temp",".toc":"folder-toc",".token":"folder-keys",".tokens":"folder-keys",".toolbox":"folder-tools",".toolboxes":"folder-tools",".tooling":"folder-tools",".toolkit":"folder-tools",".toolkits":"folder-tools",".tools":"folder-tools",".torch":"folder-pytorch",".transition":"folder-animation",".transitions":"folder-animation",".translate":"folder-i18n",".translation":"folder-i18n",".translations":"folder-i18n",".trash":"folder-trash",".trigger":"folder-trigger",".triggers":"folder-trigger",".ts":"folder-typescript",".turbo":"folder-turborepo",".tv":"folder-television",".tx":"folder-i18n",".typeface":"folder-font",".typefaces":"folder-font",".types":"folder-typescript",".typescript":"folder-typescript",".typings":"folder-typescript",".ubuntu":"folder-linux",".ui":"folder-ui",".unity":"folder-unity",".unix":"folder-linux",".update":"folder-update",".updates":"folder-update",".upgrade":"folder-update",".upgrades":"folder-update",".upload":"folder-upload",".uploads":"folder-upload",".util":"folder-utils",".utilities":"folder-utils",".utility":"folder-utils",".utils":"folder-utils",".ux":"folder-ui",".validation":"folder-rules",".validations":"folder-rules",".validator":"folder-rules",".validators":"folder-rules",".vector":"folder-svg",".vectors":"folder-svg",".vendor":"folder-lib",".vendors":"folder-lib",".venv":"folder-environment",".vercel":"folder-vercel",".verdaccio":"folder-verdaccio",".vid":"folder-video",".video":"folder-video",".videos":"folder-video",".vids":"folder-video",".view":"folder-views",".views":"folder-views",".vm":"folder-vm",".vms":"folder-vm",".voice":"folder-audio",".voices":"folder-audio",".vscode":"folder-vscode",".vscode-test":"folder-vscode",".vue":"folder-vue",".vuepress":"folder-vuepress",".wakatime":"folder-wakatime",".web":"folder-public",".webpack":"folder-webpack",".website":"folder-public",".websites":"folder-public",".widget":"folder-components",".widgets":"folder-components",".wiki":"folder-docs",".win":"folder-windows",".win10":"folder-windows",".win11":"folder-windows",".win32":"folder-windows",".windows":"folder-windows",".windows10":"folder-windows",".windows11":"folder-windows",".windowsnt":"folder-windows",".windowsxp":"folder-windows",".winnt":"folder-windows",".winxp":"folder-windows",".wordpress-org":"folder-wordpress",".wp-content":"folder-wordpress",".wsl":"folder-linux",".www":"folder-public",".wwwroot":"folder-public",".xbox":"folder-console",".xtask":"folder-scripts",".yarn":"folder-yarn",".zeabur":"folder-zeabur",".zed":"folder-zed","@types":"folder-typescript","_@types":"folder-typescript","__@types__":"folder-typescript",__addin__:"folder-plugin",__addins__:"folder-plugin",__addon__:"folder-plugin",__addons__:"folder-plugin",__admin__:"folder-admin",__admins__:"folder-admin",__agent__:"folder-robot",__agents__:"folder-robot",__android__:"folder-android",__angular__:"folder-angular",__anim__:"folder-animation",__animated__:"folder-animation",__animation__:"folder-animation",__animations__:"folder-animation",__anims__:"folder-animation",__ansible__:"folder-ansible",__api__:"folder-api",__apis__:"folder-api","__apollo-cache__":"folder-apollo","__apollo-client__":"folder-apollo","__apollo-config__":"folder-apollo",__apollo__:"folder-apollo",__app__:"folder-app",__apple__:"folder-macos",__application__:"folder-app",__applications__:"folder-app",__apps__:"folder-app",__appwrite__:"folder-appwrite",__arc__:"folder-archive",__archival__:"folder-archive",__archive__:"folder-archive",__archives__:"folder-archive",__arcs__:"folder-archive",__article__:"folder-docs",__articles__:"folder-docs",__asm__:"folder-assembly",__assembly__:"folder-assembly",__asset__:"folder-resource",__assets__:"folder-resource",__astro__:"folder-astro",__atom__:"folder-atom",__atoms__:"folder-atom",__attachment__:"folder-attachment",__attachments__:"folder-attachment",__aud__:"folder-audio",__audio__:"folder-audio",__audios__:"folder-audio",__auds__:"folder-audio",__aurelia_project__:"folder-aurelia",__auth__:"folder-secure",__authentication__:"folder-secure",__auto__:"folder-generator",__aws__:"folder-aws","__azure-pipelines-ci__":"folder-azure-pipelines","__azure-pipelines__":"folder-azure-pipelines",__azure__:"folder-aws","__back-up__":"folder-backup","__back-ups__":"folder-backup",__backend__:"folder-server",__backends__:"folder-server",__backup__:"folder-backup",__backups__:"folder-backup",__bak__:"folder-backup",__baks__:"folder-backup",__base__:"folder-base",__bases__:"folder-base",__batch__:"folder-batch",__batches__:"folder-batch",__batchs__:"folder-batch",__bench__:"folder-benchmark",__benches__:"folder-benchmark",__benchmark__:"folder-benchmark",__benchmarks__:"folder-benchmark",__bibliographies__:"folder-bibliography",__bibliography__:"folder-bibliography",__bicep__:"folder-bicep",__bin__:"folder-dist",__bkp__:"folder-backup",__bkps__:"folder-backup","__blender-assets__":"folder-blender","__blender-files__":"folder-blender","__blender-models__":"folder-blender","__blender-project__":"folder-blender",__blender__:"folder-blender",__bloc__:"folder-bloc",__blocs__:"folder-bloc",__blog__:"folder-docs",__book__:"folder-bibliography",__books__:"folder-bibliography",__bot__:"folder-robot",__bots__:"folder-robot",__bower_components__:"folder-bower",__browser__:"folder-public",__browsers__:"folder-public",__build__:"folder-dist",__buildkite__:"folder-buildkite",__builds__:"folder-dist",__built__:"folder-dist",__bull__:"folder-queue",__cache__:"folder-temp",__cached__:"folder-temp",__calc__:"folder-functions",__calcs__:"folder-functions",__calculation__:"folder-functions",__calculations__:"folder-functions",__cargo__:"folder-rust",__cart__:"folder-cart",__centos__:"folder-linux",__cert__:"folder-secure",__certificate__:"folder-secure",__certificates__:"folder-secure",__certs__:"folder-secure",__cfg__:"folder-config",__cfgs__:"folder-config","__cfn-gen__":"folder-generator",__changes__:"folder-delta",__changeset__:"folder-changesets",__changesets__:"folder-changesets",__chat__:"folder-messages",__chats__:"folder-messages",__ci__:"folder-ci",__cipher__:"folder-secure",__circleci__:"folder-circleci",__cjs__:"folder-javascript",__class__:"folder-class",__classes__:"folder-class",__claude__:"folder-claude",__cli__:"folder-command",__client__:"folder-client",__clients__:"folder-client",__cline_docs__:"folder-cline",__clis__:"folder-command","__cloud-firestore__":"folder-firestore","__cloud-functions__":"folder-cloud-functions",__cloudflare__:"folder-cloudflare",__cloudfunctions__:"folder-cloud-functions",__cluster__:"folder-cluster",__clusters__:"folder-cluster",__cmd__:"folder-command",__cobol__:"folder-cobol",__code__:"folder-src",__color__:"folder-theme",__colors__:"folder-theme",__colour__:"folder-theme",__colours__:"folder-theme",__command__:"folder-command",__commandline__:"folder-command",__commands__:"folder-command",__common__:"folder-shared",__compiled__:"folder-dist",__components__:"folder-components",__composable__:"folder-functions",__composables__:"folder-functions",__concept__:"folder-mock",__concepts__:"folder-mock",__conf__:"folder-config",__config__:"folder-config",__configs__:"folder-config",__configuration__:"folder-config",__configurations__:"folder-config",__confs__:"folder-config",__connection__:"folder-connection",__connections__:"folder-connection",__console__:"folder-console",__const__:"folder-constant",__constant__:"folder-constant",__constants__:"folder-constant",__consts__:"folder-constant",__container__:"folder-container",__containers__:"folder-container",__content__:"folder-content",__contents__:"folder-content",__context__:"folder-context",__contexts__:"folder-context","__contract-test__":"folder-contract","__contract-testing__":"folder-contract","__contract-tests__":"folder-contract",__contract__:"folder-contract",__contracts__:"folder-contract",__controller__:"folder-controller",__controllers__:"folder-controller",__controls__:"folder-controller",__conversation__:"folder-messages",__conversations__:"folder-messages",__core__:"folder-core",__coverage__:"folder-coverage",__crash__:"folder-error",__crashes__:"folder-error",__crates__:"folder-lib",__css__:"folder-css",__cts__:"folder-typescript",__cubit__:"folder-bloc",__cubits__:"folder-bloc",__cue__:"folder-cue",__cues__:"folder-cue",__cursor__:"folder-cursor",__custom__:"folder-custom",__customs__:"folder-custom",__cypher__:"folder-secure",__cypress__:"folder-cypress",__dal__:"folder-dal",__dart__:"folder-dart",__dart_tool__:"folder-dart",__dart_tools__:"folder-dart","__data-access-layer__":"folder-dal","__data-access__":"folder-dal",__data__:"folder-database",__database__:"folder-database",__databases__:"folder-database",__db__:"folder-database",__deb__:"folder-linux",__debian__:"folder-linux",__debug__:"folder-debug",__debugger__:"folder-debug",__debugging__:"folder-debug",__decorator__:"folder-decorators",__decorators__:"folder-decorators",__deepin__:"folder-linux",__delta__:"folder-delta",__deltas__:"folder-delta",__demo__:"folder-examples",__demos__:"folder-examples",__dependencies__:"folder-packages",__design__:"folder-theme",__designs__:"folder-theme",__desktop__:"folder-desktop",__devcontainer__:"folder-container",__devpackages__:"folder-packages",__devtools__:"folder-tools",__dialog__:"folder-messages",__dialogs__:"folder-messages",__diary__:"folder-docs",__directive__:"folder-directive",__directives__:"folder-directive",__display__:"folder-desktop",__dist__:"folder-dist",__distribution__:"folder-dist",__doc__:"folder-docs",__docker__:"folder-docker",__dockerfiles__:"folder-docker",__dockerhub__:"folder-docker",__docs__:"folder-docs",__document__:"folder-docs",__documentation__:"folder-docs",__documents__:"folder-docs",__download__:"folder-download",__downloader__:"folder-download",__downloaders__:"folder-download",__downloads__:"folder-download",__draft__:"folder-mock",__drafts__:"folder-mock",__drizzle__:"folder-drizzle",__ds_store__:"folder-macos",__dump__:"folder-dump",__dumps__:"folder-dump",__e2e__:"folder-coverage",__easing__:"folder-animation",__easings__:"folder-animation",__element__:"folder-element",__elements__:"folder-element",__email__:"folder-mail",__emails__:"folder-mail",__enum__:"folder-enum",__enums__:"folder-enum",__env__:"folder-environment",__environment__:"folder-environment",__environments__:"folder-environment",__envs__:"folder-environment",__err__:"folder-error",__error__:"folder-error",__errors__:"folder-error",__errs__:"folder-error","__eslint-config__":"folder-eslint","__eslint-configs__":"folder-eslint","__eslint-plugin__":"folder-eslint","__eslint-plugins__":"folder-eslint",__eslint__:"folder-eslint",__etc__:"folder-other",__event__:"folder-event",__events__:"folder-event",__example__:"folder-examples",__examples__:"folder-examples","__expo-shared__":"folder-expo",__expo__:"folder-expo",__export__:"folder-export",__exported__:"folder-export",__exports__:"folder-export",__extension__:"folder-plugin",__extensions__:"folder-plugin",__external__:"folder-lib",__externals__:"folder-lib",__extra__:"folder-other",__extras__:"folder-other",__fastlane__:"folder-fastlane",__favicon__:"folder-favicon",__favicons__:"folder-favicon",__feat__:"folder-features",__feats__:"folder-features",__feature__:"folder-features",__features__:"folder-features",__fig__:"folder-images",__figs__:"folder-images",__figure__:"folder-images",__figures__:"folder-images",__filter__:"folder-filter",__filters__:"folder-filter","__firebase-cloud-functions__":"folder-cloud-functions","__firebase-cloudfunctions__":"folder-cloud-functions","__firebase-firestore__":"folder-firestore",__firebase__:"folder-firebase",__firestore__:"folder-firestore",__fixture__:"folder-mock",__fixtures__:"folder-mock","__flow-typed__":"folder-flow",__flutter__:"folder-flutter",__font__:"folder-font",__fonts__:"folder-font",__forgejo__:"folder-forgejo",__form__:"folder-form",__forms__:"folder-form",__forum__:"folder-messages",__fragments__:"folder-components",__frontend__:"folder-client",__frontends__:"folder-client",__func__:"folder-functions",__funcs__:"folder-functions",__function__:"folder-functions",__functions__:"folder-functions",__game__:"folder-console",__gamemaker2__:"folder-gamemaker",__gamemaker__:"folder-gamemaker",__games__:"folder-console",__gcp__:"folder-aws","__gemini-ai__":"folder-gemini-ai",__gemini__:"folder-gemini-ai",__geminiai__:"folder-gemini-ai",__gen__:"folder-generator",__generated__:"folder-generator",__generator__:"folder-generator",__generators__:"folder-generator",__gens__:"folder-generator",__git__:"folder-git",__gitea__:"folder-gitea",__githooks__:"folder-git","__github/issue_template__":"folder-template","__github/pull_request_template__":"folder-template","__github/workflows__":"folder-gh-workflows",__github__:"folder-github",__gitlab__:"folder-gitlab",__global__:"folder-global",__glsl__:"folder-shader",__go__:"folder-go","__godot-cpp__":"folder-godot",__godot__:"folder-godot",__golang__:"folder-go",__gql__:"folder-graphql",__gradle__:"folder-gradle",__graphql__:"folder-graphql",__guard__:"folder-guard",__guards__:"folder-guard",__gui__:"folder-ui","__gulp-tasks__":"folder-gulp",__gulp__:"folder-gulp","__gulpfile.babel.js__":"folder-gulp","__gulpfile.js__":"folder-gulp","__gulpfile.mjs__":"folder-gulp","__gulpfile.ts__":"folder-gulp",__gulpfiles__:"folder-gulp",__handler__:"folder-controller",__handlers__:"folder-controller",__helm__:"folder-helm",__helmchart__:"folder-helm",__helmcharts__:"folder-helm",__helper__:"folder-helper",__helpers__:"folder-helper",__hg__:"folder-mercurial",__hgext__:"folder-mercurial",__hghooks__:"folder-mercurial",__histories__:"folder-backup",__history__:"folder-backup",__hlsl__:"folder-shader",__home__:"folder-home",__hook__:"folder-hook",__hooks__:"folder-hook",__html__:"folder-views",__husky__:"folder-husky",__i18n__:"folder-i18n",__ico__:"folder-images",__icon__:"folder-images",__icons__:"folder-images",__icos__:"folder-images",__idea__:"folder-intellij",__image__:"folder-images",__images__:"folder-images",__img__:"folder-images",__imgs__:"folder-images",__import__:"folder-import",__imported__:"folder-import",__imports__:"folder-import",__in__:"folder-input",__inc64__:"folder-include",__inc__:"folder-include",__include__:"folder-include",__includes__:"folder-include",__infra__:"folder-server",__infrastructure__:"folder-server",__input__:"folder-input",__inputs__:"folder-input","__integration-test__":"folder-coverage","__integration-tests__":"folder-coverage",__integration__:"folder-connection",__integrations__:"folder-connection",__interceptor__:"folder-interceptor",__interceptors__:"folder-interceptor",__interface__:"folder-interface",__interfaces__:"folder-interface",__internationalization__:"folder-i18n",__inventories__:"folder-server",__inventory__:"folder-server",__io__:"folder-input",__ios__:"folder-ios",__ipad__:"folder-macos",__iphone__:"folder-macos",__ipod__:"folder-macos",__ipynb__:"folder-jupyter",__it__:"folder-coverage",__j2__:"folder-jinja",__java__:"folder-java",__javascript__:"folder-javascript",__javascripts__:"folder-javascript",__jinja2__:"folder-jinja",__jinja__:"folder-jinja",__job__:"folder-job",__jobs__:"folder-job",__js__:"folder-javascript",__json__:"folder-json",__jsonc__:"folder-json",__jsonl__:"folder-json",__jsons__:"folder-json",__jupyter__:"folder-jupyter",__jwt__:"folder-keys",__k8s__:"folder-kubernetes",__key__:"folder-keys",__keys__:"folder-keys",__kit__:"folder-tools",__kits__:"folder-tools",__knowledge__:"folder-docs",__kotlin__:"folder-kotlin",__kql__:"folder-kusto",__kubernetes__:"folder-kubernetes",__kusto__:"folder-kusto",__l10n__:"folder-i18n",__lambda__:"folder-functions",__lambdas__:"folder-functions",__landing__:"folder-home",__lang__:"folder-i18n",__langs__:"folder-i18n",__language__:"folder-i18n",__languages__:"folder-i18n",__layout__:"folder-layout",__layouts__:"folder-layout","__lefthook-local__":"folder-lefthook",__lefthook__:"folder-lefthook",__less__:"folder-less",__lib64__:"folder-lib",__lib__:"folder-lib",__libraries__:"folder-lib",__library__:"folder-lib",__libs__:"folder-lib",__license__:"folder-license",__licenses__:"folder-license",__link__:"folder-link",__links__:"folder-link",__linux__:"folder-linux",__linuxbsd__:"folder-linux",__liquibase__:"folder-liquibase",__locale__:"folder-i18n",__locales__:"folder-i18n",__localization__:"folder-i18n",__log__:"folder-log",__logging__:"folder-log",__logic__:"folder-functions",__logs__:"folder-log",__lottie__:"folder-lottie",__lottiefiles__:"folder-lottie",__lotties__:"folder-lottie",__lua__:"folder-lua",__luau__:"folder-luau",__mac__:"folder-macos","__macbook-air__":"folder-macos",__macbook__:"folder-macos",__macos__:"folder-macos",__macosx__:"folder-macos",__mail__:"folder-mail",__mailers__:"folder-mail",__mails__:"folder-mail",__main__:"folder-home",__manager__:"folder-admin",__managers__:"folder-admin",__mapping__:"folder-mappings",__mappings__:"folder-mappings",__markdown__:"folder-markdown",__math__:"folder-functions",__maths__:"folder-functions",__md__:"folder-markdown",__measure__:"folder-benchmark",__measurement__:"folder-benchmark",__measures__:"folder-benchmark",__media__:"folder-video",__messages__:"folder-messages",__messaging__:"folder-messages","__meta-inf__":"folder-config",__meta__:"folder-meta",__metadata__:"folder-meta",__metro__:"folder-metro",__middleware__:"folder-middleware",__middlewares__:"folder-middleware",__migration__:"folder-migrations",__migrations__:"folder-migrations",__mint__:"folder-linux",__misc__:"folder-other",__miscellaneous__:"folder-other",__mjml__:"folder-mjml",__mjs__:"folder-javascript",__mobile__:"folder-mobile",__mobiles__:"folder-mobile",__mock__:"folder-mock",__mocks__:"folder-mock",__mod__:"folder-plugin",__modding__:"folder-plugin",__model__:"folder-class",__models__:"folder-class",__moderator__:"folder-admin",__moderators__:"folder-admin",__mods__:"folder-plugin",__module__:"folder-plugin",__modules__:"folder-plugin",__mojo__:"folder-mojo",__molecule__:"folder-molecule",__molecules__:"folder-molecule",__moon__:"folder-moon",__motion__:"folder-animation",__motions__:"folder-animation",__movie__:"folder-video",__movies__:"folder-video",__mq__:"folder-queue",__mts__:"folder-typescript",__music__:"folder-audio",__navigation__:"folder-routes",__navigations__:"folder-routes",__netlify__:"folder-netlify",__news__:"folder-docs",__next__:"folder-next",__nginx__:"folder-nginx",__node__:"folder-node",__node_modules__:"folder-node",__nodejs__:"folder-node",__note__:"folder-docs",__notebook__:"folder-jupyter",__notebooks__:"folder-jupyter",__notes__:"folder-docs",__now__:"folder-vercel",__nuxt__:"folder-nuxt","__nyc-output__":"folder-coverage",__nyc_output__:"folder-coverage",__obsidian__:"folder-obsidian",__opencode__:"folder-opencode",__option__:"folder-config",__options__:"folder-config",__organism__:"folder-organism",__organisms__:"folder-organism",__osx__:"folder-macos",__other__:"folder-other",__others__:"folder-other",__out__:"folder-dist",__output__:"folder-dist",__outputs__:"folder-dist",__package__:"folder-packages",__packages__:"folder-packages",__pact__:"folder-contract",__pacts__:"folder-contract",__page__:"folder-views",__pages__:"folder-views",__palette__:"folder-theme",__palettes__:"folder-theme",__partial__:"folder-include",__partials__:"folder-include",__patches__:"folder-git",__pdf__:"folder-pdf",__pdfs__:"folder-pdf","__pdm-build__":"folder-pdm","__pdm-plugins__":"folder-pdm",__perf__:"folder-benchmark",__performance__:"folder-benchmark",__phone__:"folder-mobile",__phones__:"folder-mobile",__photo__:"folder-images",__photograph__:"folder-images",__photographs__:"folder-images",__photos__:"folder-images",__php__:"folder-php",__phpmailer__:"folder-phpmailer",__pic__:"folder-images",__pics__:"folder-images",__picture__:"folder-images",__pictures__:"folder-images",__pipe__:"folder-pipe",__pipeline__:"folder-pipe",__pipelines__:"folder-pipe",__pipes__:"folder-pipe",__pkg__:"folder-packages",__pkgs__:"folder-packages",__plastic__:"folder-plastic",__playground__:"folder-sandbox",__playgrounds__:"folder-sandbox",__playlist__:"folder-audio",__playlists__:"folder-audio",__plugin__:"folder-plugin",__plugins__:"folder-plugin",__policies__:"folder-policy",__policy__:"folder-policy",__popos__:"folder-linux",__portability__:"folder-mobile",__portable__:"folder-mobile",__post__:"folder-docs",__postman__:"folder-postman",__posts__:"folder-docs",__powershell__:"folder-powershell",__pref__:"folder-config",__preference__:"folder-config",__preferences__:"folder-config",__prefs__:"folder-config",__presentation__:"folder-ui",__preview__:"folder-review",__previews__:"folder-review","__prisma/schema__":"folder-prisma",__prisma__:"folder-prisma",__private__:"folder-private",__profiling__:"folder-benchmark",__proj__:"folder-project",__project__:"folder-project",__projects__:"folder-project",__projs__:"folder-project",__prompt__:"folder-prompts",__prompts__:"folder-prompts",__properties__:"folder-config",__props__:"folder-config",__protobuf__:"folder-proto",__protobufs__:"folder-proto",__protos__:"folder-proto",__provider__:"folder-controller",__providers__:"folder-controller",__proxy__:"folder-public",__ps1__:"folder-powershell",__ps4__:"folder-console",__ps5__:"folder-console",__ps__:"folder-powershell",__public__:"folder-public",__public_html__:"folder-views",__pwa__:"folder-client",__pycache__:"folder-python",__pytest_cache__:"folder-python",__python__:"folder-python",__pytorch__:"folder-pytorch",__quasar__:"folder-quasar",__queue__:"folder-queue",__queues__:"folder-queue",__r__:"folder-r",__recordings__:"folder-audio",__release__:"folder-dist",__remote__:"folder-connection",__remotes__:"folder-connection",__repo__:"folder-repository",__report__:"folder-resource",__reports__:"folder-resource",__repos__:"folder-repository",__repositories__:"folder-repository",__repository__:"folder-repository",__res__:"folder-resource",__resolver__:"folder-resolver",__resolvers__:"folder-resolver",__resource__:"folder-resource",__resources__:"folder-resource",__restapi__:"folder-api",__review__:"folder-review",__reviewed__:"folder-review",__reviews__:"folder-review",__revisal__:"folder-review",__revisals__:"folder-review",__robot__:"folder-robot",__robots__:"folder-robot",__router__:"folder-routes",__routers__:"folder-routes",__routes__:"folder-routes",__routing__:"folder-routes",__rule__:"folder-rules",__rules__:"folder-rules",__rust__:"folder-rust",__salt__:"folder-salt",__saltstack__:"folder-salt","__sample-data__":"folder-examples",__sample__:"folder-examples",__samples__:"folder-examples",__sandbox__:"folder-sandbox",__sandboxes__:"folder-sandbox",__sass__:"folder-sass",__scala__:"folder-scala",__schema__:"folder-class",__schemas__:"folder-class",__sconf_temp__:"folder-scons",__scons__:"folder-scons",__scons_cache__:"folder-scons",__screen__:"folder-views",__screengrab__:"folder-images",__screengrabs__:"folder-images",__screens__:"folder-views",__screenshot__:"folder-images",__screenshots__:"folder-images",__script__:"folder-scripts",__scripting__:"folder-scripts",__scripts__:"folder-scripts",__scss__:"folder-sass",__secret__:"folder-keys",__secrets__:"folder-keys",__secure__:"folder-secure",__security__:"folder-secure",__seed__:"folder-seeders",__seeders__:"folder-seeders",__seeding__:"folder-seeders",__seeds__:"folder-seeders",__server__:"folder-server",__serverless__:"folder-serverless",__serverpackages__:"folder-packages",__servers__:"folder-server",__service__:"folder-controller",__services__:"folder-controller",__setting__:"folder-config",__settings__:"folder-config",__shader__:"folder-shader",__shaders__:"folder-shader",__shared__:"folder-shared",__shop__:"folder-cart","__shopping-cart__":"folder-cart",__shopping__:"folder-cart",__sim__:"folder-simulations",__sims__:"folder-simulations",__simulation__:"folder-simulations",__simulations__:"folder-simulations",__site__:"folder-public",__sketch__:"folder-mock",__sketches__:"folder-mock",__skill__:"folder-skills",__skills__:"folder-skills",__smtp__:"folder-mail",__snap__:"folder-snapcraft",__snapcraft__:"folder-snapcraft",__snapshots__:"folder-test",__snippet__:"folder-snippet",__snippets__:"folder-snippet",__song__:"folder-audio",__songs__:"folder-audio",__sound__:"folder-audio",__sounds__:"folder-audio",__source__:"folder-src",__sources__:"folder-src",__spa__:"folder-client",__spec__:"folder-test",__specs__:"folder-test",__spellcheck__:"folder-syntax",__spellcheckers__:"folder-syntax",__sql__:"folder-database","__src-tauri__":"folder-src-tauri",__src__:"folder-src",__srcs__:"folder-src",__ssl__:"folder-secure",__stack__:"folder-stack",__stacks__:"folder-stack",__start__:"folder-home",__static__:"folder-resource",__stencil__:"folder-stencil",__store__:"folder-store",__stores__:"folder-store",__stories__:"folder-storybook",__storybook__:"folder-storybook",__style__:"folder-css",__styles__:"folder-css",__stylesheet__:"folder-css",__stylesheets__:"folder-css",__stylus__:"folder-stylus",__sublime__:"folder-sublime",__submodules__:"folder-git",__supabase__:"folder-supabase","__svelte-kit__":"folder-svelte",__svelte__:"folder-svelte",__svg__:"folder-svg",__svgs__:"folder-svg",__switch__:"folder-console",__syntax__:"folder-syntax",__syntaxes__:"folder-syntax","__table-of-contents__":"folder-toc",__target__:"folder-target",__taskfile__:"folder-taskfile",__taskfiles__:"folder-taskfile",__tasks__:"folder-tasks",__television__:"folder-television",__temp__:"folder-temp",__template__:"folder-template",__templates__:"folder-template",__terraform__:"folder-terraform",__test__:"folder-test",__testfiles__:"folder-test",__testing__:"folder-test",__tests__:"folder-test",__texture__:"folder-images",__textures__:"folder-images",__theme__:"folder-theme",__themes__:"folder-theme","__third-party__":"folder-lib",__thirdparty__:"folder-lib",__tickets__:"folder-tasks",__tls__:"folder-secure",__tmp__:"folder-temp",__toc__:"folder-toc",__token__:"folder-keys",__tokens__:"folder-keys",__toolbox__:"folder-tools",__toolboxes__:"folder-tools",__tooling__:"folder-tools",__toolkit__:"folder-tools",__toolkits__:"folder-tools",__tools__:"folder-tools",__torch__:"folder-pytorch",__transition__:"folder-animation",__transitions__:"folder-animation",__translate__:"folder-i18n",__translation__:"folder-i18n",__translations__:"folder-i18n",__trash__:"folder-trash",__trigger__:"folder-trigger",__triggers__:"folder-trigger",__ts__:"folder-typescript",__turbo__:"folder-turborepo",__tv__:"folder-television",__tx__:"folder-i18n",__typeface__:"folder-font",__typefaces__:"folder-font",__types__:"folder-typescript",__typescript__:"folder-typescript",__typings__:"folder-typescript",__ubuntu__:"folder-linux",__ui__:"folder-ui",__unity__:"folder-unity",__unix__:"folder-linux",__update__:"folder-update",__updates__:"folder-update",__upgrade__:"folder-update",__upgrades__:"folder-update",__upload__:"folder-upload",__uploads__:"folder-upload",__util__:"folder-utils",__utilities__:"folder-utils",__utility__:"folder-utils",__utils__:"folder-utils",__ux__:"folder-ui",__validation__:"folder-rules",__validations__:"folder-rules",__validator__:"folder-rules",__validators__:"folder-rules",__vector__:"folder-svg",__vectors__:"folder-svg",__vendor__:"folder-lib",__vendors__:"folder-lib",__venv__:"folder-environment",__vercel__:"folder-vercel",__verdaccio__:"folder-verdaccio",__vid__:"folder-video",__video__:"folder-video",__videos__:"folder-video",__vids__:"folder-video",__view__:"folder-views",__views__:"folder-views",__vm__:"folder-vm",__vms__:"folder-vm",__voice__:"folder-audio",__voices__:"folder-audio","__vscode-test__":"folder-vscode",__vscode__:"folder-vscode",__vue__:"folder-vue",__vuepress__:"folder-vuepress",__wakatime__:"folder-wakatime",__web__:"folder-public",__webpack__:"folder-webpack",__website__:"folder-public",__websites__:"folder-public",__widget__:"folder-components",__widgets__:"folder-components",__wiki__:"folder-docs",__win10__:"folder-windows",__win11__:"folder-windows",__win32__:"folder-windows",__win__:"folder-windows",__windows10__:"folder-windows",__windows11__:"folder-windows",__windows__:"folder-windows",__windowsnt__:"folder-windows",__windowsxp__:"folder-windows",__winnt__:"folder-windows",__winxp__:"folder-windows","__wordpress-org__":"folder-wordpress","__wp-content__":"folder-wordpress",__wsl__:"folder-linux",__www__:"folder-public",__wwwroot__:"folder-public",__xbox__:"folder-console",__xtask__:"folder-scripts",__yarn__:"folder-yarn",__zeabur__:"folder-zeabur",__zed__:"folder-zed",_addin:"folder-plugin",_addins:"folder-plugin",_addon:"folder-plugin",_addons:"folder-plugin",_admin:"folder-admin",_admins:"folder-admin",_agent:"folder-robot",_agents:"folder-robot",_android:"folder-android",_angular:"folder-angular",_anim:"folder-animation",_animated:"folder-animation",_animation:"folder-animation",_animations:"folder-animation",_anims:"folder-animation",_ansible:"folder-ansible",_api:"folder-api",_apis:"folder-api",_apollo:"folder-apollo","_apollo-cache":"folder-apollo","_apollo-client":"folder-apollo","_apollo-config":"folder-apollo",_app:"folder-app",_apple:"folder-macos",_application:"folder-app",_applications:"folder-app",_apps:"folder-app",_appwrite:"folder-appwrite",_arc:"folder-archive",_archival:"folder-archive",_archive:"folder-archive",_archives:"folder-archive",_arcs:"folder-archive",_article:"folder-docs",_articles:"folder-docs",_asm:"folder-assembly",_assembly:"folder-assembly",_asset:"folder-resource",_assets:"folder-resource",_astro:"folder-astro",_atom:"folder-atom",_atoms:"folder-atom",_attachment:"folder-attachment",_attachments:"folder-attachment",_aud:"folder-audio",_audio:"folder-audio",_audios:"folder-audio",_auds:"folder-audio",_aurelia_project:"folder-aurelia",_auth:"folder-secure",_authentication:"folder-secure",_auto:"folder-generator",_aws:"folder-aws",_azure:"folder-aws","_azure-pipelines":"folder-azure-pipelines","_azure-pipelines-ci":"folder-azure-pipelines","_back-up":"folder-backup","_back-ups":"folder-backup",_backend:"folder-server",_backends:"folder-server",_backup:"folder-backup",_backups:"folder-backup",_bak:"folder-backup",_baks:"folder-backup",_base:"folder-base",_bases:"folder-base",_batch:"folder-batch",_batches:"folder-batch",_batchs:"folder-batch",_bench:"folder-benchmark",_benches:"folder-benchmark",_benchmark:"folder-benchmark",_benchmarks:"folder-benchmark",_bibliographies:"folder-bibliography",_bibliography:"folder-bibliography",_bicep:"folder-bicep",_bin:"folder-dist",_bkp:"folder-backup",_bkps:"folder-backup",_blender:"folder-blender","_blender-assets":"folder-blender","_blender-files":"folder-blender","_blender-models":"folder-blender","_blender-project":"folder-blender",_bloc:"folder-bloc",_blocs:"folder-bloc",_blog:"folder-docs",_book:"folder-bibliography",_books:"folder-bibliography",_bot:"folder-robot",_bots:"folder-robot",_bower_components:"folder-bower",_browser:"folder-public",_browsers:"folder-public",_build:"folder-dist",_buildkite:"folder-buildkite",_builds:"folder-dist",_built:"folder-dist",_bull:"folder-queue",_cache:"folder-temp",_cached:"folder-temp",_calc:"folder-functions",_calcs:"folder-functions",_calculation:"folder-functions",_calculations:"folder-functions",_cargo:"folder-rust",_cart:"folder-cart",_centos:"folder-linux",_cert:"folder-secure",_certificate:"folder-secure",_certificates:"folder-secure",_certs:"folder-secure",_cfg:"folder-config",_cfgs:"folder-config","_cfn-gen":"folder-generator",_changes:"folder-delta",_changeset:"folder-changesets",_changesets:"folder-changesets",_chat:"folder-messages",_chats:"folder-messages",_ci:"folder-ci",_cipher:"folder-secure",_circleci:"folder-circleci",_cjs:"folder-javascript",_class:"folder-class",_classes:"folder-class",_claude:"folder-claude",_cli:"folder-command",_client:"folder-client",_clients:"folder-client",_cline_docs:"folder-cline",_clis:"folder-command","_cloud-firestore":"folder-firestore","_cloud-functions":"folder-cloud-functions",_cloudflare:"folder-cloudflare",_cloudfunctions:"folder-cloud-functions",_cluster:"folder-cluster",_clusters:"folder-cluster",_cmd:"folder-command",_cobol:"folder-cobol",_code:"folder-src",_color:"folder-theme",_colors:"folder-theme",_colour:"folder-theme",_colours:"folder-theme",_command:"folder-command",_commandline:"folder-command",_commands:"folder-command",_common:"folder-shared",_compiled:"folder-dist",_components:"folder-components",_composable:"folder-functions",_composables:"folder-functions",_concept:"folder-mock",_concepts:"folder-mock",_conf:"folder-config",_config:"folder-config",_configs:"folder-config",_configuration:"folder-config",_configurations:"folder-config",_confs:"folder-config",_connection:"folder-connection",_connections:"folder-connection",_console:"folder-console",_const:"folder-constant",_constant:"folder-constant",_constants:"folder-constant",_consts:"folder-constant",_container:"folder-container",_containers:"folder-container",_content:"folder-content",_contents:"folder-content",_context:"folder-context",_contexts:"folder-context",_contract:"folder-contract","_contract-test":"folder-contract","_contract-testing":"folder-contract","_contract-tests":"folder-contract",_contracts:"folder-contract",_controller:"folder-controller",_controllers:"folder-controller",_controls:"folder-controller",_conversation:"folder-messages",_conversations:"folder-messages",_core:"folder-core",_coverage:"folder-coverage",_crash:"folder-error",_crashes:"folder-error",_crates:"folder-lib",_css:"folder-css",_cts:"folder-typescript",_cubit:"folder-bloc",_cubits:"folder-bloc",_cue:"folder-cue",_cues:"folder-cue",_cursor:"folder-cursor",_custom:"folder-custom",_customs:"folder-custom",_cypher:"folder-secure",_cypress:"folder-cypress",_dal:"folder-dal",_dart:"folder-dart",_dart_tool:"folder-dart",_dart_tools:"folder-dart",_data:"folder-database","_data-access":"folder-dal","_data-access-layer":"folder-dal",_database:"folder-database",_databases:"folder-database",_db:"folder-database",_deb:"folder-linux",_debian:"folder-linux",_debug:"folder-debug",_debugger:"folder-debug",_debugging:"folder-debug",_decorator:"folder-decorators",_decorators:"folder-decorators",_deepin:"folder-linux",_delta:"folder-delta",_deltas:"folder-delta",_demo:"folder-examples",_demos:"folder-examples",_dependencies:"folder-packages",_design:"folder-theme",_designs:"folder-theme",_desktop:"folder-desktop",_devcontainer:"folder-container",_devpackages:"folder-packages",_devtools:"folder-tools",_dialog:"folder-messages",_dialogs:"folder-messages",_diary:"folder-docs",_directive:"folder-directive",_directives:"folder-directive",_display:"folder-desktop",_dist:"folder-dist",_distribution:"folder-dist",_doc:"folder-docs",_docker:"folder-docker",_dockerfiles:"folder-docker",_dockerhub:"folder-docker",_docs:"folder-docs",_document:"folder-docs",_documentation:"folder-docs",_documents:"folder-docs",_download:"folder-download",_downloader:"folder-download",_downloaders:"folder-download",_downloads:"folder-download",_draft:"folder-mock",_drafts:"folder-mock",_drizzle:"folder-drizzle",_ds_store:"folder-macos",_dump:"folder-dump",_dumps:"folder-dump",_e2e:"folder-coverage",_easing:"folder-animation",_easings:"folder-animation",_element:"folder-element",_elements:"folder-element",_email:"folder-mail",_emails:"folder-mail",_enum:"folder-enum",_enums:"folder-enum",_env:"folder-environment",_environment:"folder-environment",_environments:"folder-environment",_envs:"folder-environment",_err:"folder-error",_error:"folder-error",_errors:"folder-error",_errs:"folder-error",_eslint:"folder-eslint","_eslint-config":"folder-eslint","_eslint-configs":"folder-eslint","_eslint-plugin":"folder-eslint","_eslint-plugins":"folder-eslint",_etc:"folder-other",_event:"folder-event",_events:"folder-event",_example:"folder-examples",_examples:"folder-examples",_expo:"folder-expo","_expo-shared":"folder-expo",_export:"folder-export",_exported:"folder-export",_exports:"folder-export",_extension:"folder-plugin",_extensions:"folder-plugin",_external:"folder-lib",_externals:"folder-lib",_extra:"folder-other",_extras:"folder-other",_fastlane:"folder-fastlane",_favicon:"folder-favicon",_favicons:"folder-favicon",_feat:"folder-features",_feats:"folder-features",_feature:"folder-features",_features:"folder-features",_fig:"folder-images",_figs:"folder-images",_figure:"folder-images",_figures:"folder-images",_filter:"folder-filter",_filters:"folder-filter",_firebase:"folder-firebase","_firebase-cloud-functions":"folder-cloud-functions","_firebase-cloudfunctions":"folder-cloud-functions","_firebase-firestore":"folder-firestore",_firestore:"folder-firestore",_fixture:"folder-mock",_fixtures:"folder-mock","_flow-typed":"folder-flow",_flutter:"folder-flutter",_font:"folder-font",_fonts:"folder-font",_forgejo:"folder-forgejo",_form:"folder-form",_forms:"folder-form",_forum:"folder-messages",_fragments:"folder-components",_frontend:"folder-client",_frontends:"folder-client",_func:"folder-functions",_funcs:"folder-functions",_function:"folder-functions",_functions:"folder-functions",_game:"folder-console",_gamemaker:"folder-gamemaker",_gamemaker2:"folder-gamemaker",_games:"folder-console",_gcp:"folder-aws",_gemini:"folder-gemini-ai","_gemini-ai":"folder-gemini-ai",_geminiai:"folder-gemini-ai",_gen:"folder-generator",_generated:"folder-generator",_generator:"folder-generator",_generators:"folder-generator",_gens:"folder-generator",_git:"folder-git",_gitea:"folder-gitea",_githooks:"folder-git",_github:"folder-github","_github/issue_template":"folder-template","_github/pull_request_template":"folder-template","_github/workflows":"folder-gh-workflows",_gitlab:"folder-gitlab",_global:"folder-global",_glsl:"folder-shader",_go:"folder-go",_godot:"folder-godot","_godot-cpp":"folder-godot",_golang:"folder-go",_gql:"folder-graphql",_gradle:"folder-gradle",_graphql:"folder-graphql",_guard:"folder-guard",_guards:"folder-guard",_gui:"folder-ui",_gulp:"folder-gulp","_gulp-tasks":"folder-gulp","_gulpfile.babel.js":"folder-gulp","_gulpfile.js":"folder-gulp","_gulpfile.mjs":"folder-gulp","_gulpfile.ts":"folder-gulp",_gulpfiles:"folder-gulp",_handler:"folder-controller",_handlers:"folder-controller",_helm:"folder-helm",_helmchart:"folder-helm",_helmcharts:"folder-helm",_helper:"folder-helper",_helpers:"folder-helper",_hg:"folder-mercurial",_hgext:"folder-mercurial",_hghooks:"folder-mercurial",_histories:"folder-backup",_history:"folder-backup",_hlsl:"folder-shader",_home:"folder-home",_hook:"folder-hook",_hooks:"folder-hook",_html:"folder-views",_husky:"folder-husky",_i18n:"folder-i18n",_ico:"folder-images",_icon:"folder-images",_icons:"folder-images",_icos:"folder-images",_idea:"folder-intellij",_image:"folder-images",_images:"folder-images",_img:"folder-images",_imgs:"folder-images",_import:"folder-import",_imported:"folder-import",_imports:"folder-import",_in:"folder-input",_inc:"folder-include",_inc64:"folder-include",_include:"folder-include",_includes:"folder-include",_infra:"folder-server",_infrastructure:"folder-server",_input:"folder-input",_inputs:"folder-input",_integration:"folder-connection","_integration-test":"folder-coverage","_integration-tests":"folder-coverage",_integrations:"folder-connection",_interceptor:"folder-interceptor",_interceptors:"folder-interceptor",_interface:"folder-interface",_interfaces:"folder-interface",_internationalization:"folder-i18n",_inventories:"folder-server",_inventory:"folder-server",_io:"folder-input",_ios:"folder-ios",_ipad:"folder-macos",_iphone:"folder-macos",_ipod:"folder-macos",_ipynb:"folder-jupyter",_it:"folder-coverage",_j2:"folder-jinja",_java:"folder-java",_javascript:"folder-javascript",_javascripts:"folder-javascript",_jinja:"folder-jinja",_jinja2:"folder-jinja",_job:"folder-job",_jobs:"folder-job",_js:"folder-javascript",_json:"folder-json",_jsonc:"folder-json",_jsonl:"folder-json",_jsons:"folder-json",_jupyter:"folder-jupyter",_jwt:"folder-keys",_k8s:"folder-kubernetes",_key:"folder-keys",_keys:"folder-keys",_kit:"folder-tools",_kits:"folder-tools",_knowledge:"folder-docs",_kotlin:"folder-kotlin",_kql:"folder-kusto",_kubernetes:"folder-kubernetes",_kusto:"folder-kusto",_l10n:"folder-i18n",_lambda:"folder-functions",_lambdas:"folder-functions",_landing:"folder-home",_lang:"folder-i18n",_langs:"folder-i18n",_language:"folder-i18n",_languages:"folder-i18n",_layout:"folder-layout",_layouts:"folder-layout",_lefthook:"folder-lefthook","_lefthook-local":"folder-lefthook",_less:"folder-less",_lib:"folder-lib",_lib64:"folder-lib",_libraries:"folder-lib",_library:"folder-lib",_libs:"folder-lib",_license:"folder-license",_licenses:"folder-license",_link:"folder-link",_links:"folder-link",_linux:"folder-linux",_linuxbsd:"folder-linux",_liquibase:"folder-liquibase",_locale:"folder-i18n",_locales:"folder-i18n",_localization:"folder-i18n",_log:"folder-log",_logging:"folder-log",_logic:"folder-functions",_logs:"folder-log",_lottie:"folder-lottie",_lottiefiles:"folder-lottie",_lotties:"folder-lottie",_lua:"folder-lua",_luau:"folder-luau",_mac:"folder-macos",_macbook:"folder-macos","_macbook-air":"folder-macos",_macos:"folder-macos",_macosx:"folder-macos",_mail:"folder-mail",_mailers:"folder-mail",_mails:"folder-mail",_main:"folder-home",_manager:"folder-admin",_managers:"folder-admin",_mapping:"folder-mappings",_mappings:"folder-mappings",_markdown:"folder-markdown",_math:"folder-functions",_maths:"folder-functions",_md:"folder-markdown",_measure:"folder-benchmark",_measurement:"folder-benchmark",_measures:"folder-benchmark",_media:"folder-video",_messages:"folder-messages",_messaging:"folder-messages",_meta:"folder-meta","_meta-inf":"folder-config",_metadata:"folder-meta",_metro:"folder-metro",_middleware:"folder-middleware",_middlewares:"folder-middleware",_migration:"folder-migrations",_migrations:"folder-migrations",_mint:"folder-linux",_misc:"folder-other",_miscellaneous:"folder-other",_mjml:"folder-mjml",_mjs:"folder-javascript",_mobile:"folder-mobile",_mobiles:"folder-mobile",_mock:"folder-mock",_mocks:"folder-mock",_mod:"folder-plugin",_modding:"folder-plugin",_model:"folder-class",_models:"folder-class",_moderator:"folder-admin",_moderators:"folder-admin",_mods:"folder-plugin",_module:"folder-plugin",_modules:"folder-plugin",_mojo:"folder-mojo",_molecule:"folder-molecule",_molecules:"folder-molecule",_moon:"folder-moon",_motion:"folder-animation",_motions:"folder-animation",_movie:"folder-video",_movies:"folder-video",_mq:"folder-queue",_mts:"folder-typescript",_music:"folder-audio",_navigation:"folder-routes",_navigations:"folder-routes",_netlify:"folder-netlify",_news:"folder-docs",_next:"folder-next",_nginx:"folder-nginx",_node:"folder-node",_node_modules:"folder-node",_nodejs:"folder-node",_note:"folder-docs",_notebook:"folder-jupyter",_notebooks:"folder-jupyter",_notes:"folder-docs",_now:"folder-vercel",_nuxt:"folder-nuxt","_nyc-output":"folder-coverage",_nyc_output:"folder-coverage",_obsidian:"folder-obsidian",_opencode:"folder-opencode",_option:"folder-config",_options:"folder-config",_organism:"folder-organism",_organisms:"folder-organism",_osx:"folder-macos",_other:"folder-other",_others:"folder-other",_out:"folder-dist",_output:"folder-dist",_outputs:"folder-dist",_package:"folder-packages",_packages:"folder-packages",_pact:"folder-contract",_pacts:"folder-contract",_page:"folder-views",_pages:"folder-views",_palette:"folder-theme",_palettes:"folder-theme",_partial:"folder-include",_partials:"folder-include",_patches:"folder-git",_pdf:"folder-pdf",_pdfs:"folder-pdf","_pdm-build":"folder-pdm","_pdm-plugins":"folder-pdm",_perf:"folder-benchmark",_performance:"folder-benchmark",_phone:"folder-mobile",_phones:"folder-mobile",_photo:"folder-images",_photograph:"folder-images",_photographs:"folder-images",_photos:"folder-images",_php:"folder-php",_phpmailer:"folder-phpmailer",_pic:"folder-images",_pics:"folder-images",_picture:"folder-images",_pictures:"folder-images",_pipe:"folder-pipe",_pipeline:"folder-pipe",_pipelines:"folder-pipe",_pipes:"folder-pipe",_pkg:"folder-packages",_pkgs:"folder-packages",_plastic:"folder-plastic",_playground:"folder-sandbox",_playgrounds:"folder-sandbox",_playlist:"folder-audio",_playlists:"folder-audio",_plugin:"folder-plugin",_plugins:"folder-plugin",_policies:"folder-policy",_policy:"folder-policy",_popos:"folder-linux",_portability:"folder-mobile",_portable:"folder-mobile",_post:"folder-docs",_postman:"folder-postman",_posts:"folder-docs",_powershell:"folder-powershell",_pref:"folder-config",_preference:"folder-config",_preferences:"folder-config",_prefs:"folder-config",_presentation:"folder-ui",_preview:"folder-review",_previews:"folder-review",_prisma:"folder-prisma","_prisma/schema":"folder-prisma",_private:"folder-private",_profiling:"folder-benchmark",_proj:"folder-project",_project:"folder-project",_projects:"folder-project",_projs:"folder-project",_prompt:"folder-prompts",_prompts:"folder-prompts",_properties:"folder-config",_props:"folder-config",_proto:"folder-proto",_protobuf:"folder-proto",_protobufs:"folder-proto",_protos:"folder-proto",_provider:"folder-controller",_providers:"folder-controller",_proxy:"folder-public",_ps:"folder-powershell",_ps1:"folder-powershell",_ps4:"folder-console",_ps5:"folder-console",_public:"folder-public",_public_html:"folder-views",_pwa:"folder-client",_pycache:"folder-python",_pytest_cache:"folder-python",_python:"folder-python",_pytorch:"folder-pytorch",_quasar:"folder-quasar",_queue:"folder-queue",_queues:"folder-queue",_r:"folder-r",_recordings:"folder-audio",_release:"folder-dist",_remote:"folder-connection",_remotes:"folder-connection",_repo:"folder-repository",_report:"folder-resource",_reports:"folder-resource",_repos:"folder-repository",_repositories:"folder-repository",_repository:"folder-repository",_res:"folder-resource",_resolver:"folder-resolver",_resolvers:"folder-resolver",_resource:"folder-resource",_resources:"folder-resource",_restapi:"folder-api",_review:"folder-review",_reviewed:"folder-review",_reviews:"folder-review",_revisal:"folder-review",_revisals:"folder-review",_robot:"folder-robot",_robots:"folder-robot",_router:"folder-routes",_routers:"folder-routes",_routes:"folder-routes",_routing:"folder-routes",_rule:"folder-rules",_rules:"folder-rules",_rust:"folder-rust",_salt:"folder-salt",_saltstack:"folder-salt",_sample:"folder-examples","_sample-data":"folder-examples",_samples:"folder-examples",_sandbox:"folder-sandbox",_sandboxes:"folder-sandbox",_sass:"folder-sass",_scala:"folder-scala",_schema:"folder-class",_schemas:"folder-class",_sconf_temp:"folder-scons",_scons:"folder-scons",_scons_cache:"folder-scons",_screen:"folder-views",_screengrab:"folder-images",_screengrabs:"folder-images",_screens:"folder-views",_screenshot:"folder-images",_screenshots:"folder-images",_script:"folder-scripts",_scripting:"folder-scripts",_scripts:"folder-scripts",_scss:"folder-sass",_secret:"folder-keys",_secrets:"folder-keys",_secure:"folder-secure",_security:"folder-secure",_seed:"folder-seeders",_seeders:"folder-seeders",_seeding:"folder-seeders",_seeds:"folder-seeders",_server:"folder-server",_serverless:"folder-serverless",_serverpackages:"folder-packages",_servers:"folder-server",_service:"folder-controller",_services:"folder-controller",_setting:"folder-config",_settings:"folder-config",_shader:"folder-shader",_shaders:"folder-shader",_shared:"folder-shared",_shop:"folder-cart",_shopping:"folder-cart","_shopping-cart":"folder-cart",_sim:"folder-simulations",_sims:"folder-simulations",_simulation:"folder-simulations",_simulations:"folder-simulations",_site:"folder-public",_sketch:"folder-mock",_sketches:"folder-mock",_skill:"folder-skills",_skills:"folder-skills",_smtp:"folder-mail",_snap:"folder-snapcraft",_snapcraft:"folder-snapcraft",_snapshots:"folder-test",_snippet:"folder-snippet",_snippets:"folder-snippet",_song:"folder-audio",_songs:"folder-audio",_sound:"folder-audio",_sounds:"folder-audio",_source:"folder-src",_sources:"folder-src",_spa:"folder-client",_spec:"folder-test",_specs:"folder-test",_spellcheck:"folder-syntax",_spellcheckers:"folder-syntax",_sql:"folder-database",_src:"folder-src","_src-tauri":"folder-src-tauri",_srcs:"folder-src",_ssl:"folder-secure",_stack:"folder-stack",_stacks:"folder-stack",_start:"folder-home",_static:"folder-resource",_stencil:"folder-stencil",_store:"folder-store",_stores:"folder-store",_stories:"folder-storybook",_storybook:"folder-storybook",_style:"folder-css",_styles:"folder-css",_stylesheet:"folder-css",_stylesheets:"folder-css",_stylus:"folder-stylus",_sublime:"folder-sublime",_submodules:"folder-git",_supabase:"folder-supabase",_svelte:"folder-svelte","_svelte-kit":"folder-svelte",_svg:"folder-svg",_svgs:"folder-svg",_switch:"folder-console",_syntax:"folder-syntax",_syntaxes:"folder-syntax","_table-of-contents":"folder-toc",_target:"folder-target",_taskfile:"folder-taskfile",_taskfiles:"folder-taskfile",_tasks:"folder-tasks",_television:"folder-television",_temp:"folder-temp",_template:"folder-template",_templates:"folder-template",_terraform:"folder-terraform",_test:"folder-test",_testfiles:"folder-test",_testing:"folder-test",_tests:"folder-test",_texture:"folder-images",_textures:"folder-images",_theme:"folder-theme",_themes:"folder-theme","_third-party":"folder-lib",_thirdparty:"folder-lib",_tickets:"folder-tasks",_tls:"folder-secure",_tmp:"folder-temp",_toc:"folder-toc",_token:"folder-keys",_tokens:"folder-keys",_toolbox:"folder-tools",_toolboxes:"folder-tools",_tooling:"folder-tools",_toolkit:"folder-tools",_toolkits:"folder-tools",_tools:"folder-tools",_torch:"folder-pytorch",_transition:"folder-animation",_transitions:"folder-animation",_translate:"folder-i18n",_translation:"folder-i18n",_translations:"folder-i18n",_trash:"folder-trash",_trigger:"folder-trigger",_triggers:"folder-trigger",_ts:"folder-typescript",_turbo:"folder-turborepo",_tv:"folder-television",_tx:"folder-i18n",_typeface:"folder-font",_typefaces:"folder-font",_types:"folder-typescript",_typescript:"folder-typescript",_typings:"folder-typescript",_ubuntu:"folder-linux",_ui:"folder-ui",_unity:"folder-unity",_unix:"folder-linux",_update:"folder-update",_updates:"folder-update",_upgrade:"folder-update",_upgrades:"folder-update",_upload:"folder-upload",_uploads:"folder-upload",_util:"folder-utils",_utilities:"folder-utils",_utility:"folder-utils",_utils:"folder-utils",_ux:"folder-ui",_validation:"folder-rules",_validations:"folder-rules",_validator:"folder-rules",_validators:"folder-rules",_vector:"folder-svg",_vectors:"folder-svg",_vendor:"folder-lib",_vendors:"folder-lib",_venv:"folder-environment",_vercel:"folder-vercel",_verdaccio:"folder-verdaccio",_vid:"folder-video",_video:"folder-video",_videos:"folder-video",_vids:"folder-video",_view:"folder-views",_views:"folder-views",_vm:"folder-vm",_vms:"folder-vm",_voice:"folder-audio",_voices:"folder-audio",_vscode:"folder-vscode","_vscode-test":"folder-vscode",_vue:"folder-vue",_vuepress:"folder-vuepress",_wakatime:"folder-wakatime",_web:"folder-public",_webpack:"folder-webpack",_website:"folder-public",_websites:"folder-public",_widget:"folder-components",_widgets:"folder-components",_wiki:"folder-docs",_win:"folder-windows",_win10:"folder-windows",_win11:"folder-windows",_win32:"folder-windows",_windows:"folder-windows",_windows10:"folder-windows",_windows11:"folder-windows",_windowsnt:"folder-windows",_windowsxp:"folder-windows",_winnt:"folder-windows",_winxp:"folder-windows","_wordpress-org":"folder-wordpress","_wp-content":"folder-wordpress",_wsl:"folder-linux",_www:"folder-public",_wwwroot:"folder-public",_xbox:"folder-console",_xtask:"folder-scripts",_yarn:"folder-yarn",_zeabur:"folder-zeabur",_zed:"folder-zed",addin:"folder-plugin",addins:"folder-plugin",addon:"folder-plugin",addons:"folder-plugin",admin:"folder-admin",admins:"folder-admin",agent:"folder-robot",agents:"folder-robot",android:"folder-android",angular:"folder-angular",anim:"folder-animation",animated:"folder-animation",animation:"folder-animation",animations:"folder-animation",anims:"folder-animation",ansible:"folder-ansible",api:"folder-api",apis:"folder-api",apollo:"folder-apollo","apollo-cache":"folder-apollo","apollo-client":"folder-apollo","apollo-config":"folder-apollo",app:"folder-app",apple:"folder-macos",application:"folder-app",applications:"folder-app",apps:"folder-app",appwrite:"folder-appwrite",arc:"folder-archive",archival:"folder-archive",archive:"folder-archive",archives:"folder-archive",arcs:"folder-archive",article:"folder-docs",articles:"folder-docs",asm:"folder-assembly",assembly:"folder-assembly",asset:"folder-resource",assets:"folder-resource",astro:"folder-astro",atom:"folder-atom",atoms:"folder-atom",attachment:"folder-attachment",attachments:"folder-attachment",aud:"folder-audio",audio:"folder-audio",audios:"folder-audio",auds:"folder-audio",aurelia_project:"folder-aurelia",auth:"folder-secure",authentication:"folder-secure",auto:"folder-generator",aws:"folder-aws",azure:"folder-aws","azure-pipelines":"folder-azure-pipelines","azure-pipelines-ci":"folder-azure-pipelines","back-up":"folder-backup","back-ups":"folder-backup",backend:"folder-server",backends:"folder-server",backup:"folder-backup",backups:"folder-backup",bak:"folder-backup",baks:"folder-backup",base:"folder-base",bases:"folder-base",batch:"folder-batch",batches:"folder-batch",batchs:"folder-batch",bench:"folder-benchmark",benches:"folder-benchmark",benchmark:"folder-benchmark",benchmarks:"folder-benchmark",bibliographies:"folder-bibliography",bibliography:"folder-bibliography",bicep:"folder-bicep",bin:"folder-dist",bkp:"folder-backup",bkps:"folder-backup",blender:"folder-blender","blender-assets":"folder-blender","blender-files":"folder-blender","blender-models":"folder-blender","blender-project":"folder-blender",bloc:"folder-bloc",blocs:"folder-bloc",blog:"folder-docs",book:"folder-bibliography",books:"folder-bibliography",bot:"folder-robot",bots:"folder-robot",bower_components:"folder-bower",browser:"folder-public",browsers:"folder-public",build:"folder-dist",buildkite:"folder-buildkite",builds:"folder-dist",built:"folder-dist",bull:"folder-queue",cache:"folder-temp",cached:"folder-temp",calc:"folder-functions",calcs:"folder-functions",calculation:"folder-functions",calculations:"folder-functions",cargo:"folder-rust",cart:"folder-cart",centos:"folder-linux",cert:"folder-secure",certificate:"folder-secure",certificates:"folder-secure",certs:"folder-secure",cfg:"folder-config",cfgs:"folder-config","cfn-gen":"folder-generator",changes:"folder-delta",changeset:"folder-changesets",changesets:"folder-changesets",chat:"folder-messages",chats:"folder-messages",ci:"folder-ci",cipher:"folder-secure",circleci:"folder-circleci",cjs:"folder-javascript",class:"folder-class",classes:"folder-class",claude:"folder-claude",cli:"folder-command",client:"folder-client",clients:"folder-client",cline_docs:"folder-cline",clis:"folder-command","cloud-firestore":"folder-firestore","cloud-functions":"folder-cloud-functions",cloudflare:"folder-cloudflare",cloudfunctions:"folder-cloud-functions",cluster:"folder-cluster",clusters:"folder-cluster",cmd:"folder-command",cobol:"folder-cobol",code:"folder-src",color:"folder-theme",colors:"folder-theme",colour:"folder-theme",colours:"folder-theme",command:"folder-command",commandline:"folder-command",commands:"folder-command",common:"folder-shared",compiled:"folder-dist",components:"folder-components",composable:"folder-functions",composables:"folder-functions",concept:"folder-mock",concepts:"folder-mock",conf:"folder-config",config:"folder-config",configs:"folder-config",configuration:"folder-config",configurations:"folder-config",confs:"folder-config",connection:"folder-connection",connections:"folder-connection",console:"folder-console",const:"folder-constant",constant:"folder-constant",constants:"folder-constant",consts:"folder-constant",container:"folder-container",containers:"folder-container",content:"folder-content",contents:"folder-content",context:"folder-context",contexts:"folder-context",contract:"folder-contract","contract-test":"folder-contract","contract-testing":"folder-contract","contract-tests":"folder-contract",contracts:"folder-contract",controller:"folder-controller",controllers:"folder-controller",controls:"folder-controller",conversation:"folder-messages",conversations:"folder-messages",core:"folder-core",coverage:"folder-coverage",crash:"folder-error",crashes:"folder-error",crates:"folder-lib",css:"folder-css",cts:"folder-typescript",cubit:"folder-bloc",cubits:"folder-bloc",cue:"folder-cue",cues:"folder-cue",cursor:"folder-cursor",custom:"folder-custom",customs:"folder-custom",cypher:"folder-secure",cypress:"folder-cypress",dal:"folder-dal",dart:"folder-dart",dart_tool:"folder-dart",dart_tools:"folder-dart",data:"folder-database","data-access":"folder-dal","data-access-layer":"folder-dal",database:"folder-database",databases:"folder-database",db:"folder-database",deb:"folder-linux",debian:"folder-linux",debug:"folder-debug",debugger:"folder-debug",debugging:"folder-debug",decorator:"folder-decorators",decorators:"folder-decorators",deepin:"folder-linux",delta:"folder-delta",deltas:"folder-delta",demo:"folder-examples",demos:"folder-examples",dependencies:"folder-packages",design:"folder-theme",designs:"folder-theme",desktop:"folder-desktop",devcontainer:"folder-container",devpackages:"folder-packages",devtools:"folder-tools",dialog:"folder-messages",dialogs:"folder-messages",diary:"folder-docs",directive:"folder-directive",directives:"folder-directive",display:"folder-desktop",dist:"folder-dist",distribution:"folder-dist",doc:"folder-docs",docker:"folder-docker",dockerfiles:"folder-docker",dockerhub:"folder-docker",docs:"folder-docs",document:"folder-docs",documentation:"folder-docs",documents:"folder-docs",download:"folder-download",downloader:"folder-download",downloaders:"folder-download",downloads:"folder-download",draft:"folder-mock",drafts:"folder-mock",drizzle:"folder-drizzle",ds_store:"folder-macos",dump:"folder-dump",dumps:"folder-dump",e2e:"folder-coverage",easing:"folder-animation",easings:"folder-animation",element:"folder-element",elements:"folder-element",email:"folder-mail",emails:"folder-mail",enum:"folder-enum",enums:"folder-enum",env:"folder-environment",environment:"folder-environment",environments:"folder-environment",envs:"folder-environment",err:"folder-error",error:"folder-error",errors:"folder-error",errs:"folder-error",eslint:"folder-eslint","eslint-config":"folder-eslint","eslint-configs":"folder-eslint","eslint-plugin":"folder-eslint","eslint-plugins":"folder-eslint",etc:"folder-other",event:"folder-event",events:"folder-event",example:"folder-examples",examples:"folder-examples",expo:"folder-expo","expo-shared":"folder-expo",export:"folder-export",exported:"folder-export",exports:"folder-export",extension:"folder-plugin",extensions:"folder-plugin",external:"folder-lib",externals:"folder-lib",extra:"folder-other",extras:"folder-other",fastlane:"folder-fastlane",favicon:"folder-favicon",favicons:"folder-favicon",feat:"folder-features",feats:"folder-features",feature:"folder-features",features:"folder-features",fig:"folder-images",figs:"folder-images",figure:"folder-images",figures:"folder-images",filter:"folder-filter",filters:"folder-filter",firebase:"folder-firebase","firebase-cloud-functions":"folder-cloud-functions","firebase-cloudfunctions":"folder-cloud-functions","firebase-firestore":"folder-firestore",firestore:"folder-firestore",fixture:"folder-mock",fixtures:"folder-mock","flow-typed":"folder-flow",flutter:"folder-flutter",font:"folder-font",fonts:"folder-font",forgejo:"folder-forgejo",form:"folder-form",forms:"folder-form",forum:"folder-messages",fragments:"folder-components",frontend:"folder-client",frontends:"folder-client",func:"folder-functions",funcs:"folder-functions",function:"folder-functions",functions:"folder-functions",game:"folder-console",gamemaker:"folder-gamemaker",gamemaker2:"folder-gamemaker",games:"folder-console",gcp:"folder-aws",gemini:"folder-gemini-ai","gemini-ai":"folder-gemini-ai",geminiai:"folder-gemini-ai",gen:"folder-generator",generated:"folder-generator",generator:"folder-generator",generators:"folder-generator",gens:"folder-generator",git:"folder-git",gitea:"folder-gitea",githooks:"folder-git",github:"folder-github","github/issue_template":"folder-template","github/pull_request_template":"folder-template","github/workflows":"folder-gh-workflows",gitlab:"folder-gitlab",global:"folder-global",glsl:"folder-shader",go:"folder-go",godot:"folder-godot","godot-cpp":"folder-godot",golang:"folder-go",gql:"folder-graphql",gradle:"folder-gradle",graphql:"folder-graphql",guard:"folder-guard",guards:"folder-guard",gui:"folder-ui",gulp:"folder-gulp","gulp-tasks":"folder-gulp","gulpfile.babel.js":"folder-gulp","gulpfile.js":"folder-gulp","gulpfile.mjs":"folder-gulp","gulpfile.ts":"folder-gulp",gulpfiles:"folder-gulp",handler:"folder-controller",handlers:"folder-controller",helm:"folder-helm",helmchart:"folder-helm",helmcharts:"folder-helm",helper:"folder-helper",helpers:"folder-helper",hg:"folder-mercurial",hgext:"folder-mercurial",hghooks:"folder-mercurial",histories:"folder-backup",history:"folder-backup",hlsl:"folder-shader",home:"folder-home",hook:"folder-hook",hooks:"folder-hook",html:"folder-views",husky:"folder-husky",i18n:"folder-i18n",ico:"folder-images",icon:"folder-images",icons:"folder-images",icos:"folder-images",idea:"folder-intellij",image:"folder-images",images:"folder-images",img:"folder-images",imgs:"folder-images",import:"folder-import",imported:"folder-import",imports:"folder-import",in:"folder-input",inc:"folder-include",inc64:"folder-include",include:"folder-include",includes:"folder-include",infra:"folder-server",infrastructure:"folder-server",input:"folder-input",inputs:"folder-input",integration:"folder-connection","integration-test":"folder-coverage","integration-tests":"folder-coverage",integrations:"folder-connection",interceptor:"folder-interceptor",interceptors:"folder-interceptor",interface:"folder-interface",interfaces:"folder-interface",internationalization:"folder-i18n",inventories:"folder-server",inventory:"folder-server",io:"folder-input",ios:"folder-ios",ipad:"folder-macos",iphone:"folder-macos",ipod:"folder-macos",ipynb:"folder-jupyter",it:"folder-coverage",j2:"folder-jinja",java:"folder-java",javascript:"folder-javascript",javascripts:"folder-javascript",jinja:"folder-jinja",jinja2:"folder-jinja",job:"folder-job",jobs:"folder-job",js:"folder-javascript",json:"folder-json",jsonc:"folder-json",jsonl:"folder-json",jsons:"folder-json",jupyter:"folder-jupyter",jwt:"folder-keys",k8s:"folder-kubernetes",key:"folder-keys",keys:"folder-keys",kit:"folder-tools",kits:"folder-tools",knowledge:"folder-docs",kotlin:"folder-kotlin",kql:"folder-kusto",kubernetes:"folder-kubernetes",kusto:"folder-kusto",l10n:"folder-i18n",lambda:"folder-functions",lambdas:"folder-functions",landing:"folder-home",lang:"folder-i18n",langs:"folder-i18n",language:"folder-i18n",languages:"folder-i18n",layout:"folder-layout",layouts:"folder-layout",lefthook:"folder-lefthook","lefthook-local":"folder-lefthook",less:"folder-less",lib:"folder-lib",lib64:"folder-lib",libraries:"folder-lib",library:"folder-lib",libs:"folder-lib",license:"folder-license",licenses:"folder-license",link:"folder-link",links:"folder-link",linux:"folder-linux",linuxbsd:"folder-linux",liquibase:"folder-liquibase",locale:"folder-i18n",locales:"folder-i18n",localization:"folder-i18n",log:"folder-log",logging:"folder-log",logic:"folder-functions",logs:"folder-log",lottie:"folder-lottie",lottiefiles:"folder-lottie",lotties:"folder-lottie",lua:"folder-lua",luau:"folder-luau",mac:"folder-macos",macbook:"folder-macos","macbook-air":"folder-macos",macos:"folder-macos",macosx:"folder-macos",mail:"folder-mail",mailers:"folder-mail",mails:"folder-mail",main:"folder-home",manager:"folder-admin",managers:"folder-admin",mapping:"folder-mappings",mappings:"folder-mappings",markdown:"folder-markdown",math:"folder-functions",maths:"folder-functions",md:"folder-markdown",measure:"folder-benchmark",measurement:"folder-benchmark",measures:"folder-benchmark",media:"folder-video",messages:"folder-messages",messaging:"folder-messages",meta:"folder-meta","meta-inf":"folder-config",metadata:"folder-meta",metro:"folder-metro",middleware:"folder-middleware",middlewares:"folder-middleware",migration:"folder-migrations",migrations:"folder-migrations",mint:"folder-linux",misc:"folder-other",miscellaneous:"folder-other",mjml:"folder-mjml",mjs:"folder-javascript",mobile:"folder-mobile",mobiles:"folder-mobile",mock:"folder-mock",mocks:"folder-mock",mod:"folder-plugin",modding:"folder-plugin",model:"folder-class",models:"folder-class",moderator:"folder-admin",moderators:"folder-admin",mods:"folder-plugin",module:"folder-plugin",modules:"folder-plugin",mojo:"folder-mojo",molecule:"folder-molecule",molecules:"folder-molecule",moon:"folder-moon",motion:"folder-animation",motions:"folder-animation",movie:"folder-video",movies:"folder-video",mq:"folder-queue",mts:"folder-typescript",music:"folder-audio",navigation:"folder-routes",navigations:"folder-routes",netlify:"folder-netlify",news:"folder-docs",next:"folder-next",nginx:"folder-nginx",node:"folder-node",node_modules:"folder-node",nodejs:"folder-node",note:"folder-docs",notebook:"folder-jupyter",notebooks:"folder-jupyter",notes:"folder-docs",now:"folder-vercel",nuxt:"folder-nuxt","nyc-output":"folder-coverage",nyc_output:"folder-coverage",obsidian:"folder-obsidian",opencode:"folder-opencode",option:"folder-config",options:"folder-config",organism:"folder-organism",organisms:"folder-organism",osx:"folder-macos",other:"folder-other",others:"folder-other",out:"folder-dist",output:"folder-dist",outputs:"folder-dist",package:"folder-packages",packages:"folder-packages",pact:"folder-contract",pacts:"folder-contract",page:"folder-views",pages:"folder-views",palette:"folder-theme",palettes:"folder-theme",partial:"folder-include",partials:"folder-include",patches:"folder-git",pdf:"folder-pdf",pdfs:"folder-pdf","pdm-build":"folder-pdm","pdm-plugins":"folder-pdm",perf:"folder-benchmark",performance:"folder-benchmark",phone:"folder-mobile",phones:"folder-mobile",photo:"folder-images",photograph:"folder-images",photographs:"folder-images",photos:"folder-images",php:"folder-php",phpmailer:"folder-phpmailer",pic:"folder-images",pics:"folder-images",picture:"folder-images",pictures:"folder-images",pipe:"folder-pipe",pipeline:"folder-pipe",pipelines:"folder-pipe",pipes:"folder-pipe",pkg:"folder-packages",pkgs:"folder-packages",plastic:"folder-plastic",playground:"folder-sandbox",playgrounds:"folder-sandbox",playlist:"folder-audio",playlists:"folder-audio",plugin:"folder-plugin",plugins:"folder-plugin",policies:"folder-policy",policy:"folder-policy",popos:"folder-linux",portability:"folder-mobile",portable:"folder-mobile",post:"folder-docs",postman:"folder-postman",posts:"folder-docs",powershell:"folder-powershell",pref:"folder-config",preference:"folder-config",preferences:"folder-config",prefs:"folder-config",presentation:"folder-ui",preview:"folder-review",previews:"folder-review",prisma:"folder-prisma","prisma/schema":"folder-prisma",private:"folder-private",profiling:"folder-benchmark",proj:"folder-project",project:"folder-project",projects:"folder-project",projs:"folder-project",prompt:"folder-prompts",prompts:"folder-prompts",properties:"folder-config",props:"folder-config",proto:"folder-proto",protobuf:"folder-proto",protobufs:"folder-proto",protos:"folder-proto",provider:"folder-controller",providers:"folder-controller",proxy:"folder-public",ps:"folder-powershell",ps1:"folder-powershell",ps4:"folder-console",ps5:"folder-console",public:"folder-public",public_html:"folder-views",pwa:"folder-client",pycache:"folder-python",pytest_cache:"folder-python",python:"folder-python",pytorch:"folder-pytorch",quasar:"folder-quasar",queue:"folder-queue",queues:"folder-queue",r:"folder-r",recordings:"folder-audio",release:"folder-dist",remote:"folder-connection",remotes:"folder-connection",repo:"folder-repository",report:"folder-resource",reports:"folder-resource",repos:"folder-repository",repositories:"folder-repository",repository:"folder-repository",res:"folder-resource",resolver:"folder-resolver",resolvers:"folder-resolver",resource:"folder-resource",resources:"folder-resource",restapi:"folder-api",review:"folder-review",reviewed:"folder-review",reviews:"folder-review",revisal:"folder-review",revisals:"folder-review",robot:"folder-robot",robots:"folder-robot",router:"folder-routes",routers:"folder-routes",routes:"folder-routes",routing:"folder-routes",rule:"folder-rules",rules:"folder-rules",rust:"folder-rust",salt:"folder-salt",saltstack:"folder-salt",sample:"folder-examples","sample-data":"folder-examples",samples:"folder-examples",sandbox:"folder-sandbox",sandboxes:"folder-sandbox",sass:"folder-sass",scala:"folder-scala",schema:"folder-class",schemas:"folder-class",sconf_temp:"folder-scons",scons:"folder-scons",scons_cache:"folder-scons",screen:"folder-views",screengrab:"folder-images",screengrabs:"folder-images",screens:"folder-views",screenshot:"folder-images",screenshots:"folder-images",script:"folder-scripts",scripting:"folder-scripts",scripts:"folder-scripts",scss:"folder-sass",secret:"folder-keys",secrets:"folder-keys",secure:"folder-secure",security:"folder-secure",seed:"folder-seeders",seeders:"folder-seeders",seeding:"folder-seeders",seeds:"folder-seeders",server:"folder-server",serverless:"folder-serverless",serverpackages:"folder-packages",servers:"folder-server",service:"folder-controller",services:"folder-controller",setting:"folder-config",settings:"folder-config",shader:"folder-shader",shaders:"folder-shader",shared:"folder-shared",shop:"folder-cart",shopping:"folder-cart","shopping-cart":"folder-cart",sim:"folder-simulations",sims:"folder-simulations",simulation:"folder-simulations",simulations:"folder-simulations",site:"folder-public",sketch:"folder-mock",sketches:"folder-mock",skill:"folder-skills",skills:"folder-skills",smtp:"folder-mail",snap:"folder-snapcraft",snapcraft:"folder-snapcraft",snapshots:"folder-test",snippet:"folder-snippet",snippets:"folder-snippet",song:"folder-audio",songs:"folder-audio",sound:"folder-audio",sounds:"folder-audio",source:"folder-src",sources:"folder-src",spa:"folder-client",spec:"folder-test",specs:"folder-test",spellcheck:"folder-syntax",spellcheckers:"folder-syntax",sql:"folder-database",src:"folder-src","src-tauri":"folder-src-tauri",srcs:"folder-src",ssl:"folder-secure",stack:"folder-stack",stacks:"folder-stack",start:"folder-home",static:"folder-resource",stencil:"folder-stencil",store:"folder-store",stores:"folder-store",stories:"folder-storybook",storybook:"folder-storybook",style:"folder-css",styles:"folder-css",stylesheet:"folder-css",stylesheets:"folder-css",stylus:"folder-stylus",sublime:"folder-sublime",submodules:"folder-git",supabase:"folder-supabase",svelte:"folder-svelte","svelte-kit":"folder-svelte",svg:"folder-svg",svgs:"folder-svg",switch:"folder-console",syntax:"folder-syntax",syntaxes:"folder-syntax","table-of-contents":"folder-toc",target:"folder-target",taskfile:"folder-taskfile",taskfiles:"folder-taskfile",tasks:"folder-tasks",television:"folder-television",temp:"folder-temp",template:"folder-template",templates:"folder-template",terraform:"folder-terraform",test:"folder-test",testfiles:"folder-test",testing:"folder-test",tests:"folder-test",texture:"folder-images",textures:"folder-images",theme:"folder-theme",themes:"folder-theme","third-party":"folder-lib",thirdparty:"folder-lib",tickets:"folder-tasks",tls:"folder-secure",tmp:"folder-temp",toc:"folder-toc",token:"folder-keys",tokens:"folder-keys",toolbox:"folder-tools",toolboxes:"folder-tools",tooling:"folder-tools",toolkit:"folder-tools",toolkits:"folder-tools",tools:"folder-tools",torch:"folder-pytorch",transition:"folder-animation",transitions:"folder-animation",translate:"folder-i18n",translation:"folder-i18n",translations:"folder-i18n",trash:"folder-trash",trigger:"folder-trigger",triggers:"folder-trigger",ts:"folder-typescript",turbo:"folder-turborepo",tv:"folder-television",tx:"folder-i18n",typeface:"folder-font",typefaces:"folder-font",types:"folder-typescript",typescript:"folder-typescript",typings:"folder-typescript",ubuntu:"folder-linux",ui:"folder-ui",unity:"folder-unity",unix:"folder-linux",update:"folder-update",updates:"folder-update",upgrade:"folder-update",upgrades:"folder-update",upload:"folder-upload",uploads:"folder-upload",util:"folder-utils",utilities:"folder-utils",utility:"folder-utils",utils:"folder-utils",ux:"folder-ui",validation:"folder-rules",validations:"folder-rules",validator:"folder-rules",validators:"folder-rules",vector:"folder-svg",vectors:"folder-svg",vendor:"folder-lib",vendors:"folder-lib",venv:"folder-environment",vercel:"folder-vercel",verdaccio:"folder-verdaccio",vid:"folder-video",video:"folder-video",videos:"folder-video",vids:"folder-video",view:"folder-views",views:"folder-views",vm:"folder-vm",vms:"folder-vm",voice:"folder-audio",voices:"folder-audio",vscode:"folder-vscode","vscode-test":"folder-vscode",vue:"folder-vue",vuepress:"folder-vuepress",wakatime:"folder-wakatime",web:"folder-public",webpack:"folder-webpack",website:"folder-public",websites:"folder-public",widget:"folder-components",widgets:"folder-components",wiki:"folder-docs",win:"folder-windows",win10:"folder-windows",win11:"folder-windows",win32:"folder-windows",windows:"folder-windows",windows10:"folder-windows",windows11:"folder-windows",windowsnt:"folder-windows",windowsxp:"folder-windows",winnt:"folder-windows",winxp:"folder-windows","wordpress-org":"folder-wordpress","wp-content":"folder-wordpress",wsl:"folder-linux",www:"folder-public",wwwroot:"folder-public",xbox:"folder-console",xtask:"folder-scripts",yarn:"folder-yarn",zeabur:"folder-zeabur",zed:"folder-zed"},py={".autorc":"auto_light",".browserslistrc":"browserlist_light",".bun-version":"bun_light",".codeclimate.yml":"code-climate_light",".config/releaserc":"semantic-release_light",".config/releaserc.cjs":"semantic-release_light",".config/releaserc.cts":"semantic-release_light",".config/releaserc.js":"semantic-release_light",".config/releaserc.json":"semantic-release_light",".config/releaserc.json5":"semantic-release_light",".config/releaserc.jsonc":"semantic-release_light",".config/releaserc.mjs":"semantic-release_light",".config/releaserc.mts":"semantic-release_light",".config/releaserc.toml":"semantic-release_light",".config/releaserc.ts":"semantic-release_light",".config/releaserc.yaml":"semantic-release_light",".config/releaserc.yml":"semantic-release_light",".config/stylelintrc":"stylelint_light",".config/stylelintrc.cjs":"stylelint_light",".config/stylelintrc.cts":"stylelint_light",".config/stylelintrc.js":"stylelint_light",".config/stylelintrc.json":"stylelint_light",".config/stylelintrc.json5":"stylelint_light",".config/stylelintrc.jsonc":"stylelint_light",".config/stylelintrc.mjs":"stylelint_light",".config/stylelintrc.mts":"stylelint_light",".config/stylelintrc.toml":"stylelint_light",".config/stylelintrc.ts":"stylelint_light",".config/stylelintrc.yaml":"stylelint_light",".config/stylelintrc.yml":"stylelint_light",".copilotignore":"copilot_light",".cursor":"cursor_light",".cursor.json":"cursor_light",".cursorignore":"cursor_light",".cursorindexingignore":"cursor_light",".cursorrc":"cursor_light",".cursorrules":"cursor_light",".drone.yml":"drone_light",".easignore":"expo_light",".nano-staged.cjs":"nano-staged_light",".nano-staged.js":"nano-staged_light",".nano-staged.json":"nano-staged_light",".nano-staged.mjs":"nano-staged_light",".nanostagedrc":"nano-staged_light",".nowignore":"vercel_light",".pnpmfile.cjs":"pnpm_light",".releaserc":"semantic-release_light",".releaserc.cjs":"semantic-release_light",".releaserc.cts":"semantic-release_light",".releaserc.js":"semantic-release_light",".releaserc.json":"semantic-release_light",".releaserc.json5":"semantic-release_light",".releaserc.jsonc":"semantic-release_light",".releaserc.mjs":"semantic-release_light",".releaserc.mts":"semantic-release_light",".releaserc.toml":"semantic-release_light",".releaserc.ts":"semantic-release_light",".releaserc.yaml":"semantic-release_light",".releaserc.yml":"semantic-release_light",".rubocop-todo.yml":"rubocop_light",".rubocop.yml":"rubocop_light",".rubocop_todo.yml":"rubocop_light",".shellcheckrc":"shellcheck_light",".stylelintcache":"stylelint_light",".stylelintignore":"stylelint_light",".stylelintrc":"stylelint_light",".stylelintrc.cjs":"stylelint_light",".stylelintrc.cts":"stylelint_light",".stylelintrc.js":"stylelint_light",".stylelintrc.json":"stylelint_light",".stylelintrc.json5":"stylelint_light",".stylelintrc.jsonc":"stylelint_light",".stylelintrc.mjs":"stylelint_light",".stylelintrc.mts":"stylelint_light",".stylelintrc.toml":"stylelint_light",".stylelintrc.ts":"stylelint_light",".stylelintrc.yaml":"stylelint_light",".stylelintrc.yml":"stylelint_light",".vercelignore":"vercel_light",".wakatime-project":"wakatime_light","auto-config.js":"auto_light","auto-config.json":"auto_light","auto-config.ts":"auto_light","auto-config.yaml":"auto_light","auto-config.yml":"auto_light","auto.config.js":"auto_light","auto.config.ts":"auto_light",browserslist:"browserlist_light","bun.lock":"bun_light","bun.lockb":"bun_light","bunfig.toml":"bun_light","circle.yml":"circleci_light","copilot-instructions.md":"copilot_light","deno.json":"deno_light","deno.jsonc":"deno_light","deno.lock":"deno_light","eas.json":"expo_light",hosts:"hosts_light","jsr.json":"jsr_light","jsr.jsonc":"jsr_light","nano-staged.cjs":"nano-staged_light","nano-staged.js":"nano-staged_light","nano-staged.json":"nano-staged_light","nano-staged.mjs":"nano-staged_light","netlify.json":"netlify_light","netlify.toml":"netlify_light","netlify.yaml":"netlify_light","netlify.yml":"netlify_light","next.config.js":"next_light","next.config.mjs":"next_light","next.config.mts":"next_light","next.config.ts":"next_light","now.json":"vercel_light","openapi.json":"openapi_light","openapi.yaml":"openapi_light","openapi.yml":"openapi_light","opencode.json":"opencode_light","opencode.jsonc":"opencode_light","payload.config.js":"payload_light","payload.config.mjs":"payload_light","payload.config.mts":"payload_light","payload.config.ts":"payload_light","pnpm-lock.yaml":"pnpm_light","pnpm-workspace.yaml":"pnpm_light","release.config.cjs":"semantic-release_light","release.config.cts":"semantic-release_light","release.config.js":"semantic-release_light","release.config.json":"semantic-release_light","release.config.json5":"semantic-release_light","release.config.jsonc":"semantic-release_light","release.config.mjs":"semantic-release_light","release.config.mts":"semantic-release_light","release.config.toml":"semantic-release_light","release.config.ts":"semantic-release_light","release.config.yaml":"semantic-release_light","release.config.yml":"semantic-release_light","remix.config.js":"remix_light","remix.config.ts":"remix_light",sconscript:"scons_light",sconstruct:"scons_light",scsub:"scons_light",shellcheckrc:"shellcheck_light","snowpack.config.cjs":"snowpack_light","snowpack.config.cts":"snowpack_light","snowpack.config.js":"snowpack_light","snowpack.config.json":"snowpack_light","snowpack.config.mjs":"snowpack_light","snowpack.config.mts":"snowpack_light","snowpack.config.ts":"snowpack_light","snowpack.deps.json":"snowpack_light","stitches.config.js":"stitches_light","stitches.config.ts":"stitches_light","stylelint.config.cjs":"stylelint_light","stylelint.config.cts":"stylelint_light","stylelint.config.js":"stylelint_light","stylelint.config.json":"stylelint_light","stylelint.config.json5":"stylelint_light","stylelint.config.jsonc":"stylelint_light","stylelint.config.mjs":"stylelint_light","stylelint.config.mts":"stylelint_light","stylelint.config.toml":"stylelint_light","stylelint.config.ts":"stylelint_light","stylelint.config.yaml":"stylelint_light","stylelint.config.yml":"stylelint_light","turbo.json":"turborepo_light","turbo.jsonc":"turborepo_light","vercel.json":"vercel_light","vercel.ts":"vercel_light","warp.md":"warp_light","zeabur.json":"zeabur_light","zeabur.json5":"zeabur_light","zeabur.jsonc":"zeabur_light","zeabur.toml":"zeabur_light","zeabur.yaml":"zeabur_light","zeabur.yml":"zeabur_light"},HR={".wakatime-project":"wakatime_light",ai:"adobe-illustrator_light",ait:"adobe-illustrator_light",blink:"blink_light",cr:"crystal_light","drone.yml":"drone_light",ecr:"crystal_light",fen:"chess_light",hcl:"hcl_light",huff:"huff_light",iuml:"uml_light",j2:"jinja_light",jinja:"jinja_light","jinja-html":"jinja_light",jinja2:"jinja_light","openapi.json":"openapi_light","openapi.yaml":"openapi_light","openapi.yml":"openapi_light",pgn:"chess_light",plantuml:"uml_light",psb:"adobe-photoshop_light",psd:"adobe-photoshop_light",psdt:"adobe-photoshop_light",pu:"uml_light",puml:"uml_light",tldr:"tldraw_light",tofu:"opentofu_light",toml:"toml_light",verse:"verse_light",wsd:"uml_light",zeabur:"zeabur_light"},hy={"-cursor":"folder-cursor_light","-idea":"folder-intellij_light","-j2":"folder-jinja_light","-jinja":"folder-jinja_light","-jinja2":"folder-jinja_light",".cursor":"folder-cursor_light",".idea":"folder-intellij_light",".j2":"folder-jinja_light",".jinja":"folder-jinja_light",".jinja2":"folder-jinja_light",__cursor__:"folder-cursor_light",__idea__:"folder-intellij_light",__j2__:"folder-jinja_light",__jinja2__:"folder-jinja_light",__jinja__:"folder-jinja_light",_cursor:"folder-cursor_light",_idea:"folder-intellij_light",_j2:"folder-jinja_light",_jinja:"folder-jinja_light",_jinja2:"folder-jinja_light",cursor:"folder-cursor_light",idea:"folder-intellij_light",j2:"folder-jinja_light",jinja:"folder-jinja_light",jinja2:"folder-jinja_light"},my={pug:'',just:'',json:'',playwright:'',xml:'',javascript:'',rocket:'',routing:'',settings:'',typedoc:'',"markdoc-config":'',"astro-config":'',visualstudio:'',"go-mod":'',"python-misc":'',ruff:'',uv:'',scons:'',console:'',excalidraw:'',gradle:'',license:'',unlicense:'',key:'',keystatic:'',ruby:'',gemfile:'',rubocop:'',rspec:'',swift:'',docker:'',latexmk:'',email:'',graphql:'',xaml:'',happo:'',chromatic:'',git:'',lua:'',r:'',dart:'',cmake:'',semgrep:'',"vue-config":'',nuxt:'',harmonix:'',lock:'',angular:'',mjml:'',vercel:'',liara:'',verdaccio:'',payload:'',next:'',remark:'',remix:'',laravel:'',vfl:'',kl:'',postcss:'',posthtml:'',todo:'',cabal:'',http:'',graphcool:'',webpack:'',rstack:'',lynx:'',ionic:'',gulp:'',nodejs:'',npm:'',yarn:'',android:'',tune:'',turborepo:'',babel:'',blitz:'',contributing:'',readme:'',changelog:'',architecture:'',credits:'',authors:'',flow:'',favicon:'',karma:'',bithound:'',svgo:'',appveyor:'',travis:'',codecov:'',sonarcloud:'',protractor:'',fusebox:'',heroku:'',editorconfig:'',bower:'',eslint:'',conduct:'',watchman:'',aurelia:'',auto:'',mocha:'',jenkins:'',firebase:'',rollup:'',hack:'',hardhat:'',stylelint:'',"code-climate":'',prettier:'',renovate:'',apollo:'',nodemon:'',webhint:'',browserlist:'',snyk:'',drone:'',opencode:'',sequelize:'',gatsby:'',wakatime:'',circleci:'',cloudfoundry:'',grunt:'',jest:'',fastlane:'',helm:'',wallaby:'',stencil:'',makefile:'',"semantic-release":'',bitbucket:'',bazel:'',"godot-assets":'',"azure-pipelines":'',vagrant:'',prisma:'',istanbul:'',tailwindcss:'',buildkite:'',netlify:'',svelte:'',nest:'',moon:'',percy:'',gitpod:'',stackblitz:'',codeowners:'',gcp:'',amplify:'',husky:'',tilt:'',capacitor:'',adonis:'',meson:'',commitizen:'',commitlint:'',buck:'',nx:'',dune:'',roadmap:'',nuget:'',stryker:'',modernizr:'',slug:'',stitches:'',nginx:'',minecraft:'',replit:'',duc:'',snowpack:'',quasar:'',dependabot:'',vite:'',vitest:'',velite:'',rolldown:'',lerna:'',windicss:'',textlint:'',vlang:'',sentry:'',contentlayer:'',phpunit:'',"php-cs-fixer":'',robots:'',tsconfig:'',tauri:'',jsconfig:'',maven:'',serverless:'',supabase:'',ember:'',horusec:'',poetry:'',pdm:'',parcel:'',astyle:'',lighthouse:'',svgr:'',rome:'',cypress:'',plop:'',tobimake:'',gleam:'',pnpm:'',gridsome:'',steadybit:'',caddy:'',openapi:'',swagger:'',bun:'',"nano-staged":'',knip:'',taskfile:'',craco:'',mercurial:'',deno:'',plastic:'',typst:'',unocss:'',"ifanr-cloud":'',concourse:'',syncpack:'',werf:'',luau:'',wally:'',panda:'',biome:'',esbuild:'',drizzle:'',puppeteer:'',garden:'',pkl:'',kubernetes:'',phpstan:'',screwdriver:'',snapcraft:'',kcl:'',clangd:'',markdownlint:'',trigger:'',deepsource:'',jsr:'',"coderabbit-ai":'',"gemini-ai":'',taze:'',wxt:'',lefthook:'',label:'',zeabur:'',copilot:'',"pre-commit":'',lintstaged:'',histoire:'',installation:'',"github-sponsors":'',"minecraft-fabric":'',umi:'',"pm2-ecosystem":'',hosts:'',citation:'',xmake:'',wrangler:'',cline:'',packship:'',snakemake:'',hadolint:'',tsdoc:'',oxc:'',claude:'',cursor:'',metro:'',bashly:'',google:'',shellcheck:'',warp:'',skill:'',tsdown:'',appwrite:'',expo:'',slint:'',html:'',markdown:'',blink:'',css:'',sass:'',less:'',json_schema:'',hjson:'',jinja:'',proto:'',prompt:'',sublime:'',simulink:'',quarto:'',twine:'',yaml:'',toml:'',toon:'',image:'',palette:'',react:'',react_ts:'',typescript:'',"typescript-def":'',markdoc:'',markojs:'',astro:'',pdf:'',table:'',vscode:'',varnish:'',database:'',kusto:'',csharp:'',qsharp:'',zip:'',vala:'',zig:'',exe:'',hex:'',java:'',jar:'',javaclass:'',c3:'',c:'',h:'',hip:'',cpp:'',hpp:'',"objective-c":'',"objective-cpp":'',rc:'',go:'',python:'',url:'',powershell:'',word:'',certificate:'',font:'',lib:'',bibliography:'',"bibtex-style":'',dll:'',fsharp:'',arduino:'',tex:'',context:'',"doctex-installer":'',bbx:'',cbx:'',lbx:'',powerpoint:'',video:'',virtual:'',vedic:'',audio:'',coffee:'',document:'',lyric:'',rust:'',raml:'',haskell:'',kotlin:'',otne:'',diff:'',clojure:'',groovy:'',dart_generated:'',actionscript:'',mxml:'',autohotkey:'',flash:'',"adobe-swc":'',swc:'',assembly:'',vue:'',ocaml:'',odin:'',onnx:'',"javascript-map":'',"css-map":'',handlebars:'',perl:'',haxe:'',"test-ts":'',"test-jsx":'',"test-js":'',puppet:'',elixir:'',livescript:'',erlang:'',twig:'',julia:'',elm:'',purescript:'',smarty:'',stylus:'',reason:'',bucklescript:'',merlin:'',verilog:'',mathematica:'',wolframlanguage:'',nunjucks:'',robot:'',solidity:'',autoit:'',haml:'',yang:'',terraform:'',opentofu:'',applescript:'',cake:'',cucumber:'',nim:'',apiblueprint:'',riot:'',coldfusion:'',nix:'',slim:'',restql:'',kivy:'',sbt:'',gitlab:'',figma:'',huff:'',crystal:'',cuda:'',log:'',dotjs:'',ejs:'',processing:'',storybook:'',wepy:'',hcl:'',san:'',quokka:'',django:'',red:'',foxpro:'',i18n:'',webassembly:'',jupyter:'',d:'',mdx:'',mdsvex:'',ballerina:'',racket:'',mint:'',velocity:'',godot:'',azure:'',razor:'',abc:'',asciidoc:'',edge:'',scheme:'',lisp:'',"3d":'',svg:'',"adobe-illustrator":'',"adobe-photoshop":'',vim:'',moonscript:'',advpl:'',disc:'',fortran:'',tcl:'',liquid:'',prolog:'',coconut:'',sketch:'',pawn:'',forth:'',uml:'',dhall:'',sml:'',opam:'',imba:'',drawio:'',pascal:'',unity:'',sas:'',command:'',denizenscript:'',search:'',rescript:'',"rescript-interface":'',brainfuck:'',bicep:'',cobol:'',grain:'',lolcode:'',idris:'',pipeline:'',opa:'',scala:'',lilypond:'',chess:'',gemini:'',php:'',ada:'',coala:'',dinophp:'',teal:'',template:'',shader:'',siyuan:'',ndst:'',tobi:'',capnp:'',tree:'',cadence:'',antlr:'',stylable:'',pinejs:'',gamemaker:'',tldraw:'',mermaid:'',mojo:'',roblox:'',rbxmk:'',spwn:'',templ:'',chrome:'',stan:'',abap:'',lottie:'',"apps-script":'',verified:'',bruno:'',cairo:'',"grafana-alloy":'',freemarker:'',tsil:'',hurl:'',cds:'',verse:'',sway:'',"bench-ts":'',"bench-jsx":'',"bench-js":'',controller:'',"dependencies-update":'',subtitles:'',beancount:'',epub:'',regedit:'',gnuplot:'',coloredpetrinets:'',pytorch:'',blender:'',"vanilla-extract":'',toc:'',cue:'',lean:'',salt:'',macaulay2:'',uiua:'',mrpack:'',"folder-rust":'',"folder-robot":'',"folder-src":'',"folder-dist":'',"folder-css":'',"folder-sass":'',"folder-television":'',"folder-desktop":'',"folder-console":'',"folder-images":'',"folder-scripts":'',"folder-node":'',"folder-javascript":'',"folder-json":'',"folder-font":'',"folder-bower":'',"folder-test":'',"folder-directive":'',"folder-jinja":'',"folder-markdown":'',"folder-pdm":'',"folder-php":'',"folder-phpmailer":'',"folder-sublime":'',"folder-docs":'',"folder-gh-workflows":'',"folder-git":'',"folder-github":'',"folder-gitea":'',"folder-gitlab":'',"folder-forgejo":'',"folder-vscode":'',"folder-views":'',"folder-vue":'',"folder-vuepress":'',"folder-expo":'',"folder-config":'',"folder-i18n":'',"folder-components":'',"folder-verdaccio":'',"folder-aurelia":'',"folder-resource":'',"folder-lib":'',"folder-theme":'',"folder-webpack":'',"folder-global":'',"folder-public":'',"folder-include":'',"folder-docker":'',"folder-nginx":'',"folder-astro":'',"folder-database":'',"folder-migrations":'',"folder-log":'',"folder-target":'',"folder-temp":'',"folder-aws":'',"folder-audio":'',"folder-video":'',"folder-kubernetes":'',"folder-import":'',"folder-export":'',"folder-wakatime":'',"folder-circleci":'',"folder-wordpress":'',"folder-gradle":'',"folder-coverage":'',"folder-class":'',"folder-other":'',"folder-lua":'',"folder-turborepo":'',"folder-typescript":'',"folder-graphql":'',"folder-routes":'',"folder-ci":'',"folder-eslint":'',"folder-benchmark":'',"folder-messages":'',"folder-less":'',"folder-gulp":'',"folder-python":'',"folder-r":'',"folder-sandbox":'',"folder-scons":'',"folder-mojo":'',"folder-moon":'',"folder-debug":'',"folder-fastlane":'',"folder-plugin":'',"folder-middleware":'',"folder-controller":'',"folder-ansible":'',"folder-server":'',"folder-client":'',"folder-tasks":'',"folder-android":'',"folder-ios":'',"folder-ui":'',"folder-upload":'',"folder-download":'',"folder-tools":'',"folder-helper":'',"folder-serverless":'',"folder-api":'',"folder-app":'',"folder-apollo":'',"folder-archive":'',"folder-backup":'',"folder-batch":'',"folder-buildkite":'',"folder-cluster":'',"folder-command":'',"folder-constant":'',"folder-container":'',"folder-content":'',"folder-context":'',"folder-core":'',"folder-delta":'',"folder-dump":'',"folder-examples":'',"folder-environment":'',"folder-functions":'',"folder-generator":'',"folder-hook":'',"folder-trigger":'',"folder-job":'',"folder-keys":'',"folder-layout":'',"folder-mail":'',"folder-mappings":'',"folder-meta":'',"folder-changesets":'',"folder-packages":'',"folder-shared":'',"folder-shader":'',"folder-stack":'',"folder-template":'',"folder-utils":'',"folder-supabase":'',"folder-private":'',"folder-linux":'',"folder-windows":'',"folder-macos":'',"folder-error":'',"folder-event":'',"folder-secure":'',"folder-custom":'',"folder-mock":'',"folder-syntax":'',"folder-vm":'',"folder-stylus":'',"folder-flow":'',"folder-rules":'',"folder-review":'',"folder-animation":'',"folder-guard":'',"folder-prisma":'',"folder-pipe":'',"folder-interceptor":'',"folder-svg":'',"folder-nuxt":'',"folder-terraform":'',"folder-mobile":'',"folder-stencil":'',"folder-firebase":'',"folder-firestore":'',"folder-cloud-functions":'',"folder-svelte":'',"folder-update":'',"folder-intellij":'',"folder-azure-pipelines":'',"folder-mjml":'',"folder-admin":'',"folder-jupyter":'',"folder-scala":'',"folder-connection":'',"folder-quasar":'',"folder-next":'',"folder-dal":'',"folder-cobol":'',"folder-yarn":'',"folder-husky":'',"folder-storybook":'',"folder-base":'',"folder-cart":'',"folder-home":'',"folder-project":'',"folder-prompts":'',"folder-interface":'',"folder-netlify":'',"folder-enum":'',"folder-contract":'',"folder-helm":'',"folder-queue":'',"folder-vercel":'',"folder-cypress":'',"folder-decorators":'',"folder-java":'',"folder-resolver":'',"folder-angular":'',"folder-unity":'',"folder-pdf":'',"folder-proto":'',"folder-plastic":'',"folder-gamemaker":'',"folder-mercurial":'',"folder-godot":'',"folder-lottie":'',"folder-taskfile":'',"folder-drizzle":'',"folder-cloudflare":'',"folder-seeders":'',"folder-store":'',"folder-bicep":'',"folder-snapcraft":'',"folder-flutter":'',"folder-snippet":'',"folder-element":'',"folder-src-tauri":'',"folder-favicon":'',"folder-features":'',"folder-lefthook":'',"folder-bloc":'',"folder-powershell":'',"folder-repository":'',"folder-luau":'',"folder-obsidian":'',"folder-trash":'',"folder-cline":'',"folder-liquibase":'',"folder-dart":'',"folder-zeabur":'',"folder-kusto":'',"folder-policy":'',"folder-attachment":'',"folder-bibliography":'',"folder-link":'',"folder-pytorch":'',"folder-blender":'',"folder-atom":'',"folder-molecule":'',"folder-organism":'',"folder-claude":'',"folder-cursor":'',"folder-gemini-ai":'',"folder-opencode":'',"folder-input":'',"folder-salt":'',"folder-simulations":'',"folder-metro":'',"folder-filter":'',"folder-toc":'',"folder-cue":'',"folder-license":'',"folder-form":'',"folder-postman":'',"folder-skills":'',"folder-zed":'',"folder-appwrite":'',"folder-assembly":'',"folder-go":'',"folder-kotlin":'',file:'',folder:'',scons_light:'',rubocop_light:'',vercel_light:'',payload_light:'',next_light:'',remix_light:'',turborepo_light:'',auto_light:'',stylelint_light:'',"code-climate_light":'',browserlist_light:'',drone_light:'',opencode_light:'',wakatime_light:'',circleci_light:'',"semantic-release_light":'',netlify_light:'',stitches_light:'',snowpack_light:'',pnpm_light:'',openapi_light:'',bun_light:'',"nano-staged_light":'',deno_light:'',jsr_light:'',zeabur_light:'',copilot_light:'',hosts_light:'',cursor_light:'',shellcheck_light:'',warp_light:'',expo_light:'',blink_light:'',jinja_light:'',toml_light:'',opentofu_light:'',huff_light:'',crystal_light:'',hcl_light:'',"adobe-illustrator_light":'',"adobe-photoshop_light":'',uml_light:'',chess_light:'',tldraw_light:'',verse_light:'',"folder-jinja_light":'',"folder-intellij_light":'',"folder-cursor_light":''};function xc(e,t){return Object.hasOwn(e,t)}function Fu(e,t,n,o){const s=e[n];return!o||!xc(t,n)?s:t[n]}function PR(){return typeof window<"u"&&typeof window.matchMedia!="function"?!1:!mm().value}function DR(e,t){const n=e.toLowerCase();if(xc(gf,e))return Fu(gf,py,e,t);if(xc(gf,n))return Fu(gf,py,n,t)}function VR(e,t){const o=e.toLowerCase().split(".");for(let s=1;sn.length>0).at(-1)??e}function qR(e){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,"").replace(/^